conf/openssl.conf: certificate expiration checks
authorTomas Zeman <tzeman@volny.cz>
Fri, 30 Aug 2013 10:45:44 +0200
changeset 28 7cccb5cf738b
parent 27 e8cb759c60b4
child 29 3f6120005a40
conf/openssl.conf: certificate expiration checks
conf/openssl.conf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/conf/openssl.conf	Fri Aug 30 10:45:44 2013 +0200
@@ -0,0 +1,6 @@
+# Certificate monitoring
+
+# Number of seconds till certificate expires
+# Parameters: $1 - path to cert file
+UserParameter=cert.x509.expire[*],openssl x509 -in $1 -enddate|grep notAfter|awk -F= '{print $$2}'|while read l; do t=`date -d"$l" +%s`; n=`date +%s`; echo `expr $t - $n`; done
+