File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ function print_cert_info {
1010 subject=" $( openssl x509 -noout -subject -in " $1 " | sed -n ' s/.*CN = \([a-z0-9.-]*\)/- \1/p' ) "
1111 san_str=" $( openssl x509 -text -in " $1 " | grep ' DNS:' ) "
1212
13+ case " $issuer " in
14+ R3 | R4 | E1 | E2)
15+ issuer=" Let's Encrypt $issuer "
16+ ;;
17+
18+ * )
19+ ;;
20+ esac
21+
1322 echo " Certificate was issued by $issuer "
1423 if [[ " $2 " == " expired" ]]; then
1524 echo " Certificate was valid until $enddate "
@@ -35,7 +44,7 @@ for cert in /etc/nginx/certs/*/fullchain.pem; do
3544 [[ -e " $cert " ]] || continue
3645 if [[ -e " ${cert% fullchain.pem} chain.pem" ]]; then
3746 # Verify the certificate with OpenSSL.
38- if verify=$( openssl verify -CAfile " ${cert% fullchain.pem} chain.pem" " $cert " 2>&1 ) ; then
47+ if verify=$( openssl verify -untrusted " ${cert% fullchain.pem} chain.pem" " $cert " 2>&1 ) ; then
3948 echo " $verify "
4049 # Print certificate info.
4150 print_cert_info " $cert "
You can’t perform that action at this time.
0 commit comments