From 81ed9fb27744ceb91388555652391a9bbfaa9fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 2 Sep 2019 14:57:08 +0200 Subject: [PATCH] Exclude SHA-224 from some reduced config examples Besides the value as an example, this is usefull for testing the option, via test-ref-configs.pl (which is included in all.sh). --- configs/config-ccm-psk-tls1_2.h | 3 +++ configs/config-suite-b.h | 3 +++ configs/config-thread.h | 3 +++ 3 files changed, 9 insertions(+) diff --git a/configs/config-ccm-psk-tls1_2.h b/configs/config-ccm-psk-tls1_2.h index c9b58dd53..e0f50ea6f 100644 --- a/configs/config-ccm-psk-tls1_2.h +++ b/configs/config-ccm-psk-tls1_2.h @@ -55,6 +55,9 @@ #define MBEDTLS_SSL_SRV_C #define MBEDTLS_SSL_TLS_C +/* Save ROM by excluded SHA-2 variant that we don't need */ +#define MBEDTLS_SHA256_NO_SHA224 + /* Save RAM at the expense of ROM */ #define MBEDTLS_AES_ROM_TABLES diff --git a/configs/config-suite-b.h b/configs/config-suite-b.h index 18e2c4036..d6891fae1 100644 --- a/configs/config-suite-b.h +++ b/configs/config-suite-b.h @@ -78,6 +78,9 @@ #define MBEDTLS_CERTS_C #define MBEDTLS_PEM_PARSE_C +/* Save ROM by excluded SHA-2 variant that we don't need */ +#define MBEDTLS_SHA256_NO_SHA224 + /* Save RAM at the expense of ROM */ #define MBEDTLS_AES_ROM_TABLES diff --git a/configs/config-thread.h b/configs/config-thread.h index 4fa0b8d19..da8ac7aaa 100644 --- a/configs/config-thread.h +++ b/configs/config-thread.h @@ -88,6 +88,9 @@ #define MBEDTLS_ECP_MAX_BITS 256 #define MBEDTLS_MPI_MAX_SIZE 32 // 256 bits is 32 bytes +/* Save ROM by excluded SHA-2 variant that we don't need */ +#define MBEDTLS_SHA256_NO_SHA224 + /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8