如何使用 Linux 命令行下载代理的 SSL 证书并将其保存到文件中。
可以通过 openssl 工具下载 ssl 证书:https://superuser.com/questions/97201/how-to-save-a-remote-server-ssl-certificate-locally-as-a-file .但这在重写 SSL 证书的公司代理后面不起作用。我想下载代理的 ssl 证书。将 HOST 和 PORT 更改为我的代理的主机和端口也不起作用。
可以使用我的浏览器下载证书,但我需要在 bash 脚本中执行此操作。
最佳答案
如前所述here , openssl
1.1.0 及更高版本支持 -proxy
参数,因此您可以使用类似 (jcenter.bintray.com
只是一个要连接的示例主机)
openssl s_client -showcerts -proxy $https_proxy -connect jcenter.bintray.com:443
另见 this script有关如何将证书导入 JVM keystore 和系统证书的更完整示例。
关于linux - 通过 Linux CLI 下载 SSL 企业代理证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44119030/