From ef3d61325233c8ebe8290f81c41fa1f39a800311 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 19 Jan 2018 23:46:34 +0100 Subject: [PATCH] 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" --- tests/suites/test_suite_pk.function | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/test_suite_pk.function b/tests/suites/test_suite_pk.function index bd92f0c99..943b3f28d 100644 --- a/tests/suites/test_suite_pk.function +++ b/tests/suites/test_suite_pk.function @@ -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 */