From 3aff5b4bac7186fda9208a76127eff040cafae13 Mon Sep 17 00:00:00 2001 From: Michael Baentsch Date: Fri, 15 Jan 2021 11:40:31 +0100 Subject: Update SERVER_HELLO_MAX_LENGTH Update constant to maximum permitted by RFC 8446 Fixes #13868 Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/13874) --- ssl/statem/statem_local.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ssl') diff --git a/ssl/statem/statem_local.h b/ssl/statem/statem_local.h index 9e03b7d363..40c3724bed 100644 --- a/ssl/statem/statem_local.h +++ b/ssl/statem/statem_local.h @@ -19,13 +19,16 @@ /* The spec allows for a longer length than this, but we limit it */ #define HELLO_VERIFY_REQUEST_MAX_LENGTH 258 #define END_OF_EARLY_DATA_MAX_LENGTH 0 -#define SERVER_HELLO_MAX_LENGTH 20000 #define HELLO_RETRY_REQUEST_MAX_LENGTH 20000 #define ENCRYPTED_EXTENSIONS_MAX_LENGTH 20000 #define SERVER_KEY_EXCH_MAX_LENGTH 102400 #define SERVER_HELLO_DONE_MAX_LENGTH 0 #define KEY_UPDATE_MAX_LENGTH 1 #define CCS_MAX_LENGTH 1 + +/* Max ServerHello size permitted by RFC 8446 */ +#define SERVER_HELLO_MAX_LENGTH 65607 + /* Max should actually be 36 but we are generous */ #define FINISHED_MAX_LENGTH 64 -- cgit v1.2.3