ssl: remove CERT_REQUIRED constant that was necessary for compatibility
authorYuya Nishihara <yuya@tcha.org>
Fri, 05 Jun 2015 21:45:44 +0900
changeset 25432 bdc15b3c9bdb
parent 25431 96159068c506
child 25433 419ac63fe29c
ssl: remove CERT_REQUIRED constant that was necessary for compatibility
mercurial/sslutil.py
--- a/mercurial/sslutil.py	Fri Jun 05 21:40:59 2015 +0900
+++ b/mercurial/sslutil.py	Fri Jun 05 21:45:44 2015 +0900
@@ -12,7 +12,6 @@
 from mercurial.i18n import _
 
 _canloaddefaultcerts = False
-CERT_REQUIRED = ssl.CERT_REQUIRED
 try:
     ssl_context = ssl.SSLContext
     _canloaddefaultcerts = util.safehasattr(ssl_context, 'load_default_certs')
@@ -144,7 +143,7 @@
         ui.setconfig('web', 'cacerts', cacerts, 'defaultcacerts')
     if cacerts != '!':
         kws.update({'ca_certs': cacerts,
-                    'cert_reqs': CERT_REQUIRED,
+                    'cert_reqs': ssl.CERT_REQUIRED,
                     })
     return kws