mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-24 00:15:35 +00:00
Fix pk_ec_test_vec() to use MBEDTLS_MD_NONE
The pk_ec_test_vec() was incorrectly using MBEDTLS_MD_SHA1 for the parameter to mbedtls_pk_verify(). It should use MBEDTLS_MD_NONE since that parameter is ignored for this test case. Signed-off-by: John Durkop <john.durkop@fermatsoftware.com>
This commit is contained in:
parent
2ec2eaac31
commit
d4efa8d0ac
|
@ -775,8 +775,8 @@ void pk_ec_test_vec( int type, int id, data_t * key, data_t * hash,
|
|||
TEST_ASSERT( mbedtls_ecp_point_read_binary( &eckey->grp, &eckey->Q,
|
||||
key->x, key->len ) == 0 );
|
||||
|
||||
// MBEDTLS_MD_SHA1 is a dummy - it is ignored, but has to be other than MBEDTLS_MD_NONE.
|
||||
TEST_ASSERT( mbedtls_pk_verify( &pk, MBEDTLS_MD_SHA1,
|
||||
// MBEDTLS_MD_NONE is used since it will be ignored.
|
||||
TEST_ASSERT( mbedtls_pk_verify( &pk, MBEDTLS_MD_NONE,
|
||||
hash->x, hash->len, sig->x, sig->len ) == ret );
|
||||
|
||||
exit:
|
||||
|
|
Loading…
Reference in a new issue