changeset 23851:948a8ca27152

sslutil: drop defunct ssl version constants Nobody outside sslutil should be using these constants anyway.
author Augie Fackler <augie@google.com>
date Wed, 14 Jan 2015 15:46:21 -0500
parents e1931f7cd977
children 99e125626352
files mercurial/sslutil.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/sslutil.py	Wed Jan 14 15:46:00 2015 -0500
+++ b/mercurial/sslutil.py	Wed Jan 14 15:46:21 2015 -0500
@@ -14,7 +14,6 @@
     # avoid using deprecated/broken FakeSocket in python 2.6
     import ssl
     CERT_REQUIRED = ssl.CERT_REQUIRED
-    PROTOCOL_TLSv1 = ssl.PROTOCOL_TLSv1
     try:
         ssl_context = ssl.SSLContext
 
@@ -50,7 +49,7 @@
                             ca_certs=None, serverhostname=None):
             sslsocket = ssl.wrap_socket(sock, keyfile, certfile,
                                         cert_reqs=cert_reqs, ca_certs=ca_certs,
-                                        ssl_version=PROTOCOL_TLSv1)
+                                        ssl_version=ssl.PROTOCOL_TLSv1)
             # check if wrap_socket failed silently because socket had been
             # closed
             # - see http://bugs.python.org/issue13721
@@ -60,8 +59,6 @@
 except ImportError:
     CERT_REQUIRED = 2
 
-    PROTOCOL_TLSv1 = 3
-
     import socket, httplib
 
     def ssl_wrap_socket(sock, keyfile, certfile, cert_reqs=CERT_REQUIRED,