mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-08-12 14:17:50 +00:00
Merge pull request #4193 from daverodgman/rsa_private_backport_2.7
Backport 2.7: Fix an incorrect error code if RSA private operation glitched
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
Bugfix
|
||||
* Fix an incorrect error code if an RSA private operation glitched.
|
||||
+2
-2
@@ -1045,10 +1045,10 @@ cleanup:
|
||||
mbedtls_mpi_free( &C );
|
||||
mbedtls_mpi_free( &I );
|
||||
|
||||
if( ret != 0 )
|
||||
if( ret != 0 && ret >= -0x007f )
|
||||
return( MBEDTLS_ERR_RSA_PRIVATE_FAILED + ret );
|
||||
|
||||
return( 0 );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_PKCS1_V21)
|
||||
|
||||
Reference in New Issue
Block a user