summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2017-09-08 03:23:52 (GMT)
committerGitHub <noreply@github.com>2017-09-08 03:23:52 (GMT)
commit9f2b3d4c2899f9caea2e47063061a76e460ac618 (patch)
treec8149b7b145b020c3143609651ccd8fe54645726 /Doc/library
parentf032e9237aa7d43d21e0b04d685c36bddf7078c1 (diff)
downloadcpython-9f2b3d4c2899f9caea2e47063061a76e460ac618.zip
cpython-9f2b3d4c2899f9caea2e47063061a76e460ac618.tar.gz
cpython-9f2b3d4c2899f9caea2e47063061a76e460ac618.tar.bz2
[3.6] bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (GH-1363) (#3444)
* bpo-29136: Add TLS 1.3 support TLS 1.3 introduces a new, distinct set of cipher suites. The TLS 1.3 cipher suites don't overlap with cipher suites from TLS 1.2 and earlier. Since Python sets its own set of permitted ciphers, TLS 1.3 handshake will fail as soon as OpenSSL 1.1.1 is released. Let's enable the common AES-GCM and ChaCha20 suites. Additionally the flag OP_NO_TLSv1_3 is added. It defaults to 0 (no op) with OpenSSL prior to 1.1.1. This allows applications to opt-out from TLS 1.3 now. Signed-off-by: Christian Heimes <christian@python.org>. (cherry picked from commit cb5b68abdeb1b1d56c581d5b4d647018703d61e3)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/ssl.rst28
1 files changed, 26 insertions, 2 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index 0f09b3f..f19526b 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -193,11 +193,11 @@ instead.
.. table::
======================== ============ ============ ============= ========= =========== ===========
- *client* / **server** **SSLv2** **SSLv3** **TLS** **TLSv1** **TLSv1.1** **TLSv1.2**
+ *client* / **server** **SSLv2** **SSLv3** **TLS** [3]_ **TLSv1** **TLSv1.1** **TLSv1.2**
------------------------ ------------ ------------ ------------- --------- ----------- -----------
*SSLv2* yes no no [1]_ no no no
*SSLv3* no yes no [2]_ no no no
- *TLS* (*SSLv23*) no [1]_ no [2]_ yes yes yes yes
+ *TLS* (*SSLv23*) [3]_ no [1]_ no [2]_ yes yes yes yes
*TLSv1* no no yes yes no no
*TLSv1.1* no no yes no yes no
*TLSv1.2* no no yes no no yes
@@ -206,6 +206,9 @@ instead.
.. rubric:: Footnotes
.. [1] :class:`SSLContext` disables SSLv2 with :data:`OP_NO_SSLv2` by default.
.. [2] :class:`SSLContext` disables SSLv3 with :data:`OP_NO_SSLv3` by default.
+ .. [3] TLS 1.3 protocol will be available with :data:`PROTOCOL_TLS` in
+ OpenSSL >= 1.1.1. There is no dedicated PROTOCOL constant for just
+ TLS 1.3.
.. note::
@@ -294,6 +297,11 @@ purposes.
3DES was dropped from the default cipher string.
+ .. versionchanged:: 3.7
+
+ TLS 1.3 cipher suites TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384,
+ and TLS_CHACHA20_POLY1305_SHA256 were added to the default cipher string.
+
Random generation
^^^^^^^^^^^^^^^^^
@@ -760,6 +768,16 @@ Constants
.. versionadded:: 3.4
+.. data:: OP_NO_TLSv1_3
+
+ Prevents a TLSv1.3 connection. This option is only applicable in conjunction
+ with :const:`PROTOCOL_TLS`. It prevents the peers from choosing TLSv1.3 as
+ the protocol version. TLS 1.3 is available with OpenSSL 1.1.1 or later.
+ When Python has been compiled against an older version of OpenSSL, the
+ flag defaults to *0*.
+
+ .. versionadded:: 3.7
+
.. data:: OP_CIPHER_SERVER_PREFERENCE
Use the server's cipher ordering preference, rather than the client's.
@@ -834,6 +852,12 @@ Constants
.. versionadded:: 3.3
+.. data:: HAS_TLSv1_3
+
+ Whether the OpenSSL library has built-in support for the TLS 1.3 protocol.
+
+ .. versionadded:: 3.7
+
.. data:: CHANNEL_BINDING_TYPES
List of supported TLS channel binding types. Strings in this list