• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help of SSL connection

 
Mike Sever
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to ignore all trusts?

Pls check the below link, already try, but not available in was 6.0.
http://forum.java.sun.com/thread.jspa?forumID=2&threadID=295242
http://forum.java.sun.com/thread.jspa?threadID=693625&tstart=120
 
Mike Sever
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two ways:
1. (1) Install the public key of the server/application in the "client" default keystore with JSSE (in JDK) keytool :
keytool -import -alias <myAlias> -file <myCert>
(2) Add the "root" certificate for the authority into $JAVA_HOME/jre/lib/security/cacerts :
keytool -import -keystore cacerts -alias <myAliasForCA> -file <myFile>

2. ignore the certificate checks:
The relevant source code is in the above link, but it doesn't work in jdk1.4(embedded in was6.0), the exception still exists: "javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted". Since jsse in jdk1.4 is different from the previous version, what is the proper code for it? Any one knows?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!