Revert "New function mbedtls_rsa_get_bitlen"
This reverts commit 1d26709dbd
.
This commit is contained in:
parent
64a43ce48e
commit
e19b7d54d0
6 changed files with 18 additions and 80 deletions
|
@ -66,7 +66,7 @@ static int rsa_can_do( mbedtls_pk_type_t type )
|
|||
static size_t rsa_get_bitlen( const void *ctx )
|
||||
{
|
||||
const mbedtls_rsa_context * rsa = (const mbedtls_rsa_context *) ctx;
|
||||
return( mbedtls_rsa_get_bitlen( rsa ) );
|
||||
return( 8 * mbedtls_rsa_get_len( rsa ) );
|
||||
}
|
||||
|
||||
static int rsa_verify_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
||||
|
|
|
@ -480,19 +480,12 @@ void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding, int hash_id
|
|||
/*
|
||||
* Get length in bytes of RSA modulus
|
||||
*/
|
||||
|
||||
size_t mbedtls_rsa_get_len( const mbedtls_rsa_context *ctx )
|
||||
{
|
||||
return( ctx->len );
|
||||
}
|
||||
|
||||
/*
|
||||
* Get length in bits of RSA modulus
|
||||
*/
|
||||
size_t mbedtls_rsa_get_bitlen( const mbedtls_rsa_context *ctx )
|
||||
{
|
||||
return( mbedtls_mpi_bitlen( &ctx->N ) );
|
||||
}
|
||||
|
||||
|
||||
#if defined(MBEDTLS_GENPRIME)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue