diff --git a/programs/pkey/rsa_decrypt.c b/programs/pkey/rsa_decrypt.c index 292092c3c..5d182677f 100644 --- a/programs/pkey/rsa_decrypt.c +++ b/programs/pkey/rsa_decrypt.c @@ -30,6 +30,7 @@ #include "polarssl/platform.h" #else #include +#include #define polarssl_printf printf #define polarssl_exit exit #endif diff --git a/programs/pkey/rsa_encrypt.c b/programs/pkey/rsa_encrypt.c index 1d35462bd..9154875c4 100644 --- a/programs/pkey/rsa_encrypt.c +++ b/programs/pkey/rsa_encrypt.c @@ -30,6 +30,7 @@ #include "polarssl/platform.h" #else #include +#include #define polarssl_fprintf fprintf #define polarssl_printf printf #define polarssl_exit exit diff --git a/tests/suites/test_suite_pkcs1_v15.function b/tests/suites/test_suite_pkcs1_v15.function index 0323e5a92..3555f92b7 100644 --- a/tests/suites/test_suite_pkcs1_v15.function +++ b/tests/suites/test_suite_pkcs1_v15.function @@ -209,59 +209,3 @@ exit: } /* END_CASE */ -/* BEGIN_CASE */ -void pkcs1_rsassa_v15_verify_ext( int mod, - int radix_N, char *input_N, - int radix_E, char *input_E, - int msg_digest_id, int ctx_hash, - int mgf_hash, int salt_len, - char *message_hex_string, - char *result_hex_str, - int result_simple, - int result_full ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char result_str[1000]; - rsa_context ctx; - size_t msg_len, hash_len; - - rsa_init( &ctx, RSA_PKCS_V15, ctx_hash ); - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( result_str, 0x00, 1000 ); - - ctx.len = mod / 8 + ( ( mod % 8 ) ? 1 : 0 ); - TEST_ASSERT( mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( rsa_check_pubkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - unhexify( result_str, result_hex_str ); - - if( msg_digest_id != POLARSSL_MD_NONE ) - { - TEST_ASSERT( md( md_info_from_type( msg_digest_id ), - message_str, msg_len, hash_result ) == 0 ); - hash_len = 0; - } - else - { - memcpy( hash_result, message_str, msg_len ); - hash_len = msg_len; - } - - TEST_ASSERT( rsa_pkcs1_verify( &ctx, NULL, NULL, RSA_PUBLIC, - msg_digest_id, hash_len, hash_result, - result_str ) == result_simple ); - - TEST_ASSERT( rsa_rsassa_pss_verify_ext( &ctx, NULL, NULL, RSA_PUBLIC, - msg_digest_id, hash_len, hash_result, - mgf_hash, salt_len, - result_str ) == result_full ); - -exit: - rsa_free( &ctx ); -} -/* END_CASE */