From: Alessandro Ghedini Date: Mon, 9 May 2016 11:59:26 +0000 (+0100) Subject: Do not access SSL struct directly in TLS1_get_version and TLS1_get_client_version... X-Git-Tag: OpenSSL_1_1_0-pre6~832 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6385ffd12d82ec9ef601100e1bdbd21ef240dc5b;p=oweals%2Fopenssl.git 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 --- 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