Trusted certificates become invalid

On the Sun Glassfish server, I deployed an application that communicates with an external web service via SSL.

I manually imported certificates into cacerts.jks using java keytool cli ( keytool -import -trustcacerts -keystore cacerts.jks -alias somealias -file somecert.cer).

I check that everything works, but then when more and more time stops working, and I get the following output in the log:

[#|2010-06-18T09:13:23.930+0200|WARNING|sun-appserver9.1|...|_ThreadID=850;_ThreadName=p: thread-pool-1; w: 901;javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: The certificate chain from the server is not trusted|...|#]

And from here the service stops working. According to the magazine, shortly before the exception occurred, the certificate is called into question, and the server does not respond by default, and I suspect that this is what causes the error.

But what makes the server suddenly poll the certificate? The certificate has already been imported and marked as trusted in the keystore. All dates are in order. Did I miss something?

+3
1

, , System (javax.net.ssl.trustStore). javax.net.ssl.trustStore - , . System, , . - JVM -Djavax.net.debug=SSL,handshake,data,trustmanager stdout.

+1

Source: https://habr.com/ru/post/1750646/


All Articles