Do not access SSL struct directly in TLS1_get_version and TLS1_get_client_version...
authorAlessandro Ghedini <alessandro@cloudflare.com>
Mon, 9 May 2016 11:59:26 +0000 (12:59 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 16 May 2016 14:58:52 +0000 (15:58 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
include/openssl/tls1.h

index 61d5bccac4978be27a8c458ae0e5b6f16ee58478..a0a3698d15afeb03c2fe3bf487091da6bf239e88 100644 (file)
@@ -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