Skip to content
This repository was archived by the owner on Aug 24, 2025. It is now read-only.

Commit a0f443a

Browse files
author
Rich Salz
committed
Increase CT_NUMBER values
Also add build-time errors to keep them in sync. Thanks to GitHub user YuDudysheva for reporting this. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from openssl#6874) (cherry picked from commit b5ee517)
1 parent f48e0ef commit a0f443a

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

include/openssl/ssl3.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,15 @@ extern "C" {
252252
# define SSL3_CT_FORTEZZA_DMS 20
253253
/*
254254
* SSL3_CT_NUMBER is used to size arrays and it must be large enough to
255-
* contain all of the cert types defined either for SSLv3 and TLSv1.
255+
* contain all of the cert types defined for *either* SSLv3 and TLSv1.
256256
*/
257-
# define SSL3_CT_NUMBER 9
257+
# define SSL3_CT_NUMBER 10
258+
259+
# if defined(TLS_CT_NUMBER)
260+
# if TLS_CT_NUMBER != SSL3_CT_NUMBER
261+
# error "SSL/TLS CT_NUMBER values do not match"
262+
# endif
263+
# endif
258264

259265
# define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001
260266

include/openssl/tls1.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,13 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
883883
* when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
884884
* comment there)
885885
*/
886-
# define TLS_CT_NUMBER 9
886+
# define TLS_CT_NUMBER 10
887+
888+
# if defined(SSL3_CT_NUMBER)
889+
# if TLS_CT_NUMBER != SSL3_CT_NUMBER
890+
# error "SSL/TLS CT_NUMBER values do not match"
891+
# endif
892+
# endif
887893

888894
# define TLS1_FINISH_MAC_LENGTH 12
889895

0 commit comments

Comments
 (0)