This is a script I call "certdays.sh" which you can call from your regular tests like this: certdays.sh somedomain.com 14 If the certificate for somedomain.com is valid less then 14 days, it will fail: https://github.com/no-gravity/certdays
Don't call it from tests though, call it from a monitoring system!
Githubassets.com Cert Has Expired
31–40 of 55 posts
Re: Githubassets.com Cert Has Expired
#32Maybe browsers should put up a warning when a certificate is about to expire; say two weeks away. Nobody should let their certificate get that close to expiring, but if it does, you'd rather it generate a lot of visible warnings before simply ceasing to work at all.
Re: Githubassets.com Cert Has Expired
#33Earlier quoted context omitted.
Tests can have bugs too.
Indeed, that's true! Not only you have to write the tests, you also have to verify it's working, and have monitoring connected to ensure it's continuously working. But still, multi-million companies should surely be able to handle that.
Re: Githubassets.com Cert Has Expired
#34Maybe browsers should put up a warning when a certificate is about to expire; say two weeks away. Nobody should let their certificate get that close to expiring, but if it does, you'd rather it generate a lot of visible warnings before simply ceasing to work at all.
Re: Githubassets.com Cert Has Expired
#35Re: Githubassets.com Cert Has Expired
#36Validity Not Before 11/2/2020, 12:00:00 AM (Greenwich Mean Time)
Validity Not After 11/9/2021, 11:59:59 PM (Greenwich Mean Time)
Re: Githubassets.com Cert Has Expired
#37if you're using nagios, setup something like command_name check_certificate command_line $USER1$/check_http -H $ARG1$ -p $ARG2$ -4 -S -C 21 -t 20 --sni this won't warn about certificate name mismatches though
That warns only after the fact, not in advance... depending on how the infrastructure (and especially the cert procuring process, for those not using LE for whatever reason) is set up, too late.
Re: Githubassets.com Cert Has Expired
#38Don't see any error. The certificate was renewed after 10 minutes of issue? Validity Not Before 11/2/2020, 12:00:00 AM (Greenwich Mean Time) Validity Not After 11/9/2021, 11:59:59 PM (Greenwich Mean Time)
Re: Githubassets.com Cert Has Expired
#39Earlier quoted context omitted.
Indeed, that's true! Not only you have to write the tests, you also have to verify it's working, and have monitoring connected to ensure it's continuously working. But still, multi-million companies should surely be able to handle that.
Verify that it is working after changes, with a test? What is testing that test?
If I was an engineer changing a test regarding SSL certs expiry time, after a change, I'd test it with a cert that has expired, about to expire and one far in the future. Manually or automated doesn't really matter, but test your changes after you've done them. Really basic stuff.
Re: Githubassets.com Cert Has Expired
#40Maybe browsers should put up a warning when a certificate is about to expire; say two weeks away. Nobody should let their certificate get that close to expiring, but if it does, you'd rather it generate a lot of visible warnings before simply ceasing to work at all.