Provide X509_set1_notBefore() and X509_set1_notAfter().
authorjsing <jsing@openbsd.org>
Thu, 22 Feb 2018 17:06:42 +0000 (17:06 +0000)
committerjsing <jsing@openbsd.org>
Thu, 22 Feb 2018 17:06:42 +0000 (17:06 +0000)
lib/libcrypto/Symbols.list
lib/libcrypto/x509/x509.h
lib/libcrypto/x509/x509_set.c

index 15cc471..c4daf0e 100644 (file)
@@ -3013,6 +3013,8 @@ X509_print_ex_fp
 X509_print_fp
 X509_pubkey_digest
 X509_reject_clear
+X509_set1_notAfter
+X509_set1_notBefore
 X509_set_ex_data
 X509_set_issuer_name
 X509_set_notAfter
index 1dafabe..cfa08b4 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.h,v 1.38 2018/02/22 17:05:35 jsing Exp $ */
+/* $OpenBSD: x509.h,v 1.39 2018/02/22 17:06:42 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -987,7 +987,9 @@ X509_NAME * X509_get_issuer_name(X509 *a);
 int            X509_set_subject_name(X509 *x, X509_NAME *name);
 X509_NAME *    X509_get_subject_name(X509 *a);
 int            X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
+int            X509_set1_notBefore(X509 *x, const ASN1_TIME *tm);
 int            X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
+int            X509_set1_notAfter(X509 *x, const ASN1_TIME *tm);
 const ASN1_TIME *X509_get0_notBefore(const X509 *x);
 ASN1_TIME *X509_getm_notBefore(const X509 *x);
 const ASN1_TIME *X509_get0_notAfter(const X509 *x);
index a43f009..06ff12c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_set.c,v 1.14 2018/02/17 15:50:42 jsing Exp $ */
+/* $OpenBSD: x509_set.c,v 1.15 2018/02/22 17:06:42 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -147,6 +147,12 @@ X509_set_notBefore(X509 *x, const ASN1_TIME *tm)
        return (in != NULL);
 }
 
+int
+X509_set1_notBefore(X509 *x, const ASN1_TIME *tm)
+{
+       return X509_set_notBefore(x, tm);
+}
+
 const ASN1_TIME *
 X509_get0_notAfter(const X509 *x)
 {
@@ -179,6 +185,12 @@ X509_set_notAfter(X509 *x, const ASN1_TIME *tm)
        return (in != NULL);
 }
 
+int
+X509_set1_notAfter(X509 *x, const ASN1_TIME *tm)
+{
+       return X509_set_notAfter(x, tm);
+}
+
 int
 X509_set_pubkey(X509 *x, EVP_PKEY *pkey)
 {