diff options
author | jsing <> | 2017-01-25 06:38:01 +0000 |
---|---|---|
committer | jsing <> | 2017-01-25 06:38:01 +0000 |
commit | 74e3af800a6d38d80a0fee55c3d3c01c3e589ec1 (patch) | |
tree | 5e5521046341b9f51c8642a76659d7f61e6383e2 /src/lib/libssl/ssl_locl.h | |
parent | fe6f3fc2532579fc0941a1603d5e19a11a013179 (diff) | |
download | openbsd-74e3af800a6d38d80a0fee55c3d3c01c3e589ec1.tar.gz openbsd-74e3af800a6d38d80a0fee55c3d3c01c3e589ec1.tar.bz2 openbsd-74e3af800a6d38d80a0fee55c3d3c01c3e589ec1.zip |
Change the SSL_IS_DTLS() macro to check the version, rather than using a
flag in the encryption methods. We can do this since there is currently
only one DTLS version. This makes upcoming changes easier.
ok beck@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 9cad2bc50d..64725a7b23 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.165 2017/01/25 06:13:02 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.166 2017/01/25 06:38:01 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -328,7 +328,7 @@ __BEGIN_HIDDEN_DECLS | |||
328 | 328 | ||
329 | /* Check if an SSL structure is using DTLS. */ | 329 | /* Check if an SSL structure is using DTLS. */ |
330 | #define SSL_IS_DTLS(s) \ | 330 | #define SSL_IS_DTLS(s) \ |
331 | (s->method->internal->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) | 331 | (s->method->internal->version == DTLS1_VERSION) |
332 | 332 | ||
333 | /* See if we need explicit IV. */ | 333 | /* See if we need explicit IV. */ |
334 | #define SSL_USE_EXPLICIT_IV(s) \ | 334 | #define SSL_USE_EXPLICIT_IV(s) \ |
@@ -1049,9 +1049,6 @@ typedef struct ssl3_enc_method { | |||
1049 | /* Uses SHA256 default PRF. */ | 1049 | /* Uses SHA256 default PRF. */ |
1050 | #define SSL_ENC_FLAG_SHA256_PRF (1 << 2) | 1050 | #define SSL_ENC_FLAG_SHA256_PRF (1 << 2) |
1051 | 1051 | ||
1052 | /* Is DTLS. */ | ||
1053 | #define SSL_ENC_FLAG_DTLS (1 << 3) | ||
1054 | |||
1055 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ | 1052 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ |
1056 | #define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4) | 1053 | #define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4) |
1057 | 1054 | ||