ChenSammi commented on code in PR #4032:
URL: https://github.com/apache/ozone/pull/4032#discussion_r1041971550


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/client/DefaultCertificateClient.java:
##########
@@ -1060,4 +1065,37 @@ public long getLocalCrlId() {
   public void setLocalCrlId(long crlId) {
     this.localCrlId = crlId;
   }
+
+  @Override
+  public synchronized KeyStoresFactory getServerKeyStoresFactory()
+      throws CertificateException {
+    if (serverKeyStoresFactory == null) {
+      serverKeyStoresFactory = SecurityUtil.getServerKeyStoresFactory(
+          securityConfig, this, true);
+    }
+    return serverKeyStoresFactory;
+  }
+
+  @Override
+  public KeyStoresFactory getClientKeyStoresFactory(boolean mutualAuth)
+      throws CertificateException {
+    Preconditions.checkArgument(mutualAuth,

Review Comment:
   Right, we can prepare the keyStores for mutual authentication.  If it's not 
mutual authentication, just leaving the keyManager of keyStores not used, there 
will be no side effect. 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to