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

login
register
mail settings
Submitter Augie Fackler
Date Sept. 20, 2013, 2:30 p.m.
Message ID <eae807f37c737c10c492.1379687400@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/2564/
State Accepted
Commit 3b82d412e9e8c660ff97e124bbc53e08faaf37cd
Headers show

Comments

Augie Fackler - Sept. 20, 2013, 2:30 p.m.
# HG changeset patch
# User Augie Fackler <raf@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-

Patch

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):