mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 21:33:02 +00:00
Enable ECDSA-det in driver-only hashes component
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
d111fbdad1
commit
91cc8bbc87
@ -2638,12 +2638,6 @@ config_psa_crypto_hash_use_psa () {
|
||||
scripts/config.py unset MBEDTLS_ENTROPY_C
|
||||
scripts/config.py unset MBEDTLS_ENTROPY_NV_SEED # depends on ENTROPY_C
|
||||
scripts/config.py unset MBEDTLS_PLATFORM_NV_SEED_ALT # depends on former
|
||||
# Also unset MD_C and things that depend on it.
|
||||
if [ "$DRIVER_ONLY" -eq 1 ]; then
|
||||
scripts/config.py unset MBEDTLS_MD_C
|
||||
fi
|
||||
scripts/config.py unset MBEDTLS_ECDSA_DETERMINISTIC
|
||||
scripts/config.py -f include/psa/crypto_config.h unset PSA_WANT_ALG_DETERMINISTIC_ECDSA
|
||||
|
||||
# Dynamic secure element support is a deprecated feature and needs to be disabled here.
|
||||
# This is done to have the same form of psa_key_attributes_s for libdriver and library.
|
||||
|
@ -236,6 +236,8 @@ void ecdsa_write_read_zero(int id)
|
||||
unsigned char sig[200];
|
||||
size_t sig_len, i;
|
||||
|
||||
MD_PSA_INIT();
|
||||
|
||||
mbedtls_ecdsa_init(&ctx);
|
||||
memset(&rnd_info, 0x00, sizeof(mbedtls_test_rnd_pseudo_info));
|
||||
memset(hash, 0, sizeof(hash));
|
||||
@ -286,6 +288,7 @@ void ecdsa_write_read_zero(int id)
|
||||
|
||||
exit:
|
||||
mbedtls_ecdsa_free(&ctx);
|
||||
MD_PSA_DONE();
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
@ -298,6 +301,8 @@ void ecdsa_write_read_random(int id)
|
||||
unsigned char sig[200];
|
||||
size_t sig_len, i;
|
||||
|
||||
MD_PSA_INIT();
|
||||
|
||||
mbedtls_ecdsa_init(&ctx);
|
||||
memset(&rnd_info, 0x00, sizeof(mbedtls_test_rnd_pseudo_info));
|
||||
memset(hash, 0, sizeof(hash));
|
||||
@ -352,6 +357,7 @@ void ecdsa_write_read_random(int id)
|
||||
|
||||
exit:
|
||||
mbedtls_ecdsa_free(&ctx);
|
||||
MD_PSA_DONE();
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
@ -431,6 +437,8 @@ void ecdsa_write_restart(int id, char *d_str, int md_alg,
|
||||
unsigned char sig[MBEDTLS_ECDSA_MAX_LEN];
|
||||
size_t slen;
|
||||
|
||||
MD_PSA_INIT();
|
||||
|
||||
mbedtls_ecdsa_restart_init(&rs_ctx);
|
||||
mbedtls_ecdsa_init(&ctx);
|
||||
memset(sig, 0, sizeof(sig));
|
||||
@ -481,6 +489,7 @@ void ecdsa_write_restart(int id, char *d_str, int md_alg,
|
||||
exit:
|
||||
mbedtls_ecdsa_restart_free(&rs_ctx);
|
||||
mbedtls_ecdsa_free(&ctx);
|
||||
MD_PSA_DONE();
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user