diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/x509.py | 3 | ||||
-rw-r--r-- | src/cryptography/x509.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py index affb79da..07e79fed 100644 --- a/src/cryptography/hazmat/backends/openssl/x509.py +++ b/src/cryptography/hazmat/backends/openssl/x509.py @@ -68,7 +68,8 @@ def _build_general_name(backend, gn): raise x509.UnsupportedGeneralNameType( "{0} is not a supported type".format( x509._GENERAL_NAMES.get(gn.type, gn.type) - ) + ), + x509._GENERAL_NAMES.get(gn.type, gn.type) ) diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 3dc066fa..dd6ea926 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -129,7 +129,9 @@ class ExtensionNotFound(Exception): class UnsupportedGeneralNameType(Exception): - pass + def __init__(self, msg, type): + super(UnsupportedGeneralNameType, self).__init__(msg) + self.type = type class NameAttribute(object): |