[issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1

2019-12-10 Thread Wator Sead
Wator Sead added the comment: So, that means there are some additional optional operations after do_handshake(), the data is needed. Thanks for explanation! -- ___ Python tracker

[issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1

2019-12-09 Thread Christian Heimes
Christian Heimes added the comment: do_handshake() performs just the handshake. TLS protocol can send or receive additional protocol data after the handshake, e.g. alerts, rekeying or renegotiation. The example just happened to not trigger these in TLS 1.2. TLS makes non-blocking IO more

[issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1

2019-12-09 Thread Wator Sead
Wator Sead added the comment: Thanks for explanation, I understand what the reason is. But why do_handshake() not clear of useless data buffer after it is completed? I think that must be easy to do. -- ___ Python tracker

[issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1

2019-12-09 Thread Christian Heimes
Christian Heimes added the comment: The problem is caused by the way how TLS 1.3 works. Select considers a TLS 1.3 socket as readable after the handshake, because there is still data on the line. The server is sending session tickets (usually two) after the handshake has been performed. If

[issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1

2019-12-09 Thread Wator Sead
Wator Sead added the comment: All new releases which include an OpenSSL version above 1.1.1 has the same issue. Can anybody fix it? Thanks a lot! -- nosy: +seahoh versions: +Python 3.5, Python 3.8, Python 3.9 ___ Python tracker

[issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1

2019-07-09 Thread Dean
New submission from Dean : Hi, I've come across an issue with OpenSSL 1.1.1, when a client socket wrapped using ssl.wrap_socket() is used in select.select() its always returning ready for reading even though there appears to be nothing to read. To reproduce: 0. Extract files from attached