-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssl_client1 fails on TLS 1.3 #9072
Comments
Internal error where the TLS layer calls
If you're concerned about that specific site, please try with |
Thanks for helping me @gilles-peskine-arm. After enabling
Since this server works normally on other clients, but the certificate verification is failing on mbedTLS, does it indicate that the root CA certificates chain |
Mbed TLS doesn't ship with any integration to the OS CA list. |
I didn't mean that, of course, mbedTLS doesn't use the OS CA list, instead it uses Just to make me clearer, I just expect to see the certificate validation working properly when using To sum up, using |
Oh, this turns out to be another deficiency in
It's dubious practice in the first place, and in TLS 1.3 we don't allow bypassing server authentication so it doesn't work at all. I've filed #9079 to improve the sample program. So, my previous reply here was wrong for TLS 1.2, but correct for TLS 1.3: you do need to have a matching root CA, not just for real-world code, but also for |
It would have been nice to document the need to call |
Mbed TLS 3.6.1When a TLS connection reaches a point where it might negotiate TLS 1.3, the TLS layer will call Mbed TLS 4.0In Mbed TLS 4.0, all TLS connections will require TestingWe will add an interoperability test between |
@gilles-peskine-arm Did you mean #9501? #9281 doesn't seem to be related to |
Summary
If I attempt to make a request to
https://api.sunrisesunset.io/json?lat=47.333&lng=13.333
using Postman, or a browser, it works perfectly.However, when making an HTTP request using the mbedTLS sample client ssl_client1.c with these parameters:
I got the following error:
What is interesting is that when I force the mbedTLS to use TLS 1.2, instead TLS 1.3 by adding the following:
mbedtls_ssl_conf_max_version(&conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3); // Force TLS 1.2
The request works perfectly! So, it indicates to me that there might be a problem with the TLS 1.3, somehow the server is not properly working with mbedTLS TLS 1.3.
System information
Mbed TLS version (number or commit id):
2ca6c285a0dd3f33982dd57299012dacab1ff206
Operating system and version:
macOS 13.2.1 (22D68)
Configuration (if not default, please attach
mbedtls_config.h
):default
Expected behavior
The request should return a successful result.
Actual behavior
The request is failing during the handshake as previously mentioned:
Steps to reproduce
Just change these configs on ssl_client1.c sample:
Then, rebuild and run that.
Additional information
mbedtls_ssl_conf_max_version(&conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3);
The text was updated successfully, but these errors were encountered: