aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_set.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-08-31 20:29:57 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-08-31 23:18:55 +0100
commit05f0fb9f6acc34c82a082d7668572828925694e7 (patch)
treeabed16eae5af33da7021280eb40f4db3f468849e /crypto/x509/x509_set.c
parent65cbf983ca4f69b8954f949c2edaaa48824481b3 (diff)
downloadopenssl-05f0fb9f6acc34c82a082d7668572828925694e7.tar.gz
Add X509_up_ref function.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509/x509_set.c')
-rw-r--r--crypto/x509/x509_set.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/x509/x509_set.c b/crypto/x509/x509_set.c
index 486e90acea..1ccfdb9d9c 100644
--- a/crypto/x509/x509_set.c
+++ b/crypto/x509/x509_set.c
@@ -150,3 +150,8 @@ int X509_set_pubkey(X509 *x, EVP_PKEY *pkey)
return (0);
return (X509_PUBKEY_set(&(x->cert_info->key), pkey));
}
+
+void X509_up_ref(X509 *x)
+{
+ CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509);
+}