summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #12440: When testing whether some bits in SSLContext.options can beAntoine Pitrou2011-07-081-1/+1
| | | | | reset, check the version of the OpenSSL headers Python was compiled against, rather than the runtime version of the OpenSSL library.
* Issue #12065: connect_ex() on an SSL socket now returns the original errnoAntoine Pitrou2011-05-181-0/+17
| | | | when the socket's timeout expires (it used to return None).
* (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optionalVictor Stinner2011-05-091-23/+33
|\ | | | | | | | | | | | | OpenSSL is now compiled with OPENSSL_NO_SSL2 defined (without the SSLv2 protocol) on Debian: fix the ssl module on Debian Testing and Debian Sid. Optimize also ssl.get_protocol_name(): speed does matter!
| * Issue #12012: ssl.PROTOCOL_SSLv2 becomes optionalVictor Stinner2011-05-091-11/+15
| | | | | | | | | | | | | | OpenSSL is now compiled with OPENSSL_NO_SSL2 defined (without the SSLv2 protocol) on Debian: fix the ssl module on Debian Testing and Debian Sid. Optimize also ssl.get_protocol_name(): speed does matter!
| * Merged revisions 87861,87863 via svnmerge fromAntoine Pitrou2011-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87861 | antoine.pitrou | 2011-01-08 11:23:29 +0100 (sam., 08 janv. 2011) | 3 lines Fix test_ssl after r87849 ........ r87863 | antoine.pitrou | 2011-01-08 11:28:11 +0100 (sam., 08 janv. 2011) | 3 lines Add EHOSTUNREACH ('No route to host') to the errnos trapped by transient_internet(). ........
| * Merged revisions ↵Georg Brandl2010-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 85820,85823,85825,85840,85843-85845,85849-85851,85855,85867,85875,85907-85908,85911,85914 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r85820 | georg.brandl | 2010-10-24 16:20:22 +0200 (So, 24 Okt 2010) | 1 line Remove usage of exception indexing. ........ r85823 | georg.brandl | 2010-10-24 16:32:45 +0200 (So, 24 Okt 2010) | 1 line Fix style. ........ r85825 | georg.brandl | 2010-10-24 17:16:02 +0200 (So, 24 Okt 2010) | 1 line Add documentation about the default warnings filters. ........ r85840 | georg.brandl | 2010-10-25 19:50:20 +0200 (Mo, 25 Okt 2010) | 1 line #3018: tkinter demo fixes for py3k. ........ r85843 | georg.brandl | 2010-10-26 08:59:23 +0200 (Di, 26 Okt 2010) | 1 line Markup fix. ........ r85844 | georg.brandl | 2010-10-26 12:39:14 +0200 (Di, 26 Okt 2010) | 1 line Work a bit more on tkinter demos. ........ r85845 | georg.brandl | 2010-10-26 12:42:16 +0200 (Di, 26 Okt 2010) | 1 line faqwiz is removed. ........ r85849 | georg.brandl | 2010-10-26 21:31:06 +0200 (Di, 26 Okt 2010) | 1 line #10200: typo. ........ r85850 | georg.brandl | 2010-10-26 21:58:11 +0200 (Di, 26 Okt 2010) | 1 line #10200: typo. ........ r85851 | georg.brandl | 2010-10-26 22:12:37 +0200 (Di, 26 Okt 2010) | 1 line Fix import. ........ r85855 | georg.brandl | 2010-10-27 09:21:54 +0200 (Mi, 27 Okt 2010) | 1 line Encoding fix. ........ r85867 | georg.brandl | 2010-10-27 22:01:51 +0200 (Mi, 27 Okt 2010) | 1 line Add David. ........ r85875 | georg.brandl | 2010-10-28 10:38:30 +0200 (Do, 28 Okt 2010) | 1 line Fix bytes/str issues in get-remote-certificate.py. ........ r85907 | georg.brandl | 2010-10-29 06:54:13 +0200 (Fr, 29 Okt 2010) | 1 line #10222: fix for overzealous AIX compiler. ........ r85908 | georg.brandl | 2010-10-29 07:22:17 +0200 (Fr, 29 Okt 2010) | 1 line send_bytes obviously needs bytes... ........ r85911 | georg.brandl | 2010-10-29 07:36:28 +0200 (Fr, 29 Okt 2010) | 1 line Fix markup error and update false positive entries from "make suspicious". ........ r85914 | georg.brandl | 2010-10-29 08:17:38 +0200 (Fr, 29 Okt 2010) | 1 line (?:...) is a non-capturing, but still grouping construct. ........
| * Merged revisions 84807 via svnmerge fromAntoine Pitrou2010-09-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84807 | antoine.pitrou | 2010-09-14 16:43:44 +0200 (mar., 14 sept. 2010) | 4 lines Issue #9853: Fix the signature of SSLSocket.recvfrom() and SSLSocket.sendto() to match the corresponding socket methods. ........
| * Merged revisions 84650 via svnmerge fromAntoine Pitrou2010-09-091-82/+80
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84650 | antoine.pitrou | 2010-09-09 15:31:46 +0200 (jeu., 09 sept. 2010) | 4 lines Use transient_internet() where appropriate in test_ssl (svn.python.org is sometimes unavailable) ........
| * Merged revisions 84597-84599 via svnmerge fromAntoine Pitrou2010-09-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84597 | antoine.pitrou | 2010-09-07 22:42:19 +0200 (mar., 07 sept. 2010) | 5 lines Issue #8574: better implementation of test.support.transient_internet(). Original patch by Victor. ........ r84598 | antoine.pitrou | 2010-09-07 23:05:49 +0200 (mar., 07 sept. 2010) | 6 lines Issue #9792: In case of connection failure, socket.create_connection() would swallow the exception and raise a new one, making it impossible to fetch the original errno, or to filter timeout errors. Now the original error is re-raised. ........ r84599 | antoine.pitrou | 2010-09-07 23:09:09 +0200 (mar., 07 sept. 2010) | 4 lines Improve transient_internet() again to detect more network errors, and use it in test_robotparser. Fixes #8574. ........
| * Merged revisions 84021-84023 via svnmerge fromAntoine Pitrou2010-08-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84021 | antoine.pitrou | 2010-08-14 18:24:38 +0200 (sam., 14 août 2010) | 4 lines Add a reasonable timeout to network SSL tests, so as to avoid buildbot timeouts when the remote server doesn't answer. ........ r84022 | antoine.pitrou | 2010-08-14 18:32:10 +0200 (sam., 14 août 2010) | 4 lines This is a better resolution than r84021 (because it will also affect ssl.get_server_certificate()). ........ r84023 | antoine.pitrou | 2010-08-14 18:33:38 +0200 (sam., 14 août 2010) | 3 lines There doesn't seem to be a reason for this test to be disabled. ........
| * Issue #8629: Disable some test_ssl tests, since they give differentAntoine Pitrou2010-05-061-5/+13
| | | | | | | | results with OpenSSL 1.0.0 and higher.
| * Merged revisions 80692 via svnmerge fromAntoine Pitrou2010-05-011-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80692 | antoine.pitrou | 2010-05-01 22:29:38 +0200 (sam., 01 mai 2010) | 9 lines Merged revisions 80690 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80690 | antoine.pitrou | 2010-05-01 22:26:58 +0200 (sam., 01 mai 2010) | 3 lines Remove duplicate test ........ ................
| * Merged revisions 80603 via svnmerge fromAntoine Pitrou2010-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80603 | antoine.pitrou | 2010-04-29 00:57:15 +0200 (jeu., 29 avril 2010) | 3 lines Fix test failure with -bb ........
| * Merged revisions 80598 via svnmerge fromAntoine Pitrou2010-04-281-188/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80598 | antoine.pitrou | 2010-04-28 23:37:09 +0200 (mer., 28 avril 2010) | 9 lines Merged revisions 80596 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80596 | antoine.pitrou | 2010-04-28 23:11:01 +0200 (mer., 28 avril 2010) | 3 lines Fix style issues in test_ssl ........ ................
| * Merged revisions 80559 via svnmerge fromAntoine Pitrou2010-04-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80559 | antoine.pitrou | 2010-04-28 00:08:08 +0200 (mer., 28 avril 2010) | 12 lines Merged revisions 80557 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk (the bug was already fixed in py3k, just merging in the tests) ........ r80557 | antoine.pitrou | 2010-04-28 00:03:37 +0200 (mer., 28 avril 2010) | 4 lines Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline before the certificate footer. Patch by Kyle VanderBeek. ........ ................
| * Merged revisions 80536 via svnmerge fromAntoine Pitrou2010-04-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80536 | antoine.pitrou | 2010-04-27 15:15:18 +0200 (mar., 27 avril 2010) | 9 lines Merged revisions 80534 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80534 | antoine.pitrou | 2010-04-27 15:13:26 +0200 (mar., 27 avril 2010) | 3 lines socket.error can really happen here, and fix a possible NameError ........ ................
| * Merged revisions 80532 via svnmerge fromAntoine Pitrou2010-04-271-159/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80532 | antoine.pitrou | 2010-04-27 12:59:39 +0200 (mar., 27 avril 2010) | 10 lines Merged revisions 80529 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80529 | antoine.pitrou | 2010-04-27 12:32:58 +0200 (mar., 27 avril 2010) | 4 lines Qualify or remove or bare excepts. Simplify exception handling in places. Remove uses of test_support.TestFailed. ........ ................
| * Merged revisions 80528 via svnmerge fromAntoine Pitrou2010-04-271-46/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80528 | antoine.pitrou | 2010-04-27 11:56:02 +0200 (mar., 27 avril 2010) | 11 lines Merged revisions 80526 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80526 | antoine.pitrou | 2010-04-27 11:51:18 +0200 (mar., 27 avril 2010) | 5 lines replace custom code with standard library functionality (HTTPServer.shutdown()) + enable test that was never run (!) + make tests faster by lowering polling timeout ........ ................
| * Merged revisions 80524 via svnmerge fromAntoine Pitrou2010-04-271-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80524 | antoine.pitrou | 2010-04-27 10:53:36 +0200 (mar., 27 avril 2010) | 9 lines Merged revisions 80522 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80522 | antoine.pitrou | 2010-04-27 10:40:51 +0200 (mar., 27 avril 2010) | 3 lines Remove uses of find_unused_port() in test_ssl, and small cleanups ........ ................
| * Merged revisions 80456 via svnmerge fromAntoine Pitrou2010-04-241-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80456 | antoine.pitrou | 2010-04-25 00:04:40 +0200 (dim., 25 avril 2010) | 5 lines Issue #8524: When creating an SSL socket, the timeout value of the original socket wasn't retained (instead, a socket with a positive timeout would be turned into a non-blocking SSL socket). ........
| * Merged revisions 80454 via svnmerge fromAntoine Pitrou2010-04-241-12/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80454 | antoine.pitrou | 2010-04-24 23:26:44 +0200 (sam., 24 avril 2010) | 15 lines Merged revisions 80451-80452 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80451 | antoine.pitrou | 2010-04-24 21:57:01 +0200 (sam., 24 avril 2010) | 4 lines The do_handshake() method of SSL objects now adjusts the blocking mode of the SSL structure if necessary (as other methods already do). ........ r80452 | antoine.pitrou | 2010-04-24 22:04:58 +0200 (sam., 24 avril 2010) | 4 lines Issue #5103: SSL handshake would ignore the socket timeout and block indefinitely if the other end didn't respond. ........ ................
| * Merged revisions 80436 via svnmerge fromAntoine Pitrou2010-04-241-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80436 | antoine.pitrou | 2010-04-24 13:13:53 +0200 (sam., 24 avril 2010) | 11 lines Merged revisions 80434 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80434 | antoine.pitrou | 2010-04-24 12:43:57 +0200 (sam., 24 avril 2010) | 5 lines Make test_makefile_close a networked test (can't read() from a non-connected socket under OS X), and skip it under Windows (where sockets can't be read() from using their fds). ........ ................
| * Merged revisions 80429 via svnmerge fromAntoine Pitrou2010-04-231-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80429 | antoine.pitrou | 2010-04-24 01:31:47 +0200 (sam., 24 avril 2010) | 13 lines Note: I'm just merging in the additional test. Merged revisions 80428 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80428 | antoine.pitrou | 2010-04-24 01:25:45 +0200 (sam., 24 avril 2010) | 4 lines Issue #5238: Calling makefile() on an SSL object would prevent the underlying socket from being closed until all objects get truely destroyed. ........ ................
| * Merged revisions 80426 via svnmerge fromAntoine Pitrou2010-04-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80426 | antoine.pitrou | 2010-04-24 01:10:32 +0200 (sam., 24 avril 2010) | 13 lines Only the test is merged in. Merged revisions 80423 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80423 | antoine.pitrou | 2010-04-24 00:54:59 +0200 (sam., 24 avril 2010) | 4 lines Issue #7943: Fix circular reference created when instantiating an SSL socket. Initial patch by Péter Szabó. ........ ................
| * Little fix in test commentAntoine Pitrou2010-04-221-1/+1
| |
| * Merged revisions 80379 via svnmerge fromAntoine Pitrou2010-04-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80379 | antoine.pitrou | 2010-04-22 20:43:31 +0200 (jeu., 22 avril 2010) | 9 lines Merged revisions 80375 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80375 | antoine.pitrou | 2010-04-22 20:00:41 +0200 (jeu., 22 avril 2010) | 3 lines Skip test on old versions of OpenSSL ........ ................
| * Merged revisions 80317 via svnmerge fromAntoine Pitrou2010-04-211-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80317 | antoine.pitrou | 2010-04-21 21:46:23 +0200 (mer., 21 avril 2010) | 15 lines Merged revisions 80314-80315 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80314 | antoine.pitrou | 2010-04-21 21:28:03 +0200 (mer., 21 avril 2010) | 5 lines Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl extension, such that verification of some SSL certificates doesn't fail because of an "unknown algorithm". ........ r80315 | antoine.pitrou | 2010-04-21 21:36:23 +0200 (mer., 21 avril 2010) | 3 lines Forgot to add the sample certificate (followup to r80314) ........ ................
* | Issue #12000: When a SSL certificate has a subjectAltName without anyAntoine Pitrou2011-05-061-0/+18
| | | | | | | | | | dNSName entry, ssl.match_hostname() should use the subject's commonName. Patch by Nicolas Bareil.
* | Merged revisions 88671 via svnmerge fromAntoine Pitrou2011-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88671 | antoine.pitrou | 2011-02-27 16:44:12 +0100 (dim., 27 févr. 2011) | 3 lines Follow up to r88664: non-blocking connect-ex() can return EWOULDBLOCK under Windows ........
* | Merged revisions 88664 via svnmerge fromAntoine Pitrou2011-02-261-0/+43
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88664 | antoine.pitrou | 2011-02-27 00:24:06 +0100 (dim., 27 févr. 2011) | 4 lines Issue #11326: Add the missing connect_ex() implementation for SSL sockets, and make it work for non-blocking connects. ........
* | Issue #10989: Fix a crash on SSLContext.load_verify_locations(None, True).Victor Stinner2011-01-291-0/+3
| | | | | | | | Patch reviewed by Antoine Pitrou, okayed by Georg Brandl.
* | Fix test_ssl after r87849Antoine Pitrou2011-01-081-1/+1
| |
* | test_ssl: test SHA256 using sha256.tbs-internet.com instead of sha2.hboeck.deVictor Stinner2011-01-081-2/+2
| |
* | Issue #10272: The ssl module now raises socket.timeout instead of a genericAntoine Pitrou2010-12-031-2/+2
| | | | | | | | SSLError on socket timeouts.
* | #10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and ↵Ezio Melotti2010-12-011-20/+20
| | | | | | | | assertRaisesRegex.
* | Issue #10443: Add the SSLContext.set_default_verify_paths() method.Antoine Pitrou2010-11-171-0/+6
| |
* | Issue #10022: The dictionary returned by the `getpeercert()` methodAntoine Pitrou2010-11-091-1/+6
| | | | | | | | of SSL sockets now has additional items such as `issuer` and `notBefore`.
* | Clean up socket closing in test_ssl and test.ssl_serversAntoine Pitrou2010-10-291-23/+31
| |
* | Remove usage of exception indexing.Georg Brandl2010-10-241-1/+1
| |
* | Fix test_ssl on Ubuntu buildbot with patched OpenSSLAntoine Pitrou2010-10-221-0/+1
| |
* | Issue #5639: Add a *server_hostname* argument to `SSLContext.wrap_socket`Antoine Pitrou2010-10-221-0/+16
| | | | | | | | | | | | in order to support the TLS SNI extension. `HTTPSConnection` and `urlopen()` also use this argument, so that HTTPS virtual hosts are now supported.
* | Let test_ssl fail gracefully if ssl support is not availableAntoine Pitrou2010-10-131-14/+6
| |
* | Issue #9003: http.client.HTTPSConnection, urllib.request.HTTPSHandler andAntoine Pitrou2010-10-131-117/+15
| | | | | | | | | | urllib.request.urlopen now take optional arguments to allow for server certificate checking, as recommended in public uses of HTTPS.
* | Issue #10075: Add a session_stats() method to SSLContext objects.Antoine Pitrou2010-10-121-0/+17
| |
* | Issue #1051: Add a script (Lib/test/make_ssl_certs.py) to generate theAntoine Pitrou2010-10-081-1/+6
| | | | | | | | custom certificate and private key files used by SSL-related certs.
* | Issue #1589: Add ssl.match_hostname(), to help implement server identityAntoine Pitrou2010-10-081-0/+71
| | | | | | | | verification for higher-level protocols.
* | Fix issue 6706: adds new handle_accepted() method to asyncore.dispatcherGiampaolo Rodolà2010-10-041-2/+1
| |
* | Issue #9853: Fix the signature of SSLSocket.recvfrom() andAntoine Pitrou2010-09-141-0/+12
| | | | | | | | SSLSocket.sendto() to match the corresponding socket methods.
* | Use transient_internet() where appropriate in test_sslAntoine Pitrou2010-09-091-130/+131
| | | | | | | | (svn.python.org is sometimes unavailable)
* | Issue #8574: better implementation of test.support.transient_internet().Antoine Pitrou2010-09-071-4/+4
| | | | | | | | Original patch by Victor.