mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 16:55:43 +01:00
Merge pull request #3988 from gilles-peskine-arm/rsa_private-ret-2.16
Backport 2.16: Fix an incorrect error code if RSA private operation glitched
This commit is contained in:
commit
15c39e53e5
2
ChangeLog.d/rsa_private-ret.txt
Normal file
2
ChangeLog.d/rsa_private-ret.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Bugfix
|
||||
* Fix an incorrect error code if an RSA private operation glitched.
|
@ -1106,10 +1106,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)
|
||||
|
Loading…
Reference in New Issue
Block a user