From 61ff35662049f02da8d2c0f54ef6e84f97c14b1a Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 11 Mar 2016 22:51:27 -0400 Subject: Add AuthorityKeyIdentifier.from_issuer_subject_key_identifier --- src/cryptography/x509/extensions.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py index 0aa67212..87d2de1c 100644 --- a/src/cryptography/x509/extensions.py +++ b/src/cryptography/x509/extensions.py @@ -191,6 +191,14 @@ class AuthorityKeyIdentifier(object): authority_cert_serial_number=None ) + @classmethod + def from_issuer_subject_key_identifier(cls, ski): + return cls( + key_identifier=ski.value.digest, + authority_cert_issuer=None, + authority_cert_serial_number=None + ) + def __repr__(self): return ( "