[ 
https://issues.apache.org/jira/browse/HTTPASYNC-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377045#comment-16377045
 ] 

Oleg Kalnichevski commented on HTTPASYNC-134:
---------------------------------------------

Just to be 100% sure I tested HttpClient 5.0-beta2-SNAPSHOT (which is 
essentially the same as 5.0-beta1) and Tomcat 9.0.5 configured to use HTTP/2 
over plain (non-SSL) connections.
{code:xml}
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443">
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
    </Connector>
{code}
Everything worked just fine. See the log below. The problem must be related to 
your SSL setup and likely has nothing to do with HTTP/2 support in either 
Apache HttpClient or Apache Tomcat.
{noformat}
Executing request GET http://localhost:8080/
2018-02-26 16:27:53,807 DEBUG 
[main][org.apache.hc.client5.http.impl.async.InternalHttp2AsyncClient] 
ex-00000001: preparing request execution
2018-02-26 16:27:53,836 DEBUG 
[main][org.apache.hc.client5.http.protocol.RequestAddCookies] CookieSpec 
selected: default
2018-02-26 16:27:53,846 DEBUG 
[main][org.apache.hc.client5.http.protocol.RequestAuthCache] Auth cache not set 
in the context
2018-02-26 16:27:53,846 DEBUG 
[main][org.apache.hc.client5.http.impl.async.AsyncProtocolExec] Target auth 
state: UNCHALLENGED
2018-02-26 16:27:53,847 DEBUG 
[main][org.apache.hc.client5.http.impl.async.AsyncProtocolExec] Proxy auth 
state: UNCHALLENGED
2018-02-26 16:27:53,850 DEBUG 
[main][org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-00000001: 
acquiring connection with route {}->http://localhost:8080
2018-02-26 16:27:53,886 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.AsyncConnectExec] 
ex-00000001: connection acquired
2018-02-26 16:27:53,887 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.Http2AsyncMainClientExec]
 ex-00000001: executing GET / HTTP/1.1
2018-02-26 16:27:53,891 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.InternalHttp2AsyncClient]
 Endpoint-4558c276: executing ex-00000001
2018-02-26 16:27:53,919 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 >> 
stream 0 frame: SETTINGS (0x4); flags: (0x0); length: 36
2018-02-26 16:27:53,919 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 >> 
"[0x0][0x0]$[0x4][0x0][0x0][0x0][0x0][0x0][0x0][0x1][0x0][0x0] 
[0x0][0x0][0x2][0x0][0x0][0x0][0x0][0x0][0x3][0x0][0x0][0x0]d[0x0][0x4][0x0][0x0][0xffffffff][0xffffffff][0x0][0x5][0x0][0x1][0x0][0x0][0x0][0x6][0x0][0xffffffff][0xffffffff][0xffffffff]"
2018-02-26 16:27:53,927 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << 
"[0x0][0x0][0x6][0x4][0x0][0x0][0x0][0x0][0x0][0x0][0x3][0x0][0x0][0x0][0xffffffc8]"
2018-02-26 16:27:53,928 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 << 
stream 0 frame: SETTINGS (0x4); flags: (0x0); length: 6
2018-02-26 16:27:53,929 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 >> 
stream 0 frame: SETTINGS (0x4); flags: ACK (0x1); length: 0
2018-02-26 16:27:53,929 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 >> 
"[0x0][0x0][0x0][0x4][0x1][0x0][0x0][0x0][0x0]"
2018-02-26 16:27:53,929 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << 
"[0x0][0x0][0x0][0x4][0x1][0x0][0x0][0x0][0x0][0x0][0x0][0x8][0x6][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x1]"
2018-02-26 16:27:53,930 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 << 
stream 0 frame: SETTINGS (0x4); flags: ACK (0x1); length: 0
2018-02-26 16:27:53,930 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 << 
stream 0 frame: PING (0x6); flags: (0x0); length: 8
2018-02-26 16:27:53,930 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 >> 
stream 0 frame: PING (0x6); flags: ACK (0x1); length: 8
2018-02-26 16:27:53,932 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 >> 
"[0x0][0x0][0x8][0x6][0x1][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x1]"
2018-02-26 16:27:53,947 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.Http2AsyncMainClientExec]
 ex-00000001: send request GET / HTTP/1.1, null entity
2018-02-26 16:27:53,949 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 >> 
:method: GET
2018-02-26 16:27:53,949 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 >> 
:scheme: http
2018-02-26 16:27:53,949 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 >> 
:authority: localhost:8080
2018-02-26 16:27:53,949 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 >> 
:path: /
2018-02-26 16:27:53,949 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 >> 
user-agent: Apache-HttpAsyncClient/5.0-beta2-SNAPSHOT (Java/1.8.0_121)
2018-02-26 16:27:53,955 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 >> 
stream 1 frame: HEADERS (0x1); flags: END_STREAM END_HEADERS (0x5); length: 61
2018-02-26 16:27:53,956 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 >> 
"[0x0][0x0]=[0x1][0x5][0x0][0x0][0x0][0x1][0xffffff82][0xffffff86]A[0xffffff8a][0xffffffa0][0xffffffe4][0x1d][0x13][0xffffff9d][0x9][0xffffffb8][0xfffffff0][0x1e][0x7][0xffffff84]z[0xffffffac][0xffffff86][0xffffffb1][0xffffff92]r[0xffffffad][0xffffff8d])[0xffffffae][0x14]z[0xffffffa8][0xffffff97][0xffffffa8]1jK[\r][0xffffffae][0x5][0xffffffa3]*F%[0xffffffb7]i[0xffffff87]^[0xffffffec]z[0xffffffb7][0xffffffa9][0xfffffffd]e[0x1f]q[0xffffffb0][0x15][0xffffffde]\[0x11][0x4]A[0xfffffffe][0xffffffff]"
2018-02-26 16:27:54,020 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << 
"[0x0][0x0]0[0x1][0x4][0x0][0x0][0x0][0x1]?[0xffffffe1]?[0xffffff88]_[0xffffff91]I|[0xffffffa5][0xffffff89][0xffffffd3]M[0x1f]d[0xffffff9c]v
 
[0xffffffa9][0xffffff83][0xffffff86][0xfffffffc]+=[0x1f][0x12][0xffffff96][0xffffffd0]z[0xffffffbe][0xffffff94][0x13][0xffffff8a]a,j[0x8][0x1]y@[0xffffffb7]pN[0xffffffdc]m[0xffffffa5]1h[0xffffffdf]"
2018-02-26 16:27:54,020 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 << 
stream 1 frame: HEADERS (0x1); flags: END_HEADERS (0x4); length: 48
2018-02-26 16:27:54,021 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 << 
:status: 200
2018-02-26 16:27:54,021 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 << 
content-type: text/html;charset=UTF-8
2018-02-26 16:27:54,021 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.headers] i/o-00000000 << 
date: Mon, 26 Feb 2018 15:27:54 GMT
2018-02-26 16:27:54,026 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.Http2AsyncMainClientExec]
 ex-00000001: consume response HTTP/2.0 200 OK, entity len -1
2018-02-26 16:27:54,041 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "[0x0] 
[0x0][0x0][0x0][0x0][0x0][0x0][0x1][\n]"
2018-02-26 16:27:54,041 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "[\n]"
2018-02-26 16:27:54,041 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "[\n]"
2018-02-26 16:27:54,046 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << 
"<!DOCTYPE html>[\n]"
2018-02-26 16:27:54,047 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "<html 
lang="en">[\n]"
2018-02-26 16:27:54,047 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "    
<head>[\n]"
2018-02-26 16:27:54,047 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "      
  <meta charset="UTF-8" />[\n]"
2018-02-26 16:27:54,047 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "      
  <title>Apache Tomcat/9.0.5</title>[\n]"
2018-02-26 16:27:54,047 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "      
  <link href="favicon.ico" rel="icon" type="image/x-icon" />[\n]"
2018-02-26 16:27:54,048 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "      
  <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />[\n]"
2018-02-26 16:27:54,048 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "      
  <link href="tomcat.css" rel="stylesheet" type="text/css" />[\n]"
2018-02-26 16:27:54,048 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << "    
</head>[\n]"

...

2018-02-26 16:27:54,079 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 << 
"</html>[\n]"
2018-02-26 16:27:54,079 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 << 
stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
2018-02-26 16:27:54,081 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.flow] i/o-00000000 << 
stream 1 flow control -8192 -> 57343
2018-02-26 16:27:54,081 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.flow] i/o-00000000 << 
stream 0 flow control -8192 -> 57343
2018-02-26 16:27:54,081 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.Http2AsyncMainClientExec]
 ex-00000001: consume response data, len 8192 bytes
2018-02-26 16:27:54,081 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 << 
stream 1 frame: DATA (0x0); flags: END_STREAM (0x1); length: 3036
2018-02-26 16:27:54,081 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.flow] i/o-00000000 << 
stream 1 flow control -3036 -> 54307
2018-02-26 16:27:54,081 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.flow] i/o-00000000 << 
stream 0 flow control -3036 -> 54307
2018-02-26 16:27:54,081 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.Http2AsyncMainClientExec]
 ex-00000001: consume response data, len 3036 bytes
2018-02-26 16:27:54,082 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.Http2AsyncMainClientExec]
 ex-00000001: end of response data
Shutting down
/->200
2018-02-26 16:27:54,092 DEBUG 
[main][org.apache.hc.client5.http.impl.async.InternalHttp2AsyncClient] Shutdown 
GRACEFUL
content length=11228, content type=text/html; charset=UTF-8
2018-02-26 16:27:54,094 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.impl.async.InternalHttp2AsyncClient]
 ex-00000001: message exchange successfully completed
2018-02-26 16:27:54,096 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http2.frame] i/o-00000000 >> 
stream 0 frame: GOAWAY (0x7); flags: (0x0); length: 25
2018-02-26 16:27:54,097 DEBUG 
[httpclient-dispatch-2][org.apache.hc.client5.http.wire] i/o-00000000 >> 
"[0x0][0x0][0x19][0x7][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0]Graceful
 shutdown"

{noformat}
Oleg

> Getting error with httpclient5 with HTTP2 & SSL (java.io.IOException: An 
> existing connection was forcibly closed by the remote host)
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPASYNC-134
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-134
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: Future
>         Environment: JDK 1.8, org.apache.httpcomponents.client5 5.0-beta1
>            Reporter: Rajan
>            Priority: Blocker
>
> Hi
> Getting following error when I configure CloseableHttpAsyncClient to use 
> HTTP2 over SSL.
>  
> java.io.IOException: An existing connection was forcibly closed by the remote 
> host
>  at sun.nio.ch.SocketDispatcher.read0(Native Method)
>  at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
>  at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
>  at sun.nio.ch.IOUtil.read(IOUtil.java:197)
>  at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
>  at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:443)
>  at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:498)
>  at 
> org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:112)
>  at 
> org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:50)
>  at 
> org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:173)
>  at 
> org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:123)
>  at 
> org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:80)
>  at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
>  at java.lang.Thread.run(Thread.java:745)
>  
>  
> Could you help, please? The complete code is provided in code section. Thanks.
>  
>  
> Regards
>  
> Rajan
> {code:java}
> // App.java
> public static void main( String[] args ) throws Exception
> {
> final CountDownLatch countDownLatch = new CountDownLatch(1);
> String trustStorePath = "C:\\cert\\keystore.jks";
> String trustStorePassword = "password";
> // SSLProvider should be used for all SSL related config like building a SSL 
> context
> SSLProvider provider = new SSLProvider();
> SSLContext sslContext = provider.buildSSLContext(null, null, trustStorePath, 
> trustStorePassword);
> final TlsStrategy tlsStrategy = new H2TlsStrategy(
> sslContext,
> H2TlsStrategy.getDefaultHostnameVerifier()) {
> };
> final PoolingAsyncClientConnectionManager cm = 
> PoolingAsyncClientConnectionManagerBuilder.create()
> .setTlsStrategy(tlsStrategy)
> .build();
> CloseableHttpAsyncClient client = 
> HttpAsyncClients.custom().setConnectionManager(cm).setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2).build();
> client.start(); 
> final HttpHost target = new HttpHost("localhost", 1090, "https");
> final String requestUri = "/rest/rest/helloWorld";
> final HttpClientContext clientContext = HttpClientContext.create();
> final SimpleHttpRequest request = SimpleHttpRequest.get(target, requestUri);
> final Future<SimpleHttpResponse> future = client.execute(
> SimpleRequestProducer.create(request),
> SimpleResponseConsumer.create(),
> new FutureCallback<SimpleHttpResponse>() {
> public void completed(final SimpleHttpResponse response) {
> System.out.println(requestUri + "->" + response.getCode());
> System.out.println(response.getBody());
> final SSLSession sslSession = clientContext.getSSLSession();
> if (sslSession != null) {
> System.out.println("SSL protocol " + sslSession.getProtocol());
> System.out.println("SSL cipher suite " + sslSession.getCipherSuite());
> }
> countDownLatch.countDown();
> }
> public void failed(final Exception ex) {
> ex.printStackTrace();
> System.out.println(requestUri + "->" + ex);
> }
> public void cancelled() {
> System.out.println(requestUri + " cancelled");
> }
> });
> countDownLatch.await();
> System.out.println("Shutting down");
> client.shutdown(ShutdownType.GRACEFUL);
> }
> //SSLProvider.java
> public class SSLProvider
> {
> public SSLContext buildSSLContext(String keyStorePath, String 
> keyStorePassword, String trustStorePath, String trustStorePassword)
> throws Exception
> {
> TrustManager trustManagers[] = null;
> KeyManager keyManagers[] = null;
> if(null != trustStorePath && !"".equalsIgnoreCase(trustStorePath))
> {
> trustManagers = new TrustManager[] {new MyX509TrustManager(trustStorePath, 
> trustStorePassword.toCharArray())};
> }
> if(null != keyStorePath && !"".equalsIgnoreCase(keyStorePath))
> {
> keyManagers = new KeyManager[] {new MyX509KeyManager(keyStorePath, 
> keyStorePassword.toCharArray())};
> }
> SSLContext context = SSLContext.getInstance("TLS");
> context.init(keyManagers, trustManagers, null);
> return context;
> }
> static class MyX509TrustManager implements X509TrustManager
> {
> /*
> * The default PKIX X509TrustManager9. We'll delegate decisions to it, and 
> fall back to the logic in this class if the default
> * X509TrustManager doesn't trust it.
> */
> X509TrustManager pkixTrustManager;
> MyX509TrustManager(String trustStore, char[] password) throws Exception
> {
> this(new File(trustStore), password);
> }
> MyX509TrustManager(File trustStore, char[] password) throws Exception
> {
> // create a "default" JSSE X509TrustManager.
> KeyStore ks = KeyStore.getInstance("JKS");
> ks.load(new FileInputStream(trustStore), password);
> TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
> tmf.init(ks);
> TrustManager tms[] = tmf.getTrustManagers();
> /*
> * Iterate over the returned trustmanagers, look for an instance of 
> X509TrustManager. If found, use that as our "default" trust
> * manager.
> */
> for(int i = 0; i < tms.length; i++)
> {
> if(tms[i] instanceof X509TrustManager)
> {
> pkixTrustManager = (X509TrustManager) tms[i];
> return;
> }
> }
> /*
> * Find some other way to initialize, or else we have to fail the constructor.
> */
> throw new Exception("Couldn't initialize");
> }
> /*
> * Delegate to the default trust manager.
> */
> public void checkClientTrusted(X509Certificate[] chain, String authType) 
> throws CertificateException
> {
> pkixTrustManager.checkClientTrusted(chain, authType);
> }
> /*
> * Delegate to the default trust manager.
> */
> public void checkServerTrusted(X509Certificate[] chain, String authType) 
> throws CertificateException
> {
> pkixTrustManager.checkServerTrusted(chain, authType);
> }
> /*
> * Merely pass this through.
> */
> public X509Certificate[] getAcceptedIssuers()
> {
> return pkixTrustManager.getAcceptedIssuers();
> }
> }
> /**
> * Inspired from 
> http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html
> * 
> */
> static class MyX509KeyManager implements X509KeyManager
> {
> /*
> * The default PKIX X509KeyManager. We'll delegate decisions to it, and fall 
> back to the logic in this class if the default
> * X509KeyManager doesn't trust it.
> */
> X509KeyManager pkixKeyManager;
> MyX509KeyManager(String keyStore, char[] password) throws Exception
> {
> this(new File(keyStore), password);
> }
> MyX509KeyManager(File keyStore, char[] password) throws Exception
> {
> // create a "default" JSSE X509KeyManager.
> KeyStore ks = KeyStore.getInstance("JKS");
> ks.load(new FileInputStream(keyStore), password);
> KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509", "SunJSSE");
> kmf.init(ks, password);
> KeyManager kms[] = kmf.getKeyManagers();
> /*
> * Iterate over the returned keymanagers, look for an instance of 
> X509KeyManager. If found, use that as our "default" key
> * manager.
> */
> for(int i = 0; i < kms.length; i++)
> {
> if(kms[i] instanceof X509KeyManager)
> {
> pkixKeyManager = (X509KeyManager) kms[i];
> return;
> }
> }
> /*
> * Find some other way to initialize, or else we have to fail the constructor.
> */
> throw new Exception("Couldn't initialize");
> }
> public PrivateKey getPrivateKey(String arg0)
> {
> return pkixKeyManager.getPrivateKey(arg0);
> }
> public X509Certificate[] getCertificateChain(String arg0)
> {
> return pkixKeyManager.getCertificateChain(arg0);
> }
> public String[] getClientAliases(String arg0, Principal[] arg1)
> {
> return pkixKeyManager.getClientAliases(arg0, arg1);
> }
> public String chooseClientAlias(String[] arg0, Principal[] arg1, Socket arg2)
> {
> return pkixKeyManager.chooseClientAlias(arg0, arg1, arg2);
> }
> public String[] getServerAliases(String arg0, Principal[] arg1)
> {
> return pkixKeyManager.getServerAliases(arg0, arg1);
> }
> public String chooseServerAlias(String arg0, Principal[] arg1, Socket arg2)
> {
> return pkixKeyManager.chooseServerAlias(arg0, arg1, arg2);
> }
> }
> public HostnameVerifier getHostNameVerfier()
> {
> return new HostnameVerifier()
> {
> public boolean verify(String arg0, SSLSession arg1)
> {
> // a host can be termed as blocked or non-verified through some logic here;by 
> returning false
> return true;
> }
> };
> }
> }{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to