浏览代码

openssl: display a domain's cert's start and end dates (#1486)

Andrew Louis 7 年之前
父节点
当前提交
415daf8c4b
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pages/common/openssl.md

+ 4 - 0
pages/common/openssl.md

@@ -14,6 +14,10 @@
 
 `openssl x509 -req -days {{days}} -in {{filename.csr}} -signkey {{filename.key}} -out {{filename.crt}}`
 
+- Display the start and expiry dates for a domain's certificate:
+
+`openssl s_client -connect {{host}}:{{port}} 2>/dev/null | openssl x509 -noout -dates`
+
 - Display the certificate presented by an SSL/TLS server:
 
 `openssl s_client -connect {{host}}:{{port}} </dev/null`