changeset 29286:a05a91a3f120

sslutil: remove "strict" argument from validatesocket() It was only used by mail.py as part of processing smtp.verifycert, which was just removed.
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 30 May 2016 11:19:43 -0700
parents 63a3749147af
children fbccb334efe7
files mercurial/sslutil.py
diffstat 1 files changed, 5 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/sslutil.py	Sat Jun 04 11:13:28 2016 -0700
+++ b/mercurial/sslutil.py	Mon May 30 11:19:43 2016 -0700
@@ -324,7 +324,7 @@
 
     return None
 
-def validatesocket(sock, strict=False):
+def validatesocket(sock):
     """Validate a socket meets security requiremnets.
 
     The passed socket must have been created with ``wrapsocket()``.
@@ -386,17 +386,10 @@
         return
 
     if not sock._hgstate['caloaded']:
-        if strict:
-            raise error.Abort(_('%s certificate with fingerprint %s not '
-                                'verified') % (host, nicefingerprint),
-                              hint=_('check %s or web.cacerts config '
-                                     'setting') % section)
-        else:
-            ui.warn(_('warning: %s certificate with fingerprint %s '
-                      'not verified (check %s or web.cacerts config '
-                      'setting)\n') %
-                    (host, nicefingerprint, section))
-
+        ui.warn(_('warning: %s certificate with fingerprint %s '
+                  'not verified (check %s or web.cacerts config '
+                  'setting)\n') %
+                (host, nicefingerprint, section))
         return
 
     msg = _verifycert(peercert2, host)