From dc29030ab67880440ec8fcff3a35b5c7bdca5c6b Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 7 Sep 2015 23:32:58 +0100 Subject: [PATCH] Add accessors for X509_REVOKED. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Rich Salz Reviewed-by: Emilia Käsper --- crypto/x509/x509cset.c | 10 ++++++++++ include/openssl/x509.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c index 4dbe6d087f..1543588139 100644 --- a/crypto/x509/x509cset.c +++ b/crypto/x509/x509cset.c @@ -177,6 +177,11 @@ int X509_CRL_get_signature_nid(const X509_CRL *crl) return OBJ_obj2nid(crl->sig_alg.algorithm); } +ASN1_TIME *X509_REVOKED_get0_revocationDate(X509_REVOKED *x) +{ + return x->revocationDate; +} + int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) { ASN1_TIME *in; @@ -194,6 +199,11 @@ int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) return (in != NULL); } +ASN1_INTEGER *X509_REVOKED_get0_serialNumber(X509_REVOKED *x) +{ + return x->serialNumber; +} + int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial) { ASN1_INTEGER *in; diff --git a/include/openssl/x509.h b/include/openssl/x509.h index eb9e3b4453..1374b0f80e 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -800,7 +800,9 @@ void X509_CRL_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, int X509_CRL_get_signature_nid(const X509_CRL *crl); int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp); +ASN1_INTEGER *X509_REVOKED_get0_serialNumber(X509_REVOKED *x); int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); +ASN1_TIME *X509_REVOKED_get0_revocationDate(X509_REVOKED *x); int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer, -- 2.25.1