mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
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:
parent
851c3a2ced
commit
2bd0dda700
1 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue