diff options
author | Phoebe Queen <foibey@gmail.com> | 2015-08-12 03:52:03 +0100 |
---|---|---|
committer | Phoebe Queen <foibey@gmail.com> | 2015-08-12 03:52:03 +0100 |
commit | 019b7f84c9284d27972ea0abfac8ebad24490b92 (patch) | |
tree | aa9d725fa085776f527dce7f1a5cd7459c76ba48 /docs/x509/reference.rst | |
parent | 9fbb889347696db4a15e44b2c73d38aa47da8b97 (diff) | |
download | cryptography-019b7f84c9284d27972ea0abfac8ebad24490b92.tar.gz cryptography-019b7f84c9284d27972ea0abfac8ebad24490b92.tar.bz2 cryptography-019b7f84c9284d27972ea0abfac8ebad24490b92.zip |
added docs for get_extension_for_class
Diffstat (limited to 'docs/x509/reference.rst')
-rw-r--r-- | docs/x509/reference.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index 8d5d6a6f..efc2c8a9 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -889,6 +889,21 @@ X.509 Extensions >>> cert.extensions.get_extension_for_oid(ExtensionOID.BASIC_CONSTRAINTS) <Extension(oid=<ObjectIdentifier(oid=2.5.29.19, name=basicConstraints)>, critical=True, value=<BasicConstraints(ca=True, path_length=None)>)> + .. method:: get_extension_for_class(extclass) + + :param extclass: An extension class. + + :returns: An instance of the extension class. + + :raises cryptography.x509.ExtensionNotFound: If the certificate does + not have the extension requested. + + .. doctest:: + + >>> from cryptography import x509 + >>> cert.extensions.get_extension_for_class(x509.BasicConstraints) + <Extension(oid=<ObjectIdentifier(oid=2.5.29.19, name=basicConstraints)>, critical=True, value=<BasicConstraints(ca=True, path_length=None)>)> + .. class:: Extension .. versionadded:: 0.9 |