Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 63027 invoked from network); 9 Aug 2005 22:18:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Aug 2005 22:18:55 -0000 Received: (qmail 24097 invoked by uid 500); 9 Aug 2005 22:18:54 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 24077 invoked by uid 500); 9 Aug 2005 22:18:54 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 24063 invoked by uid 99); 9 Aug 2005 22:18:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 15:18:54 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=NORMAL_HTTP_TO_IP,PLING_PLING X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.186.18.64] (HELO mail17.bluewin.ch) (195.186.18.64) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 15:19:16 -0700 Received: from [192.168.0.3] (81.62.199.88) by mail17.bluewin.ch (Bluewin 7.2.063) id 42DF6DB900334E94 for httpclient-user@jakarta.apache.org; Tue, 9 Aug 2005 22:18:52 +0000 Subject: Re: manager, timeout, and SSL - PLEASE HELP!!! From: Oleg Kalnichevski To: HttpClient User Discussion In-Reply-To: <200508092208.j79M8HHr022519@mail12c2.megamailservers.com> References: <200508092208.j79M8HHr022519@mail12c2.megamailservers.com> Content-Type: text/plain Date: Wed, 10 Aug 2005 00:18:51 +0200 Message-Id: <1123625931.2929.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-5) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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