diff --git a/crypto/x509/x509_set.c b/crypto/x509/x509_set.c index 8e85a7ecc..6fd0d6392 100644 --- a/crypto/x509/x509_set.c +++ b/crypto/x509/x509_set.c @@ -134,6 +134,11 @@ int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm) return (in != NULL); } +int X509_set_notBefore(X509 *x, const ASN1_TIME *tm) +{ + return X509_set1_notBefore(x, tm); +} + const ASN1_TIME *X509_get0_notBefore(const X509 *x) { return x->cert_info->validity->notBefore; @@ -172,6 +177,11 @@ int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm) return (in != NULL); } +int X509_set_notAfter(X509 *x, const ASN1_TIME *tm) +{ + return X509_set1_notAfter(x, tm); +} + const ASN1_TIME *X509_get0_notAfter(const X509 *x) { return x->cert_info->validity->notAfter; diff --git a/include/openssl/x509.h b/include/openssl/x509.h index 6919c90aa..20c59225c 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -512,9 +512,13 @@ OPENSSL_EXPORT ASN1_TIME *X509_get_notBefore(const X509 *x509); // |X509_getm_notAfter| instead. OPENSSL_EXPORT ASN1_TIME *X509_get_notAfter(const X509 *x509); -// The following symbols are deprecated aliases to |X509_set1_*|. -#define X509_set_notBefore X509_set1_notBefore -#define X509_set_notAfter X509_set1_notAfter +// X509_set_notBefore calls |X509_set1_notBefore|. Use |X509_set1_notBefore| +// instead. +OPENSSL_EXPORT int X509_set_notBefore(X509 *x509, const ASN1_TIME *tm); + +// X509_set_notAfter calls |X509_set1_notAfter|. Use |X509_set1_notAfter| +// instead. +OPENSSL_EXPORT int X509_set_notAfter(X509 *x509, const ASN1_TIME *tm); // X509_get0_uids sets |*out_issuer_uid| and |*out_subject_uid| to non-owning // pointers to the issuerUID and subjectUID fields, respectively, of |x509|.