aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-11 22:51:27 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-11 23:02:01 -0400
commit61ff35662049f02da8d2c0f54ef6e84f97c14b1a (patch)
tree9ed62e6417eb49cec6c9230047a4c3f8ee0e0599 /src
parente40a03f61e907d0de5fb07624cb6306323de543d (diff)
downloadcryptography-61ff35662049f02da8d2c0f54ef6e84f97c14b1a.tar.gz
cryptography-61ff35662049f02da8d2c0f54ef6e84f97c14b1a.tar.bz2
cryptography-61ff35662049f02da8d2c0f54ef6e84f97c14b1a.zip
Add AuthorityKeyIdentifier.from_issuer_subject_key_identifier
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/x509/extensions.py8
1 files changed, 8 insertions, 0 deletions
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 (
"<AuthorityKeyIdentifier(key_identifier={0.key_identifier!r}, "