Java HTTP client crashes on HTTPS connections

OS: CentOS 6.5
JAVA: 1.7.0_91

One use case in the project: due to the remote client server system upgrade, HTTPClient runs into such exception like javax.net.ssl.SSLException: java.security.ProviderException: java.security.KeyException:

After Java runtime was upgrade to Java 8, the exception is gone. If we switch JDK/JRE to 1.7, the problem is still there. The reason can be traced back to /usr/lib64/libssl3.so and nss version is not up to date. Using yum to update nss to the latest, the error is gone.

Why Java 8 works before nss update? The reason is JVM (8) wasn’t loading nss but rather using some internal SSL implementation to avoid such exception.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditShare on StumbleUponEmail this to someoneShare on TumblrDigg this

3 thoughts on “Java HTTP client crashes on HTTPS connections

Leave a Reply to Nagesh Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">