-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
nss: Fall back to latest supported SSL version #3337
Conversation
travis reports a little nit:
|
NSS may be built without support for the latest SSL/TLS versions, leading to "SSL version range is not valid" errors when the library code supports a recent version (e.g. TLS v1.3) but it has explicitly been disabled. This change adjusts the maximum SSL version requested by libcurl to be the maximum supported version at runtime, as long as that version is at least as high as the minimum version required by libcurl. Fixes curl#3261
109abb8
to
0751db5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could possibly consider outputting the numerical TLS version numbers as hex, as they are defined as hex in the NSS header file.
I think it would be even better to output them as text strings like "TLSv1.2" where the values are known, and maybe hex otherwise. Perhaps have a function nss_sslver_to_string that's structured like nss_sslver_from_curl? |
@pghmcfc Sounds good! |
How's this look?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the style issues, it looks fine to me.
Use descriptive text strings rather than decimal numbers.
a4ed6fe
to
01d4b54
Compare
Thanks for the fix-ups! While reviewing the |
Maybe the other uses of |
Actually, it should be easy to make it consistent (and compatible with old NSS releases) again:
|
Yes, that's fixed the build on Fedoras 16 and 17. |
54a6372
to
98e9843
Compare
Perfect. Thank you for working on this! |
I'm puzzed by the DoH torture test failures on travis (test 2100) which indeed is not happening due to this change. |
(doh leak now worked on in #3342) |
Thanks a lot both of you! |
Landed in 6848ea5 |
NSS may be built without support for the latest SSL/TLS versions, leading to "SSL version range is not valid" errors when the library code supports a recent version (e.g. TLS v1.3) but it has explicitly been disabled.
This change adjusts the maximum SSL version requested by libcurl to be the maximum supported version at runtime, as long as that version is at least as high as the minimum version required by libcurl.
Fixes #3261
Note: The
SSL_VersionRangeGetSupported
API was added in NSS version 3.14 (https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.14_release_notes), same as theSSL_VersionRangeGetDefault
API, which is already used in curl, so there should be no change in NSS version requirements.