1. Pypy
  2. Untitled project
  3. pypy

Commits

Philip Jenvey  committed 0f69595

fix for 30065a062e2c

  • Participants
  • Parent commits 70bdd46
  • Branches py3k

Comments (0)

Files changed (2)

File pypy/module/_ssl/interp_ssl.py

View file
  • Ignore whitespace
 
 
 class SSLContext(W_Root):
-    def __init__(self, protocol):
+    def __init__(self, space, protocol):
         if protocol == PY_SSL_VERSION_TLS1:
             method = libssl_TLSv1_method()
         elif protocol == PY_SSL_VERSION_SSL3:
     @unwrap_spec(protocol=int)
     def descr_new(space, w_subtype, protocol=PY_SSL_VERSION_SSL23):
         self = space.allocate_instance(SSLContext, w_subtype)
-        self.__init__(protocol)
+        self.__init__(space, protocol)
         if not self.ctx:
             raise ssl_error(space, "failed to allocate SSL context")
         return space.wrap(self)

File pypy/module/_ssl/test/test_ssl.py

View file
  • Ignore whitespace
     def test_options(self):
         import _ssl
         ctx = _ssl._SSLContext(_ssl.PROTOCOL_TLSv1)
-        assert _ssl.OP_ALL == ctx.options
+        assert _ssl.OP_ALL | _ssl.OP_NO_SSLv2 == ctx.options