diff options
author | Thomas Erbesdobler <t.erbesdobler@gmx.de> | 2020-03-03 03:26:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 21:26:07 -0500 |
commit | ed71c5cc07e4a0bb7a58f4e0731e5af3d4d4aa53 (patch) | |
tree | 4dd0830c94c9ecbe908a8a078b6851f5c60bca6d /tests/x509 | |
parent | d12fd8d1c2851cec4af76d77b9ef7beaa83e837c (diff) | |
download | cryptography-ed71c5cc07e4a0bb7a58f4e0731e5af3d4d4aa53.tar.gz cryptography-ed71c5cc07e4a0bb7a58f4e0731e5af3d4d4aa53.tar.bz2 cryptography-ed71c5cc07e4a0bb7a58f4e0731e5af3d4d4aa53.zip |
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.
Diffstat (limited to 'tests/x509')
-rw-r--r-- | tests/x509/test_x509.py | 6 |
1 files changed, 3 insertions, 3 deletions
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() == |