{"id":1651,"date":"2020-08-06T03:58:47","date_gmt":"2020-08-06T03:58:47","guid":{"rendered":"https:\/\/www.ipcpu.com\/?p=1651"},"modified":"2022-07-31T03:59:51","modified_gmt":"2022-07-31T03:59:51","slug":"openssl-ssl-date","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2020\/08\/openssl-ssl-date\/","title":{"rendered":"\u4f7f\u7528openssl\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668ssl\u8bc1\u4e66\u548c\u6709\u6548\u671f"},"content":{"rendered":"

\u4f7f\u7528openssl\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668ssl\u8bc1\u4e66<\/h2>\n

<\/p>\n

\u547d\u4ee4\u5982\u4e0b<\/p>\n

\n
# openssl s_client -connect sqimg.qq.com:443\nCONNECTED(00000003)\ndepth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA\nverify return:1\ndepth=1 C = US, O = DigiCert Inc, CN = DigiCert Secure Site CN CA G3\nverify return:1\ndepth=0 C = CN, ST = Guangdong Province, L = Shenzhen, O = Shenzhen Tencent Computer Systems Company Limited, CN = weixin.qq.com\nverify return:1\n---\nCertificate chain\n 0 s:\/C=CN\/ST=Guangdong Province\/L=Shenzhen\/O=Shenzhen Tencent Computer Systems Company Limited\/CN=weixin.qq.com\n   i:\/C=US\/O=DigiCert Inc\/CN=DigiCert Secure Site CN CA G3\n 1 s:\/C=US\/O=DigiCert Inc\/CN=DigiCert Secure Site CN CA G3\n   i:\/C=US\/O=DigiCert Inc\/OU=www.digicert.com\/CN=DigiCert Global Root CA\n 2 s:\/C=US\/O=DigiCert Inc\/OU=www.digicert.com\/CN=DigiCert Global Root CA\n   i:\/C=US\/O=DigiCert Inc\/OU=www.digicert.com\/CN=DigiCert Global Root CA<\/code><\/pre>\n<\/div>\n

\u5982\u679c\u4f7f\u7528\u4e86SNI\uff0c\u5219\u9700\u8981\u6307\u5b9a\u4e0bservername<\/p>\n

\n
# openssl s_client -connect sqimg.qq.com:443 -servername sqimg.qq.com\nCONNECTED(00000003)\ndepth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA\nverify return:1\ndepth=1 C = US, O = DigiCert Inc, CN = DigiCert Secure Site CN CA G3\nverify return:1\ndepth=0 C = CN, ST = Guangdong Province, L = Shenzhen, O = Shenzhen Tencent Computer Systems Company Limited, CN = office.qq.com\nverify return:1\n---\nCertificate chain\n 0 s:\/C=CN\/ST=Guangdong Province\/L=Shenzhen\/O=Shenzhen Tencent Computer Systems Company Limited\/CN=office.qq.com\n   i:\/C=US\/O=DigiCert Inc\/CN=DigiCert Secure Site CN CA G3\n 1 s:\/C=US\/O=DigiCert Inc\/CN=DigiCert Secure Site CN CA G3\n   i:\/C=US\/O=DigiCert Inc\/OU=www.digicert.com\/CN=DigiCert Global Root CA\n 2 s:\/C=US\/O=DigiCert Inc\/OU=www.digicert.com\/CN=DigiCert Global Root CA\n   i:\/C=US\/O=DigiCert Inc\/OU=www.digicert.com\/CN=DigiCert Global Root CA\n---<\/code><\/pre>\n<\/div>\n

openssl\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668ssl\u8bc1\u4e66\u7684\u6709\u6548\u671f<\/h2>\n
\n
# \u67e5\u770b\u8fdc\u7a0b\u8bc1\u4e66\u6709\u6548\u671f\necho | openssl s_client -connect www.ipcpu.com:443 2>\/dev\/null | openssl x509 -noout -dates\nnotBefore=Dec 11 12:02:58 2013 GMT\nnotAfter=Apr 10 00:00:00 2014 GMT\n\n# \u67e5\u770b\u672c\u5730\u8bc1\u4e66\u6587\u4ef6\u6709\u6548\u671f\n# openssl x509 -noout -dates -in \/tmp\/xxx.pem\nnotBefore=May 17 01:14:08 2022 GMT\nnotAfter=Aug 15 01:14:07 2022 GMT\n\n#\u67e5\u770b\u8fdc\u7a0b\u8bc1\u4e66\u8be6\u7ec6\u4fe1\u606f\n echo | openssl s_client -connect www.ipcpu.com:443 2>\/dev\/null | openssl x509 -text -noout\n# \u67e5\u770b\u672c\u5730\u8bc1\u4e66\u6587\u4ef6\u8be6\u7ec6\u4fe1\u606f\nopenssl x509 -in \/tmp\/xxx.pem -text -noout<\/code><\/pre>\n<\/div>\n

\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » \u4f7f\u7528openssl\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668ssl\u8bc1\u4e66\u548c\u6709\u6548\u671f<\/a><\/p>","protected":false},"excerpt":{"rendered":"

\u4f7f\u7528openssl\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668ssl\u8bc1\u4e66 \u547d\u4ee4\u5982\u4e0b # openssl s_client -connect sqimg.qq.com:443 CONNECTED(00000003) depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA verify return:1 depth=1 C = US, O = DigiCert Inc, CN = DigiCert Secure Site CN CA G3 verify return:1 depth=0 C = CN, ST = Guangdong Province, L = […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,13],"tags":[28],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1651"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=1651"}],"version-history":[{"count":1,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1651\/revisions"}],"predecessor-version":[{"id":1652,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1651\/revisions\/1652"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=1651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=1651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=1651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}