From a7ee00225bbf98bcacdd0422d9b054514ef3d0e2 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 18 Dec 2018 13:30:20 +0000 Subject: [PATCH] Test mbedtls_rsa_init() with invalid padding --- tests/suites/test_suite_rsa.function | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function index fe70085f9..a0ab86cb9 100644 --- a/tests/suites/test_suite_rsa.function +++ b/tests/suites/test_suite_rsa.function @@ -28,7 +28,8 @@ void rsa_invalid_param( ) unsigned char buf[42] = { 0 }; size_t olen; - TEST_INVALID_PARAM( mbedtls_rsa_init( NULL, 0, 0 ) ); + TEST_INVALID_PARAM( mbedtls_rsa_init( NULL, valid_padding, 0 ) ); + TEST_INVALID_PARAM( mbedtls_rsa_init( &ctx, invalid_padding, 0 ) ); TEST_VALID_PARAM( mbedtls_rsa_free( NULL ) ); /* No more variants because only the first argument must be non-NULL. */