On Mon, 2013-07-08 at 05:19 -0700, bastiat wrote: > Hallo Oleg, > > First of all, thx for Your reply, > > sync example works fine, thx, > > how can I configure keymanager and trustmanager for async ? > > below code works correctly for sync (SSLUtil properly loads keymanager[] and > trustmanager[]) > > SSLContext sslContext = SSLContext.getInstance("TLS"); > SSLUtil sslUtil= new SSLUtil(); > sslContext.init(sslUtil.getKeyManager(), > sslUtil.getTrustManagers(), null); > SSLSocketFactory socketFactory = new > SSLSocketFactory(sslContext); > > > socketFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); > Scheme sch = new Scheme("https", 8443, socketFactory); > > httpclient.getConnectionManager().getSchemeRegistry().register(sch); > > httpclient.getConnectionManager() is null for > http://hc.apache.org/httpcomponents-asyncclient-dev/httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientHttpExchangeFutureCallback.java > > how should I add my sslContext ? >
What's wrong with that? --- SSLContext sslcontext = <...> HttpAsyncClient client = HttpAsyncClients.custom() .setSSLContext(sslcontext) .build(); -- Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org