Minor formatting changes
This commit is contained in:
parent
617c1aeb18
commit
8fd5548241
@ -466,7 +466,8 @@ int mbedtls_rsa_export_crt( const mbedtls_rsa_context *ctx,
|
||||
* \param padding MBEDTLS_RSA_PKCS_V15 or MBEDTLS_RSA_PKCS_V21
|
||||
* \param hash_id MBEDTLS_RSA_PKCS_V21 hash identifier
|
||||
*/
|
||||
void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding, int hash_id);
|
||||
void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding,
|
||||
int hash_id);
|
||||
|
||||
/**
|
||||
* \brief Get length of RSA modulus in bytes
|
||||
@ -498,7 +499,7 @@ int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx,
|
||||
unsigned int nbits, int exponent );
|
||||
|
||||
/**
|
||||
* \brief Check a public RSA key
|
||||
* \brief Check if a context contains an RSA public key
|
||||
*
|
||||
* \param ctx RSA context to be checked
|
||||
*
|
||||
@ -507,7 +508,8 @@ int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx,
|
||||
int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx );
|
||||
|
||||
/**
|
||||
* \brief Check a private RSA key
|
||||
* \brief Check if a context contains a complete
|
||||
* and valid RSA private key.
|
||||
*
|
||||
* \param ctx RSA context to be checked
|
||||
*
|
||||
|
@ -156,7 +156,9 @@ void rsa_pkcs1_sign_raw( char *message_hex_string, char *hash_result_string,
|
||||
unhexify( message_str, message_hex_string );
|
||||
hash_len = unhexify( hash_result, hash_result_string );
|
||||
|
||||
TEST_ASSERT( mbedtls_rsa_pkcs1_sign( &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_NONE, hash_len, hash_result, output ) == 0 );
|
||||
TEST_ASSERT( mbedtls_rsa_pkcs1_sign( &ctx, &rnd_pseudo_rand, &rnd_info,
|
||||
MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_NONE,
|
||||
hash_len, hash_result, output ) == 0 );
|
||||
|
||||
hexify( output_str, output, ctx.len );
|
||||
|
||||
@ -212,7 +214,10 @@ void rsa_pkcs1_verify_raw( char *message_hex_string, char *hash_result_string,
|
||||
hash_len = unhexify( hash_result, hash_result_string );
|
||||
unhexify( result_str, result_hex_str );
|
||||
|
||||
TEST_ASSERT( mbedtls_rsa_pkcs1_verify( &ctx, NULL, NULL, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_NONE, hash_len, hash_result, result_str ) == correct );
|
||||
TEST_ASSERT( mbedtls_rsa_pkcs1_verify( &ctx, NULL, NULL,
|
||||
MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_NONE,
|
||||
hash_len, hash_result,
|
||||
result_str ) == correct );
|
||||
|
||||
/* For PKCS#1 v1.5, there is an alternative way to verify signatures */
|
||||
if( padding_mode == MBEDTLS_RSA_PKCS_V15 )
|
||||
|
Loading…
Reference in New Issue
Block a user