diff -urN a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py --- a/src/OpenSSL/crypto.py 2023-04-29 03:22:33.000000000 +0200 +++ b/src/OpenSSL/crypto.py 2024-08-02 10:24:47.843604182 +0200 @@ -39,6 +39,20 @@ ) +# Define X509_CRL_set1_lastUpdate and X509_CRL_set1_nextUpdate if are missing, +# but X509_CRL_set_lastUpdate and X509_CRL_set_nextUpdate present. +# It's required for backward compatibility with older openssl versions. +if ( + not hasattr(_lib, "X509_CRL_set1_lastUpdate") + and hasattr(_lib, "X509_CRL_set_lastUpdate") +): + _lib.X509_CRL_set1_lastUpdate = _lib.X509_CRL_set_lastUpdate +if ( + not hasattr(_lib, "X509_CRL_set1_nextUpdate") + and hasattr(_lib, "X509_CRL_set_nextUpdate") +): + _lib.X509_CRL_set1_nextUpdate = _lib.X509_CRL_set_nextUpdate + __all__ = [ "FILETYPE_PEM", "FILETYPE_ASN1",