diff --git a/src/_cffi_src/openssl/x509.py b/src/_cffi_src/openssl/x509.py index d1c8699ff71c..350d0a58946d 100644 --- a/src/_cffi_src/openssl/x509.py +++ b/src/_cffi_src/openssl/x509.py @@ -226,6 +226,8 @@ long X509_CRL_get_version(X509_CRL *); ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *); ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *); +const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *); +const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *); X509_NAME *X509_CRL_get_issuer(X509_CRL *); Cryptography_STACK_OF_X509_REVOKED *X509_CRL_get_REVOKED(X509_CRL *); @@ -360,6 +362,9 @@ #define X509_set1_notAfter X509_set_notAfter #define X509_getm_notAfter X509_get_notAfter #define X509_getm_notBefore X509_get_notBefore + +#define X509_CRL_get0_lastUpdate X509_CRL_get_lastUpdate +#define X509_CRL_get0_nextUpdate X509_CRL_get_nextUpdate #endif #endif """ diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py index efbb1793098f..69428dc5c9c6 100644 --- a/src/cryptography/hazmat/backends/openssl/x509.py +++ b/src/cryptography/hazmat/backends/openssl/x509.py @@ -282,13 +282,13 @@ def issuer(self): @property def next_update(self): - nu = self._backend._lib.X509_CRL_get_nextUpdate(self._x509_crl) + nu = self._backend._lib.X509_CRL_get0_nextUpdate(self._x509_crl) self._backend.openssl_assert(nu != self._backend._ffi.NULL) return _parse_asn1_time(self._backend, nu) @property def last_update(self): - lu = self._backend._lib.X509_CRL_get_lastUpdate(self._x509_crl) + lu = self._backend._lib.X509_CRL_get0_lastUpdate(self._x509_crl) self._backend.openssl_assert(lu != self._backend._ffi.NULL) return _parse_asn1_time(self._backend, lu)