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?

 

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);

 

 

Reply via email to