Commit Graph

76 Commits

Author SHA1 Message Date
Antoine Pitrou 803e6d670c Issue #9003: http.client.HTTPSConnection, urllib.request.HTTPSHandler and
urllib.request.urlopen now take optional arguments to allow for
server certificate checking, as recommended in public uses of HTTPS.
2010-10-13 10:36:15 +00:00
Antoine Pitrou b0182c8ca5 Issue #10075: Add a session_stats() method to SSLContext objects. 2010-10-12 20:09:02 +00:00
Antoine Pitrou 81564093a1 Issue #1051: Add a script (Lib/test/make_ssl_certs.py) to generate the
custom certificate and private key files used by SSL-related certs.
2010-10-08 23:06:24 +00:00
Antoine Pitrou 59fdd6736b Issue #1589: Add ssl.match_hostname(), to help implement server identity
verification for higher-level protocols.
2010-10-08 10:37:08 +00:00
Giampaolo Rodolà 977c707b42 Fix issue 6706: adds new handle_accepted() method to asyncore.dispatcher 2010-10-04 21:08:36 +00:00
Antoine Pitrou a468adc76d Issue #9853: Fix the signature of SSLSocket.recvfrom() and
SSLSocket.sendto() to match the corresponding socket methods.
2010-09-14 14:43:44 +00:00
Antoine Pitrou 350c7229be Use transient_internet() where appropriate in test_ssl
(svn.python.org is sometimes unavailable)
2010-09-09 13:31:46 +00:00
Antoine Pitrou a88c83cbab Issue #8574: better implementation of test.support.transient_internet().
Original patch by Victor.
2010-09-07 20:42:19 +00:00
Giampaolo Rodolà 8b7da623ce Fix issue #9711: raise ValueError is SSLConnection constructor is invoked with keyfile and not certfile. 2010-08-30 18:28:05 +00:00
Giampaolo Rodolà 4a656ebe05 dedent some lines in test_ssl so that they are actually executed 2010-08-29 22:50:39 +00:00
Giampaolo Rodolà cd9dfb919a in ssl tests rely on IOError.errno rather thanf IOError.strerror for better compatibility across platforms. 2010-08-29 20:56:56 +00:00
Giampaolo Rodolà 745ab3807e Fix issue issue9706: provides a better error handling for various SSL operations 2010-08-29 19:25:49 +00:00
Antoine Pitrou 982c018b32 Remove debug hack 2010-08-16 14:33:42 +00:00
Antoine Pitrou ed9863685f Add debug output to the asyncore test 2010-08-15 23:28:10 +00:00
Antoine Pitrou f4c7badc02 Put test_ciphers in NetworkedTests 2010-08-15 23:02:22 +00:00
Antoine Pitrou 968dc03f24 Following Ezio's suggestion, force verbose mode on test_ssl to diagnose freezes on 3.x 2010-08-15 22:16:23 +00:00
Antoine Pitrou ab6190f9aa There doesn't seem to be a reason for this test to be disabled. 2010-08-14 16:33:38 +00:00
Antoine Pitrou d151e27446 This is a better resolution than r84021 (because it will also affect
ssl.get_server_certificate()).
2010-08-14 16:32:10 +00:00
Antoine Pitrou 35bebe12e0 Add a reasonable timeout to network SSL tests, so as to avoid buildbot timeouts
when the remote server doesn't answer.
2010-08-14 16:24:38 +00:00
Antoine Pitrou 23df483cb6 Try to fix issue #9415: skip some tests on broken Ubuntu OpenSSL 2010-08-04 17:14:06 +00:00
Antoine Pitrou 15cee6209f In verbose mode, identify OpenSSL build and platform more precisely 2010-08-04 16:45:21 +00:00
Victor Stinner 313a120ab6 Issue #8969: On Windows, use mbcs codec in strict mode to encode and decode
filenames and enable os.fsencode().
2010-06-11 23:56:51 +00:00
Antoine Pitrou b52187710e Issue #4870: Add an `options` attribute to SSL contexts, as well as
several ``OP_*`` constants to the `ssl` module.  This allows to selectively
disable protocol versions, when used in combination with `PROTOCOL_SSLv23`.
2010-05-21 09:56:06 +00:00
Antoine Pitrou d7e4c1caa6 Typo (thanks Arfrever) 2010-05-17 14:13:10 +00:00
Antoine Pitrou d0919507f9 Try to fix buildbot failures with old OpenSSLs. 2010-05-17 10:30:00 +00:00
Antoine Pitrou 304740635b "xyzzy" is not a silly enough name for some OpenSSL versions to report an error 2010-05-16 23:46:26 +00:00
Antoine Pitrou 27ba6388ed Do not fail if ssl fails to import 2010-05-16 20:35:03 +00:00
Antoine Pitrou 65ec8ae47f Fix (hopefully) the remaining test_ssl buildbot failures 2010-05-16 19:56:32 +00:00
Antoine Pitrou 467f28de03 Followup on r81233: fix test_ssl with OpenSSL < 1.0.0. 2010-05-16 19:22:44 +00:00
Antoine Pitrou 152efa2ae2 Issue #8550: Add first class `SSLContext` objects to the ssl module. 2010-05-16 18:19:27 +00:00
Antoine Pitrou d75b2a90d9 Merged revisions 80869 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80869 | antoine.pitrou | 2010-05-06 16:11:23 +0200 (jeu., 06 mai 2010) | 3 lines

  `self` doesn't exist here
........
2010-05-06 14:15:10 +00:00
Antoine Pitrou 70d8a86ea0 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
........
2010-05-01 20:29:38 +00:00
Antoine Pitrou 764b8780db Fix test failure with -bb 2010-04-28 22:57:15 +00:00
Antoine Pitrou 480a124973 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
........
2010-04-28 21:37:09 +00:00
Antoine Pitrou 9bfbe61961 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.
........
2010-04-27 22:08:08 +00:00
Antoine Pitrou 05830aa4ff 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
........
2010-04-27 13:15:18 +00:00
Antoine Pitrou 18c913e2b1 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.
........
2010-04-27 10:59:39 +00:00
Antoine Pitrou af7c6026c7 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
........
2010-04-27 09:56:02 +00:00
Antoine Pitrou 773b5db01a 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
........
2010-04-27 08:53:36 +00:00
Antoine Pitrou 40f0874b55 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).
2010-04-24 22:04:40 +00:00
Antoine Pitrou d3f8ab8bd3 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.
........
2010-04-24 21:26:44 +00:00
Antoine Pitrou e322024449 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).
........
2010-04-24 11:13:53 +00:00
Antoine Pitrou cfcd8adf71 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.
........
2010-04-23 23:31:47 +00:00
Antoine Pitrou 9d5436621f 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ó.
........
2010-04-23 23:10:32 +00:00
Antoine Pitrou 29619b2aff 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
........
2010-04-22 18:43:31 +00:00
Antoine Pitrou fec12fff0f 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)
........
2010-04-21 19:46:23 +00:00
Antoine Pitrou 2d9cb9c1cb Merged revisions 80151 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80151 | antoine.pitrou | 2010-04-17 19:10:38 +0200 (sam., 17 avril 2010) | 4 lines

  Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the
  available cipher list.  Helps fix test_ssl with OpenSSL 1.0.0.
........
2010-04-17 17:40:45 +00:00
Antoine Pitrou 04f6a32dff Merged revisions 79812 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79812 | antoine.pitrou | 2010-04-05 23:35:07 +0200 (lun., 05 avril 2010) | 5 lines

  Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,
  using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO`
  and `ssl.OPENSSL_VERSION_NUMBER`.
........
2010-04-05 21:40:07 +00:00
Georg Brandl 1b37e8728c Merged revisions 78093 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line

  Remove unused imports in test modules.
........
2010-03-14 10:45:50 +00:00
Georg Brandl 89fad14944 Merged revisions 78018,78035-78040,78042-78043,78046,78048-78052,78054,78059,78075-78080 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78018 | georg.brandl | 2010-02-06 11:08:21 +0100 (Sa, 06 Feb 2010) | 1 line

  #7864: make deprecation notices a bit clearer.
........
  r78035 | georg.brandl | 2010-02-06 23:44:17 +0100 (Sa, 06 Feb 2010) | 1 line

  Fix duplicate import.
........
  r78036 | georg.brandl | 2010-02-06 23:49:47 +0100 (Sa, 06 Feb 2010) | 1 line

  Remove unused import.
........
  r78037 | georg.brandl | 2010-02-06 23:59:15 +0100 (Sa, 06 Feb 2010) | 1 line

  No need to assign the results of expressions used only for side effects.
........
  r78038 | georg.brandl | 2010-02-07 00:02:29 +0100 (So, 07 Feb 2010) | 1 line

  Add a missing import.
........
  r78039 | georg.brandl | 2010-02-07 00:06:24 +0100 (So, 07 Feb 2010) | 1 line

  Add missing imports.
........
  r78040 | georg.brandl | 2010-02-07 00:08:00 +0100 (So, 07 Feb 2010) | 1 line

  Fix a few UnboundLocalErrors in test_long.
........
  r78042 | georg.brandl | 2010-02-07 00:12:12 +0100 (So, 07 Feb 2010) | 1 line

  Add missing import.
........
  r78043 | georg.brandl | 2010-02-07 00:12:19 +0100 (So, 07 Feb 2010) | 1 line

  Remove duplicate test method.
........
  r78046 | georg.brandl | 2010-02-07 00:18:00 +0100 (So, 07 Feb 2010) | 1 line

  Fix various missing import/unbound name errors.
........
  r78048 | georg.brandl | 2010-02-07 00:23:45 +0100 (So, 07 Feb 2010) | 1 line

  We heard you like test failures so we put unbound locals in your test so that you can fail while you fail.
........
  r78049 | georg.brandl | 2010-02-07 00:33:33 +0100 (So, 07 Feb 2010) | 1 line

  Fix import/access for some identifiers.  _TestSharedCTypes does not seem to be executed?
........
  r78050 | georg.brandl | 2010-02-07 00:34:10 +0100 (So, 07 Feb 2010) | 1 line

  Fix more unbound locals in code paths that do not seem to be used.
........
  r78051 | georg.brandl | 2010-02-07 00:53:52 +0100 (So, 07 Feb 2010) | 1 line

  Add missing import when running these tests standalone.
........
  r78052 | georg.brandl | 2010-02-07 00:54:04 +0100 (So, 07 Feb 2010) | 1 line

  Add missing import when running these tests standalone.
........
  r78054 | georg.brandl | 2010-02-07 00:58:25 +0100 (So, 07 Feb 2010) | 1 line

  Add missing import.
........
  r78059 | georg.brandl | 2010-02-07 12:34:15 +0100 (So, 07 Feb 2010) | 1 line

  Use "regexp" consistently.
........
  r78075 | georg.brandl | 2010-02-07 13:16:12 +0100 (So, 07 Feb 2010) | 1 line

  Fix another duplicated test method.
........
  r78076 | georg.brandl | 2010-02-07 13:19:43 +0100 (So, 07 Feb 2010) | 1 line

  Fix wrong usage of "except X, Y:".
........
  r78077 | georg.brandl | 2010-02-07 13:25:50 +0100 (So, 07 Feb 2010) | 1 line

  Fix two redefined test methods.
........
  r78078 | georg.brandl | 2010-02-07 13:27:06 +0100 (So, 07 Feb 2010) | 1 line

  Fix a redefined test method.
........
  r78079 | georg.brandl | 2010-02-07 13:34:26 +0100 (So, 07 Feb 2010) | 1 line

  Add a minimal test for fnmatchcase().
........
  r78080 | georg.brandl | 2010-02-07 13:55:12 +0100 (So, 07 Feb 2010) | 1 line

  Remove duplicate test method.
........
2010-03-14 10:23:39 +00:00