Make DistributionPoint relative_name a set of NameAttribute (#3210)
* Add RelativeDistinguishedName class
* Make relative_name a RelativeDistinguishedName
DistributionPoint relative_name is currently a Name but RFC 5280
defines it as RelativeDistinguishedName, i.e. a non-empty SET OF
name attributes. Change the DistributionPoint relative_name
attribute to be a RelativeDistinguishedName.
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst
index bee7c17..c562331 100644
--- a/docs/x509/reference.rst
+++ b/docs/x509/reference.rst
@@ -1156,6 +1156,22 @@
The value of the attribute.
+
+.. class:: RelativeDistinguishedName(attributes)
+
+ .. versionadded:: 1.6
+
+ A relative distinguished name is a non-empty set of name attributes. The
+ object is iterable to get every attribute.
+
+ .. method:: get_attributes_for_oid(oid)
+
+ :param oid: An :class:`ObjectIdentifier` instance.
+
+ :returns: A list of :class:`NameAttribute` instances that match the OID
+ provided. The list should contain zero or one values.
+
+
.. class:: ObjectIdentifier
.. versionadded:: 0.8
@@ -1851,12 +1867,15 @@
.. attribute:: relative_name
- :type: :class:`Name` or None
+ :type: :class:`RelativeDistinguishedName` or None
This field describes methods to retrieve the CRL relative to the CRL
issuer. At most one of ``full_name`` or ``relative_name`` will be
non-None.
+ .. versionchanged:: 1.6
+ Changed from :class:`Name` to :class:`RelativeDistinguishedName`.
+
.. attribute:: crl_issuer
:type: list of :class:`GeneralName` instances or None