mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
rsa: add check after calling BN_BLINDING_lock
As the potential failure of getting lock, we need to check the return value of the BN_BLINDING_lock() in order to avoid the dirty data. Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17642)
This commit is contained in:
parent
14db620282
commit
aefbcde291
@ -213,7 +213,9 @@ static int rsa_blinding_convert(BN_BLINDING *b, BIGNUM *f, BIGNUM *unblind,
|
||||
*/
|
||||
int ret;
|
||||
|
||||
BN_BLINDING_lock(b);
|
||||
if (!BN_BLINDING_lock(b))
|
||||
return 0;
|
||||
|
||||
ret = BN_BLINDING_convert_ex(f, unblind, b, ctx);
|
||||
BN_BLINDING_unlock(b);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user