diff options
author | jsing <> | 2024-07-16 14:38:04 +0000 |
---|---|---|
committer | jsing <> | 2024-07-16 14:38:04 +0000 |
commit | 772f611f8f8ff3800ee3fe27142570622d06cc38 (patch) | |
tree | 2b4abb3d0d8f9b72dd3be8ba85d91d7d35b07f3d /src/lib/libssl/ssl_local.h | |
parent | b9ac2dff20ea5834ad8b30951507caf01cb04463 (diff) | |
download | openbsd-772f611f8f8ff3800ee3fe27142570622d06cc38.tar.gz openbsd-772f611f8f8ff3800ee3fe27142570622d06cc38.tar.bz2 openbsd-772f611f8f8ff3800ee3fe27142570622d06cc38.zip |
Clean up SSL_HANDSHAKE_MAC_DEFAULT.
The handshake MAC needs to be upgraded when TLSv1.0 and TLSv1.1
ciphersuites are used with TLSv1.2. Since we no longer support TLSv1.0
and TLSv1.1, we can simply upgrade the handshake MAC in the ciphersuite
table and remove the various defines/macros/code that existed to handle
the upgrade.
ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_local.h')
-rw-r--r-- | src/lib/libssl/ssl_local.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/lib/libssl/ssl_local.h b/src/lib/libssl/ssl_local.h index 74c6ad33ee..c002c9b34f 100644 --- a/src/lib/libssl/ssl_local.h +++ b/src/lib/libssl/ssl_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_local.h,v 1.18 2024/07/15 14:45:15 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_local.h,v 1.19 2024/07/16 14:38:04 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 | * |
@@ -246,11 +246,8 @@ __BEGIN_HIDDEN_DECLS | |||
246 | /* Bits for algorithm2 (handshake digests and other extra flags) */ | 246 | /* Bits for algorithm2 (handshake digests and other extra flags) */ |
247 | 247 | ||
248 | #define SSL_HANDSHAKE_MAC_MASK 0xff0 | 248 | #define SSL_HANDSHAKE_MAC_MASK 0xff0 |
249 | #define SSL_HANDSHAKE_MAC_MD5 0x010 | ||
250 | #define SSL_HANDSHAKE_MAC_SHA 0x020 | ||
251 | #define SSL_HANDSHAKE_MAC_SHA256 0x080 | 249 | #define SSL_HANDSHAKE_MAC_SHA256 0x080 |
252 | #define SSL_HANDSHAKE_MAC_SHA384 0x100 | 250 | #define SSL_HANDSHAKE_MAC_SHA384 0x100 |
253 | #define SSL_HANDSHAKE_MAC_DEFAULT (SSL_HANDSHAKE_MAC_MD5 | SSL_HANDSHAKE_MAC_SHA) | ||
254 | 251 | ||
255 | #define SSL3_CK_ID 0x03000000 | 252 | #define SSL3_CK_ID 0x03000000 |
256 | #define SSL3_CK_VALUE_MASK 0x0000ffff | 253 | #define SSL3_CK_VALUE_MASK 0x0000ffff |
@@ -274,10 +271,6 @@ __BEGIN_HIDDEN_DECLS | |||
274 | #define SSL_USE_SIGALGS(s) \ | 271 | #define SSL_USE_SIGALGS(s) \ |
275 | (s->method->enc_flags & SSL_ENC_FLAG_SIGALGS) | 272 | (s->method->enc_flags & SSL_ENC_FLAG_SIGALGS) |
276 | 273 | ||
277 | /* See if we use SHA256 default PRF. */ | ||
278 | #define SSL_USE_SHA256_PRF(s) \ | ||
279 | (s->method->enc_flags & SSL_ENC_FLAG_SHA256_PRF) | ||
280 | |||
281 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ | 274 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ |
282 | #define SSL_USE_TLS1_2_CIPHERS(s) \ | 275 | #define SSL_USE_TLS1_2_CIPHERS(s) \ |
283 | (s->method->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS) | 276 | (s->method->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS) |
@@ -1188,9 +1181,6 @@ typedef struct ssl3_state_st { | |||
1188 | /* Uses signature algorithms extension. */ | 1181 | /* Uses signature algorithms extension. */ |
1189 | #define SSL_ENC_FLAG_SIGALGS (1 << 1) | 1182 | #define SSL_ENC_FLAG_SIGALGS (1 << 1) |
1190 | 1183 | ||
1191 | /* Uses SHA256 default PRF. */ | ||
1192 | #define SSL_ENC_FLAG_SHA256_PRF (1 << 2) | ||
1193 | |||
1194 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ | 1184 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ |
1195 | #define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4) | 1185 | #define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4) |
1196 | 1186 | ||
@@ -1200,7 +1190,6 @@ typedef struct ssl3_state_st { | |||
1200 | #define TLSV1_ENC_FLAGS 0 | 1190 | #define TLSV1_ENC_FLAGS 0 |
1201 | #define TLSV1_1_ENC_FLAGS 0 | 1191 | #define TLSV1_1_ENC_FLAGS 0 |
1202 | #define TLSV1_2_ENC_FLAGS (SSL_ENC_FLAG_SIGALGS | \ | 1192 | #define TLSV1_2_ENC_FLAGS (SSL_ENC_FLAG_SIGALGS | \ |
1203 | SSL_ENC_FLAG_SHA256_PRF | \ | ||
1204 | SSL_ENC_FLAG_TLS1_2_CIPHERS) | 1193 | SSL_ENC_FLAG_TLS1_2_CIPHERS) |
1205 | #define TLSV1_3_ENC_FLAGS (SSL_ENC_FLAG_SIGALGS | \ | 1194 | #define TLSV1_3_ENC_FLAGS (SSL_ENC_FLAG_SIGALGS | \ |
1206 | SSL_ENC_FLAG_TLS1_3_CIPHERS) | 1195 | SSL_ENC_FLAG_TLS1_3_CIPHERS) |