From c3d38b5d80a955aee4b160bb97464a20c4992da7 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 8 Dec 2018 03:26:07 +0200 Subject: Add RFC 4514 Distinguished Name formatting for Name, RDN and NameAttribute (#4304) --- docs/x509/reference.rst | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'docs/x509') diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index 15891059..ac6bbcdc 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -583,7 +583,7 @@ X.509 CRL (Certificate Revocation List) Object .. doctest:: >>> crl.issuer - , value='US')>, , value='cryptography.io')>])> + .. attribute:: next_update @@ -1246,6 +1246,14 @@ X.509 CSR (Certificate Signing Request) Builder Object :return bytes: The DER encoded name. + .. method:: rfc4514_string() + + .. versionadded:: 2.5 + + :return str: Format the given name as a `RFC 4514`_ Distinguished Name + string, for example ``CN=mydomain.com, O=My Org, C=US``. + + .. class:: Version .. versionadded:: 0.7 @@ -1279,6 +1287,13 @@ X.509 CSR (Certificate Signing Request) Builder Object The value of the attribute. + .. method:: rfc4514_string() + + .. versionadded:: 2.5 + + :return str: Format the given attribute as a `RFC 4514`_ Distinguished + Name string. + .. class:: RelativeDistinguishedName(attributes) @@ -1295,6 +1310,13 @@ X.509 CSR (Certificate Signing Request) Builder Object :returns: A list of :class:`NameAttribute` instances that match the OID provided. The list should contain zero or one values. + .. method:: rfc4514_string() + + .. versionadded:: 2.5 + + :return str: Format the given RDN set as a `RFC 4514`_ Distinguished + Name string. + .. class:: ObjectIdentifier @@ -1309,6 +1331,8 @@ X.509 CSR (Certificate Signing Request) Builder Object The dotted string value of the OID (e.g. ``"2.5.4.3"``) +.. _`RFC 4514`: https://tools.ietf.org/html/rfc4514 + .. _general_name_classes: General Name Classes -- cgit v1.2.3