tls: mbedtls: append PEM chain certs to leaf so full chain is sent on the wire#3588
Open
precla wants to merge 32 commits into
Open
tls: mbedtls: append PEM chain certs to leaf so full chain is sent on the wire#3588precla wants to merge 32 commits into
precla wants to merge 32 commits into
Conversation
My infrastructure switched to using 6-day LE certs, these in turn switched from the ISRG X1 root CA to their YR CA. After testing I realized this had updated warmcat.com to use 4096-bit RSA, which the ESP32 is too slow to cope with. So I switched again to EC-256 which uses their X2 CA; this patch now switches all the related lws examples to also trust that.
36b13c7 to
a54bc50
Compare
Contributor
Author
8e57b3d to
a686094
Compare
a2e93a1 to
eb5ee93
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issue
Certificate chain within one PEM file is not handled properly when using mbedtls as backend
steps to reproduce:
Link example main.c against static library 'build/lib/libwebsockets.a.':
main.c
save the following certificates:
full_chain.key
full_chain.pem
run the binary and test certificate:
test-chaincan be run with following arguments:"--cert"for the .pem file, default file isfull_chain.pem"--key"for the .key file, default file isfull_chain.key"--port"for a custom port, default port is7681libwebsocket with mbedtls <= 4.3.10:
^ certificate chain is not loaded.
libwebsocket with mbedtls == 4.3.10 + this patch:
^ certificate chain is loaded.
NOTE
i couldn't get the libwebsocket from main branch to load the certificate when mbedtls is used as the backend. so i tested only with v4.3.10 + patch.
I get the following errors when using main branch and the provided .pem + .key file with mbedtls as backend. (same if i use this patch or if i don't use the patch):
with main + openssl it works fine, same for 4.3.10 + openssl.
Co-developed-by: Opus 4.7