Skip to content

Commit 592f591

Browse files
all.sh: test CTR_DRBG_USE_128_BIT_KEY and ENTROPY_FORCE_SHA256
Test MBEDTLS_CTR_DRBG_USE_128_BIT_KEY and MBEDTLS_ENTROPY_FORCE_SHA256 together and separately.
1 parent 2ef377d commit 592f591

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

tests/scripts/all.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,43 @@ component_test_aes_fewer_tables_and_rom_tables () {
920920
make test
921921
}
922922

923+
component_test_ctr_drbg_aes_256_sha_256 () {
924+
msg "build: full + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
925+
scripts/config.pl full
926+
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
927+
scripts/config.pl set MBEDTLS_ENTROPY_FORCE_SHA256
928+
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
929+
make
930+
931+
msg "test: full + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
932+
make test
933+
}
934+
935+
component_test_ctr_drbg_aes_128_sha_512 () {
936+
msg "build: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY (ASan build)"
937+
scripts/config.pl full
938+
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
939+
scripts/config.pl set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
940+
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
941+
make
942+
943+
msg "test: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY (ASan build)"
944+
make test
945+
}
946+
947+
component_test_ctr_drbg_aes_128_sha_256 () {
948+
msg "build: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
949+
scripts/config.pl full
950+
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
951+
scripts/config.pl set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
952+
scripts/config.pl set MBEDTLS_ENTROPY_FORCE_SHA256
953+
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
954+
make
955+
956+
msg "test: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
957+
make test
958+
}
959+
923960
component_test_se_default () {
924961
msg "build: default config + MBEDTLS_PSA_CRYPTO_SE_C"
925962
scripts/config.py set MBEDTLS_PSA_CRYPTO_SE_C

0 commit comments

Comments
 (0)