aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509_ext.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-04-21 20:39:29 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-04-21 20:39:29 -0400
commite37ca984fcf093f4382eb3f19abf10b0862600da (patch)
tree18e6bb37bcb14639d0e533603d10d11792567978 /tests/test_x509_ext.py
parent7f817d5262084fcb01fc8b8a1a4f9728e7887bff (diff)
parentd04b39b253916223e9dd99831586822a4f9a2fc1 (diff)
downloadcryptography-e37ca984fcf093f4382eb3f19abf10b0862600da.tar.gz
cryptography-e37ca984fcf093f4382eb3f19abf10b0862600da.tar.bz2
cryptography-e37ca984fcf093f4382eb3f19abf10b0862600da.zip
Merge pull request #1857 from reaperhulk/san-check-list-elements
add a check to require that the list passed to SAN is all general names
Diffstat (limited to 'tests/test_x509_ext.py')
-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 2fa659ef..a7e04156 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(
[