vim.googlecode.com SSL 憑證更改

vim.googlecode.com SSL 憑證更改

我正在從原始程式碼建立 vim,並且必須不斷更新~/.hgrc檔案的 SSL 主機指紋。它變得有點愚蠢和龐大——見下文。模式是一樣的:運行更新,發現SSL指紋發生了變化,更新指紋…

有人知道更簡單的方法來保持更新嗎?

### openssl s_client -connect  vim.googlecode.com:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin
[hostfingerprints]
vim.googlecode.com = CB:F1:C8:AC:28:D5:61:B7:C1:9C:73:7E:3A:B6:BB:E2:E6:55:95:2A 
vim.googlecode.com = 52:BC:6F:6A:D5:86:38:B1:F5:FE:07:B3:A5:88:72:DC:EB:49:BF:5D
vim.googlecode.com = FD:02:92:B1:B3:32:27:F4:7B:40:3D:0A:CA:9E:DD:EE:22:17:52:02
vim.googlecode.com = F6:21:3F:1D:BA:DC:6A:0D:7C:AF:00:E4:C4:12:87:DC:1B:7C:1D:11
vim.googlecode.com = A0:60:E5:C3:DB:27:FB:31:B5:B2:D2:79:8E:24:4D:70:0E:E0:4B:EE
vim.googlecode.com = 65:A0:A7:8D:8F:48:EB:13:5C:81:3C:47:2D:6B:73:C4:7E:EA:61:5F

答案1

看一下http://mercurial.selenic.com/wiki/CACertificates- 指定 cacerts 應該夠了。簡而言之,不要依賴特定的指紋,而是檢查憑證是否由可信任來源簽署。

對於 Debian/Ubuntu/Arch/Gentoo:

[web]
cacerts = /etc/ssl/certs/ca-certificates.crt

費多拉/RHEL:

[web]
cacerts = /etc/pki/tls/certs/ca-bundle.crt

相關內容