I have an old iMac that has been sitting unused upstairs for awhile, that I decided to finally get rid of. Before putting it on Craigslist, like any good computer owner, I wiped the drives and went to reinstall the most recent version of OS X/macOS that this old machine would support. In this case, this was El Capitan.
But when I went to install, I kept getting an error about the OS not being able to install. Popping the log window open, I found an entry called CSSMERR_TP_CERT_EXPIRED. This would seem to be a prime suspect.
The error is pretty straighforward when you think about it. The certificate, or more likely on of the intermediate certificates, was expired. And because this is an old version of OS X, good luck getting that fixed officially. But we’re not sunk yet.
And the solution is simple, if not straightforward to do: just set the date back to when the certificate was valid.
But because there is no way to set the date once you are in the installer context, you will need to open a terminal window (from the Utilities menu) and set the date this way:
$ date 0820120015
Will set the date of your machine back to August 20, 2015 at 12:00pm. Now run the installer again and everything should install successfully.