OpenBSD manual page server

Manual Page Search Parameters

X509_GET0_NOTBEFORE(3) Library Functions Manual X509_GET0_NOTBEFORE(3)

X509_get0_notBefore, X509_get0_notAfter, X509_getm_notBefore, X509_getm_notAfter, X509_CRL_get0_lastUpdate, X509_CRL_get0_nextUpdate, X509_set1_notBefore, X509_set1_notAfter, X509_CRL_set1_lastUpdate, X509_CRL_set1_nextUpdateget and set certificate and CRL validity dates

#include <openssl/x509.h>

const ASN1_TIME *
X509_get0_notBefore(const X509 *x);

const ASN1_TIME *
X509_get0_notAfter(const X509 *x);

X509_getm_notBefore(const X509 *x);

X509_getm_notAfter(const X509 *x);

X509_CRL_get0_lastUpdate(const X509_CRL *crl);

X509_CRL_get0_nextUpdate(const X509_CRL *crl);

X509_set1_notBefore(X509 *x, const ASN1_TIME *tm);

X509_set1_notAfter(X509 *x, const ASN1_TIME *tm);

X509_CRL_set1_lastUpdate(X509_CRL *crl, const ASN1_TIME *tm);

X509_CRL_set1_nextUpdate(X509_CRL *crl, const ASN1_TIME *tm);

() and () return pointers to the notBefore and notAfter fields of the validity period of the certificate x, respectively.

() and () are identical except for the const qualifier on the return type.

() and () return pointers to the lastUpdate and nextUpdate fields of crl.

(), (), (), and () set the notBefore, notAfter, lastUpdate, or nextUpdate field of x or crl, respectively, to a deep copy of tm and free the ASN1_TIME value that they replace.

X509_get0_notBefore(), X509_get0_notAfter(), X509_getm_notBefore(), X509_getm_notAfter(), X509_CRL_get0_lastUpdate(), and X509_CRL_get0_nextUpdate() return internal pointers which must not be freed by the application, or NULL if the requested fields are not available.

X509_set1_notBefore(), X509_set1_notAfter(), X509_CRL_set1_lastUpdate(), and X509_CRL_set1_nextUpdate() return 1 on success or 0 on failure.

ASN1_TIME_set(3), ASN1_TIME_set_tm(3), X509_cmp_time(3), X509_CRL_get0_by_serial(3), X509_CRL_new(3), X509_get_subject_name(3), X509_new(3), X509_sign(3), X509_VAL_new(3), X509_verify_cert(3)

These functions first appeared in OpenSSL 1.1.0 and have been available since OpenBSD 6.3.

March 23, 2018 OpenBSD-6.7