I apologize for the cross posts I figured out what the problem was. I had sun's jsse and ibm's jsse in the application's classpath (under WEB-INF/lib)
-----Original Message----- From: Sharma, Siddharth Sent: Wednesday, November 16, 2005 10:01 AM To: 'HttpClient User Discussion' Subject: RE: Can't get httpclient to work for SSL Thanks Roland. I used the class SSLProtocolSocketFactory and that gets the default JSSE to create the socket. But I get this error: java.security.NoSuchAlgorithmException: Class com.ibm.jsse.y configured for a SSLContext: not a SSLContext Any ideas? -----Original Message----- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 1:51 AM To: HttpClient User Discussion Subject: RE: Can't get httpclient to work for SSL Hi, looks like you found the problem yourself. Yes, you need to register a SecureProtocolSocketFactory. The "java.protocol.handler.pkgs" handlers will only be used by the standard Java URLConnection classes. I suggest you grab the source of the SPSF for the Sun JSSE and simply replace all references to sun. or com.sun. classes with references to the respective com.ibm. classes. hope that helps, Roland "Sharma, Siddharth" <[EMAIL PROTECTED]> 15.11.2005 23:46 Please respond to "HttpClient User Discussion" To HttpClient User Discussion <[email protected]> cc Subject RE: Can't get httpclient to work for SSL Has anybody customized SSL in httpclient for using the ibm jsse? I am reading documentation on the site and it says that to use an SSL library besides Sun's default implementation, one must provide an impl of org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory. And I am wondering if anyone has already done so for the IBM jsse? -----Original Message----- From: Sharma, Siddharth [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 15, 2005 4:39 PM To: HttpClient User Discussion Subject: RE: Can't get httpclient to work for SSL I have installed jsse. I had code earlier that used the URL and URLConnection classes in java.net and it worked for this same exact url. I want functionality to set the timeout on the request, hence I am trying this library out, but it throws this error. If I put that original code back in, it works. That's the reason I am stumped. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 15, 2005 4:33 PM To: HttpClient User Discussion Subject: Re: Can't get httpclient to work for SSL I believe that the SSL libraries weren't included with the JDK until JDK 1.4. I'm guessing you need to download those libraries separately for JDK versions below 1.4. ----- Original Message ----- From: "Sharma, Siddharth" <[EMAIL PROTECTED]> Date: Tuesday, November 15, 2005 3:19 pm Subject: Can't get httpclient to work for SSL > Hi > > I have written the code that uses HTTPClient to communicate with a web > server and it works when I use http, but fails when I use https. > > I get the error > java.net.SocketException: SSL implementation not available > > Before the request is posted, there is code that sets up JSSE in the > following manner: > > Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); > System.setProperty("java.protocol.handler.pkgs", > "com.sun.net.ssl.internal.www.protocol"); > > I tried using both Sun's and IBM's JSSE implementation but it did > not work. > What am I missing? > I am using IBM JDK 1.3.1. > > If this should be a JSSE forum post, I apologize. > > Thanks in advance > Sid > > > -------------------------------------------------------------------- > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: httpclient-user- > [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
