ipalib/x509.py: support Cryptography 43
Cryptography 43 added two new abstract methods to Certificate class of which we are using one, public_key_algorithm_oid. Fixes: https://pagure.io/freeipa/issue/9641 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
1 parent
38b83c2b93
commit
531bd05de9
1 file changed
+9
@@ -294,6 +294,15 @@ class IPACertificate(crypto_x509.Certificate):
|
||||
tzinfo=datetime.timezone.utc
|
||||
)
|
||||
|
||||
if hasattr(crypto_x509.Certificate, "public_key_algorithm_oid"):
|
||||
# added in python-cryptography 43.0.0
|
||||
@property
|
||||
def public_key_algorithm_oid(self):
|
||||
"""
|
||||
Returns the ObjectIdentifier of the public key.
|
||||
"""
|
||||
return self._cert.public_key_algorithm_oid()
|
||||
|
||||
@property
|
||||
def tbs_certificate_bytes(self):
|
||||
return self._cert.tbs_certificate_bytes
|
||||
|
||||
Reference in new issue
Block a user