I wrote a script to find the expiry dates of SSL cert in a directory.
shopt -s nullglob
for f in *.0 *.pem *.key *.crt; do
echo "## CERTIFICATE NAME -> $f ##"
openssl x509 -noout -in $f -issuer -subject -dates
echo ""
done
Are there any improvements on this?
Please check cmd to get Expected ans :
openssl x509 -noout -text -in abc.cer | grep Not
Output :
Not Before: Aug 30 10:14:54 2018 GMT
Not After : Aug 29 10:14:54 2021 GMT
Description : Use your .cer or crt certificate name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With