fapifta commented on code in PR #5009:
URL: https://github.com/apache/ozone/pull/5009#discussion_r1257548539


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/client/CertificateClient.java:
##########
@@ -126,6 +130,30 @@ X509Certificate getCertificate(String certSerialId)
    */
   Set<X509Certificate> getAllCaCerts();
 
+  /**
+   * This method serves as a convenience to solve the common problem in the
+   * code related to clients, and handle single SCM case and the data with
+   * which we provide one single cert to old clients.
+   * @return either the rootCA certificate, or the sub-CA certificate
+   *          of the node that served as the rootCA during bootstrap.
+   */
+  default String getSingleCACertificatePEM() throws SCMSecurityException {
+    return CertificateCodec.getPEMEncodedString(getSingleCACertificate());
+  }

Review Comment:
   Yes, I have adjusted the code to overcome these.



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