Commit c7ac991c authored by Janos Follath's avatar Janos Follath Committed by Simon Butcher

Removing 'if' branch from the fix.

This new error shouldn't be distinguishable from other padding errors.
Updating 'bad' instead of adding a new 'if' branch.
parent eb39d7d2
......@@ -856,8 +856,7 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
bad |= *p++; /* Must be zero */
}
if( pad_count < 8 )
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
bad |= ( pad_count < 8 );
if( bad )
return( MBEDTLS_ERR_RSA_INVALID_PADDING );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment