dr_*_*dr_ 4 openssl certificates
我需要从 HTTPS 网站https://api.paczkomaty.pl下载 PEM 格式的 SSL 证书。所以我使用 OpenSSL 来做到这一点:
openssl s_client -connect api.paczkomaty.pl:443 > myfile
openssl x509 -in myfile -text
Run Code Online (Sandbox Code Playgroud)
结果如下:
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
0d:5a:87:30:7e:43:96:05:5e:20:f3:2f:14:a4:d9:47
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, O = GeoTrust Inc., CN = RapidSSL SHA256 CA
Validity
Not Before: Mar 11 00:00:00 2017 GMT
Not After : Apr 10 23:59:59 2018 GMT
Subject: CN = *.grupainteger.pl
(...)
Run Code Online (Sandbox Code Playgroud)
但是,当我通过浏览器(Chrome 或 Firefox)访问该网站并检查其证书时,它显示了一个不同的证书;其序列号不同,有效期为15/1/2018至1/9/2018。
为什么 OpenSSL 获取不同的证书?
小智 6
为什么 OpenSSL 获取不同的证书?
s_client
默认情况下不发送 SNI(服务器名称指示)数据,但浏览器会发送。服务器可以根据该 SNI 的内容选择使用不同的证书进行响应 - 或者如果不存在 SNI,则它将提供默认证书。尝试添加-servername api.paczkomaty.pl
到您的s_client
命令行
归档时间: |
|
查看次数: |
3617 次 |
最近记录: |