Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

libraries/SocketWrapper: Support loading CA certs from the file system.#249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
iabdalkader wants to merge3 commits intoarduino:main
base:main
Choose a base branch
Loading
fromiabdalkader:tls_ca_data

Conversation

@iabdalkader
Copy link

Main changes:

Update CA data:

Use a curated list of certificates that covers most of the Internet. This reduces the certificates size to 20KBs which can be loaded on all boards. The certs file is generated with:https://github.com/arduino/cacert-utils/

Support loading CA certs from the file system.

This patch adds support for automatically loading CA certificates from the filesystem. The file system certs are loaded on the first call to connectSSL(), once, and shared between all sockets.

If filesystem support is not enabled, or CA loading fails, the connection proceeds without error.

Custom CA certificates can still be passed via the 'cert' parameter, and both filesystem and custom certificates are registered with using different TLS tags. This allows users to add their own certs without recreating the whole file.

Testing

Enabled and tested on C33.

Using a curated list of certificates that covers most ofthe Internet. This reduces the certificates size to 20KBswhich can be loaded on all boards.Created with:https://github.com/arduino/cacert-utils/Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This patch adds support for automatically loading CA certificatesfrom the filesystem. The file system certs are loaded on the firstcall to connectSSL(), once, and shared between all sockets.If filesystem support is not enabled, or CA loading fails, theconnection proceeds without error.Custom CA certificates can still be passed via the 'cert' parameter,and both filesystem and custom certificates are registered withusing different TLS tags. This allows users to add their own certswithout recreating the whole file.Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@iabdalkaderiabdalkader changed the titleTls ca dataSupport loading CA certs from the file system.Nov 6, 2025
@iabdalkaderiabdalkader changed the titleSupport loading CA certs from the file system.libraries/SocketWrapper: Support loading CA certs from the file system.Nov 6, 2025
Copy link

@pillo79pillo79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Are the changes to C33 config needed to sync that with other boards, or should these be applied more commonly?

Otherwise LGTM!

@iabdalkader
Copy link
Author

Are the changes to C33 config needed to sync that with other boards, or should these be applied more commonly?

Those options are going to be required by every board and at least 80KBs of heap for mbedtls, if we want to parse and load all of the certificates. I only enabled it for C33 because that's the only one I tested.

Note, I've managed to reduce the certs size from 64KBs to 20KBs withhttps://github.com/arduino/cacert-utils/ the file we have right now needs 140KBs of heap for mbedtls, and at least 64KBs of system heap.

pillo79 reacted with rocket emoji

@iabdalkader
Copy link
Author

@pillo79 Please don't merge this yet, it's not intended for the next release.

@per1234per1234 added the enhancementNew feature or request labelNov 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pillo79pillo79pillo79 approved these changes

@pennampennamAwaiting requested review from pennam

Assignees

No one assigned

Labels

enhancementNew feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@iabdalkader@pillo79@per1234

[8]ページ先頭

©2009-2025 Movatter.jp