Don't raise an UnsupportedExtension for critical extensions. (#3550)
* Don't raise an UnsupportedExtension for critical extensions.
Fixes #2903
Fixes #2901
Fixes #3325
* Don't link
* Revert "Don't link"
This reverts commit 4fe847f91d9dd45cdc28a4984c4e44aad62a5de6.
* fix
* Revert "Revert "Don't link""
This reverts commit 856031b5a1fbad04ac218fa94ebf37dcd402f3ed.
* fix
* Deprecate this
* Better changelog entry
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst
index 1177dba..24d1c07 100644
--- a/docs/x509/reference.rst
+++ b/docs/x509/reference.rst
@@ -379,9 +379,6 @@
:raises cryptography.x509.DuplicateExtension: If more than one
extension of the same type is found within the certificate.
- :raises cryptography.x509.UnsupportedExtension: If the certificate
- contains an extension that is not supported.
-
:raises cryptography.x509.UnsupportedGeneralNameType: If an extension
contains a general name that is not supported.
@@ -773,9 +770,6 @@
:raises cryptography.x509.DuplicateExtension: If more than one
extension of the same type is found within the certificate signing request.
- :raises cryptography.x509.UnsupportedExtension: If the certificate signing request
- contains an extension that is not supported.
-
:raises cryptography.x509.UnsupportedGeneralNameType: If an extension
contains a general name that is not supported.
@@ -2067,10 +2061,8 @@
.. versionadded:: 1.2
- A generic extension class used to hold the raw value of **non-critical**
- extensions that ``cryptography`` does not know how to parse. Extensions
- marked critical will raise
- :class:`~cryptography.x509.UnsupportedExtension`.
+ A generic extension class used to hold the raw value of extensions that
+ ``cryptography`` does not know how to parse.
.. attribute:: oid
@@ -2669,17 +2661,6 @@
Returns the OID.
-.. class:: UnsupportedExtension
-
- This is raised when a certificate contains an unsupported extension type
- that is marked ``critical``.
-
- .. attribute:: oid
-
- :type: :class:`ObjectIdentifier`
-
- Returns the OID.
-
.. class:: ExtensionNotFound
This is raised when calling :meth:`Extensions.get_extension_for_oid` with