Commit Graph

64 Commits

Author SHA1 Message Date
Bill Janssen 119c7a623a A better way of finding an open port to test with. 2007-09-10 23:41:24 +00:00
Bill Janssen 98d19dafd9 More work on SSL support.
* 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.
2007-09-10 21:51:02 +00:00
Bill Janssen ffe576dc78 SSL certificate distinguished names should be represented by tuples 2007-09-05 00:46:27 +00:00
Guido van Rossum ba8c5653cc > Regardless, building a fixed test certificate and checking it in sounds like
> 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
2007-08-27 17:19:42 +00:00
Neal Norwitz 9eb9b10751 If we can't create a certificate, print a warning, but don't fail the test.
Modified patch from what Bill Janssen sent on python-3000.
2007-08-27 01:15:33 +00:00
Neal Norwitz 3e533c2290 Make a utility function for handling (printing) an error 2007-08-27 01:03:18 +00:00
Neal Norwitz f6f525b7c9 Stop using string.join (from the module) to ease upgrade to py3k 2007-08-27 00:58:33 +00:00
Neal Norwitz d6a51e64d7 Another patch from Bill Janssen that:
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.
2007-08-26 22:20:03 +00:00
Neal Norwitz 15d4e56c40 Get the test passing by commenting out some writes (should they be removed?) 2007-08-26 21:40:16 +00:00
Guido van Rossum e472933e27 Bill Janssen wrote:
Here's a patch which makes test_ssl a better player in the buildbots
environment.  I deep-ended on "try-except-else" clauses.
2007-08-26 19:35:09 +00:00
Neal Norwitz 7fc8e2993a Fail gracefully if the cert files cannot be created 2007-08-26 18:50:39 +00:00
Neal Norwitz 8e58b34ee8 Try to get this test to pass for systems that do not have SO_REUSEPORT 2007-08-25 17:25:17 +00:00
Neal Norwitz ce7fa56aac Fix test so it is skipped properly if there is no SSL support. 2007-08-25 16:54:38 +00:00
Guido van Rossum 4f2c3ddca4 Server-side SSL and certificate validation, by Bill Janssen.
While cleaning up Bill's C style, I may have cleaned up some code
he didn't touch as well (in _ssl.c).
2007-08-25 15:08:43 +00:00