summaryrefslogtreecommitdiffstats
path: root/crypto/rsa
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2008-07-03 19:59:25 +0000
committerGeoff Thorpe <geoff@openssl.org>2008-07-03 19:59:25 +0000
commit5f834ab123af6444b7cffe21849e434ad6479f8a (patch)
tree0cc48f4fc085f781606cb118b715781651487cb3 /crypto/rsa
parent8528128b2a740d34d3ae1d43c525d7e6ea6d7f37 (diff)
Revert my earlier CRYPTO_THREADID commit, I will commit a reworked
version some time soon.
Diffstat (limited to 'crypto/rsa')
-rw-r--r--crypto/rsa/rsa_eay.c4
-rw-r--r--crypto/rsa/rsa_lib.c3
-rw-r--r--crypto/rsa/rsa_test.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c
index 7f58a89891..a1ecd6d478 100644
--- a/crypto/rsa/rsa_eay.c
+++ b/crypto/rsa/rsa_eay.c
@@ -263,10 +263,8 @@ err:
static BN_BLINDING *rsa_get_blinding(RSA *rsa, int *local, BN_CTX *ctx)
{
BN_BLINDING *ret;
- CRYPTO_THREADID tid;
int got_write_lock = 0;
- CRYPTO_THREADID_set(&tid);
CRYPTO_r_lock(CRYPTO_LOCK_RSA);
if (rsa->blinding == NULL)
@@ -283,7 +281,7 @@ static BN_BLINDING *rsa_get_blinding(RSA *rsa, int *local, BN_CTX *ctx)
if (ret == NULL)
goto err;
- if (!BN_BLINDING_cmp_thread(ret, &tid))
+ if ((BN_BLINDING_get_thread_id(ret) == CRYPTO_thread_id()) && (BN_BLINDING_get_thread_idptr(ret) == CRYPTO_thread_idptr()))
{
/* rsa->blinding is ours! */
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index cf35c0d10b..dd09609743 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -417,7 +417,8 @@ BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx)
RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_BN_LIB);
goto err;
}
- BN_BLINDING_set_thread(ret);
+ BN_BLINDING_set_thread_id(ret, CRYPTO_thread_id());
+ BN_BLINDING_set_thread_idptr(ret, CRYPTO_thread_idptr());
err:
BN_CTX_end(ctx);
if (in_ctx == NULL)
diff --git a/crypto/rsa/rsa_test.c b/crypto/rsa/rsa_test.c
index c8705a0f6e..4080de8bcf 100644
--- a/crypto/rsa/rsa_test.c
+++ b/crypto/rsa/rsa_test.c
@@ -328,7 +328,7 @@ int main(int argc, char *argv[])
}
CRYPTO_cleanup_all_ex_data();
- ERR_remove_thread_state(NULL);
+ ERR_remove_state(0);
CRYPTO_mem_leaks_fp(stderr);