diff options
author | tb <> | 2024-03-02 11:46:55 +0000 |
---|---|---|
committer | tb <> | 2024-03-02 11:46:55 +0000 |
commit | 3e5e7f2a269ad388a1b8199d25b80d3a62e57e92 (patch) | |
tree | f3a156ff7fdf4beb4ece3ebd30ce13b3acca00fd | |
parent | 17dd058fa6a2fcf296d19d4fca23180abec5ba40 (diff) | |
download | openbsd-3e5e7f2a269ad388a1b8199d25b80d3a62e57e92.tar.gz openbsd-3e5e7f2a269ad388a1b8199d25b80d3a62e57e92.tar.bz2 openbsd-3e5e7f2a269ad388a1b8199d25b80d3a62e57e92.zip |
Make {SSL3,TLS}_CT_* internal
And here goes a bunch of unused macros that just had to be in two
headers so they could get out of sync. Three of these constants
are used in a single function...
ok jsing
-rw-r--r-- | src/lib/libssl/s3_lib.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/ssl3.h | 15 | ||||
-rw-r--r-- | src/lib/libssl/tls1.h | 13 |
3 files changed, 8 insertions, 28 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 9836d20bd0..6ebe2605da 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.250 2024/03/02 11:44:47 tb Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.251 2024/03/02 11:46:55 tb 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 | * |
@@ -2594,6 +2594,10 @@ ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
2594 | return (ret); | 2594 | return (ret); |
2595 | } | 2595 | } |
2596 | 2596 | ||
2597 | #define SSL3_CT_RSA_SIGN 1 | ||
2598 | #define SSL3_CT_RSA_FIXED_DH 3 | ||
2599 | #define SSL3_CT_ECDSA_SIGN 64 | ||
2600 | |||
2597 | int | 2601 | int |
2598 | ssl3_get_req_cert_types(SSL *s, CBB *cbb) | 2602 | ssl3_get_req_cert_types(SSL *s, CBB *cbb) |
2599 | { | 2603 | { |
@@ -2613,7 +2617,7 @@ ssl3_get_req_cert_types(SSL *s, CBB *cbb) | |||
2613 | * ECDSA certs can be used with RSA cipher suites as well | 2617 | * ECDSA certs can be used with RSA cipher suites as well |
2614 | * so we don't need to check for SSL_kECDH or SSL_kECDHE. | 2618 | * so we don't need to check for SSL_kECDH or SSL_kECDHE. |
2615 | */ | 2619 | */ |
2616 | if (!CBB_add_u8(cbb, TLS_CT_ECDSA_SIGN)) | 2620 | if (!CBB_add_u8(cbb, SSL3_CT_ECDSA_SIGN)) |
2617 | return 0; | 2621 | return 0; |
2618 | 2622 | ||
2619 | return 1; | 2623 | return 1; |
diff --git a/src/lib/libssl/ssl3.h b/src/lib/libssl/ssl3.h index 603d9ccb4f..55fbf72242 100644 --- a/src/lib/libssl/ssl3.h +++ b/src/lib/libssl/ssl3.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl3.h,v 1.58 2024/02/03 15:58:33 beck Exp $ */ | 1 | /* $OpenBSD: ssl3.h,v 1.59 2024/03/02 11:46:55 tb 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 | * |
@@ -314,19 +314,6 @@ extern "C" { | |||
314 | #define TLS1_HB_REQUEST 1 | 314 | #define TLS1_HB_REQUEST 1 |
315 | #define TLS1_HB_RESPONSE 2 | 315 | #define TLS1_HB_RESPONSE 2 |
316 | 316 | ||
317 | #define SSL3_CT_RSA_SIGN 1 | ||
318 | #define SSL3_CT_DSS_SIGN 2 | ||
319 | #define SSL3_CT_RSA_FIXED_DH 3 | ||
320 | #define SSL3_CT_DSS_FIXED_DH 4 | ||
321 | #define SSL3_CT_RSA_EPHEMERAL_DH 5 | ||
322 | #define SSL3_CT_DSS_EPHEMERAL_DH 6 | ||
323 | #define SSL3_CT_FORTEZZA_DMS 20 | ||
324 | /* SSL3_CT_NUMBER is used to size arrays and it must be large | ||
325 | * enough to contain all of the cert types defined either for | ||
326 | * SSLv3 and TLSv1. | ||
327 | */ | ||
328 | #define SSL3_CT_NUMBER 7 | ||
329 | |||
330 | #define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001 | 317 | #define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001 |
331 | #define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010 | 318 | #define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010 |
332 | #define TLS1_FLAGS_FREEZE_TRANSCRIPT 0x0020 | 319 | #define TLS1_FLAGS_FREEZE_TRANSCRIPT 0x0020 |
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h index 05514b8f4d..21666291ff 100644 --- a/src/lib/libssl/tls1.h +++ b/src/lib/libssl/tls1.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls1.h,v 1.58 2024/03/02 11:44:47 tb Exp $ */ | 1 | /* $OpenBSD: tls1.h,v 1.59 2024/03/02 11:46:55 tb 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 | * |
@@ -740,17 +740,6 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) | |||
740 | #define TLS1_3_RFC_AES_128_CCM_8_SHA256 "TLS_AES_128_CCM_8_SHA256" | 740 | #define TLS1_3_RFC_AES_128_CCM_8_SHA256 "TLS_AES_128_CCM_8_SHA256" |
741 | #endif | 741 | #endif |
742 | 742 | ||
743 | #define TLS_CT_RSA_SIGN 1 | ||
744 | #define TLS_CT_DSS_SIGN 2 | ||
745 | #define TLS_CT_RSA_FIXED_DH 3 | ||
746 | #define TLS_CT_DSS_FIXED_DH 4 | ||
747 | #define TLS_CT_ECDSA_SIGN 64 | ||
748 | #define TLS_CT_RSA_FIXED_ECDH 65 | ||
749 | #define TLS_CT_ECDSA_FIXED_ECDH 66 | ||
750 | /* when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see | ||
751 | * comment there) */ | ||
752 | #define TLS_CT_NUMBER 7 | ||
753 | |||
754 | #define TLS1_FINISH_MAC_LENGTH 12 | 743 | #define TLS1_FINISH_MAC_LENGTH 12 |
755 | 744 | ||
756 | #define TLS_MD_MAX_CONST_SIZE 20 | 745 | #define TLS_MD_MAX_CONST_SIZE 20 |