[PATCH 3 of 4 force-tls] sslutil: make keyfile and certfile arguments consistent between 2.6+ and 2.5-

Augie Fackler raf at durin42.com
Fri Sep 20 09:30:00 CDT 2013


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1379682943 14400
#      Fri Sep 20 09:15:43 2013 -0400
# Node ID eae807f37c737c10c49279574f29c045f3d16496
# Parent  2431d0d80cdc3a8f9cac58751185a513df0fdf4d
sslutil: make keyfile and certfile arguments consistent between 2.6+ and 2.5-

diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
--- a/mercurial/sslutil.py
+++ b/mercurial/sslutil.py
@@ -34,7 +34,7 @@
 
     import socket, httplib
 
-    def ssl_wrap_socket(sock, key_file, cert_file, ssl_version=PROTOCOL_TLSv1,
+    def ssl_wrap_socket(sock, keyfile, certfile, ssl_version=PROTOCOL_TLSv1,
                         cert_reqs=CERT_REQUIRED, ca_certs=None):
         if not util.safehasattr(socket, 'ssl'):
             raise util.Abort(_('Python SSL support not found'))
@@ -42,7 +42,7 @@
             raise util.Abort(_(
                 'certificate checking requires Python 2.6'))
 
-        ssl = socket.ssl(sock, key_file, cert_file)
+        ssl = socket.ssl(sock, keyfile, certfile)
         return httplib.FakeSocket(sock, ssl)
 
 def _verifycert(cert, hostname):


More information about the Mercurial-devel mailing list