ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1755591 - /webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
Date Tue, 09 Aug 2016 10:16:33 GMT
Author: coheigea
Date: Tue Aug  9 10:16:33 2016
New Revision: 1755591

URL: http://svn.apache.org/viewvc?rev=1755591&view=rev
Log:
NPE fix

Modified:
    webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java?rev=1755591&r1=1755590&r2=1755591&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
(original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
Tue Aug  9 10:16:33 2016
@@ -504,7 +504,10 @@ public class SamlAssertionWrapper {
         // prepare to sign the SAML token
         CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
         cryptoType.setAlias(issuerKeyName);
-        X509Certificate[] issuerCerts = issuerCrypto.getX509Certificates(cryptoType);
+        X509Certificate[] issuerCerts = null;
+        if (issuerCrypto != null) {
+            issuerCerts = issuerCrypto.getX509Certificates(cryptoType);
+        }
         if (issuerCerts == null || issuerCerts.length == 0) {
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "empty",
                 new Object[] {"No issuer certs were found to sign the SAML Assertion using
issuer name: "



Mime
View raw message