title: How to make Java "trust" an expired certificate?
body: <p>I have a CA-signed, but long expired code signing certificate in use for a JWS-deployed web application.</p>
  
  <p>When I launch this app, I get a warning prompt asking whether I trust this publisher. When I agree, in Java control panel I can see the certificate in Security tab.</p>
  
  <p>How can I achieve the same effect programmatically (from command line)? <code>keytool -import</code> does not seem to do the trick.</p>