From 0b8e44ecaae9293b3512c6de34a1ab1d11719c15 Mon Sep 17 00:00:00 2001 From: jsing Date: Sun, 17 Mar 2019 15:16:39 +0000 Subject: 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@ --- lib/libssl/ssl_clnt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libssl/ssl_clnt.c') 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; -- cgit v1.2.3-59-g8ed1b