summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #7133: SSL objects now support the new buffer API.Antoine Pitrou2009-10-191-14/+15
| | | | This fixes the test_ssl failure.
* remove test_support.TestSkipped and just use unittest.SkipTestBenjamin Peterson2009-03-261-1/+1
|
* fix for release blocker 3910, 2.6 regression in socket.ssl methodBill Janssen2008-09-291-1/+15
|
* incorporate fixes from issue 3162; SSL doc patchBill Janssen2008-09-081-0/+121
|
* fix old API names in test_sslBenjamin Peterson2008-08-181-4/+4
|
* remove duplicate close() from ssl.py; expose unwrap and add test for itBill Janssen2008-08-121-2/+17
|
* catch socket.error errors in badCertTestBill Janssen2008-07-171-0/+3
|
* make sure we close the active channels when eof is received on themBill Janssen2008-06-281-0/+1
|
* various SSL fixes; issues 1251, 3162, 3212Bill Janssen2008-06-281-33/+213
|
* - Issue #2550: The approach used by client/server code for obtaining portsTrent Nelson2008-04-081-49/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to listen on in network-oriented tests has been refined in an effort to facilitate running multiple instances of the entire regression test suite in parallel without issue. test_support.bind_port() has been fixed such that it will always return a unique port -- which wasn't always the case with the previous implementation, especially if socket options had been set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The new implementation of bind_port() will actually raise an exception if it is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or SO_REUSEPORT socket option set. Furthermore, if available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed. This currently only applies to Windows. This option prevents any other sockets from binding to the host/port we've bound to, thus removing the possibility of the 'non-deterministic' behaviour, as Microsoft puts it, that occurs when a second SOCK_STREAM socket binds and accepts to a host/port that's already been bound by another socket. The optional preferred port parameter to bind_port() has been removed. Under no circumstances should tests be hard coding ports! test_support.find_unused_port() has also been introduced, which will pass a temporary socket object to bind_port() in order to obtain an unused port. The temporary socket object is then closed and deleted, and the port is returned. This method should only be used for obtaining an unused port in order to pass to an external program (i.e. the -accept [port] argument to openssl's s_server mode) or as a parameter to a server-oriented class that doesn't give you direct access to the underlying socket used. Finally, test_support.HOST has been introduced, which should be used for the host argument of any relevant socket calls (i.e. bind and connect). The following tests were updated to following the new conventions: test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib, test_poplib, test_ftplib, test_telnetlib, test_socketserver, test_asynchat and test_socket_ssl. It is now possible for multiple instances of the regression test suite to run in parallel without issue.
* Apply same patch from 3k branch to try and prevent this test from hangingNeal Norwitz2008-04-021-0/+1
| | | | on various platforms, most recently the Alpha Tru64.
* #2503 make singletons compared with "is" not == or !=Benjamin Peterson2008-03-291-1/+1
| | | | Thanks to Wummel for the patch
* Introduce a lock to fix a race condition which caused an exception in the test.Neal Norwitz2008-03-091-6/+16
| | | | | Some buildbots were consistently failing (e.g., amd64). Also remove a couple of semi-colons.
* Disabled test_xmlrpc:test_404. It's causing lots of false alarms.Christian Heimes2008-01-191-2/+2
| | | | I also disabled a test in test_ssl which requires network access to svn.python.org. This fixes a bug Skip has reported a while ago.
* use binary mode when reading files for testAsyncore to make Windows happyBill Janssen2007-09-161-1/+1
|
* Add support for asyncore server-side SSL support. This requiresBill Janssen2007-09-161-104/+270
| | | | | | | | | | | | | | | adding the 'makefile' method to ssl.SSLSocket, and importing the requisite fakefile class from socket.py, and making the appropriate changes to it to make it use the SSL connection. Added sample HTTPS server to test_ssl.py, and test that uses it. Change SSL tests to use https://svn.python.org/, instead of www.sf.net and pop.gmail.com. Added utility function to ssl module, get_server_certificate, to wrap up the several things to be done to pull a certificate from a remote server.
* Make sure test_ssl doesn't reference the ssl module in aBill Janssen2007-09-111-1/+4
| | | | context where it can't be imported.
* A better way of finding an open port to test with.Bill Janssen2007-09-101-3/+26
|
* More work on SSL support.Bill Janssen2007-09-101-211/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Much expanded test suite: All protocols tested against all other protocols. All protocols tested with all certificate options. Tests for bad key and bad cert. Test of STARTTLS functionality. Test of RAND_* functions. * Fixes for threading/malloc bug. * Issue 1065 fixed: sslsocket class renamed to SSLSocket. sslerror class renamed to SSLError. Function "wrap_socket" now used to wrap an existing socket. * Issue 1583946 finally fixed: Support for subjectAltName added. Subject name now returned as proper DN list of RDNs. * SSLError exported from socket as "sslerror". * RAND_* functions properly exported from ssl.py. * Documentation improved: Example of how to create a self-signed certificate. Better indexing.
* SSL certificate distinguished names should be represented by tuplesBill Janssen2007-09-051-8/+5
|
* > Regardless, building a fixed test certificate and checking it in sounds likeGuido van Rossum2007-08-271-8/+10
| | | | | | | | | > the better option. Then the openssl command in the test code can be turned > into a comment describing how the test data was pregenerated. Here's a patch that does that. Bill
* If we can't create a certificate, print a warning, but don't fail the test.Neal Norwitz2007-08-271-13/+16
| | | | Modified patch from what Bill Janssen sent on python-3000.
* Make a utility function for handling (printing) an errorNeal Norwitz2007-08-271-16/+14
|
* Stop using string.join (from the module) to ease upgrade to py3kNeal Norwitz2007-08-271-10/+10
|
* Another patch from Bill Janssen that:Neal Norwitz2007-08-261-6/+16
| | | | | | 1) Fixes the bug that two class names are initial-lower-case. 2) Replaces the poll waiting for the server to become ready with a threading.Event signal.
* Get the test passing by commenting out some writes (should they be removed?)Neal Norwitz2007-08-261-2/+2
|
* Bill Janssen wrote:Guido van Rossum2007-08-261-39/+82
| | | | | Here's a patch which makes test_ssl a better player in the buildbots environment. I deep-ended on "try-except-else" clauses.
* Fail gracefully if the cert files cannot be createdNeal Norwitz2007-08-261-2/+7
|
* Try to get this test to pass for systems that do not have SO_REUSEPORTNeal Norwitz2007-08-251-1/+4
|
* Fix test so it is skipped properly if there is no SSL support.Neal Norwitz2007-08-251-2/+6
|
* Server-side SSL and certificate validation, by Bill Janssen.Guido van Rossum2007-08-251-0/+304
While cleaning up Bill's C style, I may have cleaned up some code he didn't touch as well (in _ssl.c).