indicatedServerName = req.connection().indicatedServerName(); assertEquals(version, req.version()); assertEquals(serverSSL, req.isSSL());
/** * Returns the SNI server name presented during the SSL handshake by the client. * @return the indicated server name */ public String indicatedServerName() { String ret = delegate.indicatedServerName(); return ret; }
/** * Returns the SNI server name presented during the SSL handshake by the client. * @return the indicated server name */ public String indicatedServerName() { String ret = delegate.indicatedServerName(); return ret; }
indicatedServerName = req.connection().indicatedServerName(); assertEquals(version, req.version()); assertEquals(serverSSL, req.isSSL());
@Test public void testVirtualHostSNI() throws Exception { WebClientOptions clientOptions = new WebClientOptions() .setTrustAll(true) .setDefaultHost(DEFAULT_HTTPS_HOST) .setDefaultPort(DEFAULT_HTTPS_PORT); HttpServerOptions serverOptions = new HttpServerOptions() .setSsl(true) .setSni(true) .setKeyStoreOptions(Cert.SNI_JKS.get()) .setPort(DEFAULT_HTTPS_PORT) .setHost(DEFAULT_HTTPS_HOST); testTLS(clientOptions, serverOptions, req -> req.get("/").virtualHost("host2.com").ssl(true), req -> { assertEquals("host2.com", req.connection().indicatedServerName()); System.out.println(req.host()); }); }