java - Trusted certificates becomes invalid -


In a Sun Glassfish server, I have deployed an application that communicates with SSL on an external website.

I manually imported the certificate with java keytool cli ( keytool -import -trustcacerts -keystore cacerts.jks -alias noalias -file somecert.cer ) in cacerts.jks is.

I verify that everything works, but after a long time when things stop working and I get the following output in the log:

< P> [# 2010-06-18T0 9: 13: 23.930 + 0200 | Warning | Sun-apesar 9 9 | ... | _ThreadID = 850; _ThreadName = p: thread-pool-1; W: 901; Javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: The certificate chain is not trusted by the server ... ... | #]

And here the service stops working according to the log, shortly before the exception, the certificate is questioned and by default The server did not respond and I suspect that this generates the error.

But did the server suddenly question the certificate? The certificate has already been imported and marked as trusted in keystore. All dates are fine Do I miss something?

There are probably some other applications that are changing system properties ( javax.net.ssl. TrustStore ). javax.net.ssl.trustStore What is indicative of a trusted keystore Try to print this system property so that it can be changed. Another option is to start JVM with the following option -Djavax.net.debug = SSL, Handshake, Data, TrustManager , you should give some verbose output to your standout log file.


Comments