Commits

Anonymous committed 979b3dd

python3 ssl constructor actually raises ValueError on illegal protocol

Comments (0)

Files changed (1)

pypy/module/_ssl/interp_ssl.py

         elif protocol == PY_SSL_VERSION_SSL23:
             method = libssl_SSLv23_method()
         else:
-            raise ssl_error(space, "invalid SSL protocol version")
+            raise OperationError(
+                space.w_ValueError, space.wrap("invalid protocol version"))
         self.__init__(method)
         if not self.ctx:
             raise ssl_error(space, "failed to allocate SSL context")