diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-11 18:50:58 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-12 18:58:14 -0600 |
commit | e901d642548dd268dcdc2efa60087a3fa1774fa6 (patch) | |
tree | da7929e437b78ed212b8790d73fd7eaf2c58aef1 /docs | |
parent | 719d536dd691e84e208534798f2eb4f82aaa2e07 (diff) | |
download | cryptography-e901d642548dd268dcdc2efa60087a3fa1774fa6.tar.gz cryptography-e901d642548dd268dcdc2efa60087a3fa1774fa6.tar.bz2 cryptography-e901d642548dd268dcdc2efa60087a3fa1774fa6.zip |
refactor x509.Name to use get_attributes_by_oid
Diffstat (limited to 'docs')
-rw-r--r-- | docs/x509.rst | 101 |
1 files changed, 6 insertions, 95 deletions
diff --git a/docs/x509.rst b/docs/x509.rst index 33047262..282744f3 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -203,106 +203,17 @@ X.509 Certificate Object >>> len(cert.subject.attributes) 3 - .. attribute:: country_name + .. method:: get_attributes_for_oid(oid) - :type: :class:`list` + :param oid: An :class:`ObjectIdentifier` instance. - A list of country name :class:`NameAttribute` objects. + :returns: A list of :class:`NameAttribute` instances that match the + OID provided. If nothing matches an empty list will be returned. .. 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. + >>> cert.subject.get_attributes_for_oid(x509.OID_COMMON_NAME) + [<NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=commonName)>, value=u'Good CA')>] .. class:: Version |