Ticket #28065 (closed defect: wontfix)
mercurial: Error when pulling from https with cert not signed by a CA in the default list
| Reported by: | brejoc@… | Owned by: | deric@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.1 |
| Keywords: | Cc: | snc@… | |
| Port: | mercurial |
Description
When I try to pull changes from our hg server via https with a self signed certificate hg aborts and present an error message. This happens since version 1.7.3:
$ hg pull abort: error: _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
The same hg version installed via pip gives a warning (warning: repos.myhost.com certificate not verified (check web.cacerts config setting)) but performs the task without abortion.
Change History
comment:1 Changed 2 years ago by ryandesign@…
- Owner changed from macports-tickets@… to deric@…
- Summary changed from Error when pulling from https with self signed cert to mercurial: Error when pulling from https with self signed cert
comment:3 Changed 2 years ago by bpanulla@…
Also occurs with CACert certificates (cacert.org). CACert root certificate is in my system Keychain.
comment:4 Changed 19 months ago by jmr@…
- Summary changed from mercurial: Error when pulling from https with self signed cert to mercurial: Error when pulling from https with cert not signed by a CA in the default list
comment:5 Changed 18 months ago by jmr@…
I'm not sure there's really a bug here. Accepting certificates not signed by a known CA is not a safe default.
The port is initially configured to use curl-ca-bundle for its list of acceptable CAs. If you want to use a different list globally, edit ${prefix}/etc/mercurial/hgrc (or override it in ~/.hgrc). If you want to use a different cacerts file for a clone, use --config web.cacerts=<path>. If you really want to skip validating the certificate, use --insecure.
comment:6 Changed 18 months ago by brejoc@…
Sorry jmr, but that's not the point. The app could warn (which is the behaviour implemented by the developers) or abort, but not throw an error and exit.
comment:7 Changed 18 months ago by jmr@…
What do you mean "the behaviour implemented by the developers"? Aborting with that error message is not in any way specific to macports, see for example: http://mercurial.selenic.com/bts/issue2596

