cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1557187 - /cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/TrustValidator.java
Date Fri, 10 Jan 2014 16:47:48 GMT
Author: coheigea
Date: Fri Jan 10 16:47:47 2014
New Revision: 1557187

URL: http://svn.apache.org/r1557187
Log:
Potential NPE fix

Modified:
    cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/TrustValidator.java

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/TrustValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/TrustValidator.java?rev=1557187&r1=1557186&r2=1557187&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/TrustValidator.java
(original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/common/TrustValidator.java
Fri Jan 10 16:47:47 2014
@@ -36,7 +36,9 @@ public class TrustValidator {
         
         Credential trustCredential = new Credential();
         trustCredential.setPublicKey(publicKey);
-        trustCredential.setCertificates(new X509Certificate[]{cert});
+        if (cert != null) {
+            trustCredential.setCertificates(new X509Certificate[]{cert});
+        }
         validator.validate(trustCredential, data);
     }
 }



Mime
View raw message