2013-09-23 30 views
0

它关系到这个问题: How to get a *.cer file to add a self-signed HTTPS certificate as trusted for Java如何获得一个* .cer文件到命令添加自签名HTTPS证书

正如答复中提到:

With firefox is is done by double-clicking on the lock in the status bar, clicking on the button "View certificate", then in the "Details" tab, click on "Export..." 

我想知道是否有无法通过命令获取.cer文件,以便我可以使流程自动化?

+0

让我看看,我想你想从HTTPS URL中自动提取'cer'文件(通过运行命令)?这意味着您想要(以某种方式)连接到HTTPS端点并检索该服务器的证书? (全部通过运行命令)对吗? – zaerymoghaddam

+0

@moghaddam对。 – imapollo

回答

1

为了通过SSL与服务器进行交互,众所周知的工具之一是OpenSSL。您可以在Linux或Windows上轻松安装。 OpenSSL具有可用于检索服务器的SSL证书的命令。

看看下面的职位上通过OpenSSL的检索服务器证书教程一步一步(特别注意的意见,以自动化的全过程)

Quickpost: Retrieving an SSL Certificate