[PATCH STABLE] sslutil: fix reversed logic (issue5034)

Gábor Stefanik gabor.stefanik at nng.com
Fri Jan 8 15:30:53 UTC 2016


# HG changeset patch
# User Gábor Stefanik <gabor.stefanik at nng.com>
# Date 1452266845 -3600
#      Fri Jan 08 16:27:25 2016 +0100
# Branch stable
# Node ID 1022a013889a1e794c360558c0067628d5b23d71
# Parent  1292700d31b520a0af73cd5515b6d10a3f7af7cd
sslutil: fix reversed logic (issue5034)

diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
--- a/mercurial/sslutil.py
+++ b/mercurial/sslutil.py
@@ -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


More information about the Mercurial-devel mailing list