DaanHoogland commented on code in PR #14596:
URL: https://github.com/apache/cloudstack/pull/14596#discussion_r4579635273


##########
plugins/ca/root-ca/src/main/java/org/apache/cloudstack/ca/provider/RootCACustomTrustManager.java:
##########
@@ -91,6 +92,17 @@ public void checkClientTrusted(final X509Certificate[] 
certificates, final Strin
             return;
         }
 
+        if (authStrictness) {
+            if (caCertificate == null) {
+                throw new CertificateException("Root CA certificate is 
required to validate client: " + clientAddress);
+            }
+            try {
+                primaryClientCertificate.verify(caCertificate.getPublicKey());
+            } catch (final GeneralSecurityException e) {
+                throw new CertificateException("Client certificate signature 
verification failed for client: " + clientAddress, e);
+            }
+        }

Review Comment:
   can this validation be in a separate method?



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

Reply via email to