From 9e1873af35a2b530e71e1579b2d62c233b75ba26 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Mon, 9 Jul 2018 16:11:18 +0300 Subject: Make RelativeDistinguishedName preserve attribtue order (#4306) Duplicate attributes now raise an error instead of silently discarding duplicates. --- docs/x509/reference.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/x509') diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index 3fc6507e..64097bf2 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -1117,7 +1117,7 @@ X.509 CSR (Certificate Signing Request) Builder Object Technically, a Name is a list of *sets* of attributes, called *Relative Distinguished Names* or *RDNs*, although multi-valued RDNs are rarely encountered. The iteration order of values within a multi-valued RDN is - undefined. If you need to handle multi-valued RDNs, the ``rdns`` property + preserved. If you need to handle multi-valued RDNs, the ``rdns`` property gives access to an ordered list of :class:`RelativeDistinguishedName` objects. @@ -1203,7 +1203,8 @@ X.509 CSR (Certificate Signing Request) Builder Object .. versionadded:: 1.6 A relative distinguished name is a non-empty set of name attributes. The - object is iterable to get every attribute. + object is iterable to get every attribute, preserving the original order. + Passing duplicate attributes to the constructor raises ``ValueError``. .. method:: get_attributes_for_oid(oid) -- cgit v1.2.3