Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-08-06 06:22:49 +0400
committerAdam Langley <agl@google.com>2014-08-07 04:06:34 +0400
commit150c617cfce408faf1274a60e5db194595cb4473 (patch)
tree35dc71d4a4f1afe75561befbb1543470f96ed514 /include/openssl/x509.h
parente6e15fc3a19ac6e4317d7245df24313c261fc2bb (diff)
Add X509_up_ref and use it internally.
Avoid needing to manually increment the reference count and using the right lock, both here and in Chromium. Change-Id: If116ebc224cfb1c4711f7e2c06f1fd2c97af21dd Reviewed-on: https://boringssl-review.googlesource.com/1415 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/x509.h')
-rw-r--r--include/openssl/x509.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/openssl/x509.h b/include/openssl/x509.h
index d07b2f52..058bbff6 100644
--- a/include/openssl/x509.h
+++ b/include/openssl/x509.h
@@ -806,6 +806,10 @@ DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR)
+/* X509_up_ref adds one to the reference count of |x| and returns
+ * |x|. */
+OPENSSL_EXPORT X509 *X509_up_ref(X509 *x);
+
OPENSSL_EXPORT int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
OPENSSL_EXPORT int X509_set_ex_data(X509 *r, int idx, void *arg);