-/* $OpenBSD: x509.h,v 1.34 2018/02/22 16:50:30 jsing Exp $ */
+/* $OpenBSD: x509.h,v 1.35 2018/02/22 16:53:42 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#define X509_CRL_get_issuer(x) ((x)->crl->issuer)
#define X509_CRL_get_REVOKED(x) ((x)->crl->revoked)
+int X509_CRL_up_ref(X509_CRL *x);
+
const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl);
const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl);
void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
-/* $OpenBSD: x509cset.c,v 1.12 2018/02/22 16:47:50 jsing Exp $ */
+/* $OpenBSD: x509cset.c,v 1.13 2018/02/22 16:53:42 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2001.
*/
#include <openssl/objects.h>
#include <openssl/x509.h>
+int
+X509_CRL_up_ref(X509_CRL *x)
+{
+ int refs = CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);
+ return (refs > 1) ? 1 : 0;
+}
+
int
X509_CRL_set_version(X509_CRL *x, long version)
{