Hi, I am currently using the HTTP async client in my application to communicate with a proprietary server. Now, I need to extend the functionality to include HTTPS support. We need to provide client authentication and I have the following picture of how I can provide client credentials.
My first question is, is this the correct approach? Am I missing anything here? ************************************************ SSLContext context = ..... ; // Create with user provided keystore/truststore AsyncScheme scheme = new AsyncScheme( "https", 9910, new SSLLayeringStrategy(context) ); HttpAsyncClient httpClientAsync = new DefaultHttpAsyncClient(); PoolingClientAsyncConnectionManager connectionMgr = (PoolingClientAsyncConnectionManager)httpClientAsync.getConnectionManager(); AsyncSchemeRegistry asyncReg = connectionMgr.getSchemeRegistry(); asyncReg.register(scheme); ************************************************ My second question is about server authorization for which I need access to the server certificate. I need to get the CN value from the certificate which I am later going to use internally. I am basically looking for something similar to java.net.HttpsUrlConnection.getPeerPrincipal or java.net.HttpsUrlConnection.getServerCertificates. Any help will be greatly appreciated. Thanks Sachin
