Commit Graph

22 Commits

Author SHA1 Message Date
Matt Mackall
5a379a202e sslutil: more helpful fingerprint mismatch message
This will aid debugging for users of sites that renew certs.
2012-01-26 11:23:15 -06:00
Mads Kiilerich
142d372dec sslutil: show fingerprint when cacerts validation fails 2012-01-09 14:43:24 +01:00
Pierre-Yves David
c8f1983f55 phases: exchange phase boundaries on pull
Add an extra argument to addchangegroup to all phase code to execute before the
lock is released.
2011-12-15 11:28:42 +01:00
Arne Babenhauserheide
eaac554b05 clone: get all bookmarks before updating 2011-11-04 10:18:40 +01:00
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +01:00
Augie Fackler
e362108b3a test-https.t: clean up superfluous trailing whitespace 2011-05-04 10:32:08 -05:00
David Soria Parra
2def9dba3a test-https: match output from b396ee1c907c 2011-03-16 09:05:59 +01:00
Martin Geisler
be8aa69be9 test-https: update to match output from 6eebab86aebc 2011-03-14 09:20:05 +01:00
timeless
49d2d3233b cacert: improve error report when web.cacert file does not exist 2011-03-06 10:27:07 -06:00
Mads Kiilerich
e4660104cf util: flush stdout before calling external processes
stdout could have content in its buffer while a subprocess ran and emitted
output.

Flushing stdout ensures that output now comes in the right order.
2011-02-18 03:35:01 +01:00
Mads Kiilerich
733fae3e0f tests: update test-https.t output
I must have lost the insecure cert warning in a last minute patch series
cleanup of 117f170f7437.
2011-02-18 03:34:47 +01:00
Mads Kiilerich
1edc9de542 url: merge BetterHTTPS with httpsconnection to get some proxy https validation 2011-02-16 04:36:36 +01:00
Mads Kiilerich
88522bde9b tests: test https through http proxy
These tests fails for me with Python 2.6(.nothing)
2011-02-16 04:28:11 +01:00
Matt Mackall
792783a5de bookmarks: fix up test-https 2011-02-14 18:04:20 -06:00
Yuya Nishihara
da93c3bd0b 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.
2011-01-29 23:23:24 +09:00
Mads Kiilerich
e10e504454 url: 'ssh known host'-like checking of fingerprints of HTTPS certificates
Known fingerprints of HTTPS servers can now be configured in the
hostfingerprints section. That makes it possible to verify the identify of web
servers without configuring and trusting the CA chain.

Limitations:
* Portnumbers are ignored, just like with ordinary certificates.
* Host name matching is case sensitive.
2011-01-28 02:57:59 +01:00
Eduard-Cristian Stefan
c66ec9cf09 url: expand path for web.cacerts 2011-01-02 15:30:12 +02:00
Mads Kiilerich
d9f11887ef https: use web.cacerts configuration from local repo to validate remote repo 2010-12-27 17:49:58 +01:00
Mads Kiilerich
97213d6b00 https: warn when server certificate isn't verified
Mercurial will verify HTTPS server certificates if web.cacerts is configured,
but it will by default silently not verify any certificates.

We now warn the user that when the certificate isn't verified she won't get the
security she might expect from https:
  warning: localhost certificate not verified (check web.cacerts config setting)

Self-signed certificates can be accepted silently by configuring web.cacerts to
point to a suitable certificate file.
2010-12-18 21:58:52 +01:00
Mads Kiilerich
affe4fdcad hgweb: use Pythons ssl module for HTTPS serve when using Python 2.6 or later
pyOpenSSL apparently doesn't work for Python 2.7 and isn't very actively
maintained.

The built-in ssl module seems like a long-term winner, so we now use that with
Python 2.6 and higher.
2010-10-20 20:19:34 +02:00
Mads Kiilerich
26f5319c13 test-https: test web.cacerts functionality 2010-10-17 04:13:50 +02:00
Mads Kiilerich
c627f511ce serve: fix https mode and add test
The https mode failed in super because BaseRequestHandler is an old-style
class.

This introduces the first test of https client/server functionality - and
"hghave ssl". The test is currently only run on Python 2.6.
2010-10-17 04:13:35 +02:00