Test mbedtls_rsa_gen_key() with NULL ctx/RNG separately

This commit is contained in:
Hanno Becker 2018-12-18 13:30:42 +00:00
parent 71cd6c7ba9
commit f04d923834

View file

@ -67,7 +67,11 @@ void rsa_invalid_param( )
invalid_padding, 0 ) ); invalid_padding, 0 ) );
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA, TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA,
mbedtls_rsa_gen_key( NULL, NULL, NULL, 0, 0 ) ); mbedtls_rsa_gen_key( NULL, rnd_std_rand,
NULL, 0, 0 ) );
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA,
mbedtls_rsa_gen_key( &ctx, NULL,
NULL, 0, 0 ) );
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA, TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA,
mbedtls_rsa_check_pubkey( NULL ) ); mbedtls_rsa_check_pubkey( NULL ) );