Mercurial > public > mercurial-scm > hg-stable
diff mercurial/url.py @ 13328:a939f08fae9c stable
url: add --insecure option to bypass verification of ssl certificates
If --insecure specified, it behaves in the same way as no web.cacerts
configured.
Also shows hint for --insecure option when _verifycert() failed. But currently
the hint isn't displayed on SSLError, because it needs a certain level of
changes.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 29 Jan 2011 23:23:24 +0900 |
parents | 8dc488dfcdb4 |
children | 4e92ad05fe18 |
line wrap: on
line diff
--- a/mercurial/url.py Mon Jan 31 13:33:41 2011 +0100 +++ b/mercurial/url.py Sat Jan 29 23:23:24 2011 +0900 @@ -541,8 +541,9 @@ ca_certs=cacerts) msg = _verifycert(self.sock.getpeercert(), self.host) if msg: - raise util.Abort(_('%s certificate error: %s') % - (self.host, msg)) + raise util.Abort(_('%s certificate error: %s ' + '(use --insecure to connect ' + 'insecurely)') % (self.host, msg)) self.ui.debug('%s certificate successfully verified\n' % self.host) else: