Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 97362 invoked from network); 4 Aug 2006 14:26:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2006 14:26:08 -0000 Received: (qmail 39145 invoked by uid 500); 4 Aug 2006 14:26:07 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 39133 invoked by uid 500); 4 Aug 2006 14:26:06 -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 39122 invoked by uid 99); 4 Aug 2006 14:26:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 07:26:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [64.18.3.86] (HELO exprod8og52.obsmtp.com) (64.18.3.86) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 04 Aug 2006 07:26:05 -0700 Received: from source ([205.180.14.155]) by exprod8ob52.obsmtp.com ([64.18.7.12]) with SMTP; Fri, 04 Aug 2006 07:12:49 PDT Received: from us-hqmail1.ariba.com ([10.10.10.196]) by us-hqmail1.ariba.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 4 Aug 2006 07:24:45 -0700 Received: from in-blrmail1.ariba.com ([10.10.223.12]) by us-hqmail1.ariba.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 4 Aug 2006 07:24:45 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: virtual protocol registration with customSSLProtocolSocketFactory ignored Date: Fri, 4 Aug 2006 19:54:42 +0530 Message-ID: <90523D4F297D094CB3CBE2ED0B52BE5A013FEF5E@in-blrmail1.ariba.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: virtual protocol registration with customSSLProtocolSocketFactory ignored Thread-Index: Aca3zo6eGy3kuEnGQEynybz4pPW9YAAAjFTw From: "Adalbert Wysocki" To: "HttpClient User Discussion" X-OriginalArrivalTime: 04 Aug 2006 14:24:45.0052 (UTC) FILETIME=[BBA023C0:01C6B7D1] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks Oleg! It helps but... Do you recommend using a HostConfiguration configured with my particular Protocol (and the socket factory) instead of registering the protocol with Protocol.registerProtocol(...)? Or Using as parameter to the PostMethod a relative URI without any scheme and starting from the first / ? Is there a milestone to solve this issue? Thanks, Aldo -----Original Message----- From: Oleg Kalnichevski [mailto:olegk@apache.org]=20 Sent: Friday, August 04, 2006 7:32 PM To: HttpClient User Discussion Subject: Re: virtual protocol registration with customSSLProtocolSocketFactory ignored On Fri, 2006-08-04 at 19:16 +0530, Adalbert Wysocki wrote: > Hi, >=20 > Having an endless handshake going though the proxy with SSL and client > certificate authentication I upgraded from HTTPClient 2.0.2 to 3.0.1. >=20 > With 3.0.1 the handshake is working BUT the authentication of the client > by the server using the client certificate is not working anymore > whereas it was before. >=20 > Debugging it appears that the default SSLProtocolSocketFactory is used > instead of the one I register. It was working fine with 2.0.2 and does > not with 3.0.1. >=20 > The protocolInUse variable in HttpConnection during the open() method > has a wrong value... >=20 > Registering my custom Factory with the "https" scheme protocol in > addition or instead my custom "httpsin0" schema protocol is a > workaround... >=20 > =20 >=20 > Is it a known issue or did I missed something? >=20 Aldo, It is a known issue. Please make sure you are using relative URLs when passing a custom HostConfiguration as a parameter to the HttpClient#executeMethod method.=20 Hope this helps Oleg > =20 >=20 > Thanks for your help, >=20 > Aldo >=20 > =20 >=20 > ------------- >=20 > =20 >=20 > My AuthSSLProtocolSocketFactory creates the keystore, keymanagers and > trustmanagers. >=20 > My application registers a custom protocol with "httpsin0" schema. >=20 > =20 >=20 > ProtocolSocketFactory socketFactory =3D new AuthSSLProtocolSocketFactory( >=20 > keyStoreURL, storePass, keyPass, trustStoreURL, >=20 > trustStorePass); >=20 > =20 >=20 > Protocol authhttps =3D new Protocol("https", = socketFactory, > getPort()); >=20 > Protocol.registerProtocol('httpsin0", authhttps); >=20 > =20 >=20 > ...=20 >=20 > =20 >=20 > HttpClient httpclient =3D new HttpClient(); >=20 > String url =3D "httpsin0://my.secure.server.url/zzzzzzzzzzzz" >=20 > =20 >=20 > PostMethod httpPost =3D new PostMethod(url); >=20 > InputStreamRequestEntity isRequestEntity =3D new > InputStreamRequestEntity(requestMsg); >=20 > httpPost.setRequestEntity(isRequestEntity); >=20 > =20 >=20 > httpclient.executeMethod(httpPost); >=20 > =20 >=20 >=20 >=20 --------------------------------------------------------------------- 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