diff options
author | 2019-03-17 15:16:39 +0000 | |
---|---|---|
committer | 2019-03-17 15:16:39 +0000 | |
commit | 0b8e44ecaae9293b3512c6de34a1ab1d11719c15 (patch) | |
tree | b91550d7aa73ef67834321f08bb9ac0bd11a1678 /lib/libssl/ssl_clnt.c | |
parent | Remove the alert level from the TLSv1.3 alert callback. (diff) | |
download | wireguard-openbsd-0b8e44ecaae9293b3512c6de34a1ab1d11719c15.tar.xz wireguard-openbsd-0b8e44ecaae9293b3512c6de34a1ab1d11719c15.zip |
Partially clean up the TLS1_get_{,client}_version macros.
LibreSSL only supports TLSv1.0 and above, hence the checks the macros are
performing are useless. Simplify them to their effective code. Also place
both under #ifndef LIBRESSL_INTERNAL and use the variables directly in our
code, which improves readability.
ok tb@
Diffstat (limited to 'lib/libssl/ssl_clnt.c')
-rw-r--r-- | lib/libssl/ssl_clnt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_clnt.c b/lib/libssl/ssl_clnt.c index abdcc9791a5..5da53d84454 100644 --- a/lib/libssl/ssl_clnt.c +++ b/lib/libssl/ssl_clnt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_clnt.c,v 1.56 2019/02/09 15:26:15 jsing Exp $ */ +/* $OpenBSD: ssl_clnt.c,v 1.57 2019/03/17 15:16:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -950,7 +950,7 @@ ssl3_get_server_hello(SSL *s) /* TLS v1.2 only ciphersuites require v1.2 or later. */ if ((cipher->algorithm_ssl & SSL_TLSV1_2) && - (TLS1_get_version(s) < TLS1_2_VERSION)) { + (s->version < TLS1_2_VERSION)) { al = SSL_AD_ILLEGAL_PARAMETER; SSLerror(s, SSL_R_WRONG_CIPHER_RETURNED); goto f_err; |