Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Make SSL Server Certificate Trusted
How to make a SSL self-signed server certificate trusted? I want the ValidatorException going away.
✍: FYIcenter
There are several options to make a self-signed server certificate trusted:
Below is a demonstration of the last option:
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. Save the server certificate in a keystore file for the client program to use:
\fyicenter>\local\jdk-1.8.0\bin\keytool -importcert -file server.crt -alias server -keystore server_crt.jks Enter keystore password: fyicenter Re-enter new password: fyicenter 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 Serial number: 5ae4a887 Valid from: Sun Jun 25 08:00:08 until: Sat Sep 23 08:00:08 ... Trust this certificate? [no]: yes Certificate was added to keystore
3. Open another command window and run SslClientCmd.java with javax.net.ssl.trustStore system property set to server_crt.jks on your local host:
\fyicenter>\local\jdk-1.8.0\bin\java -Djavax.net.ssl.trustStore=server_crt.jks SslClientCmd localhost 8080 /index.html HTTP/1.0 200 OK Content-Type: text/html Content-Length: 40
No more SSL errors. The client program successfully communicated with the server with all messages encrypted.
⇒ What Is Client Certificate Authentication
⇐ Connect to SSL Server Failed with Invalid Certificate
2018-06-27, 1560🔥, 0💬
Popular Posts:
The JSR 105 XML Digital Signature 1.0.1 FCS implementation provides an API and implementation that a...
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
layout.jar is a component in iText Java library to provide layout functionalities. iText Java librar...
Apache Ant is a Java-based build tool. In theory, it is kind of like make, without make's wrinkles. ...
How to download and install JDK (Java Development Kit) 1.3? If you want to write Java applications, ...