summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_set.c
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2016-03-01 18:06:15 +0000
committerRich Salz <rsalz@openssl.org>2016-03-08 11:10:34 -0500
commitc001ce33137993a0c4ff15060ed1639826bfca0b (patch)
tree0589954d36d7138b51b4e9906a2d728e9c25669c /crypto/x509/x509_set.c
parent41cfbccc99f3ca3c9f656d8c71e2db5bcfcf6817 (diff)
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/x509/x509_set.c')
-rw-r--r--crypto/x509/x509_set.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/x509/x509_set.c b/crypto/x509/x509_set.c
index 9330a544bd..360ead87d3 100644
--- a/crypto/x509/x509_set.c
+++ b/crypto/x509/x509_set.c
@@ -148,7 +148,8 @@ int X509_set_pubkey(X509 *x, EVP_PKEY *pkey)
void X509_up_ref(X509 *x)
{
- CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509);
+ int i;
+ CRYPTO_atomic_add(&x->references, 1, &i, x->lock);
}
long X509_get_version(X509 *x)