开发者

Get certificate fingerprint of HTTPS server on Windows 7?

Recently Mercurial has added certificate validation when connecting to HTTPS servers. I'm trying to clone the wiki repository for a Google Code project at https://wiki.droidweight.googlecode.com/hg/, but the certificate is for *.googlecode.com.

Google Code's certificate does not cover multiple subdomains like *.*.googlecode.com.

I'm getting the error:

% hg clone --verbose https://wiki.droidweight.googlecode.com/hg/ -- C:\workspace\wiki
abort: wiki.droidweight.googlecode.com certificate error: certificate is for *.googlecode.com, googlecode.com, *.codespot.com, *.googlesource.com, googlesource.com (use --in开发者_开发知识库secure to connect insecurely)

I need to get the certificate fingerprint. This SO answer says how to do it on *nix.

How would one get the fingerprint on Windows 7 (Home Premium)?

References:

  • Open issue on Google Code's support site.
  • Mercurial CA Certificates FAQ.


Which version of Mercurial are you using? 1.8.2 prints the fingerprint when you clone, as per the documentation.

EDIT: After some testing, I realised that Mercurial prints the certificate when you connect insecurely (I don't have web.cacerts configured, so cloning always succeeded, though with a warning). So if you pass --insecure to your hg clone, you'll get a clone and a fingerprint.

Alternatively, install GnuWin32! It makes the Windows command line a fun place to be :) (I have no affiliation with GnuWin32; just hugely appreciative.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜