diff options
author | Nils Larsch <nils@openssl.org> | 2005-09-22 23:37:37 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-09-22 23:37:37 +0000 |
commit | ce75ca04b1c7ba4166cda8099aaeda45148710f8 (patch) | |
tree | ec0083a246238cf1b9257451f7d2757a0ba8315f /crypto/rsa/rsa_eay.c | |
parent | 9dba0554a50a896af5eaaf08b72571d1d32db4e2 (diff) | |
download | openssl-ce75ca04b1c7ba4166cda8099aaeda45148710f8.tar.gz |
protect BN_BLINDING_invert with a write lock and BN_BLINDING_convert
with a read lock
Submitted by: Leandro Santi <lesanti@fiuba7504.com.ar>
Diffstat (limited to 'crypto/rsa/rsa_eay.c')
-rw-r--r-- | crypto/rsa/rsa_eay.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c index 620ac5544b..56da944845 100644 --- a/crypto/rsa/rsa_eay.c +++ b/crypto/rsa/rsa_eay.c @@ -283,9 +283,9 @@ static int rsa_blinding_convert(BN_BLINDING *b, int local, BIGNUM *f, else { int ret; - CRYPTO_w_lock(CRYPTO_LOCK_RSA_BLINDING); + CRYPTO_r_lock(CRYPTO_LOCK_RSA_BLINDING); ret = BN_BLINDING_convert_ex(f, r, b, ctx); - CRYPTO_w_unlock(CRYPTO_LOCK_RSA_BLINDING); + CRYPTO_r_unlock(CRYPTO_LOCK_RSA_BLINDING); return ret; } } @@ -298,9 +298,9 @@ static int rsa_blinding_invert(BN_BLINDING *b, int local, BIGNUM *f, else { int ret; - CRYPTO_r_lock(CRYPTO_LOCK_RSA_BLINDING); + CRYPTO_w_lock(CRYPTO_LOCK_RSA_BLINDING); ret = BN_BLINDING_invert_ex(f, r, b, ctx); - CRYPTO_r_unlock(CRYPTO_LOCK_RSA_BLINDING); + CRYPTO_w_unlock(CRYPTO_LOCK_RSA_BLINDING); return ret; } } |