aboutsummaryrefslogtreecommitdiffstats
path: root/docs/x509
diff options
context:
space:
mode:
authorMarti Raudsepp <marti@juffo.org>2018-12-08 03:26:07 +0200
committerPaul Kehrer <paul.l.kehrer@gmail.com>2018-12-08 09:26:07 +0800
commitc3d38b5d80a955aee4b160bb97464a20c4992da7 (patch)
tree8d6580c1a56be5bccd9f98a414b5bb234b527d20 /docs/x509
parent7e422821b9f800f5345c37011c510dc9e76f552c (diff)
downloadcryptography-c3d38b5d80a955aee4b160bb97464a20c4992da7.tar.gz
cryptography-c3d38b5d80a955aee4b160bb97464a20c4992da7.tar.bz2
cryptography-c3d38b5d80a955aee4b160bb97464a20c4992da7.zip
Add RFC 4514 Distinguished Name formatting for Name, RDN and NameAttribute (#4304)
Diffstat (limited to 'docs/x509')
-rw-r--r--docs/x509/reference.rst26
1 files changed, 25 insertions, 1 deletions
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
- <Name([<NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.6, name=countryName)>, value='US')>, <NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=commonName)>, value='cryptography.io')>])>
+ <Name(C=US, CN=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