Hi Lou

Your query is a bit unspecific (there is a lot of information missing such as OS to be used or a reason [stats, monitoring, ...]) but maybe you can use this approach:

(echo "" | openssl s_client -connect <hostname>:<portnumber> -showcerts | openssl x509 -text | egrep -i "not (before|after)") 2>/dev/null

I use it for monitoring. It works with all ssl wraped protocols (ie. smtps ftps, imaps pop3s). It does not work with other encrypted services such as ssh or sftp.

Regards
Martin

Am 26.11.2011 18:00, schrieb Lou Picciano:
Can a certificate's expiration date be queried directly?

Reply via email to