aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-04-21 08:44:17 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-04-21 08:44:17 -0500
commitd04b39b253916223e9dd99831586822a4f9a2fc1 (patch)
treecf057817a98a2f2df5bffcb8c66d0214272a51d5 /tests
parentbd11e028dcf763171097f5366f87f95ad0371a03 (diff)
downloadcryptography-d04b39b253916223e9dd99831586822a4f9a2fc1.tar.gz
cryptography-d04b39b253916223e9dd99831586822a4f9a2fc1.tar.bz2
cryptography-d04b39b253916223e9dd99831586822a4f9a2fc1.zip
add a check to require that the list passed to SAN is all general names
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509_ext.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index 8516a339..45d309db 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -721,6 +721,12 @@ class TestSubjectAlternativeName(object):
x509.DNSName(six.u("crypto.local")),
]
+ def test_invalid_general_names(self):
+ with pytest.raises(TypeError):
+ x509.SubjectAlternativeName(
+ [x509.DNSName(six.u("cryptography.io")), "invalid"]
+ )
+
def test_repr(self):
san = x509.SubjectAlternativeName(
[