diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-13 18:47:30 -0600 |
|---|---|---|
| committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-13 18:47:30 -0600 |
| commit | 53d8d49454d7cef5cd41fc854116090ca78026ce (patch) | |
| tree | 44378de0bb36ce16c208856504a897064102b1c5 /docs | |
| parent | e901d642548dd268dcdc2efa60087a3fa1774fa6 (diff) | |
| download | cryptography-53d8d49454d7cef5cd41fc854116090ca78026ce.tar.gz cryptography-53d8d49454d7cef5cd41fc854116090ca78026ce.tar.bz2 cryptography-53d8d49454d7cef5cd41fc854116090ca78026ce.zip | |
make x509.Name iterable and address other review feedback
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) |
