docs: Fix type returned by get_extension_for_oid() and get_extension_for_class() (#7380)

The previous wording (to me) sounded as if an instance of the specific
`ExtensionType` subclass would be returned.
But the methods actually return an `Extension` instance, from which the
specific `ExtensionType` instance can be accessed through the `value`
property.
This commit is contained in:
Felix Dreissig 2022-06-28 13:26:36 +02:00 committed by GitHub
parent 851c3a2ced
commit 2bd0dda700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1568,7 +1568,7 @@ X.509 Extensions
:param oid: An :class:`ObjectIdentifier` instance.
:returns: An instance of the extension class.
:returns: An instance of :class:`Extension`.
:raises cryptography.x509.ExtensionNotFound: If the certificate does
not have the extension requested.
@ -1585,7 +1585,7 @@ X.509 Extensions
:param extclass: An extension class.
:returns: An instance of the extension class.
:returns: An instance of :class:`Extension`.
:raises cryptography.x509.ExtensionNotFound: If the certificate does
not have the extension requested.