From 7379a74b29c3ed6f13da2ac78c8abba9bed385ba Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 22 Feb 2018 17:01:44 +0000 Subject: [PATCH] Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate(). --- lib/libcrypto/Symbols.list | 2 ++ lib/libcrypto/x509/x509.h | 4 +++- lib/libcrypto/x509/x509cset.c | 14 +++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index a6404766dbf..bd821d71803 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -2668,6 +2668,8 @@ X509_CRL_match X509_CRL_new X509_CRL_print X509_CRL_print_fp +X509_CRL_set1_lastUpdate +X509_CRL_set1_nextUpdate X509_CRL_set_default_method X509_CRL_set_issuer_name X509_CRL_set_lastUpdate diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index 4f3c730a8fd..906cadaea39 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.36 2018/02/22 16:58:45 jsing Exp $ */ +/* $OpenBSD: x509.h,v 1.37 2018/02/22 17:01:44 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1029,7 +1029,9 @@ int X509_REQ_add1_attr_by_txt(X509_REQ *req, int X509_CRL_set_version(X509_CRL *x, long version); int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm); +int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm); int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm); +int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm); int X509_CRL_sort(X509_CRL *crl); const STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(const X509_REVOKED *x); diff --git a/lib/libcrypto/x509/x509cset.c b/lib/libcrypto/x509/x509cset.c index 3fc31cd519d..182dd8a9542 100644 --- a/lib/libcrypto/x509/x509cset.c +++ b/lib/libcrypto/x509/x509cset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509cset.c,v 1.13 2018/02/22 16:53:42 jsing Exp $ */ +/* $OpenBSD: x509cset.c,v 1.14 2018/02/22 17:01:44 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -108,6 +108,12 @@ X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) return (in != NULL); } +int +X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) +{ + return X509_CRL_set_lastUpdate(x, tm); +} + int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) { @@ -126,6 +132,12 @@ X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) return (in != NULL); } +int +X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) +{ + return X509_CRL_set_nextUpdate(x, tm); +} + int X509_CRL_sort(X509_CRL *c) { -- 2.20.1