aboutsummaryrefslogtreecommitdiffstats
path: root/docs/x509.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-01-01 20:03:52 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-12 18:58:14 -0600
commit719d536dd691e84e208534798f2eb4f82aaa2e07 (patch)
treeecbe47cdda225afe629273d702d1ee2fd8d86811 /docs/x509.rst
parentcd9bdcddf7ea7fe041ffcb01965a035e64ab719e (diff)
downloadcryptography-719d536dd691e84e208534798f2eb4f82aaa2e07.tar.gz
cryptography-719d536dd691e84e208534798f2eb4f82aaa2e07.tar.bz2
cryptography-719d536dd691e84e208534798f2eb4f82aaa2e07.zip
X509 distinguished name parsing support in the OpenSSL backend
Diffstat (limited to 'docs/x509.rst')
-rw-r--r--docs/x509.rst137
1 files changed, 137 insertions, 0 deletions
diff --git a/docs/x509.rst b/docs/x509.rst
index 26dd2a07..33047262 100644
--- a/docs/x509.rst
+++ b/docs/x509.rst
@@ -166,6 +166,143 @@ X.509 Certificate Object
>>> cert.not_valid_after
datetime.datetime(2030, 12, 31, 8, 30)
+ .. attribute:: issuer
+
+ .. versionadded:: 0.8
+
+ :type: :class:`Name`
+
+ The :class:`Name` of the issuer.
+
+ .. attribute:: subject
+
+ .. versionadded:: 0.8
+
+ :type: :class:`Name`
+
+ The :class:`Name` of the subject.
+
+
+.. class:: Name
+
+ .. versionadded:: 0.8
+
+ An X509 Name is an ordered list of attributes. The entire list can be
+ obtained with :attr:`attributes` or you can use the helper properties to
+ obtain the specific type you want. Names are sometimes represented as a
+ slash or comma delimited string (e.g. ``/CN=mydomain.com/O=My Org/C=US``).
+
+ .. attribute:: attributes
+
+ :type: :class:`list`
+
+ A list of all the :class:`NameAttribute` objects.
+
+ .. doctest::
+
+ >>> len(cert.subject.attributes)
+ 3
+
+ .. attribute:: country_name
+
+ :type: :class:`list`
+
+ A list of country name :class:`NameAttribute` objects.
+
+ .. doctest::
+
+ >>> cert.subject.country_name == [
+ ... x509.NameAttribute(
+ ... x509.OID_COUNTRY_NAME,
+ ... 'US'
+ ... )
+ ... ]
+ True
+
+ .. attribute:: organization_name
+
+ :type: :class:`list`
+
+ A list of organization name :class:`NameAttribute` objects.
+
+ .. attribute:: organizational_unit_name
+
+ :type: :class:`list`
+
+ A list of organizational unit name :class:`NameAttribute` objects.
+
+ .. attribute:: dn_qualifier
+
+ :type: :class:`list`
+
+ A list of DN qualifier :class:`NameAttribute` objects.
+
+ .. attribute:: state_or_province_name
+
+ :type: :class:`list`
+
+ A list of state or province name :class:`NameAttribute` objects.
+
+ .. attribute:: common_name
+
+ :type: :class:`list`
+
+ A list of common name :class:`NameAttribute` objects.
+
+ .. attribute:: serial_number
+
+ :type: :class:`list`
+
+ A list of serial number :class:`NameAttribute` objects. This is not the
+ same as the certificate's serial number.
+
+ .. attribute:: locality_name
+
+ :type: :class:`list`
+
+ A list of locality name :class:`NameAttribute` objects.
+
+ .. attribute:: title
+
+ :type: :class:`list`
+
+ A list of title :class:`NameAttribute` objects.
+
+ .. attribute:: surname
+
+ :type: :class:`list`
+
+ A list of surname :class:`NameAttribute` objects.
+
+ .. attribute:: given_name
+
+ :type: :class:`list`
+
+ A list of given name :class:`NameAttribute` objects.
+
+ .. attribute:: pseudonym
+
+ :type: :class:`list`
+
+ A list of pseudonym :class:`NameAttribute` objects.
+
+ .. attribute:: generation_qualifier
+
+ :type: :class:`list`
+
+ A list of generation qualifier :class:`NameAttribute` objects.
+
+ .. attribute:: domain_component
+
+ :type: :class:`list`
+
+ A list of domain component :class:`NameAttribute` objects.
+
+ .. attribute:: email_address
+
+ :type: :class:`list`
+
+ A list of email address :class:`NameAttribute` objects.
.. class:: Version