diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/spelling_wordlist.txt | 1 | ||||
-rw-r--r-- | docs/x509.rst | 23 |
2 files changed, 12 insertions, 12 deletions
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 003e37d5..fefd26b3 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -29,6 +29,7 @@ interoperable introspectability invariants iOS +iterable Koblitz Lange metadata diff --git a/docs/x509.rst b/docs/x509.rst index 282744f3..473efc36 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -187,21 +187,20 @@ X.509 Certificate Object .. 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 + An X509 Name is an ordered list of attributes. The object is iterable to + get every attribute 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``). + slash or comma delimited string (e.g. ``/CN=mydomain.com/O=My Org/C=US`` or + ``CN=mydomain.com, O=My Org, C=US``). - .. attribute:: attributes + .. doctest:: - :type: :class:`list` - - A list of all the :class:`NameAttribute` objects. - - .. doctest:: - - >>> len(cert.subject.attributes) - 3 + >>> assert len(cert.subject) == 3 + >>> attributes = [] + >>> for attribute in cert.subject: + ... attributes.append(attribute) + >>> len(attributes) + 3 .. method:: get_attributes_for_oid(oid) |