summaryrefslogtreecommitdiffstats
path: root/ssl/tls1.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-05-25 11:43:17 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-05-25 11:43:17 +0000
commit277f8a34f4041fb9e7b00e998e079d7fecd075a9 (patch)
tree616e616fb31ecca3eb5ebbcfeec81a50b2f4410d /ssl/tls1.h
parent4dde470865ae2421e4ebd55e936ddb25238608a2 (diff)
use TLS1_get_version macro to check version so TLS v1.2 changes don't interfere with DTLS
Diffstat (limited to 'ssl/tls1.h')
-rw-r--r--ssl/tls1.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/tls1.h b/ssl/tls1.h
index b517877ba1..1246e4adef 100644
--- a/ssl/tls1.h
+++ b/ssl/tls1.h
@@ -171,6 +171,9 @@ extern "C" {
#define TLS1_VERSION_MAJOR 0x03
#define TLS1_VERSION_MINOR 0x01
+#define TLS1_get_version(s) \
+ ((s->version >> 8) == TLS1_VERSION_MAJOR ? s->version : 0)
+
#define TLS1_AD_DECRYPTION_FAILED 21
#define TLS1_AD_RECORD_OVERFLOW 22
#define TLS1_AD_UNKNOWN_CA 48 /* fatal */