sslutil: remove "strict" argument from validatesocket()
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 30 May 2016 11:19:43 -0700
changeset 29286 a05a91a3f120
parent 29285 63a3749147af
child 29287 fbccb334efe7
sslutil: remove "strict" argument from validatesocket() It was only used by mail.py as part of processing smtp.verifycert, which was just removed.
mercurial/sslutil.py
--- 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)