aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-10 19:45:47 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-11 21:27:04 -0500
commit235e5a1a27b04a790cba988977d894266185135d (patch)
tree37f0f86acc876ca6d6efd1f61d4b32bd769803b0 /tests/test_x509.py
parentc8e9861396914451086f8410df7e7575a9b23bd7 (diff)
downloadcryptography-235e5a1a27b04a790cba988977d894266185135d.tar.gz
cryptography-235e5a1a27b04a790cba988977d894266185135d.tar.bz2
cryptography-235e5a1a27b04a790cba988977d894266185135d.zip
support IPAddress encoding for general names
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 6ad891b1..9b6b8826 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -6,6 +6,7 @@ from __future__ import absolute_import, division, print_function
import binascii
import datetime
+import ipaddress
import os
import pytest
@@ -1001,6 +1002,8 @@ class TestCertificateSigningRequestBuilder(object):
x509.OID_ORGANIZATION_NAME, u'We heart UTF8!\u2122'
)
])),
+ x509.IPAddress(ipaddress.ip_address(u"127.0.0.1")),
+ x509.IPAddress(ipaddress.ip_address(u"ff::")),
]),
critical=False,
).sign(private_key, hashes.SHA256(), backend)
@@ -1021,6 +1024,8 @@ class TestCertificateSigningRequestBuilder(object):
x509.OID_ORGANIZATION_NAME, u'We heart UTF8!\u2122'
),
])),
+ x509.IPAddress(ipaddress.ip_address(u"127.0.0.1")),
+ x509.IPAddress(ipaddress.ip_address(u"ff::")),
]
def test_subject_alt_name_unsupported_general_name(self, backend):