diff options
author | David Benjamin <davidben@chromium.org> | 2014-08-07 06:15:46 +0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-08-07 06:44:31 +0400 |
commit | 67454b6f76d90fe290da4650ee0fc97db3357e02 (patch) | |
tree | 614207492f139f8c8c5c2d719013028db7371777 /ssl/ssl_cert.c | |
parent | 7fdeaf11017b82368e0a97547fc491b90ad40f67 (diff) |
Don't X509_up_ref X509_STOREs.
Change-Id: Ic78bec93aedcc06c1496fe374e1c1c77ef70ea4b
Reviewed-on: https://boringssl-review.googlesource.com/1416
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r-- | ssl/ssl_cert.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 7d398d90..765efe49 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -364,12 +364,14 @@ CERT *ssl_cert_dup(CERT *cert) if (cert->verify_store) { - ret->verify_store = X509_up_ref(cert->verify_store); + CRYPTO_add(&cert->verify_store->references, 1, CRYPTO_LOCK_X509_STORE); + ret->verify_store = cert->verify_store; } if (cert->chain_store) { - ret->chain_store = X509_up_ref(cert->chain_store); + CRYPTO_add(&cert->chain_store->references, 1, CRYPTO_LOCK_X509_STORE); + ret->chain_store = cert->chain_store; } ret->ciphers_raw = NULL; @@ -1211,7 +1213,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) - X509_up_ref(store); + CRYPTO_add(&store->references, 1, CRYPTO_LOCK_X509_STORE); return 1; } |