sslutil: fix reversed logic (issue5034) stable
authorGábor Stefanik <gabor.stefanik@nng.com>
Fri, 08 Jan 2016 16:27:25 +0100
branchstable
changeset 27688 6c7d26cef0cd
parent 27641 1292700d31b5
child 27701 4571c0b38337
child 27723 bf86e3e87123
sslutil: fix reversed logic (issue5034)
mercurial/sslutil.py
--- a/mercurial/sslutil.py	Mon Jan 04 21:21:59 2016 +0100
+++ b/mercurial/sslutil.py	Fri Jan 08 16:27:25 2016 +0100
@@ -35,7 +35,7 @@
         # maintainers for us, but that breaks too many things to
         # do it in a hurry.
         sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
-        sslcontext.options &= ssl.OP_NO_SSLv2 & ssl.OP_NO_SSLv3
+        sslcontext.options |= ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3
         if certfile is not None:
             def password():
                 f = keyfile or certfile