mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
parent
38b83c2b93
commit
531bd05de9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user