mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 02:45:41 +01:00
- Removed unused but initialized variables
This commit is contained in:
parent
9db7742adb
commit
eaf90d9a9c
@ -60,7 +60,6 @@ pkcs1_rsaes_oaep_decrypt:mod:radix_P:input_P:radix_Q:input_Q:radix_N:input_N:rad
|
||||
rsa_context ctx;
|
||||
mpi P1, Q1, H, G;
|
||||
size_t output_len;
|
||||
size_t msg_len;
|
||||
|
||||
mpi_init( &P1 ); mpi_init( &Q1 ); mpi_init( &H ); mpi_init( &G );
|
||||
rsa_init( &ctx, RSA_PKCS_V21, {hash} );
|
||||
@ -86,7 +85,7 @@ pkcs1_rsaes_oaep_decrypt:mod:radix_P:input_P:radix_Q:input_Q:radix_N:input_N:rad
|
||||
|
||||
TEST_ASSERT( rsa_check_privkey( &ctx ) == 0 );
|
||||
|
||||
msg_len = unhexify( message_str, {message_hex_string} );
|
||||
unhexify( message_str, {message_hex_string} );
|
||||
|
||||
TEST_ASSERT( rsa_pkcs1_decrypt( &ctx, RSA_PRIVATE, &output_len, message_str, output, 1000 ) == {result} );
|
||||
if( {result} == 0 )
|
||||
|
@ -180,7 +180,7 @@ rsa_pkcs1_sign_raw:message_hex_string:hash_result_string:padding_mode:mod:radix_
|
||||
unsigned char output_str[1000];
|
||||
rsa_context ctx;
|
||||
mpi P1, Q1, H, G;
|
||||
int msg_len, hash_len;
|
||||
int hash_len;
|
||||
|
||||
mpi_init( &P1 ); mpi_init( &Q1 ); mpi_init( &H ); mpi_init( &G );
|
||||
rsa_init( &ctx, {padding_mode}, 0 );
|
||||
@ -207,7 +207,7 @@ rsa_pkcs1_sign_raw:message_hex_string:hash_result_string:padding_mode:mod:radix_
|
||||
|
||||
TEST_ASSERT( rsa_check_privkey( &ctx ) == 0 );
|
||||
|
||||
msg_len = unhexify( message_str, {message_hex_string} );
|
||||
unhexify( message_str, {message_hex_string} );
|
||||
hash_len = unhexify( hash_result, {hash_result_string} );
|
||||
|
||||
TEST_ASSERT( rsa_pkcs1_sign( &ctx, NULL, NULL, RSA_PRIVATE, SIG_RSA_RAW, hash_len, hash_result, output ) == 0 );
|
||||
@ -227,7 +227,7 @@ rsa_pkcs1_verify_raw:message_hex_string:hash_result_string:padding_mode:mod:radi
|
||||
unsigned char hash_result[1000];
|
||||
unsigned char result_str[1000];
|
||||
rsa_context ctx;
|
||||
size_t msg_len, hash_len;
|
||||
size_t hash_len;
|
||||
|
||||
rsa_init( &ctx, {padding_mode}, 0 );
|
||||
memset( message_str, 0x00, 1000 );
|
||||
@ -240,7 +240,7 @@ rsa_pkcs1_verify_raw:message_hex_string:hash_result_string:padding_mode:mod:radi
|
||||
|
||||
TEST_ASSERT( rsa_check_pubkey( &ctx ) == 0 );
|
||||
|
||||
msg_len = unhexify( message_str, {message_hex_string} );
|
||||
unhexify( message_str, {message_hex_string} );
|
||||
hash_len = unhexify( hash_result, {hash_result_string} );
|
||||
unhexify( result_str, {result_hex_str} );
|
||||
|
||||
|
@ -222,7 +222,7 @@ x509parse_key:key_data:result_str:result
|
||||
rsa_context rsa;
|
||||
unsigned char buf[2000];
|
||||
unsigned char output[2000];
|
||||
int data_len, res;
|
||||
int data_len;
|
||||
|
||||
memset( &rsa, 0, sizeof( rsa_context ) );
|
||||
memset( buf, 0, 2000 );
|
||||
@ -230,7 +230,7 @@ x509parse_key:key_data:result_str:result
|
||||
|
||||
data_len = unhexify( buf, {key_data} );
|
||||
|
||||
res = x509parse_key( &rsa, buf, data_len, NULL, 0 );
|
||||
x509parse_key( &rsa, buf, data_len, NULL, 0 );
|
||||
|
||||
TEST_ASSERT( x509parse_key( &rsa, buf, data_len, NULL, 0 ) == ( {result} ) );
|
||||
if( ( {result} ) == 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user