![从 Linux 机器上的公共站点下载 SSL 证书](https://linux22.com/image/1534301/%E4%BB%8E%20Linux%20%E6%9C%BA%E5%99%A8%E4%B8%8A%E7%9A%84%E5%85%AC%E5%85%B1%E7%AB%99%E7%82%B9%E4%B8%8B%E8%BD%BD%20SSL%20%E8%AF%81%E4%B9%A6.png)
需要下载来自 Linux 机器上开放站点的 SSL 证书。 https://fqsq02.six-group.com/sheldon.html 使用以下命令
root#> openssl s_client -host fqsq02.six-group.com/sheldon.html -port 443 -prexit -showcerts
我得到以下输出:
getaddrinfo: Temporary failure in name resolution
connect:errno=111
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
答案1
OpenSSL-host
参数仅接受主机名,而不是 URL 的一部分。如果您运行以下命令,则不会收到错误,并会立即返回到提示符:
openssl s_client -host fqsq02.six-group.com -port 443 -showcerts </dev/null