Slair1 commented on a change in pull request #4852:
URL: https://github.com/apache/cloudstack/pull/4852#discussion_r616033038



##########
File path: 
plugins/ca/root-ca/src/main/java/org/apache/cloudstack/ca/provider/RootCACustomTrustManager.java
##########
@@ -79,32 +79,35 @@ public void checkClientTrusted(final X509Certificate[] 
certificates, final Strin
         if (LOG.isDebugEnabled()) {
             printCertificateChain(certificates, s);
         }
-        if (!authStrictness) {
-            return;
-        }
-        if (certificates == null || certificates.length < 1 || certificates[0] 
== null) {
+
+        final X509Certificate primaryClientCertificate = (certificates != null 
&& certificates.length > 0 && certificates[0] != null) ? certificates[0] : null;
+        String exceptionMsg = "";
+
+        if (authStrictness && primaryClientCertificate == null) {
             throw new CertificateException("In strict auth mode, 
certificate(s) are expected from client:" + clientAddress);
+        } else if (primaryClientCertificate == null) {

Review comment:
       Easy enough!  will plan on updating this today.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to