Provide X509_CRL_get0_{last,next}Update() and X509_CRL_get0_signature().
authorjsing <jsing@openbsd.org>
Tue, 20 Feb 2018 17:04:58 +0000 (17:04 +0000)
committerjsing <jsing@openbsd.org>
Tue, 20 Feb 2018 17:04:58 +0000 (17:04 +0000)
lib/libcrypto/Symbols.list
lib/libcrypto/asn1/x_crl.c
lib/libcrypto/x509/x509.h

index a2957cf..f575132 100644 (file)
@@ -2620,6 +2620,9 @@ X509_CRL_dup
 X509_CRL_free
 X509_CRL_get0_by_cert
 X509_CRL_get0_by_serial
+X509_CRL_get0_lastUpdate
+X509_CRL_get0_nextUpdate
+X509_CRL_get0_signature
 X509_CRL_get_ext
 X509_CRL_get_ext_by_NID
 X509_CRL_get_ext_by_OBJ
index d8f24ca..0da2e95 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_crl.c,v 1.27 2017/01/29 17:49:22 beck Exp $ */
+/* $OpenBSD: x_crl.c,v 1.28 2018/02/20 17:04:58 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -685,3 +685,25 @@ X509_CRL_get_meth_data(X509_CRL *crl)
 {
        return crl->meth_data;
 }
+
+const ASN1_TIME *
+X509_CRL_get0_lastUpdate(const X509_CRL *crl)
+{
+       return crl->crl->lastUpdate;
+}
+
+const ASN1_TIME *
+X509_CRL_get0_nextUpdate(const X509_CRL *crl)
+{
+       return crl->crl->nextUpdate;
+}
+
+void
+X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
+    const X509_ALGOR **palg)
+{
+       if (psig != NULL)
+               *psig = crl->signature;
+       if (palg != NULL)
+               *palg = crl->sig_alg;
+}
index 6d64511..9d02e31 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.h,v 1.29 2018/02/17 15:50:42 jsing Exp $ */
+/* $OpenBSD: x509.h,v 1.30 2018/02/20 17:04:58 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -606,6 +606,11 @@ extern "C" {
 #define                X509_CRL_get_issuer(x) ((x)->crl->issuer)
 #define                X509_CRL_get_REVOKED(x) ((x)->crl->revoked)
 
+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,
+    const X509_ALGOR **palg);
+
 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
 X509_CRL_METHOD *X509_CRL_METHOD_new(
        int (*crl_init)(X509_CRL *crl),