add a check to require that the list passed to SAN is all general names
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index 8516a33..45d309d 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -721,6 +721,12 @@
             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(
             [