소스 검색

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

Xiaoyu Yao 5 년 전
부모
커밋
b41ef61ebc
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      hadoop-hdds/common/src/main/java/org/apache/ratis/RatisHelper.java

+ 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;