From: jsing Date: Thu, 22 Feb 2018 16:47:50 +0000 (+0000) Subject: Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=da36649fa9ca97e34117df862e9306f7d7a4589b;p=openbsd Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate() and X509_REVOKED_get0_serialNumber(). --- diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 2b674655ae2..511c44cd866 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -2808,6 +2808,9 @@ X509_REVOKED_add1_ext_i2d X509_REVOKED_add_ext X509_REVOKED_delete_ext X509_REVOKED_free +X509_REVOKED_get0_extensions +X509_REVOKED_get0_revocationDate +X509_REVOKED_get0_serialNumber X509_REVOKED_get_ext X509_REVOKED_get_ext_by_NID X509_REVOKED_get_ext_by_OBJ diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index 6f0f5f4deca..c7695b4663d 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.32 2018/02/20 17:09:20 jsing Exp $ */ +/* $OpenBSD: x509.h,v 1.33 2018/02/22 16:47:50 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1024,8 +1024,11 @@ int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm); int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm); int X509_CRL_sort(X509_CRL *crl); -int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); +const STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(const X509_REVOKED *x); +const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x); +const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x); int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); +int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); int X509_REQ_check_private_key(X509_REQ *x509,EVP_PKEY *pkey); diff --git a/lib/libcrypto/x509/x509cset.c b/lib/libcrypto/x509/x509cset.c index afc1f0f2b30..88de63debd5 100644 --- a/lib/libcrypto/x509/x509cset.c +++ b/lib/libcrypto/x509/x509cset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509cset.c,v 1.11 2015/09/30 17:49:59 jsing Exp $ */ +/* $OpenBSD: x509cset.c,v 1.12 2018/02/22 16:47:50 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -136,6 +136,24 @@ X509_CRL_sort(X509_CRL *c) return 1; } +const STACK_OF(X509_EXTENSION) * +X509_REVOKED_get0_extensions(const X509_REVOKED *x) +{ + return x->extensions; +} + +const ASN1_TIME * +X509_REVOKED_get0_revocationDate(const X509_REVOKED *x) +{ + return x->revocationDate; +} + +const ASN1_INTEGER * +X509_REVOKED_get0_serialNumber(const X509_REVOKED *x) +{ + return x->serialNumber; +} + int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) {