New submission from Christian Heimes <li...@cheimes.de>:

Epic for various TLS 1.3 related tasks and improvements

TLS 1.3 requires some changes to the SSL module and tests. The TLS 1.3 
handshake behaves slightly differently, which causes some tests to fail. The 
new handshake and deferred non-application data also affect applications. 

* TLS 1.3 cipher suites are now set by SSL_CTX_set_ciphersuites(), while SSL to 
TLS 1.2 cipher suites are still set by SSL_CTX_set_cipher_list(). Therefore 
SSLContext.set_ciphers() no longer fails with invalid cipher suites, because 
TLS 1.3 are still available. TLS 1.3 cipher suites also cannot be changed or 
disabled by SSLContext.set_ciphers().

* TLS client cert authentication occurs after SSL_do_handshake() has finished. 
SSLSocket.connect() / handshake no longer fail, when the server requests a 
client cert or the available client cert is invalid. The actual authentication 
occurs when the client performs the first SSL_read() / SSL_write().

* Session tickets are exchanged after the handshake, too. On the client side, 
the session ticket is only available after the first SSL_read() or other 
operations that perform a read(). The session ticket class and code no longer 
works with TLS 1.3.

* TLS 1.3 sends two session tickets instead of one.

* Server-side handshake can fail with ConnectionResetError or BrokenPipeError, 
when the client closes the fd while the server is still send non-application 
data like new session ticket or client cert request.

* Client-side unwrap() / shutdown used to fail when a session ticket was stuck 
on the wire. This problem will be fixed by OpenSSL 1.1.1-pre7, see 
https://github.com/openssl/openssl/pull/6340 


I'll add a TLS 1.3 section to the ssl module documentation. TLS 1.3 will be a 
tech-preview and not production-ready until at least OpenSSL 1.1.1-final and 
Python 3.7.1. Ned, Benjamin, are you OK with that?

----------
assignee: christian.heimes
messages: 317413
nosy: alex, benjamin.peterson, christian.heimes, dstufft, janssen, ned.deily
priority: high
severity: normal
stage: needs patch
status: open
title: Support TLS 1.3
type: enhancement
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33618>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to