aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-05-03 11:04:34 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-05-03 11:04:34 -0500
commitc6e0f06135d36533a7543b0a24f144b44019a9dc (patch)
treeac4158ebc39a59b66c5e35b52c23445684b65b41 /src
parent25b1398738e74fe3eb5c4557aacfb897dd2caef4 (diff)
downloadcryptography-c6e0f06135d36533a7543b0a24f144b44019a9dc.tar.gz
cryptography-c6e0f06135d36533a7543b0a24f144b44019a9dc.tar.bz2
cryptography-c6e0f06135d36533a7543b0a24f144b44019a9dc.zip
Fix AKI authority_cert_issuer type
It was originally defined as an X509 Name, but in reality it is a list of GeneralName objects (albeit typically a list of one DirectoryName).
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/x509.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py
index 27337092..0d87cd51 100644
--- a/src/cryptography/x509.py
+++ b/src/cryptography/x509.py
@@ -666,8 +666,13 @@ class AuthorityKeyIdentifier(object):
"must both be present or both None"
)
- if not isinstance(authority_cert_issuer, Name):
- raise TypeError("authority_cert_issuer must be a Name")
+ if not all(
+ isinstance(x, GeneralName) for x in authority_cert_issuer
+ ):
+ raise TypeError(
+ "authority_cert_issuer must be a list of GeneralName "
+ "objects"
+ )
if not isinstance(authority_cert_serial_number, six.integer_types):
raise TypeError(