Categories:
Audio (13)
Biotech (29)
Bytecode (22)
Database (79)
Framework (7)
Game (7)
General (497)
Graphics (53)
I/O (32)
IDE (2)
JAR Tools (70)
JavaBeans (16)
JDBC (86)
JDK (338)
JSP (20)
Logging (90)
Mail (54)
Messaging (8)
Network (106)
PDF (82)
Report (7)
Scripting (75)
Security (67)
Server (112)
Servlet (17)
SOAP (24)
Testing (55)
Web (24)
XML (287)
Other Resources:
Connect to SSL Server Failed with Invalid Certificate
Why am I getting the ValidatorException error when connecting to an SSL server?
✍: FYIcenter
You are getting a ValidatorException error when connecting to an SSL server,
because the server certificate can not be trusted for one of the following possible reasons:
You can play with SslServerCmd.java and SslClientCmd.java given in previous tutorials to see the ValidatorException error:
1. Open a command window and run SslServerCmd.java on your local host:
\fyicenter>\local\jdk-1.8.0\bin\java SslServerCmd USAGE: java SslServerCmd [port [clientAuth]] Listening: port=8080, clientAuth=No
2. Open another command window and run SslClientCmd.java on your local host:
\fyicenter>\local\jdk-1.8.0\bin\java SslServerCmd Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1937) ...
In this case, the server certificate is signed by yourself as the root CA. The client program SslServerCmd.java cannot trust it, because the root CA in not listed in the default trusted root CA list.
Owner: CN=fyicenter.com, OU=IT, O=FYIcenter, L=NA, ST=NA, C=FR Issuer: CN=fyicenter.com, OU=IT, O=FYIcenter, L=NA, ST=NA, C=FR
2018-06-27, 805👍, 0💬
Popular Posts:
The Java API for XML Registries (JAXR) provides a uniform and standard API for accessing different k...
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
Apache Neethi provides general framework for the programmers to use WS Policy. It is compliant with ...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
What Is log4j-1.2.13.jar? I got the JAR file from logging-log4j-1.2.13.zip .log4j-1.2.13.jar is the ...