安装 chrome 本机客户端 (nacl)

Install chrome native client (nacl)

我正在尝试安装 Chrome 本机客户端。

我去这个https://developer.chrome.com/native-client/sdk/download页面下载并安装了sdk。我按照此页面中的说明进行操作,但是当我尝试执行 naclsdk list 命令或任何 naclsdk 命令时出现错误:

third_party.fancy_urllib.InvalidCertificateException: Host storage.googleapis.com returned an invalid certificate ([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)):
To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl
Usage: sdk_update_main.py <command> [options]

这里有什么问题?证书有问题吗?

注释两行sdk_tools/download.py

# ca_certs = os.path.join(SCRIPT_DIR, 'cacerts.txt')

# request.set_ssl_info(ca_certs=ca_certs)

问题出在过时的 sdk_tools/cacerts.txt 文件上; Google 已更改他们使用的 CA,但代码会尝试针对特定 CA 信任锚进行验证。

顺便说一句,这突出了键固定的困难。

您可以做的最小更改是通过下载 newer version 来更新它期望的 CA 证书。这仍然会验证您是否已连接到 Google 控制的服务器。

sevenyearslater 的 翻录此自定义检查也有效,但在某些情况下可以欺骗下载站点。

当我尝试应用接受的答案时,download.py 在执行之前被旧版本覆盖。

相反,我通过将 cacerts.txt 的内容替换为 storage.googleapis.com 今天使用的证书链来更新证书:

-----BEGIN CERTIFICATE-----
MIIGcjCCBVqgAwIBAgIQBdcOj75NzEPW3Y45nh0r+zANBgkqhkiG9w0BAQsFADBU
MQswCQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZpY2VzMSUw
IwYDVQQDExxHb29nbGUgSW50ZXJuZXQgQXV0aG9yaXR5IEczMB4XDTE5MDMwMTA5
MzY0NVoXDTE5MDUyNDA5MjUwMFowcjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh
bGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxEzARBgNVBAoMCkdvb2ds
ZSBMTEMxITAfBgNVBAMMGCouc3RvcmFnZS5nb29nbGVhcGlzLmNvbTCCASIw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