From 02467dda61be0413413bc88a85e0290ca7001847 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Mon, 7 Nov 2016 15:54:04 +1000 Subject: 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. --- docs/x509/reference.rst | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'docs/x509') diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index bee7c176..c5623315 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -1156,6 +1156,22 @@ X.509 CSR (Certificate Signing Request) Builder Object 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 @@ X.509 Extensions .. 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 -- cgit v1.2.3