mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 22:20:30 +00:00
Stop checking against reference vector in pk_rsa_encrypt_test_vec when USE_PSA_CRYPTO
The pk_rsa_encrypt_test_vec() reference vector is calculated while using mbedtls_test_rnd_pseudo_rand rng source, but since the RNG souce can't be controlled when USE_PSA_CRYPTO is enabled we can't get the same result. The pk_rsa_encrypt_test_vec() fails when switching to mbedtls_test_rnd_std_rand as rng source. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
e0df42cbb7
commit
dac2f23a82
@ -812,7 +812,10 @@ void pk_rsa_encrypt_test_vec( data_t * message, int mod, int radix_N,
|
||||
output, &olen, sizeof( output ),
|
||||
mbedtls_test_rnd_pseudo_rand, &rnd_info ) == ret );
|
||||
TEST_ASSERT( olen == result->len );
|
||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
// When using PSA crypto, RNG isn't controllable, so reference vector can't be used
|
||||
TEST_ASSERT( memcmp( output, result->x, olen ) == 0 );
|
||||
#endif
|
||||
|
||||
exit:
|
||||
mbedtls_pk_free( &pk );
|
||||
|
Loading…
x
Reference in New Issue
Block a user