Thursday 7 April 2011

Trusting self signed certificate in java

Simple version of how to trust self-signed certificates.
$ wget https://raw.githubusercontent.com/escline/InstallCert/master/InstallCert.java
$ javac InstallCert.java 
$ java InstallCert host:port
$ cp jssecacerts /usr/java/jdk1.6.0_21/jre/lib/security/

restart JVM and you're done. Of course, you can always choose longer path and follow JSSE documentation

No comments:

Post a Comment