From d582a01073ce8db8698e28cc92430ca283eb7dcf Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Wed, 28 Sep 2022 07:59:01 +0200 Subject: [PATCH] Make MBEDTLS_SSL_CONTEXT_SERIALIZATION dependent on AEAD Signed-off-by: Przemek Stekiel --- include/mbedtls/check_config.h | 3 +++ tests/scripts/all.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 1874e51cbd..bbace7a3cd 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -966,6 +966,9 @@ #error "MBEDTLS_SSL_SESSION_TICKETS defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) && !defined(MBEDTLS_CIPHER_MODE_AEAD) +#error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites" +#endif /* Reject attempts to enable options that have been removed and that could * cause a build to succeed but with features removed. */ diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 64290544f2..124889d1da 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -1297,6 +1297,7 @@ component_test_crypto_default_stream_cipher_only () { scripts/config.py unset MBEDTLS_CMAC_C scripts/config.py unset MBEDTLS_NIST_KW_C scripts/config.py unset MBEDTLS_SSL_SESSION_TICKETS + scripts/config.py unset MBEDTLS_SSL_CONTEXT_SERIALIZATION # Enable stream(null) cipher only scripts/config.py set MBEDTLS_CIPHER_NULL_CIPHER