Forráskód Böngészése

HDDS-1858. mTLS support for Ozone is not correct. Contributed by Siddharth Wagle.

Xiaoyu Yao 5 éve
szülő
commit
b41ef61ebc

+ 3 - 3
hadoop-hdds/common/src/main/java/org/apache/ratis/RatisHelper.java

@@ -202,11 +202,11 @@ public interface RatisHelper {
   static GrpcTlsConfig createTlsClientConfig(SecurityConfig conf) {
     if (conf.isGrpcTlsEnabled()) {
       if (conf.isGrpcMutualTlsRequired()) {
-        return new GrpcTlsConfig(
-            null, null, conf.getTrustStoreFile(), false);
-      } else {
         return new GrpcTlsConfig(conf.getClientPrivateKeyFile(),
             conf.getClientCertChainFile(), conf.getTrustStoreFile(), true);
+      } else {
+        return new GrpcTlsConfig(
+            null, null, conf.getTrustStoreFile(), false);
       }
     }
     return null;