diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2020-07-17 03:30:43 +0200 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2020-07-21 20:40:07 +0200 |
commit | 77174598920a05826a28d8a0bd87a3af43d3f4d8 (patch) | |
tree | ed3d423072d3f399e583d1cc7787f1d5490a3e0e /ssl/ssl_conf.c | |
parent | DOC: Fix SSL_CTX_set_cert_cb.pod and SSL_CTX_set_client_cert_cb.pod (diff) | |
download | openssl-77174598920a05826a28d8a0bd87a3af43d3f4d8.tar.xz openssl-77174598920a05826a28d8a0bd87a3af43d3f4d8.zip |
Avoid errors with a priori inapplicable protocol bounds
The 'MinProtocol' and 'MaxProtocol' configuration commands now silently
ignore TLS protocol version bounds when configurign DTLS-based contexts,
and conversely, silently ignore DTLS protocol version bounds when
configuring TLS-based contexts. The commands can be repeated to set
bounds of both types. The same applies with the corresponding
"min_protocol" and "max_protocol" command-line switches, in case some
application uses both TLS and DTLS.
SSL_CTX instances that are created for a fixed protocol version (e.g.
TLSv1_server_method()) also silently ignore version bounds. Previously
attempts to apply bounds to these protocol versions would result in an
error. Now only the "version-flexible" SSL_CTX instances are subject to
limits in configuration files in command-line options.
Expected to resolve #12394
Reviewed-by: Paul Dale <paul.dale@oracle.com>
GH: #12472
Diffstat (limited to 'ssl/ssl_conf.c')
-rw-r--r-- | ssl/ssl_conf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index aefe8ad203..fe9b8ec3ea 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -303,6 +303,13 @@ static int protocol_from_string(const char *value) const char *name; int version; }; + /* + * Note: To avoid breaking previously valid configurations, we must retain + * legacy entries in this table even if the underlying protocol is no + * longer supported. This also means that the constants SSL3_VERSION, ... + * need to be retained indefinitely. This table can only grow, never + * shrink. + */ static const struct protocol_versions versions[] = { {"None", 0}, {"SSLv3", SSL3_VERSION}, |