summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_sslproto.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016)Victor Stinner2023-09-061-0/+3
| | | | Skip test_asyncio, test_imaplib and test_socket tests if FreeBSD TCP blackhole is enabled (net.inet.tcp.blackhole=2).
* bpo-46198: Fix `test_asyncio.test_sslproto` (GH-31801)Alex Waygood2022-03-101-0/+1
| | | GH-30297 removed a duplicate `from test import support` statement from `test_asyncio.test_sslproto`. However, in between that PR being filed and it being merged, GH-31275 removed the _other_ `from test import support` statement. This means that `support` is now undefined in `test_asyncio.test_sslproto`, causing the CI to fail on all platforms for all PRS.
* bpo-46198: rename duplicate tests and remove unused code (GH-30297)Nikita Sobolev2022-03-101-1/+0
|
* bpo-44011: New asyncio ssl implementation (#31275)Kumar Aditya2022-02-151-15/+20
| | | | | | | | | | | * bpo-44011: New asyncio ssl implementation Co-Authored-By: Andrew Svetlov <andrew.svetlov@gmail.com> * fix warning * fix typo Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-23819: Get rid of assert statements in test_asyncio (GH-30212)Serhiy Storchaka2021-12-201-3/+3
| | | | | | To keep checks even if run tests with optimized Python. Either use special assertion methods like assertEqual() or raise an AssertionError explicitly.
* bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968)Serhiy Storchaka2021-08-261-0/+3
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)Pablo Galindo2021-05-031-20/+15
| | | | This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all subsequent dependent commits.
* bpo-44011: New asyncio ssl implementation (#17975)Andrew Svetlov2021-05-021-15/+20
|
* bpo-42392: Remove loop parameter from asyncio.streams (GH-23517)Yurii Karabas2020-11-261-20/+14
|
* bpo-40443: Remove unused imports in tests (GH-19804)Victor Stinner2020-04-301-1/+0
|
* bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566)Victor Stinner2019-12-111-4/+7
| | | | | | | | | | | | | | | Replace hardcoded timeout constants in tests with SHORT_TIMEOUT of test.support, so it's easier to ajdust this timeout for all tests at once. SHORT_TIMEOUT is 30 seconds by default, but it can be longer depending on --timeout command line option. The change makes almost all timeouts longer, except test_reap_children() of test_support which is made 2x shorter: SHORT_TIMEOUT should be enough. If this test starts to fail, LONG_TIMEOUT should be used instead. Uniformize also "from test import support" import in some test files.
* bpo-38614: Use test.support.LONG_TIMEOUT constant (GH-17562)Victor Stinner2019-12-101-1/+2
| | | | | | | | Replace hardcoded timeout constants in tests with LONG_TIMEOUT of test.support, so it's easier to ajdust this timeout for all tests at once. LONG_TIMEOUT is 5 minutes by default, but it can be longer depending on --timeout command line option.
* bpo-38614: Use test.support.LOOPBACK_TIMEOUT constant (GH-17554)Victor Stinner2019-12-101-1/+2
| | | | | Replace hardcoded timeout constants in tests with LOOPBACK_TIMEOUT of test.support, so it's easier to ajdust this timeout for all tests at once.
* bpo-35998: Fix test_asyncio.test_start_tls_server_1() (GH-16815)Victor Stinner2019-10-161-14/+10
| | | | | | | | | | main() is now responsible to send the ANSWER, rather than ServerProto. main() now waits until it got the HELLO before sending the ANSWER over the new transport. Previously, there was a race condition between main() replacing the protocol and the protocol sending the ANSWER once it gets the HELLO. TLSv1.3 was disabled for the test: reenable it.
* bpo-38107: Replace direct future and task contructor calls with factories in ↵Andrew Svetlov2019-09-111-6/+6
| | | | asyncio tests (GH-15928)
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+0
|
* bpo-35031: also disable TLS 1.3 for test_start_tls_server_1 on macOS (GH-14188)Ned Deily2019-06-181-2/+4
|
* bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148)Victor Stinner2019-06-171-0/+6
| | | | | bpo-35031, bpo-35998: Reintroduce workaround on Windows and FreeBSD in test_start_tls_server_1() of test_asyncio: disable TLS v1.3 on the client context.
* bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() ↵Andrew Svetlov2019-06-141-18/+19
| | | | (GH-14080)
* bpo-36889: Merge asyncio streams (GH-13251)Andrew Svetlov2019-05-271-17/+20
| | | https://bugs.python.org/issue36889
* bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779)Paul Monson2019-05-151-2/+2
|
* bpo-34745: Fix asyncio sslproto memory issues (GH-12386)Fantix King2019-03-171-0/+72
| | | | | | | | | | | | | | * Fix handshake timeout leak in asyncio/sslproto Refs MagicStack/uvloop#222 * Break circular ref _SSLPipe <-> SSLProtocol * bpo-34745: Fix asyncio ssl memory leak * Break circular ref SSLProtocol <-> UserProtocol * Add NEWS entry
* bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011)Pablo Galindo2018-10-291-0/+7
| | | Some FreeBSD buildbots fail to run this test as the eof was not being received by the server if the size is not big enough. This behaviour only appears if the client is using TLS1.3.
* bpo-34728: Fix asyncio tests to run under "-Werror" (GH-9661)Yury Selivanov2018-10-021-11/+9
|
* bpo-33694: Fix typo in helper function name (GH-7522)Victor Stinner2018-06-081-6/+6
| | | | | | _feed_data_to_bufferred_proto() renamed to _feed_data_to_buffered_proto() ("bufferred" => "buffered"). Typo spotted by Nathaniel J. Smith.
* bpo-33694: Fix race condition in asyncio proactor (GH-7498)Victor Stinner2018-06-071-6/+7
| | | | | | | | | | | | | | | | The cancellation of an overlapped WSARecv() has a race condition which causes data loss because of the current implementation of proactor in asyncio. No longer cancel overlapped WSARecv() in _ProactorReadPipeTransport to work around the race condition. Remove the optimized recv_into() implementation to get simple implementation of pause_reading() using the single _pending_data attribute. Move _feed_data_to_bufferred_proto() to protocols.py. Remove set_protocol() method which became useless.
* bpo-33789: test_asyncio: Fix ResourceWarning (GH-7460)Victor Stinner2018-06-061-0/+5
| | | | | * Close sockets and streams to fix ResourceWarning warnings * Catch also OSError to hide a traceback on an expected handshake error
* bpo-33734: asyncio/ssl: a bunch of bugfixes (#7321)Yury Selivanov2018-06-041-29/+211
| | | | | | | * Fix AttributeError (not all SSL exceptions have 'errno' attribute) * Increase default handshake timeout from 10 to 60 seconds * Make sure start_tls can be cancelled correctly * Make sure any error in SSLProtocol gets propagated (instead of just being logged)
* bpo-33562: Check the global asyncio event loop policy isn't set after any ↵Brett Cannon2018-06-021-0/+4
| | | | tests (GH-7328)
* bpo-33654: Support protocol type switching in SSLTransport.set_protocol() ↵Yury Selivanov2018-05-291-11/+36
| | | | (#7194)
* bpo-32458: Further tune start_tls tests (#7166)Yury Selivanov2018-05-281-4/+6
|
* bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)Yury Selivanov2018-05-281-25/+152
| | | | | | | | | | | In this commit: * Support BufferedProtocol in set_protocol() and start_tls() * Fix proactor to cancel readers reliably * Update tests to be compatible with OpenSSL 1.1.1 * Clarify BufferedProtocol docs * Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving * Rewrite test_start_tls_server_1
* bpo-33618: Enable TLS 1.3 in tests (GH-7079)Christian Heimes2018-05-231-0/+2
| | | | | | | | | | | | TLS 1.3 behaves slightly different than TLS 1.2. Session tickets and TLS client cert auth are now handled after the initialy handshake. Tests now either send/recv data to trigger session and client certs. Or tests ignore ConnectionResetError / BrokenPipeError on the server side to handle clients that force-close the socket fd. To test TLS 1.3, OpenSSL 1.1.1-pre7-dev (git master + OpenSSL PR https://github.com/openssl/openssl/pull/6340) is required. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044)Andrew Svetlov2018-03-101-20/+37
| | | | * Skip write()/data_received() if sslpipe is destroyed
* bpo-23749: Make start-tls tests more stable on win7 buildbot (GH-5409)Yury Selivanov2018-01-291-2/+10
| | | | | | | To mitigate the situation when the buildbot is under load and is unable to send/receive data fast enough: * reduce the size of the payload * set a generous timeout for socket ops
* bpo-32458: Temporarily mask start-tls proactor test on Windows (#5054)Yury Selivanov2017-12-301-2/+4
|
* bpo-23749: Implement loop.start_tls() (#5039)Yury Selivanov2017-12-301-0/+152
|
* bpo-29970: Make ssh_handshake_timeout None by default (#4939)Andrew Svetlov2017-12-201-0/+16
| | | | | * Make ssh_handshake_timeout None by default. * Raise ValueError if ssl_handshake_timeout is used without ssl. * Raise ValueError if ssl_handshake_timeout is not positive.
* bpo-29970: Add timeout for SSL handshake in asyncioNeil Aspinall2017-12-191-1/+13
| | | | 10 seconds by default.
* bpo-32273: Move asyncio.test_utils to test.test_asyncio (#4785)Yury Selivanov2017-12-111-1/+1
|
* bpo-31632: fix set_protocol() in _SSLProtocolTransport (#3817) (#3817)jlacoline2017-10-191-0/+8
|
* Revert "bpo-29406: asyncio SSL contexts leak sockets after calling close ↵Yury Selivanov2017-06-111-34/+0
| | | | | with certain servers (#409)" (#2111) This reverts commit a608d2d5a7f1aabe9bcbfc220135c5e126189390.
* bpo-29406: asyncio SSL contexts leak sockets after calling close with ↵Nikolay Kim2017-06-101-0/+34
| | | | | | | | certain servers (#409) * asyncio SSL contexts leak sockets after calling close with certain servers * cleanup _shutdown_timeout_handle on _fatal_error
* Closing transport during handshake process leaks socket (#480)Nikolay Kim2017-06-091-0/+15
|
* bpo-29742: asyncio get_extra_info() throws exception (#525)Nikolay Kim2017-03-121-0/+12
|
* Issue #28990: Fix SSL hanging if connection is closed before handshake ↵Yury Selivanov2016-12-161-0/+10
| | | | completed.
* Issue #28613: Fix get_event_loop() to return the current loopYury Selivanov2016-11-041-0/+1
| | | | when called from coroutines or callbacks.
* asyncio: Add set_protocol / get_protocol methods to TransportsYury Selivanov2016-09-121-0/+1
|
* asyncio: Fix NameError in sslproto _fatal_error()Yury Selivanov2016-06-281-0/+16
| | | | Patch by Richard Walker.
* Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
|