openssl的常用使用方法

查询证书详情: openssl x509 -in 【证书的cert文件】-text

例:echo | openssl s_client -connect   10.108.20.161:443  | openssl x509 -noout -text

$ echo | openssl s_client -connect checkout.ebay.com:443 2>/dev/null | openssl x509 -noout -text | grep Not
            Not Before: Sep  7 00:00:00 2018 GMT
            Not After : Sep  8 12:00:00 2019 GMT

查看证书文件详情:openssl x509 -in [CERTFILE] -text

例:openssl x509 -in apiserver-kubelet-client.crt -text

[Mon May 04 06:34:20 ] # openssl x509 -in apiserver-kubelet-client.crt -text | grep Not
            Not Before: Jan  6 04:52:42 2020 GMT
            Not After : Jan  5 04:52:43 2021 GMT
This entry was posted in Common Tools, Tools. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *