Skip to content

Commit

Permalink
Fixes #5973 - Proxy client TLS authentication example.
Browse files Browse the repository at this point in the history
Fixes test mistakenly missing the proper request tag.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Feb 15, 2021
1 parent 7f867bf commit a5ef97f
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -333,8 +333,8 @@ protected KeyManager[] getKeyManagers(KeyStore keyStore) throws Exception
public void testClientAuthProxyingWithSSLSessionResumptionDisabled() throws Exception
{
// To user the same HttpClient and server hostName, we need to disable
// SSLSession caching, which is only possible by creating SSLEngine without
// peer host information.
// SSLSession caching, which is only possible by creating SSLEngine
// without peer host information.
// This is more CPU intensive because TLS sessions can never be resumed.

startServer();
Expand All @@ -347,7 +347,7 @@ protected Request newProxyRequest(HttpServletRequest request, String rewrittenTa
Request proxyRequest = super.newProxyRequest(request, rewrittenTarget);
proxyRequest.port(serverConnector.getLocalPort());
// Tag the request.
proxyRequest.tag(user);
proxyRequest.tag(new AliasTLSTag(user));
return proxyRequest;
}

Expand Down Expand Up @@ -381,8 +381,7 @@ protected KeyManager[] getKeyManagers(KeyStore keyStore) throws Exception
clientTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/proxy_keystore.p12").getAbsolutePath());
clientTLS.setKeyStorePassword("storepwd");
clientTLS.setKeyStoreType("PKCS12");
HttpClientTransportOverHTTP transport = new HttpClientTransportOverHTTP(1);
return new HttpClient(transport, clientTLS);
return new HttpClient(new HttpClientTransportOverHTTP(1), clientTLS);

}
});
Expand Down

0 comments on commit a5ef97f

Please sign in to comment.