summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ftplib.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787)Christian Heimes2018-08-161-0/+5
| | | | | | | | | | | | Read from data socket to avoid "[SSL] shutdown while in init" exception during shutdown of the dummy server. Signed-off-by: Christian Heimes <christian@python.org> <!-- issue-number: [bpo-34391](https://www.bugs.python.org/issue34391) --> https://bugs.python.org/issue34391 <!-- /issue-number -->
* bpo-33618: Enable TLS 1.3 in tests (GH-7079)Christian Heimes2018-05-231-7/+3
| | | | | | | | | | | | 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-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes (#5663)Christian Heimes2018-02-271-0/+6
| | | | | | | | | | | | | | | | | | * bpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes Misc fixes and workarounds for compatibility with OpenSSL 1.1.1-pre1 and TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by default. Some test cases only apply to TLS 1.2. Other tests currently fail because the threaded or async test servers stop after failure. I'm going to address these issues when OpenSSL 1.1.1 reaches beta. OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS 1.3. The feature is enabled by default for maximum compatibility with broken middle boxes. Users should be able to disable the hack and CPython's test suite needs it to verify default options. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32706: Skip test_ftplib.test_check_hostname() (#5422)Victor Stinner2018-01-291-0/+1
| | | | | | This test is unstable and currently prevents to make any new change since the test always fails on Travis CI. Skip the test to get more time to fix it.
* bpo-31399: Let OpenSSL verify hostname and IP address (#3462)Christian Heimes2018-01-271-0/+3
| | | | | | | | | | | | | | | bpo-31399: Let OpenSSL verify hostname and IP The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. * Remove match_hostname calls * Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host() * Add documentation for OpenSSL 1.0.2 requirement * Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform. * Add hostname_checks_common_name Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31346: Use PROTOCOL_TLS_CLIENT/SERVER (#3058)Christian Heimes2017-09-151-12/+6
| | | | | | Replaces PROTOCOL_TLSv* and PROTOCOL_SSLv23 with PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31234: Fix dangling thread in test_ftplib (#3544)Victor Stinner2017-09-131-0/+2
| | | Clear also self.server_thread attribute in TestTimeouts.tearDown().
* bpo-31234: Fix dangling thread in test_ftp/poplib (#3540)Victor Stinner2017-09-131-0/+6
| | | | Explicitly clear the server attribute in test_ftplib and test_poplib to prevent dangling thread.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-1/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command ↵Dong-hee Na2017-07-221-1/+5
| | | | (#1214)
* bpo-30818: test_ftplib calls asyncore.close_all() (#2514)Victor Stinner2017-06-301-0/+3
| | | | | | | | | | Always clear asyncore socket map using asyncore.close_all(ignore_all=True) in tearDown() method. This change should fix this warning: Warning -- asyncore.socket_map was modified by test_ftplib Before: {} After: {4: <test.test_ftplib.DummyTLS_FTPServer 127.0.0.1:0 at 0x805feccf0>}
* Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.Christian Heimes2016-09-101-4/+6
| | | | | | | The deprecation include manual creation of SSLSocket and certfile/keyfile (or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib. ssl.wrap_socket() is not marked as deprecated yet.
* Issue #23883: Add missing APIs to __all__; patch by Jacek KołodziejMartin Panter2015-11-141-1/+10
|
* merge 3.4 (#22935)Benjamin Peterson2014-12-061-1/+1
|\
| * allow ssl module to compile if openssl doesn't support SSL 3 (closes #22935)Benjamin Peterson2014-12-061-1/+1
| | | | | | | | Patch by Kurt Roeckx.
* | merge 3.4 (#22921)Benjamin Peterson2014-11-231-4/+0
|\ \ | |/
| * don't require OpenSSL SNI to pass hostname to ssl functions (#22921)Benjamin Peterson2014-11-231-4/+0
| | | | | | | | Patch by Donald Stufft.
* | Issue #6623: Remove deprecated Netrc class in the ftplib module.Berker Peksag2014-11-011-17/+6
| | | | | | | | Patch by Matt Chaput.
* | Issue #21566: Make use of socket.listen() default backlog.Charles-François Natali2014-07-231-3/+3
|/
* Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref ↵Serhiy Storchaka2014-02-081-3/+3
|\ | | | | | | tests.
| * Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref ↵Serhiy Storchaka2014-02-081-3/+3
| | | | | | | | tests.
| * Issue #18702: All skipped tests now reported as skipped.Serhiy Storchaka2013-11-031-7/+7
| |
* | fixed test_ftplibChristian Heimes2013-12-151-1/+1
| |
* | test_ftplib: skip check_hostname test when SNI is not availableChristian Heimes2013-12-151-0/+4
| |
* | Issue #19781: ftplib now supports SSLContext.check_hostname and server nameChristian Heimes2013-12-021-1/+32
| | | | | | | | indication for TLS/SSL connections.
* | Issue #18702: All skipped tests now reported as skipped.Serhiy Storchaka2013-11-031-7/+7
| |
* | Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read bySerhiy Storchaka2013-10-201-1/+21
|\ \ | |/ | | | | | | limiting the call to readline(). Original patch by Michał Jastrzębski and Giampaolo Rodola.
| * Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read bySerhiy Storchaka2013-10-201-1/+21
| | | | | | | | | | limiting the call to readline(). Original patch by Michał Jastrzębski and Giampaolo Rodola.
* | merge 3.3 (#19118)Benjamin Peterson2013-09-291-4/+0
|\ \ | |/
| * remove duplicate test_mkd (closes #19118)Benjamin Peterson2013-09-291-4/+0
| |
| * Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as ↵Antoine Pitrou2013-08-211-4/+4
| | | | | | | | possible, since "localhost" goes through a DNS lookup under recent Windows versions.
* | Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as ↵Antoine Pitrou2013-08-211-4/+4
| | | | | | | | possible, since "localhost" goes through a DNS lookup under recent Windows versions.
* | merge from 3.3Senthil Kumaran2013-08-131-0/+8
|\ \ | |/ | | | | Increasing test coverage of ftplib. Patch by Muhammad Jehanzeb
| * Increasing test coverage of ftplib. Patch by Muhammad JehanzebSenthil Kumaran2013-08-131-0/+8
| |
* | test_ftplib: silence a BytesWarning when checking TypeErrorFlorent Xicluna2013-07-061-1/+2
|\ \ | |/
| * test_ftplib: silence a BytesWarning when checking TypeErrorFlorent Xicluna2013-07-061-1/+2
| |
* | ftplib tests: provide a global socket's TIMEOUT variable and use it ↵Giampaolo Rodola'2013-05-161-14/+15
| | | | | | | | everywhere so that failing tests won't accidentally hang
* | (Merge 3.3) Close #6822: ftplib.FTP.storlines() expects a binary file, not a ↵Victor Stinner2013-04-021-0/+4
|\ \ | |/ | | | | | | | | text file Add an unit test to ensure that text files are rejectect (with TypeError)
| * Close #6822: ftplib.FTP.storlines() expects a binary file, not a text fileVictor Stinner2013-04-021-0/+4
| | | | | | | | Add an unit test to ensure that text files are rejectect (with TypeError)
* | #6623: Add explicit deprecation warning for ftplib.Netrc.R David Murray2013-02-191-1/+12
| |
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-3/+3
| |
* | Small cleanup in test_ftplibAntoine Pitrou2012-12-191-13/+14
|\ \ | |/
| * Small cleanup in test_ftplibAntoine Pitrou2012-12-191-13/+14
| |
* | Issue #16717: get rid of socket.error, replace with OSErrorAndrew Svetlov2012-12-181-3/+3
|/
* compare singletons by identity not equality (closes #16712)Benjamin Peterson2012-10-091-1/+1
| | | | Patch from Serhiy Storchaka.
* provide a common method to check for RETR_DATA validity, first checking the ↵Giampaolo Rodola'2012-01-091-8/+10
| | | | expected len and then the actual data content; this way we get a failure on len mismatch rather than content mismatch (which is very long and unreadable)
* Issue #13453: Try to increase some socket timeouts to make some buildbots stopCharles-François Natali2011-12-191-1/+1
|\ | | | | | | failing.
| * Issue #13453: Try to increase some socket timeouts to make some buildbots stopCharles-François Natali2011-12-191-1/+1
| | | | | | | | failing.
* | Issue 12139: ftplib - remove 'post CCC' test to fix various buildot failures ↵Giampaolo Rodola'2011-06-301-2/+0
| | | | | | | | due to dummy test server not properly handling SSL shutdown(), see http://bugs.python.org/msg139499
* | Issue 12139: add CCC command support to FTP_TLS class to revert the SSL ↵Giampaolo Rodola'2011-06-271-2/+20
| | | | | | | | connection back to clear-text.