File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
src/cryptography/hazmat/bindings/openssl Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ Changelog
9
9
.. note :: This version is not yet released and is under active development.
10
10
11
11
* **BACKWARDS INCOMPATIBLE: ** Support for Python 3.7 has been removed.
12
+ * Support for OpenSSL < 3.0 is deprecated and will be removed in the next
13
+ release.
12
14
* Removed the deprecated ``get_attribute_for_oid `` method on
13
15
:class: `~cryptography.x509.CertificateSigningRequest `. Users should use
14
16
:meth: `~cryptography.x509.Attributes.get_attribute_for_oid ` instead.
Original file line number Diff line number Diff line change 16
16
from cryptography .exceptions import InternalError
17
17
from cryptography .hazmat .bindings ._rust import _openssl , openssl
18
18
from cryptography .hazmat .bindings .openssl ._conditional import CONDITIONAL_NAMES
19
+ from cryptography .utils import CryptographyDeprecationWarning
19
20
20
21
21
22
def _openssl_assert (ok : bool ) -> None :
@@ -120,3 +121,17 @@ def _verify_package_version(version: str) -> None:
120
121
UserWarning ,
121
122
stacklevel = 2 ,
122
123
)
124
+
125
+ if (
126
+ not openssl .CRYPTOGRAPHY_IS_LIBRESSL
127
+ and not openssl .CRYPTOGRAPHY_IS_BORINGSSL
128
+ and not openssl .CRYPTOGRAPHY_IS_AWSLC
129
+ and not openssl .CRYPTOGRAPHY_OPENSSL_300_OR_GREATER
130
+ ):
131
+ warnings .warn (
132
+ "You are using OpenSSL < 3.0. Support for OpenSSL < 3.0 is deprecated "
133
+ "and will be removed in the next release. Please upgrade to OpenSSL "
134
+ "3.0 or later." ,
135
+ CryptographyDeprecationWarning ,
136
+ stacklevel = 2 ,
137
+ )
You can’t perform that action at this time.
0 commit comments