diff --git a/auth/realm/ldap/src/main/java/org/wildfly/security/auth/realm/ldap/X509EvidenceVerifier.java b/auth/realm/ldap/src/main/java/org/wildfly/security/auth/realm/ldap/X509EvidenceVerifier.java index 8b2bd7bd61a..b764ee60f50 100644 --- a/auth/realm/ldap/src/main/java/org/wildfly/security/auth/realm/ldap/X509EvidenceVerifier.java +++ b/auth/realm/ldap/src/main/java/org/wildfly/security/auth/realm/ldap/X509EvidenceVerifier.java @@ -176,10 +176,8 @@ public boolean verifyCertificate(X509Certificate certificate, Attributes attribu for (int i = 0; i < size; i++) { Object attrDigest = attribute.get(i); - if (attrDigest != null){ - if (digest.equalsIgnoreCase((String) attrDigest)) { - return true; - } + if (attrDigest != null && digest.equalsIgnoreCase((String) attrDigest)){ + return true; } } } catch (NoSuchAlgorithmException | CertificateEncodingException e) {