Adapt RSA verify failure code

RSA verification now returns MBEDTLS_ERR_RSA_VERIFY_FAILED where it
used to return MBEDTLS_ERR_RSA_INVALID_PADDING. Fix pk_rsa_match.

This ompletes the functional merge of:
* "Adapt test suites to modified error codes"
* "PK: support for opaque keys"
This commit is contained in:
Gilles Peskine 2018-01-19 23:46:34 +01:00 committed by Andrzej Kurek
parent b7f081ac17
commit ef3d613252

View File

@ -128,7 +128,7 @@ static void pk_rsa_match( mbedtls_rsa_context *raw,
hash, sizeof hash, sig, sig_len - 1 ) == MBEDTLS_ERR_RSA_VERIFY_FAILED );
sig[sig_len-1] ^= 1;
TEST_ASSERT( mbedtls_pk_verify( tested_ctx, MBEDTLS_MD_NONE,
hash, sizeof hash, sig, sig_len ) == MBEDTLS_ERR_RSA_INVALID_PADDING );
hash, sizeof hash, sig, sig_len ) == MBEDTLS_ERR_RSA_VERIFY_FAILED );
}
/* Test encryption */