From ed71c5cc07e4a0bb7a58f4e0731e5af3d4d4aa53 Mon Sep 17 00:00:00 2001 From: Thomas Erbesdobler Date: Tue, 3 Mar 2020 03:26:07 +0100 Subject: Reversed the order of RDNs in x509.Name.rfc4514_string() (#5120) RFC4514 requires in section 2.1 that RDNs are converted to string representation in reversed order. --- tests/x509/test_x509.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/x509/test_x509.py b/tests/x509/test_x509.py index fa3a41a7..fb0c96ab 100644 --- a/tests/x509/test_x509.py +++ b/tests/x509/test_x509.py @@ -4556,14 +4556,14 @@ class TestName(object): def test_rfc4514_string(self): n = x509.Name([ x509.RelativeDistinguishedName([ - x509.NameAttribute(NameOID.ORGANIZATIONAL_UNIT_NAME, u'Sales'), - x509.NameAttribute(NameOID.COMMON_NAME, u'J. Smith'), + x509.NameAttribute(NameOID.DOMAIN_COMPONENT, u'net'), ]), x509.RelativeDistinguishedName([ x509.NameAttribute(NameOID.DOMAIN_COMPONENT, u'example'), ]), x509.RelativeDistinguishedName([ - x509.NameAttribute(NameOID.DOMAIN_COMPONENT, u'net'), + x509.NameAttribute(NameOID.ORGANIZATIONAL_UNIT_NAME, u'Sales'), + x509.NameAttribute(NameOID.COMMON_NAME, u'J. Smith'), ]), ]) assert (n.rfc4514_string() == -- cgit v1.2.3