]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Added `CERTIFICATE_VERIFY_MAX_LENGTH` constant
authorVeronikaNguyen <veronika.maithi.nguyen@gmail.com>
Fri, 10 Mar 2023 22:13:46 +0000 (23:13 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 21 Mar 2023 11:44:08 +0000 (12:44 +0100)
- Set `CERTIFICATE_VERIFY_MAX_LENGTH` to 65539
  (2 bytes for the algorithm identifier + 2 bytes of signature length
   + 65535 bytes of signature)
- Changed `SSL3_RT_MAX_PLAIN_LENGTH` to `CERTIFICATE_VERIFY_MAX_LENGTH`
  in `statem_srvr.c` and `statem_clnt.c`

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20486)

ssl/statem/statem_clnt.c
ssl/statem/statem_local.h
ssl/statem/statem_srvr.c

index e5b036390a92ac3db483e57796fa62dafc1644a8..8d90520d14ab9d4a647fcc40e56230c9b93e0d0a 100644 (file)
@@ -1020,7 +1020,7 @@ size_t ossl_statem_client_max_message_size(SSL_CONNECTION *s)
         return s->max_cert_list;
 
     case TLS_ST_CR_CERT_VRFY:
-        return SSL3_RT_MAX_PLAIN_LENGTH;
+        return CERTIFICATE_VERIFY_MAX_LENGTH;
 
     case TLS_ST_CR_CERT_STATUS:
         return SSL3_RT_MAX_PLAIN_LENGTH;
index 75b7274c2ed3e623a26ff537402914c3d80fe362..30b7d5b0a560ccd0e0b4454a8c6514f9a304bc6c 100644 (file)
@@ -31,6 +31,9 @@
 /* Max ServerHello size permitted by RFC 8446 */
 #define SERVER_HELLO_MAX_LENGTH         65607
 
+/* Max CertificateVerify size permitted by RFC 8446 */
+#define CERTIFICATE_VERIFY_MAX_LENGTH   65539
+
 /* Max should actually be 36 but we are generous */
 #define FINISHED_MAX_LENGTH             64
 
index 6d4be61118bf0ba378fd71a15aa757adb76c70f6..3137f548efe3cdc200535aff3d6c36cbedeedf98 100644 (file)
@@ -1223,7 +1223,7 @@ size_t ossl_statem_server_max_message_size(SSL_CONNECTION *s)
         return CLIENT_KEY_EXCH_MAX_LENGTH;
 
     case TLS_ST_SR_CERT_VRFY:
-        return SSL3_RT_MAX_PLAIN_LENGTH;
+        return CERTIFICATE_VERIFY_MAX_LENGTH;
 
 #ifndef OPENSSL_NO_NEXTPROTONEG
     case TLS_ST_SR_NEXT_PROTO: