From 6385ffd12d82ec9ef601100e1bdbd21ef240dc5b Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 9 May 2016 12:59:26 +0100 Subject: [PATCH] Do not access SSL struct directly in TLS1_get_version and TLS1_get_client_version macros Reviewed-by: Rich Salz Reviewed-by: Tim Hudson Reviewed-by: Matt Caswell --- include/openssl/tls1.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/openssl/tls1.h b/include/openssl/tls1.h index 61d5bccac4..a0a3698d15 100644 --- a/include/openssl/tls1.h +++ b/include/openssl/tls1.h @@ -179,10 +179,10 @@ extern "C" { # define TLS1_2_VERSION_MINOR 0x03 # define TLS1_get_version(s) \ - ((s->version >> 8) == TLS1_VERSION_MAJOR ? s->version : 0) + ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0) # define TLS1_get_client_version(s) \ - ((s->client_version >> 8) == TLS1_VERSION_MAJOR ? s->client_version : 0) + ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0) # define TLS1_AD_DECRYPTION_FAILED 21 # define TLS1_AD_RECORD_OVERFLOW 22 -- 2.25.1