I received a customer query asking how to use Simon to check for an expired website SSL certificate.
Of course, Simon is very flexible, so even if there isn’t a built-in service for this specific case, if you can do it in the Terminal, you can probably create a custom script-based service in Simon to do it, too.
There are a number of ways to get certificate information, but this is one simple approach (if you know of a better way, let me know!).
I created a new script-based service, using the basic C shell, a one-line command, and a custom variable for the host name:
I then created a new test using this service. When accessing a server with an expired certificate, the output includes a “
verify return code” message of “
certificate has expired“, so I used a Block filter to look at just that text (I pasted “
Verify return code: ” in the Start text, and an Option-Return in the End text), then a Find Required filter to make the test result in a failure if it doesn’t find “
ok“, and finally an Override Custom filter if a failure, to output the error message:
For the success case, the last filter doesn’t apply, so it just outputs the “
Want to use this service? You can easily add it yourself, or import it by downloading from the Simon Extras page.
I hope you found the techniques in this post helpful.