-
-
Notifications
You must be signed in to change notification settings - Fork 7k
TLS ip address verification, extend test #19252
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
Conversation
Change the test certificate to carry a altname 'dns:127.0.0.1' which should *not* match in test_17_05_bad_ip_addr. wolfSSL: since `wolfSSL_check_domain_name()` does not differentiate between DNS and IP names, use if only for DNS names. For IP addresses, get the peer certificate after the handshake and check that using wolfSSL_X509_check_ip_asc(). Unfortunately, this succeeds where it should not, as wolfSSL internally used the same check code for both cases. So, skip the test case until wolfSSL fixes that.
|
Opened wolfSSL/wolfssl#9351 at the wolfSSL project. |
wolfssl+mbedtls work on "normal" not-matching ip addresses.
|
Thanks for this! Any chance to add an ipv6 test too? |
Add macos skips on wolfssl early data tests which are not reliable
Not easily. We'd need a dynamic check if ipv6 is working on the platform. Also: thinking some more about this test, it seems highly theoretical. If someone gets a CA to sign a cert with an ip address in a DNS alt name, they can probably trick other things in there as well. It's then a broken CA we would be dealing with, or? |
Understood.
Yup, I agree,that's it is even untested from that other PR; it was just an idea I had about what this code could theoretically break. By the way, I think there is another case in `lib/vquic/vquic-tls.c. Here's an ad-hoc patch which shows the issue: |
…ation for ip addresses
|
@MegaManSec good catch. |
Follow-up to 692c7f1 curl#19252 Follow-up to eefd03c curl#18703 Fixes curl#19724
Change the test certificate to carry a altname 'dns:127.0.0.1' which should not match in test_17_05_bad_ip_addr.
wolfSSL: since
wolfSSL_check_domain_name()does not differentiate between DNS and IP names, use if only for DNS names. For IP addresses, get the peer certificate after the handshake and check that using wolfSSL_X509_check_ip_asc().Unfortunately, this succeeds where it should not, as wolfSSL internally used the same check code for both cases. So, skip the test case until wolfSSL fixes that.