pzampino commented on code in PR #1291:
URL: https://github.com/apache/knox/pull/1291#discussion_r3554024513


##########
gateway-spi/src/main/java/org/apache/knox/gateway/dispatch/DefaultHttpClientFactory.java:
##########
@@ -173,25 +173,36 @@ private boolean doesRetryParamExist(final FilterConfig 
filterConfig) {
    * <p>
    * This method is package private to allow access to unit tests
    *
-   * @param services     the {@link GatewayServices}
-   * @param filterConfig a {@link FilterConfig} used to query for parameters 
for this operation
-   * @param serviceRole the name of the service role to whom this HTTP client 
is being created for
+   * @param services       the {@link GatewayServices}
+   * @param gatewayConfig  the {@link GatewayConfig} used to determine 
single-EKU mode
+   * @param filterConfig   a {@link FilterConfig} used to query for parameters 
for this operation
+   * @param serviceRole    the name of the service role to whom this HTTP 
client is being created for
    * @return a {@link SSLContext} or <code>null</code> if a custom {@link 
SSLContext} is not needed.
    */
-  SSLContext createSSLContext(GatewayServices services, FilterConfig 
filterConfig, String serviceRole) {
+  SSLContext createSSLContext(GatewayServices services, GatewayConfig 
gatewayConfig, FilterConfig filterConfig, String serviceRole) {
     KeyStore identityKeystore;
     char[] identityKeyPassphrase;
     KeyStore trustKeystore;
 
     KeystoreService ks = services.getService(ServiceType.KEYSTORE_SERVICE);
     try {
-      if 
(Boolean.parseBoolean(filterConfig.getInitParameter(PARAMETER_USE_TWO_WAY_SSL)))
 {
+      boolean singleEku = gatewayConfig != null && 
gatewayConfig.isSingleEkuEnabled();
+      boolean twoWaySsl = 
Boolean.parseBoolean(filterConfig.getInitParameter(PARAMETER_USE_TWO_WAY_SSL))
+          || (gatewayConfig != null && 
gatewayConfig.isHttpClientTwoWaySslEnabled());

Review Comment:
   Ok, so you're introducing the new global config. Got it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to