aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-07-11 21:21:56 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-07-11 21:21:56 -0500
commitc8e9861396914451086f8410df7e7575a9b23bd7 (patch)
treeb9584293a7f40194cb7f23567b5d8e03eca35ffd /tests
parent3fe1543c9e4c04604967a9524aa5b2e641bc9ede (diff)
parent065b7b81984b8dbb24910d438b9ea0128db0b0bf (diff)
downloadcryptography-c8e9861396914451086f8410df7e7575a9b23bd7.tar.gz
cryptography-c8e9861396914451086f8410df7e7575a9b23bd7.tar.bz2
cryptography-c8e9861396914451086f8410df7e7575a9b23bd7.zip
Merge pull request #2134 from reaperhulk/encode-dirname
support DirectoryName encoding for general names
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 9c97e969..6ad891b1 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -995,6 +995,12 @@ class TestCertificateSigningRequestBuilder(object):
x509.DNSName(u"example.com"),
x509.DNSName(u"*.example.com"),
x509.RegisteredID(x509.ObjectIdentifier("1.2.3.4.5.6.7")),
+ x509.DirectoryName(x509.Name([
+ x509.NameAttribute(x509.OID_COMMON_NAME, u'PyCA'),
+ x509.NameAttribute(
+ x509.OID_ORGANIZATION_NAME, u'We heart UTF8!\u2122'
+ )
+ ])),
]),
critical=False,
).sign(private_key, hashes.SHA256(), backend)
@@ -1009,6 +1015,12 @@ class TestCertificateSigningRequestBuilder(object):
x509.DNSName(u"example.com"),
x509.DNSName(u"*.example.com"),
x509.RegisteredID(x509.ObjectIdentifier("1.2.3.4.5.6.7")),
+ x509.DirectoryName(x509.Name([
+ x509.NameAttribute(x509.OID_COMMON_NAME, u'PyCA'),
+ x509.NameAttribute(
+ x509.OID_ORGANIZATION_NAME, u'We heart UTF8!\u2122'
+ ),
+ ])),
]
def test_subject_alt_name_unsupported_general_name(self, backend):