0

命令行下面openssl怎样查看https网站的证书信息

cara created at5 years ago view count: 352

以前用过,再找找不到了, 能查看指定网站的证书信息,比如证书颁发机构, 支持算法, ssl协议版本

report
回复
1

openssl s_client -connect baidu.com:443

openssl s_client -connect baidu.com:443
CONNECTED(00000006)
depth=2 C = US, O = "VeriSign, Inc.", OU = VeriSign Trust Network, OU = "(c) 2006 VeriSign, Inc. - For authorized use only", CN = VeriSign Class 3 Public Primary Certification Authority - G5
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
 0 s:/C=CN/ST=beijing/L=beijing/O=BeiJing Baidu Netcom Science Technology Co., Ltd/OU=service operation department/CN=www.baidu.cn
   i:/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4
 1 s:/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4
   i:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
 2 s:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
   i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHJTCCBg2gAwIBAgIQS0TZlVMygzSrMNk4giZhPDANBgkqhkiG9w0BAQsFADB+
MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd
BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj
IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE3MDIyNjAwMDAwMFoX
DTE4MDQxMjIzNTk1OVowgaoxCzAJBgNVBAYTAkNOMRAwDgYDVQQIDAdiZWlqaW5n
MRAwDgYDV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EI0LqJtN
-----END CERTIFICATE-----
subject=/C=CN/ST=beijing/L=beijing/O=BeiJing Baidu Netcom Science Technology Co., Ltd/OU=service operation department/CN=www.baidu.cn
issuer=/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4
---
No client certificate CA names sent
---
SSL handshake has read 5069 bytes and written 444 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES128-GCM-SHA256
    Session-ID: BFBF919417F95742109CA75F5E0A96BE97CAD28C4F2AA98FCEEA3757F64914E5
    Session-ID-ctx:
    Master-Key: 1DF67F7C29A5FEC06ACF0A207FAD6AC1AE78224CA3C868F3C0E31D77237ED9BE30637CE5266E43D97CDC79E32A022AC0
    TLS session ticket lifetime hint: 72000 (seconds)
    TLS session ticket:
    0000 - 85 f9 fa 2f 2f df 90 10-a1 0d 87 c2 b3 ab b5 2d   ...//..........-
    0010 - 58 c6 64 80 72 c6 29 32-ac 96 4b db 14 e7 41 0e   X.d.r.)2..K...A.
    0020 - 90 79 81 ec fd 25 99 aa-27 d6 f3 34 9e 15 f0 09   .y...%..'..4....
    0030 - 97 59 3b a4 56 87 33 0a-bb cd bc 41 c5 7f 47 f9   .Y;.V.3....A..G.
    0040 - 61 72 e8 05 d9 29 2b 92-31 d4 e8 6d 83 a8 ba 9d   ar...)+.1..m....
    0050 - b4 52 bd 70 02 75 e0 6a-c4 4d e8 07 4f c7 a5 3d   .R.p.u.j.M..O..=
    0060 - a6 92 70 af fc c1 e1 e5-86 02 31 c4 1a 1c a3 17   ..p.......1.....
    0070 - e6 fe a5 fe 8c 1f 68 89-46 a7 28 5a da 56 3d 04   ......h.F.(Z.V=.
    0080 - fa 44 26 14 50 55 4f b3-af e0 01 eb aa 5b 80 e4   .D&.PUO......[..
    0090 - 0f db 82 34 3d e9 38 a3-69 26 dd 44 a2 0f 32 d0   ...4=.8.i&.D..2.

    Start Time: 1514452681
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
5 years ago 回复
0

openssl s_client -showcerts -connect www.baidu.com:443

5 years ago 回复

相关搜索关键词

Recent search keywords