adoroszlai commented on code in PR #5009:
URL: https://github.com/apache/ozone/pull/5009#discussion_r1252795408
##########
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:
There are a few more tests that need to be updated:
https://github.com/fapifta/hadoop-ozone/actions/runs/5459036651/jobs/9934647451#step:5:3792
https://github.com/fapifta/hadoop-ozone/actions/runs/5459036651/jobs/9934647503#step:5:3764
https://github.com/fapifta/hadoop-ozone/actions/runs/5459036651/jobs/9934647503#step:5:3810
Sorry for the trouble. :)
--
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]