diff options
author | Nathaniel J. Smith <njs@pobox.com> | 2019-08-01 21:32:13 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2019-08-02 00:32:13 -0400 |
commit | a18137385f574603535b29ad935f496d307ab3ae (patch) | |
tree | 1393938d0f8db3fd6582c078165a25923ae997ce | |
parent | a539b4ccb4788ed0b6c47edcfa7a123e4522fa3e (diff) | |
download | pyopenssl-a18137385f574603535b29ad935f496d307ab3ae.tar.gz |
Expose OP_NO_TLSv1_3 (#861)
* Expose OP_NO_TLSv1_3
* Support openssl <1.1.1
-rw-r--r-- | doc/api/ssl.rst | 1 | ||||
-rw-r--r-- | src/OpenSSL/SSL.py | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/ssl.rst b/doc/api/ssl.rst index c678b28..1c09237 100644 --- a/doc/api/ssl.rst +++ b/doc/api/ssl.rst @@ -74,6 +74,7 @@ Context, Connection. OP_NO_TLSv1 OP_NO_TLSv1_1 OP_NO_TLSv1_2 + OP_NO_TLSv1_3 Constants used with :py:meth:`set_options` of Context objects. diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index eeb92f6..5521151 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -46,6 +46,7 @@ __all__ = [ 'OP_NO_TLSv1', 'OP_NO_TLSv1_1', 'OP_NO_TLSv1_2', + 'OP_NO_TLSv1_3', 'MODE_RELEASE_BUFFERS', 'OP_SINGLE_DH_USE', 'OP_SINGLE_ECDH_USE', @@ -139,6 +140,10 @@ OP_NO_SSLv3 = _lib.SSL_OP_NO_SSLv3 OP_NO_TLSv1 = _lib.SSL_OP_NO_TLSv1 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 +except AttributeError: + pass MODE_RELEASE_BUFFERS = _lib.SSL_MODE_RELEASE_BUFFERS |