Merge branch 'mbedtls-2.7-restricted' into mbedtls-2.7.16r0

This commit is contained in:
Janos Follath 2020-06-25 09:20:57 +01:00
commit 9cdda866bf
11 changed files with 496 additions and 11 deletions

View file

@ -892,6 +892,61 @@ component_test_no_hmac_drbg () {
# so there's little value in running those lengthy tests here.
}
component_test_no_drbg_all_hashes () {
# this tests the internal ECP DRBG using a KDF based on SHA-512
msg "build: Default minus DRBGs"
scripts/config.pl unset MBEDTLS_CTR_DRBG_C
scripts/config.pl unset MBEDTLS_HMAC_DRBG_C
scripts/config.pl unset MBEDTLS_ECDSA_DETERMINISTIC # requires HMAC_DRBG
scripts/config.pl unset MBEDTLS_PSA_CRYPTO_C # requires a DRBG
scripts/config.pl unset MBEDTLS_PSA_CRYPTO_STORAGE_C # requires PSA Crypto
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
make
msg "test: Default minus DRBGs"
make test
# no SSL tests as they all depend on having a DRBG
}
component_test_no_drbg_no_sha512 () {
# this tests the internal ECP DRBG using a KDF based on SHA-256
msg "build: Default minus DRBGs minus SHA-512"
scripts/config.pl unset MBEDTLS_CTR_DRBG_C
scripts/config.pl unset MBEDTLS_HMAC_DRBG_C
scripts/config.pl unset MBEDTLS_ECDSA_DETERMINISTIC # requires HMAC_DRBG
scripts/config.pl unset MBEDTLS_PSA_CRYPTO_C # requires a DRBG
scripts/config.pl unset MBEDTLS_PSA_CRYPTO_STORAGE_C # requires PSA Crypto
scripts/config.pl unset MBEDTLS_SHA512_C
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
make
msg "test: Default minus DRBGs minus SHA-512"
make test
# no SSL tests as they all depend on having a DRBG
}
component_test_ecp_no_internal_rng () {
msg "build: Default plus ECP_NO_INTERNAL_RNG minus DRBG modules"
scripts/config.pl set MBEDTLS_ECP_NO_INTERNAL_RNG
scripts/config.pl unset MBEDTLS_CTR_DRBG_C
scripts/config.pl unset MBEDTLS_HMAC_DRBG_C
scripts/config.pl unset MBEDTLS_ECDSA_DETERMINISTIC # requires HMAC_DRBG
scripts/config.pl unset MBEDTLS_PSA_CRYPTO_C # requires a DRBG
scripts/config.pl unset MBEDTLS_PSA_CRYPTO_STORAGE_C # requires PSA Crypto
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
make
msg "test: ECP_NO_INTERNAL_RNG, no DRBG module"
make test
# no SSL tests as they all depend on having a DRBG
}
component_test_full_cmake_clang () {
msg "build: cmake, full config, clang" # ~ 50s
scripts/config.pl full