hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject RE: Can't get httpclient to work for SSL
Date Wed, 16 Nov 2005 06:50:33 GMT
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" <Siddharth.Sharma@Staples.com> 
15.11.2005 23:46
Please respond to
"HttpClient User Discussion"


To
HttpClient User Discussion <httpclient-user@jakarta.apache.org>
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:Siddharth.Sharma@Staples.com] 
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: ADELONG@jam.rr.com [mailto:ADELONG@jam.rr.com] 
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" <Siddharth.Sharma@Staples.com>
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: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-
> help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message