5 ms·
Several people have asked in existing threads why you'd want this, so, let's give a very real example that we can guess probably at least one HN reader will be
by tialaramex 5y ago
Several people have asked in existing threads why you'd want this, so, let's give a very real example that we can guess probably at least one HN reader will be grateful for:
At the end of next month (September 2021) the root CA certificate for DST Root CA X3 expires.
When a new CA comes into existence in the Web PKI they face a significant problem, even if all the brand new shiny software trusts their excellent new CA root, almost everybody at least sometimes needs old software that might not have the latest updates. So, they get an existing trusted CA to sign to say that they trust this new CA.
The charity that provides Let's Encrypt, ISRG, has a root CA named ISRG Root X1 (and a newer one named ISRG Root X2 but that's another matter) but they also sought such cross signatures from IdenTrust, who had bought the Digital Signature Trust and with it DST Root CA X3 in order to "bootstrap" trust on older systems.
So up until late September, a device that has no idea who ISRG are or what Let's Encrypt is, still trusts Let's Encrypt certificates, because it trusts DST Root CA X3. And then the self-signed certificate for DST Root CA X3 expires.
Tools like RunAsDate allow you to test your software to see whether it will still work after that expiry date. It wasn't really practical to run such tests a few months ago, because if in say May you tell the computer it's now the 1st of October all your perfectly good Let's Encrypt certificates issued in April have expired by October, so that's why nothing works. However, since early July it has been possible to have certificates that will not be expired when DST Root CA X3 expires and perform such tests.
Lots of maintainers probably look after systems where they can't (or at least, daren't) add a newer root like ISRG Root X1 and would value knowing in advance that the system will blow up completely at the end of September, rather than being blind-sided when it inevitably happens. RunAsDate (and similar tools on other systems) enable them to find that out with a few weeks left to fix or at least mitigate the problem.
- monkpit 5y agoI would assume the reason most people would use this is to spoof simple “trial period” checks on older software. I remember, as a kid, setting the clock back on shareware in order to run the full version. This would make it more convenient since you don’t have to alter system time.
- tgtweak 5y agoCaveat - timestamp servers are a thing... Having your certificate cross-signed by a timestamp server ensures that even if the root certificate expires your application can continue to run provided that a timestamp server was in fact used at the moment of signing, and thusly vetted the certificate authority at that time. This allows for windows applications signed long before their cert expired can continue to run until a new signed version is deployed. This doesn't take into account certificate revocation. Regardless, moving the date up is a good way to test.