Clearing Java certificates cache (force reload certificates)
- by AlbertoFEM
A simple question here.
One application gave me this exception when trying to access a website with a expired certificate: java.security.cert.CertificateExpiredException
So, I renewed the certificated from the website machine and restarted it. When I try to access it from Firefox or Chrome it will load the new certificate (which it's expiration date is set somewhere near 2040).
The problem is, Java applications doesn't seems to renew this certificate, it seems to be stuck in some kind of internal cache. I already tried to add it to the keystore and set options in the application properties like -Dcom.sun.net.ssl.checkRevocation=false. No matter what I do, it always throw me a java.security.cert.CertificateExpiredException
Any ideas?