]> granicus.if.org Git - python/commitdiff
Try to fix test_ssl failures on some buildbots
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 9 Jan 2014 20:30:17 +0000 (21:30 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 9 Jan 2014 20:30:17 +0000 (21:30 +0100)
1  2 
Lib/test/test_ssl.py

index 34e86767562f42021e6ba6e212da722627296a1b,9fc6027afb44ccf955b1d668a6abf6842cd28b79..0dc04c08eaefb887b0135bbf4d81510e34d8b56c
@@@ -1859,18 -1440,15 +1859,18 @@@ else
                                ssl.get_protocol_name(server_protocol),
                                certtype))
          client_context = ssl.SSLContext(client_protocol)
-         client_context.options = ssl.OP_ALL | client_options
+         client_context.options |= client_options
          server_context = ssl.SSLContext(server_protocol)
-         server_context.options = ssl.OP_ALL | server_options
+         server_context.options |= server_options
 +
 +        # NOTE: we must enable "ALL" ciphers on the client, otherwise an
 +        # SSLv23 client will send an SSLv3 hello (rather than SSLv2)
 +        # starting from OpenSSL 1.0.0 (see issue #8322).
 +        if client_context.protocol == ssl.PROTOCOL_SSLv23:
 +            client_context.set_ciphers("ALL")
 +
          for ctx in (client_context, server_context):
              ctx.verify_mode = certsreqs
 -            # NOTE: we must enable "ALL" ciphers, otherwise an SSLv23 client
 -            # will send an SSLv3 hello (rather than SSLv2) starting from
 -            # OpenSSL 1.0.0 (see issue #8322).
 -            ctx.set_ciphers("ALL")
              ctx.load_cert_chain(CERTFILE)
              ctx.load_verify_locations(CERTFILE)
          try: