diff options
author | 2020-05-31 18:03:32 +0000 | |
---|---|---|
committer | 2020-05-31 18:03:32 +0000 | |
commit | b9f2fbd8d2d0a5734e930c4fa8ec8d6b7f7b51c4 (patch) | |
tree | 344da918e00b7bce4c6c8b4ad569cb2c8aec6ef9 /lib/libssl/ssl_versions.c | |
parent | When building a chain look for non-expired certificates first. (diff) | |
download | wireguard-openbsd-b9f2fbd8d2d0a5734e930c4fa8ec8d6b7f7b51c4.tar.xz wireguard-openbsd-b9f2fbd8d2d0a5734e930c4fa8ec8d6b7f7b51c4.zip |
Replace ssl_max_server_version() with ssl_downgrade_max_version()
Replace the only occurrence of ssl_max_server_version() with a call
to ssl_downgrade_max_version() and remove ssl_max_server_version().
ok beck@ tb@
Diffstat (limited to 'lib/libssl/ssl_versions.c')
-rw-r--r-- | lib/libssl/ssl_versions.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/libssl/ssl_versions.c b/lib/libssl/ssl_versions.c index 03eb41582ac..b21fa7198c6 100644 --- a/lib/libssl/ssl_versions.c +++ b/lib/libssl/ssl_versions.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_versions.c,v 1.5 2020/05/31 16:36:35 jsing Exp $ */ +/* $OpenBSD: ssl_versions.c,v 1.6 2020/05/31 18:03:32 jsing Exp $ */ /* * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> * @@ -200,30 +200,6 @@ ssl_max_shared_version(SSL *s, uint16_t peer_ver, uint16_t *max_ver) return 1; } -uint16_t -ssl_max_server_version(SSL *s) -{ - uint16_t max_version, min_version = 0; - - if (SSL_IS_DTLS(s)) - return (DTLS1_VERSION); - - if (!ssl_enabled_version_range(s, &min_version, &max_version)) - return 0; - - /* - * Limit to the versions supported by this method. The SSL method - * will be changed during version negotiation, as such we want to - * use the SSL method from the context. - */ - if (!ssl_clamp_version_range(&min_version, &max_version, - s->ctx->method->internal->min_version, - s->ctx->method->internal->max_version)) - return 0; - - return (max_version); -} - int ssl_downgrade_max_version(SSL *s, uint16_t *max_ver) { |