summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/Symbols.list1
-rw-r--r--src/lib/libcrypto/x509/x509.h4
-rw-r--r--src/lib/libcrypto/x509/x509cset.c9
3 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index fb10bdedd6..3b4cbc386f 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -2675,6 +2675,7 @@ X509_CRL_set_version
2675X509_CRL_sign 2675X509_CRL_sign
2676X509_CRL_sign_ctx 2676X509_CRL_sign_ctx
2677X509_CRL_sort 2677X509_CRL_sort
2678X509_CRL_up_ref
2678X509_CRL_verify 2679X509_CRL_verify
2679X509_EXTENSIONS_it 2680X509_EXTENSIONS_it
2680X509_EXTENSION_create_by_NID 2681X509_EXTENSION_create_by_NID
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h
index 9033b1d4d9..3dc636473f 100644
--- a/src/lib/libcrypto/x509/x509.h
+++ b/src/lib/libcrypto/x509/x509.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509.h,v 1.34 2018/02/22 16:50:30 jsing Exp $ */ 1/* $OpenBSD: x509.h,v 1.35 2018/02/22 16:53:42 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -606,6 +606,8 @@ extern "C" {
606#define X509_CRL_get_issuer(x) ((x)->crl->issuer) 606#define X509_CRL_get_issuer(x) ((x)->crl->issuer)
607#define X509_CRL_get_REVOKED(x) ((x)->crl->revoked) 607#define X509_CRL_get_REVOKED(x) ((x)->crl->revoked)
608 608
609int X509_CRL_up_ref(X509_CRL *x);
610
609const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl); 611const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl);
610const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl); 612const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl);
611void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, 613void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
diff --git a/src/lib/libcrypto/x509/x509cset.c b/src/lib/libcrypto/x509/x509cset.c
index 88de63debd..3fc31cd519 100644
--- a/src/lib/libcrypto/x509/x509cset.c
+++ b/src/lib/libcrypto/x509/x509cset.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509cset.c,v 1.12 2018/02/22 16:47:50 jsing Exp $ */ 1/* $OpenBSD: x509cset.c,v 1.13 2018/02/22 16:53:42 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -64,6 +64,13 @@
64#include <openssl/x509.h> 64#include <openssl/x509.h>
65 65
66int 66int
67X509_CRL_up_ref(X509_CRL *x)
68{
69 int refs = CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);
70 return (refs > 1) ? 1 : 0;
71}
72
73int
67X509_CRL_set_version(X509_CRL *x, long version) 74X509_CRL_set_version(X509_CRL *x, long version)
68{ 75{
69 if (x == NULL) 76 if (x == NULL)