3 ms·
a certificate is either valid or its not. this is more for administering it or for users that rely on it and want to know within build systems, at least that is
by hakre 5y ago
a certificate is either valid or its not. this is more for administering it or for users that rely on it and want to know within build systems, at least that is where it did hit me.
the failure then, the same.
wondered although if there is some use in knowing an upcoming expiration.
# curl + GNU date + GNU grep -P
$ echo "cert days left: ~$(( ($(date +%s -d "$(curl -IvsS https://www.w3.org 2>&1 >/dev/null | grep -Po '(?<=^\* expire date: ).*')")-$(date +%s))/86400 ))"
cert days left: ~396
but then what should the information give? that my build breaks, say next Tuesday? and what if until then the certificate expiration is enlarged?