summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_cert.c
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2016-03-01 19:06:15 +0100
committerRich Salz <rsalz@openssl.org>2016-03-08 17:10:34 +0100
commitc001ce33137993a0c4ff15060ed1639826bfca0b (patch)
tree0589954d36d7138b51b4e9906a2d728e9c25669c /ssl/ssl_cert.c
parentConvert CRYPTO_LOCK_UI to new multi-threading API (diff)
downloadopenssl-c001ce33137993a0c4ff15060ed1639826bfca0b.tar.xz
openssl-c001ce33137993a0c4ff15060ed1639826bfca0b.zip
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 'ssl/ssl_cert.c')
-rw-r--r--ssl/ssl_cert.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index faa7a95ddd..e8044125eb 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -273,13 +273,12 @@ CERT *ssl_cert_dup(CERT *cert)
ret->cert_cb_arg = cert->cert_cb_arg;
if (cert->verify_store) {
- CRYPTO_add(&cert->verify_store->references, 1,
- CRYPTO_LOCK_X509_STORE);
+ X509_STORE_up_ref(cert->verify_store);
ret->verify_store = cert->verify_store;
}
if (cert->chain_store) {
- CRYPTO_add(&cert->chain_store->references, 1, CRYPTO_LOCK_X509_STORE);
+ X509_STORE_up_ref(cert->chain_store);
ret->chain_store = cert->chain_store;
}
@@ -1056,7 +1055,7 @@ int ssl_cert_set_cert_store(CERT *c, X509_STORE *store, int chain, int ref)
X509_STORE_free(*pstore);
*pstore = store;
if (ref && store)
- CRYPTO_add(&store->references, 1, CRYPTO_LOCK_X509_STORE);
+ X509_STORE_up_ref(store);
return 1;
}