-
Notifications
You must be signed in to change notification settings - Fork 818
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
Add new settings to specify TLS versions to use #9667
Conversation
This adds these new settings: records.yaml: proxy.config.ssl.server.version.min proxy.config.ssl.server.version.max proxy.config.ssl.client.version.min proxy.config.ssl.client.version.max sni.yaml: valid_tls_version_min_in valid_tls_version_max_in and deprecates these settings: records.yaml: proxy.config.ssl.TLSv1 proxy.config.ssl.TLSv1_1 proxy.config.ssl.TLSv1_2 proxy.config.ssl.TLSv1_3 proxy.config.ssl.client.TLSv1 proxy.config.ssl.client.TLSv1_1 proxy.config.ssl.client.TLSv1_2 proxy.config.ssl.client.TLSv1_3 sni.yaml: valid_tls_versions_in
.. ts:cv:: CONFIG proxy.config.ssl.TLSv1 INT 0 | ||
:deprecated: | ||
|
||
This setting is depreated in favor of :ts:cv:`proxy.config.ssl.server.version.min` and |
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.
type: deprecated
there are more probably from the copy/paste
iocore/net/SSLConfig.cc
Outdated
if (!option) { | ||
ssl_client_ctx_options |= SSL_OP_NO_TLSv1; | ||
} else { | ||
// This is disabled by default. It it's used if it's enabled. |
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.
typo: It it's
[approve ci] |
auto ssl_vc = dynamic_cast<SSLNetVConnection *>(snis); | ||
ssl_vc->set_valid_tls_version_min(this->min_ver); | ||
ssl_vc->set_valid_tls_version_max(this->max_ver); | ||
} else { |
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.
Why not } else if (!unset) {
?
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.
I guess I wanted to make it clear that if (!unset) {
is the first line for the case min/max isn't used. It enables us to add some code before the if
easily.
* asf/master: (33 commits) Add error log for invalid OCSP response (apache#9674) Add new settings to specify TLS versions to use (apache#9667) Remove flask from tests/Pipfile (apache#9688) Doc: Add example of --enable-lto build option with LLVM (apache#9654) Added Zhengxi to the asf contributors (apache#9685) Don't build native QUIC implementation (apache#9670) Stabilize autest tls_hooks17 (apache#9671) Cleanup: remove ts::buffer from HostDB. (apache#9677) Fix leak in MultiTextMod in ControlBase. (apache#9675) Cleanup: remove TsBuffer.h from MIME.cc (apache#9661) Cleanup: remove ts::Buffer from ControlBase. (apache#9664) setup pre-commit hook at cmake generation time (apache#9669) Updated parent retry attempt logic (apache#9620) Try to do less work in hot function HttpHookState::getNext (apache#9660) cmake build, fixed warning using older openssl APIs (apache#9648) rename attempts to retry_attempts (apache#9655) OCSP: Fix unitialized variable error. (apache#9662) Add support for CONNECT method on HTTP/2 connection (apache#9616) Remove deprecated debug output functions from 10 source files. (apache#9657) Remove deprecated debug output functions from 14 source files. (apache#9658) ...
This is for apache#9667
I found an incompatibility between OpenSSL and BoringSSL.
If
valid_tls_versions_in
has[TLSv1, TLSv1_2, TLSv1_3]
(note thatTLSv1_1
isn't in the list), BoringSSL only allows TLSv1 where OpenSSL allows all the three versions. It sounds like a bug but it's actually not.https://boringssl.googlesource.com/boringssl/+/86ada1ea2f51ff41baa2919337e5d721bd27f764/ssl/ssl_versions.cc#225
And I also found that the way (API) we currently use to specify available TLS versions is deprecated.
The old way allow us to specify versions individually (like above), but the new way only allows us to specify a range of versions.
Old:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_set_options.html
https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_OP_NO_TLSv1
New:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_set_min_proto_version.html
https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_set_min_proto_version
Since the old way is no longer supported by SSL libraries, we should deprecate the current way and only allow ATS users to specify a range.
This adds these new settings:
and deprecates these settings: