hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: manager, timeout, and SSL - PLEASE HELP!!!
Date Tue, 09 Aug 2005 22:18:51 GMT
Ivan,
(1) Please post the source code of the AuthSSLProtocolSocketFactory
class
(2) Let me know which JRE you you using. Connection timeouts are handled
completely differently for JRE < 1.4 and those >= 1.4

I'll look at it tomorrow. It is kind of late here

Oleg


On Tue, 2005-08-09 at 15:08 -0700, Ivan B wrote:
> I would appreciate anyone's input on this it is driving me crazy.
> 
> Basically, we are accessing a host that has personal cert installed
> over https. In the sample code bellow everything works just fine until
> I uncomment the commented line. Once I do that I get 
> "Peer not verified" exception. 
> 
> 
> 
> public SmapleTestCraft() throws Exception {
>         CertificateManager certManager = CertificateManager.getInstance();
>         ProtocolSocketFactory sf = new
> AuthSSLProtocolSocketFactory(certManager);;
>         
>         Protocol.registerProtocol("https", new Protocol("https", sf, 443));
>         
>         MultiThreadedHttpConnectionManager connectionManager = new
> MultiThreadedHttpConnectionManager();
>         // THIS LINE BREAKS EVERYTHING, BUT WE NEED TIMEOUT VALUE
>         //connectionManager.getParams().setConnectionTimeout(5000);
>         
>         HttpClient httpclient = new HttpClient(connectionManager);
>  
> httpclient.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
>         
>         GetMethod httpget = new GetMethod("https://127.0.0.1/banner.txt");
>         
>         try {
>             httpclient.executeMethod(httpget);
>             System.out.println(httpget.getStatusLine());
>         } finally {
>             httpget.releaseConnection();
>         }
>     }
> 
> 
> 
> ---------------------------------------------------------------------
> 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