SSL Certificate Report
Problem this snippet solves: This script creates a text report detailing all invalid or soon to expire certificates in /config/ssl/ssl.crt/ using openssl to write out the certificate attributes. Co...
Published Mar 10, 2015
Version 1.0CodeCentral_194
Cirrus
Joined May 05, 2019
CodeCentral_194
Cirrus
Joined May 05, 2019
Jason_Adams
Sep 22, 2017Employee
I updated the script to:
1 - Enclose all 'exec' command statements in curly braces. 2 - Resolve the formatting of the regsub commands:
FROM:
regsub -all -- {[['''space''']]+} $start " " start
regsub -all -- {[['''space''']]+} $stop " " stop
TO:
regsub -all -- {[[:space:]]+} $start " " start
regsub -all -- {[[:space:]]+} $stop " " stop
I suspect this occurred during a DevCentral update at some point, so hope this is still helpful.
NOTE: There is a built-in command for this as well:
tmsh run sys crypto check-cert { log enabled stdout enabled verbose enabled }
For help on the command:
tmsh help sys crypto check-cert