1
0
python-pyOpenSSL/pyOpenSSL-pr1158-conditional-__all__.patch
Matej Cepl b067fdba7d Accepting request 1030427 from home:bnavigator:branches:devel:languages:python
- Upstream post-release doc fix (gh#pyca/pyopenssl#1150)
  * The minimum cryptography version is now 38.0.x (and we now pin
    releases  against cryptography major versions to prevent future
    breakage)
- Add pyOpenSSL-pr1158-conditional-__all__.patch
  gh#pyca/pyopenssl#1158

OBS-URL: https://build.opensuse.org/request/show/1030427
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyOpenSSL?expand=0&rev=96
2022-10-24 21:44:16 +00:00

47 lines
1.3 KiB
Diff

diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index 9db7353..c2a49f2 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -59,7 +59,7 @@ __all__ = [
"OP_NO_TLSv1",
"OP_NO_TLSv1_1",
"OP_NO_TLSv1_2",
- "OP_NO_TLSv1_3",
+ # "OP_NO_TLSv1_3", conditionally added below
"MODE_RELEASE_BUFFERS",
"OP_SINGLE_DH_USE",
"OP_SINGLE_ECDH_USE",
@@ -84,8 +84,8 @@ __all__ = [
"OP_NO_QUERY_MTU",
"OP_COOKIE_EXCHANGE",
"OP_NO_TICKET",
- "OP_NO_RENEGOTIATION",
- "OP_IGNORE_UNEXPECTED_EOF",
+ # "OP_NO_RENEGOTIATION", conditionally added below
+ # "OP_IGNORE_UNEXPECTED_EOF", conditionally added below
"OP_ALL",
"VERIFY_PEER",
"VERIFY_FAIL_IF_NO_PEER_CERT",
@@ -172,6 +172,7 @@ OP_NO_TLSv1_1 = _lib.SSL_OP_NO_TLSv1_1
OP_NO_TLSv1_2 = _lib.SSL_OP_NO_TLSv1_2
try:
OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3
+ __all__ += ["OP_NO_TLSv1_3"]
except AttributeError:
pass
@@ -208,11 +209,13 @@ OP_NO_TICKET = _lib.SSL_OP_NO_TICKET
try:
OP_NO_RENEGOTIATION = _lib.SSL_OP_NO_RENEGOTIATION
+ __all__ += ["OP_NO_RENEGOTIATION"]
except AttributeError:
pass
try:
OP_IGNORE_UNEXPECTED_EOF = _lib.SSL_OP_IGNORE_UNEXPECTED_EOF
+ __all__ += ["OP_IGNORE_UNEXPECTED_EOF"]
except AttributeError:
pass