- Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size management (Closes ticket #44)

This commit is contained in:
Paul Bakker 2011-11-25 12:11:43 +00:00
parent b6d5f08051
commit fe3256e54b
4 changed files with 23 additions and 5 deletions

View file

@ -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 ||