aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-03-12 09:41:47 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2016-03-12 09:41:47 -0500
commit2d0deb14fe2502fcab6cb9ec56f444ad7cd6dd4a (patch)
treeff568231e454cd9fff9b9cbc4da35f06cb03e448 /src
parentab5de1a6b65c040dc61f02ef6e097105b2404cee (diff)
parent2d8e574e9dd1510783f12b7632b05622a16e82ef (diff)
downloadcryptography-2d0deb14fe2502fcab6cb9ec56f444ad7cd6dd4a.tar.gz
cryptography-2d0deb14fe2502fcab6cb9ec56f444ad7cd6dd4a.tar.bz2
cryptography-2d0deb14fe2502fcab6cb9ec56f444ad7cd6dd4a.zip
Merge pull request #2813 from reaperhulk/fix-2758
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}, "