- Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size management (Closes ticket #44)
This commit is contained in:
parent
b6d5f08051
commit
fe3256e54b
4 changed files with 23 additions and 5 deletions
|
@ -142,7 +142,7 @@ int rsa_check_pubkey( const rsa_context *ctx )
|
|||
return( POLARSSL_ERR_RSA_KEY_CHECK_FAILED );
|
||||
|
||||
if( mpi_msb( &ctx->N ) < 128 ||
|
||||
mpi_msb( &ctx->N ) > 4096 )
|
||||
mpi_msb( &ctx->N ) > POLARSSL_MPI_MAX_BITS )
|
||||
return( POLARSSL_ERR_RSA_KEY_CHECK_FAILED );
|
||||
|
||||
if( mpi_msb( &ctx->E ) < 2 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue