diff mercurial/sslutil.py @ 15997:a45516cb8d9f stable

sslutil: more helpful fingerprint mismatch message This will aid debugging for users of sites that renew certs.
author Matt Mackall <mpm@selenic.com>
date Thu, 26 Jan 2012 11:23:15 -0600
parents 8f377751b510
children 9cf7c9d529d0
line wrap: on
line diff
--- a/mercurial/sslutil.py	Thu Jan 26 11:23:14 2012 -0600
+++ b/mercurial/sslutil.py	Thu Jan 26 11:23:15 2012 -0600
@@ -122,8 +122,9 @@
         if hostfingerprint:
             if peerfingerprint.lower() != \
                     hostfingerprint.replace(':', '').lower():
-                raise util.Abort(_('invalid certificate for %s with '
-                                   'fingerprint %s') % (host, nicefingerprint))
+                raise util.Abort(_('certificate for %s has unexpected '
+                                   'fingerprint %s') % (host, nicefingerprint),
+                                 hint=_('check hostfingerprint configuration'))
             self.ui.debug('%s certificate matched fingerprint %s\n' %
                           (host, nicefingerprint))
         elif cacerts: