diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2016-03-01 18:06:15 +0000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-08 11:10:34 -0500 |
commit | c001ce33137993a0c4ff15060ed1639826bfca0b (patch) | |
tree | 0589954d36d7138b51b4e9906a2d728e9c25669c /crypto/x509v3 | |
parent | 41cfbccc99f3ca3c9f656d8c71e2db5bcfcf6817 (diff) | |
download | openssl-c001ce33137993a0c4ff15060ed1639826bfca0b.tar.gz |
Convert CRYPTO_LOCK_X509_* to new multi-threading API
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509v3')
-rw-r--r-- | crypto/x509v3/pcy_cache.c | 4 | ||||
-rw-r--r-- | crypto/x509v3/v3_purp.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/crypto/x509v3/pcy_cache.c b/crypto/x509v3/pcy_cache.c index 64fe3bc598..bdce5a83bb 100644 --- a/crypto/x509v3/pcy_cache.c +++ b/crypto/x509v3/pcy_cache.c @@ -224,9 +224,9 @@ const X509_POLICY_CACHE *policy_cache_set(X509 *x) { if (x->policy_cache == NULL) { - CRYPTO_w_lock(CRYPTO_LOCK_X509); + CRYPTO_THREAD_write_lock(x->lock); policy_cache_new(x); - CRYPTO_w_unlock(CRYPTO_LOCK_X509); + CRYPTO_THREAD_unlock(x->lock); } return x->policy_cache; diff --git a/crypto/x509v3/v3_purp.c b/crypto/x509v3/v3_purp.c index e5231b3231..ae82fd181c 100644 --- a/crypto/x509v3/v3_purp.c +++ b/crypto/x509v3/v3_purp.c @@ -128,9 +128,9 @@ int X509_check_purpose(X509 *x, int id, int ca) int idx; const X509_PURPOSE *pt; if (!(x->ex_flags & EXFLAG_SET)) { - CRYPTO_w_lock(CRYPTO_LOCK_X509); + CRYPTO_THREAD_write_lock(x->lock); x509v3_cache_extensions(x); - CRYPTO_w_unlock(CRYPTO_LOCK_X509); + CRYPTO_THREAD_unlock(x->lock); } /* Return if side-effect only call */ if (id == -1) @@ -576,9 +576,9 @@ static int check_ca(const X509 *x) int X509_check_ca(X509 *x) { if (!(x->ex_flags & EXFLAG_SET)) { - CRYPTO_w_lock(CRYPTO_LOCK_X509); + CRYPTO_THREAD_write_lock(x->lock); x509v3_cache_extensions(x); - CRYPTO_w_unlock(CRYPTO_LOCK_X509); + CRYPTO_THREAD_unlock(x->lock); } return check_ca(x); |