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:[EMAIL PROTECTED] 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, > > 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. > > 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. > > 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. > > The protocolInUse variable in HttpConnection during the open() method > has a wrong value... > > Registering my custom Factory with the "https" scheme protocol in > addition or instead my custom "httpsin0" schema protocol is a > workaround... > > > > Is it a known issue or did I missed something? > 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. Hope this helps Oleg > > > Thanks for your help, > > Aldo > > > > ------------- > > > > My AuthSSLProtocolSocketFactory creates the keystore, keymanagers and > trustmanagers. > > My application registers a custom protocol with "httpsin0" schema. > > > > ProtocolSocketFactory socketFactory = new AuthSSLProtocolSocketFactory( > > keyStoreURL, storePass, keyPass, trustStoreURL, > > trustStorePass); > > > > Protocol authhttps = new Protocol("https", socketFactory, > getPort()); > > Protocol.registerProtocol('httpsin0", authhttps); > > > > ... > > > > HttpClient httpclient = new HttpClient(); > > String url = "httpsin0://my.secure.server.url/zzzzzzzzzzzz" > > > > PostMethod httpPost = new PostMethod(url); > > InputStreamRequestEntity isRequestEntity = new > InputStreamRequestEntity(requestMsg); > > httpPost.setRequestEntity(isRequestEntity); > > > > httpclient.executeMethod(httpPost); > > > > > --------------------------------------------------------------------- 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]
