File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes SSL Handshake Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "SSL Handshake Issue" Watch "SSL Handshake Issue" New topic
Author

SSL Handshake Issue

Maruthi Chokkanathan
Greenhorn

Joined: Dec 06, 2005
Posts: 10
Hi,
I am getting an intermittent error during ssl handshake as "SSL Implementation Not Available or untrusted server cert chain". We are triggering the java program using oracle plsql, so our jdk version is 1.3,oracle version is 9i and necessary jsse jars and permissions pertaining to that all were enabled. At one time, https connection establishes and returns the response and at some point it throws "SSL Implementation Not Available or untrusted server cert chain" and again it starts to work.

We are using httpclient 3.1 for connection establishment and everything seems to be perfect. When I googled to get some more information related to error it seems that this error occurs normally due to server certificate corruption or improper installation of jsse jars, but for us it occurs at random times only(most of the times we could able to establish the ssl connection).

Could anyone light me up some more information so that it will be helpful to proceed further.

Regards,
Maruthi
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2713
    
    5

"Maruthi " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
Maruthi Chokkanathan
Greenhorn

Joined: Dec 06, 2005
Posts: 10
Hi All,
I managed to found the answer. It is required to set the system property to explicitly load the cacerts file,security provider and protocol type.

System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
System.setProperty("javax.net.ssl.trustStore","/jre/lib/security/cacerts");//Path of Cacerts file
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

Without setting this properties, if we try to access the https url using httpclient it works in an inconsistent manner. Explicit loading works.

Thanks,

Regards,
Maruthi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSL Handshake Issue
 
Similar Threads
SSLException: untrusted server cert chain
How to create web service client to remote SSL service (HTTPS)?
publishing to a registry
SSLHandshakeException: Remote host closed connection during handshake
Client certificate authentication