You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2017/02/13 11:20:05 UTC

svn commit: r1782748 [4/9] - in /webservices/wss4j/trunk: bindings/src/main/java/org/apache/wss4j/binding/wssc200502/ policy/src/main/java/org/apache/wss4j/policy/builders/ policy/src/main/java/org/apache/wss4j/policy/model/ ws-security-common/src/main...

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/Merlin.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/Merlin.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/Merlin.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/Merlin.java Mon Feb 13 11:20:02 2017
@@ -671,7 +671,7 @@ public class Merlin extends CryptoBase {
                                               new Object[] {msg});
             } catch (KeyStoreException ex) {
                 throw new WSSecurityException(
-                    WSSecurityException.ErrorCode.FAILURE, ex, "noPrivateKey", 
+                    WSSecurityException.ErrorCode.FAILURE, ex, "noPrivateKey",
                         new Object[] {ex.getMessage()}
                 );
             }
@@ -679,7 +679,7 @@ public class Merlin extends CryptoBase {
         String password = getPassword(identifier, callbackHandler);
         return getPrivateKey(identifier, password);
     }
-    
+
     /**
      * Gets the private key corresponding to the given PublicKey.
      *
@@ -710,7 +710,7 @@ public class Merlin extends CryptoBase {
                                               new Object[] {msg});
             } catch (KeyStoreException ex) {
                 throw new WSSecurityException(
-                    WSSecurityException.ErrorCode.FAILURE, ex, "noPrivateKey", 
+                    WSSecurityException.ErrorCode.FAILURE, ex, "noPrivateKey",
                         new Object[] {ex.getMessage()}
                 );
             }
@@ -718,7 +718,7 @@ public class Merlin extends CryptoBase {
         String password = getPassword(identifier, callbackHandler);
         return getPrivateKey(identifier, password);
     }
-    
+
     /**
      * Gets the private key corresponding to the identifier.
      *
@@ -823,7 +823,7 @@ public class Merlin extends CryptoBase {
         List<Certificate[]> foundIssuingCertChains = null;
         String issuerString = certs[0].getIssuerX500Principal().getName();
         if (certs.length == 1) {
-            
+
             Object subject = convertSubjectToPrincipal(issuerString);
 
             if (keystore != null) {
@@ -835,7 +835,7 @@ public class Merlin extends CryptoBase {
                 foundIssuingCertChains = getCertificates(subject, truststore);
             }
 
-            if (foundIssuingCertChains == null || foundIssuingCertChains.isEmpty() 
+            if (foundIssuingCertChains == null || foundIssuingCertChains.isEmpty()
                 || foundIssuingCertChains.get(0).length < 1) {
                 String subjectString = certs[0].getSubjectX500Principal().getName();
                 if (LOG.isDebugEnabled()) {
@@ -905,7 +905,7 @@ public class Merlin extends CryptoBase {
             }
 
             PKIXParameters param = createPKIXParameters(set, enableRevocation);
-            
+
             // Generate cert path
             if (foundIssuingCertChains != null && !foundIssuingCertChains.isEmpty()) {
                 java.security.cert.CertPathValidatorException validatorException = null;
@@ -914,10 +914,10 @@ public class Merlin extends CryptoBase {
                     X509Certificate[] x509certs = new X509Certificate[foundCertChain.length + 1];
                     x509certs[0] = certs[0];
                     System.arraycopy(foundCertChain, 0, x509certs, 1, foundCertChain.length);
-                    
+
                     List<X509Certificate> certList = Arrays.asList(certs);
                     CertPath path = getCertificateFactory().generateCertPath(certList);
-                    
+
                     try {
                         validator.validate(path, param);
                         // We have a valid cert path at this point so break
@@ -927,14 +927,14 @@ public class Merlin extends CryptoBase {
                         validatorException = e;
                     }
                 }
-                
+
                 if (validatorException != null) {
                     throw validatorException;
                 }
             } else {
                 List<X509Certificate> certList = Arrays.asList(certs);
                 CertPath path = getCertificateFactory().generateCertPath(certList);
-                
+
                 validator.validate(path, param);
             }
         } catch (NoSuchProviderException | NoSuchAlgorithmException
@@ -950,10 +950,10 @@ public class Merlin extends CryptoBase {
         if (!matchesSubjectDnPattern(certs[0], subjectCertConstraints)) {
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION);
         }
-    }   
+    }
 
     @Override
-    public void verifyTrust(X509Certificate[] certs, boolean enableRevocation, 
+    public void verifyTrust(X509Certificate[] certs, boolean enableRevocation,
                             Collection<Pattern> subjectCertConstraints,
                             Collection<Pattern> issuerCertConstraints) throws WSSecurityException {
         verifyTrust(certs, enableRevocation, subjectCertConstraints);
@@ -1070,7 +1070,7 @@ public class Merlin extends CryptoBase {
 
                 if (certs != null && certs.length > 0 && certs[0] instanceof X509Certificate) {
                     X509Certificate x509cert = (X509Certificate) certs[0];
-                    LOG.debug("Keystore alias {} has issuer {} and serial {}", alias, 
+                    LOG.debug("Keystore alias {} has issuer {} and serial {}", alias,
                               x509cert.getIssuerX500Principal().getName(), x509cert.getSerialNumber());
                     if (x509cert.getSerialNumber().compareTo(serialNumber) == 0) {
                         Object certName =
@@ -1087,7 +1087,7 @@ public class Merlin extends CryptoBase {
                 WSSecurityException.ErrorCode.FAILURE, e, "keystore"
             );
         }
-        
+
         LOG.debug("No issuer serial match found in keystore");
         return new Certificate[]{};
     }
@@ -1173,7 +1173,7 @@ public class Merlin extends CryptoBase {
                 WSSecurityException.ErrorCode.FAILURE, e, "keystore"
             );
         }
-        
+
         LOG.debug("No thumbprint match found in keystore");
         return new Certificate[]{};
     }
@@ -1240,7 +1240,7 @@ public class Merlin extends CryptoBase {
                 WSSecurityException.ErrorCode.FAILURE, e, "keystore"
             );
         }
-        
+
         LOG.debug("No SKI match found in keystore");
         return new Certificate[]{};
     }
@@ -1272,7 +1272,7 @@ public class Merlin extends CryptoBase {
         // We just choose the first entry
         return Arrays.copyOf(certs.get(0), certs.get(0).length, X509Certificate[].class);
     }
-    
+
     private Object convertSubjectToPrincipal(String subjectDN) {
         //
         // Convert the subject DN to a java X500Principal object first. This is to ensure
@@ -1289,7 +1289,7 @@ public class Merlin extends CryptoBase {
         } catch (java.lang.IllegalArgumentException ex) {
             subject = createBCX509Name(subjectDN);
         }
-        
+
         return subject;
     }
 
@@ -1368,7 +1368,7 @@ public class Merlin extends CryptoBase {
         } catch (KeyStoreException e) {
             return false;
         }
-        
+
         LOG.debug("No PublicKey match found in keystore");
         return false;
     }
@@ -1411,7 +1411,7 @@ public class Merlin extends CryptoBase {
                 WSSecurityException.ErrorCode.FAILURE, e, "keystore"
             );
         }
-        
+
         if (foundCerts.isEmpty()) {
             LOG.debug("No Subject match found in keystore");
         }
@@ -1467,7 +1467,7 @@ public class Merlin extends CryptoBase {
         }
         return null;
     }
-    
+
     private String getIdentifier(PublicKey publicKey, KeyStore store)
         throws WSSecurityException {
         try {

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/X509SubjectPublicKeyInfo.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/X509SubjectPublicKeyInfo.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/X509SubjectPublicKeyInfo.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/X509SubjectPublicKeyInfo.java Mon Feb 13 11:20:02 2017
@@ -1,108 +1,108 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.wss4j.common.crypto;
-
-import java.security.PublicKey;
-
-import org.apache.wss4j.common.ext.WSSecurityException;
-
-/**
- * Represents the X.509 SubjectPublicKeyInfo for a public key, as specified
- * in RFC3280/5280:
- * <pre>
- * SubjectPublicKeyInfo  ::=  SEQUENCE  {
- *       algorithm            AlgorithmIdentifier,
- *       subjectPublicKey     BIT STRING  }
- *
- * AlgorithmIdentifier  ::=  SEQUENCE  {
- *       algorithm               OBJECT IDENTIFIER,
- *       parameters              ANY DEFINED BY algorithm OPTIONAL  }
- * </pre>
- */
-public class X509SubjectPublicKeyInfo extends DERDecoder {
-
-    /**
-     * Construct a SubjectPublicKeyInfo for the given public key.
-     *
-     * @param key the public key.
-     * @throws WSSecurityException if the public key encoding format is 
-     *                             not X.509 or the encoding is null.
-     */
-    public X509SubjectPublicKeyInfo(PublicKey key) throws WSSecurityException {
-        super(key.getEncoded());
-        if (!("X.509".equalsIgnoreCase(key.getFormat()) 
-                || "X509".equalsIgnoreCase(key.getFormat()))) {
-            throw new WSSecurityException(
-                WSSecurityException.ErrorCode.UNSUPPORTED_SECURITY_TOKEN,
-                "noSKIHandling",
-                new Object[] {"Support for X.509-encoded public keys only"}
-            );
-        }
-    }
-
-    /**
-     * Construct a SubjectPublicKeyInfo for the given X.509-encoded public key.
-     *
-     * @param x509EncodedPublicKey the public key, in X.509 DER-encoding.
-     * @throws WSSecurityException if the encoded public key is null.
-     */
-    public X509SubjectPublicKeyInfo(byte[] x509EncodedPublicKey) throws WSSecurityException {
-        super(x509EncodedPublicKey);
-    }
-
-    /**
-     * Get the subjectPublicKey element of the SubjectPublicKeyInfo.
-     *
-     * @return the X.509-encoded subjectPublicKey bit string.
-     * @throws WSSecurityException the DER-encoding is invalid.
-     */
-    public byte[] getSubjectPublicKey() throws WSSecurityException {
-        reset();
-        expect(TYPE_SEQUENCE);    // SubjectPublicKeyInfo SEQUENCE
-        getLength();
-        // Could enforce the max length of this sequence, but not actually
-        // necessary for our purposes, so be forgiving and simply ignore.
-        expect(TYPE_SEQUENCE);    // algorithm AlgorithmIdentifier SEQUENCE
-        int algIDlen = getLength();
-        if (algIDlen < 0) {
-            // Unsupported indefinite-length
-            throw new WSSecurityException(
-                    WSSecurityException.ErrorCode.UNSUPPORTED_SECURITY_TOKEN,
-                    "noSKIHandling",
-                    new Object[] {"Unsupported X.509 public key format"}
-            );
-        }
-        skip(algIDlen);           // AlgorithmIdentifier contents
-        expect(TYPE_BIT_STRING);  // subjectPublicKey BIT STRING
-        int keyLen = getLength() - 1;
-        if (keyLen < 0) {
-            // Invalid BIT STRING length
-            throw new WSSecurityException(
-                    WSSecurityException.ErrorCode.UNSUPPORTED_SECURITY_TOKEN,
-                    "noSKIHandling",
-                    new Object[] {"Invalid X.509 public key format"}
-            );
-        }
-        skip(1);   // number unused bits
-        // DER-encoding guarantees unused bits should be 0
-
-        return getBytes(keyLen);
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.wss4j.common.crypto;
+
+import java.security.PublicKey;
+
+import org.apache.wss4j.common.ext.WSSecurityException;
+
+/**
+ * Represents the X.509 SubjectPublicKeyInfo for a public key, as specified
+ * in RFC3280/5280:
+ * <pre>
+ * SubjectPublicKeyInfo  ::=  SEQUENCE  {
+ *       algorithm            AlgorithmIdentifier,
+ *       subjectPublicKey     BIT STRING  }
+ *
+ * AlgorithmIdentifier  ::=  SEQUENCE  {
+ *       algorithm               OBJECT IDENTIFIER,
+ *       parameters              ANY DEFINED BY algorithm OPTIONAL  }
+ * </pre>
+ */
+public class X509SubjectPublicKeyInfo extends DERDecoder {
+
+    /**
+     * Construct a SubjectPublicKeyInfo for the given public key.
+     *
+     * @param key the public key.
+     * @throws WSSecurityException if the public key encoding format is
+     *                             not X.509 or the encoding is null.
+     */
+    public X509SubjectPublicKeyInfo(PublicKey key) throws WSSecurityException {
+        super(key.getEncoded());
+        if (!("X.509".equalsIgnoreCase(key.getFormat())
+                || "X509".equalsIgnoreCase(key.getFormat()))) {
+            throw new WSSecurityException(
+                WSSecurityException.ErrorCode.UNSUPPORTED_SECURITY_TOKEN,
+                "noSKIHandling",
+                new Object[] {"Support for X.509-encoded public keys only"}
+            );
+        }
+    }
+
+    /**
+     * Construct a SubjectPublicKeyInfo for the given X.509-encoded public key.
+     *
+     * @param x509EncodedPublicKey the public key, in X.509 DER-encoding.
+     * @throws WSSecurityException if the encoded public key is null.
+     */
+    public X509SubjectPublicKeyInfo(byte[] x509EncodedPublicKey) throws WSSecurityException {
+        super(x509EncodedPublicKey);
+    }
+
+    /**
+     * Get the subjectPublicKey element of the SubjectPublicKeyInfo.
+     *
+     * @return the X.509-encoded subjectPublicKey bit string.
+     * @throws WSSecurityException the DER-encoding is invalid.
+     */
+    public byte[] getSubjectPublicKey() throws WSSecurityException {
+        reset();
+        expect(TYPE_SEQUENCE);    // SubjectPublicKeyInfo SEQUENCE
+        getLength();
+        // Could enforce the max length of this sequence, but not actually
+        // necessary for our purposes, so be forgiving and simply ignore.
+        expect(TYPE_SEQUENCE);    // algorithm AlgorithmIdentifier SEQUENCE
+        int algIDlen = getLength();
+        if (algIDlen < 0) {
+            // Unsupported indefinite-length
+            throw new WSSecurityException(
+                    WSSecurityException.ErrorCode.UNSUPPORTED_SECURITY_TOKEN,
+                    "noSKIHandling",
+                    new Object[] {"Unsupported X.509 public key format"}
+            );
+        }
+        skip(algIDlen);           // AlgorithmIdentifier contents
+        expect(TYPE_BIT_STRING);  // subjectPublicKey BIT STRING
+        int keyLen = getLength() - 1;
+        if (keyLen < 0) {
+            // Invalid BIT STRING length
+            throw new WSSecurityException(
+                    WSSecurityException.ErrorCode.UNSUPPORTED_SECURITY_TOKEN,
+                    "noSKIHandling",
+                    new Object[] {"Invalid X.509 public key format"}
+            );
+        }
+        skip(1);   // number unused bits
+        // DER-encoding guarantees unused bits should be 0
+
+        return getBytes(keyLen);
+    }
+}

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/derivedKey/ConversationConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/derivedKey/ConversationConstants.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/derivedKey/ConversationConstants.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/derivedKey/ConversationConstants.java Mon Feb 13 11:20:02 2017
@@ -180,7 +180,7 @@ public final class ConversationConstants
 
         String P_SHA_1_2005_12 =
             "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1";
-        
+
         byte[] createKey(byte[] secret, byte[] seed, int offset, long length)
             throws WSSecurityException;
     }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/AttachmentRequestCallback.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/AttachmentRequestCallback.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/AttachmentRequestCallback.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/AttachmentRequestCallback.java Mon Feb 13 11:20:02 2017
@@ -51,7 +51,7 @@ public class AttachmentRequestCallback i
     }
 
     /**
-     * Set whether to remove the attachments when we're reading them. 
+     * Set whether to remove the attachments when we're reading them.
      * The default is "true".
      */
     public void setRemoveAttachments(boolean removeAttachments) {

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/WSSecurityException.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/WSSecurityException.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/WSSecurityException.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/ext/WSSecurityException.java Mon Feb 13 11:20:02 2017
@@ -35,7 +35,7 @@ public class WSSecurityException extends
      * Fault codes defined in the WSS 1.1 spec under section 12, Error handling
      */
 
-    public static final String NS_WSSE10 = 
+    public static final String NS_WSSE10 =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 
     /**

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java Mon Feb 13 11:20:02 2017
@@ -115,11 +115,11 @@ public class KerberosClientExceptionActi
 
         try {
             @SuppressWarnings("rawtypes")
-            Class inquireType = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_INQUIRE_TYPE_CLASS 
+            Class inquireType = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_INQUIRE_TYPE_CLASS
                 : SUN_JGSS_INQUIRE_TYPE_CLASS);
 
             @SuppressWarnings("rawtypes")
-            Class extendedGSSContext = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_EXT_GSSCTX_CLASS 
+            Class extendedGSSContext = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_EXT_GSSCTX_CLASS
                 : SUN_JGSS_EXT_GSSCTX_CLASS);
 
             @SuppressWarnings("unchecked")

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java Mon Feb 13 11:20:02 2017
@@ -107,15 +107,15 @@ public class KerberosServiceExceptionAct
 
             try {
                 @SuppressWarnings("rawtypes")
-                Class inquireType = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_INQUIRE_TYPE_CLASS 
+                Class inquireType = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_INQUIRE_TYPE_CLASS
                     : SUN_JGSS_INQUIRE_TYPE_CLASS);
 
                 @SuppressWarnings("rawtypes")
-                Class extendedGSSContext = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_EXT_GSSCTX_CLASS 
+                Class extendedGSSContext = Class.forName(IS_IBM_VENDOR ? IBM_JGSS_EXT_GSSCTX_CLASS
                     : SUN_JGSS_EXT_GSSCTX_CLASS);
 
                 @SuppressWarnings("unchecked")
-                Method inquireSecContext = 
+                Method inquireSecContext =
                 extendedGSSContext.getMethod(EXTENDED_JGSS_CONTEXT_INQUIRE_SEC_CONTEXT_METHOD_NAME, inquireType);
 
                 @SuppressWarnings("unchecked")

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/OpenSAMLUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/OpenSAMLUtil.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/OpenSAMLUtil.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/OpenSAMLUtil.java Mon Feb 13 11:20:02 2017
@@ -79,7 +79,7 @@ public final class OpenSAMLUtil {
             ConfigurationService.setConfiguration(configuration);
 
             XMLObjectProviderRegistry providerRegistry = new XMLObjectProviderRegistry();
-            configuration.register(XMLObjectProviderRegistry.class, providerRegistry, 
+            configuration.register(XMLObjectProviderRegistry.class, providerRegistry,
                                    ConfigurationService.DEFAULT_PARTITION_NAME);
 
             try {
@@ -87,7 +87,7 @@ public final class OpenSAMLUtil {
 
                 SAMLConfiguration samlConfiguration = new SAMLConfiguration();
 
-                configuration.register(SAMLConfiguration.class, samlConfiguration, 
+                configuration.register(SAMLConfiguration.class, samlConfiguration,
                                        ConfigurationService.DEFAULT_PARTITION_NAME);
 
                 builderFactory = XMLObjectProviderRegistrySupport.getBuilderFactory();

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java Mon Feb 13 11:20:02 2017
@@ -206,7 +206,7 @@ public class SubjectBean {
 
         if (subjectConfirmationMethod == null && that.subjectConfirmationMethod != null) {
             return false;
-        } else if (subjectConfirmationMethod != null 
+        } else if (subjectConfirmationMethod != null
             && !subjectConfirmationMethod.equals(that.subjectConfirmationMethod)) {
             return false;
         }

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoClientAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoClientAction.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoClientAction.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoClientAction.java Mon Feb 13 11:20:02 2017
@@ -60,7 +60,7 @@ public class DefaultSpnegoClientAction i
             GSSManager gssManager = GSSManager.getInstance();
             Oid oid = new Oid("1.3.6.1.5.5.2");
 
-            GSSName gssService = gssManager.createName(serviceName, isUsernameServiceNameForm 
+            GSSName gssService = gssManager.createName(serviceName, isUsernameServiceNameForm
                                                        ? GSSName.NT_USER_NAME : GSSName.NT_HOSTBASED_SERVICE);
             secContext = gssManager.createContext(gssService, oid, null, GSSContext.DEFAULT_LIFETIME);
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoServiceAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoServiceAction.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoServiceAction.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/spnego/DefaultSpnegoServiceAction.java Mon Feb 13 11:20:02 2017
@@ -60,8 +60,8 @@ public class DefaultSpnegoServiceAction
             GSSManager gssManager = GSSManager.getInstance();
             Oid oid = new Oid("1.3.6.1.5.5.2");
 
-            GSSName gssService = 
-                gssManager.createName(serviceName, isUsernameServiceNameForm ? GSSName.NT_USER_NAME 
+            GSSName gssService =
+                gssManager.createName(serviceName, isUsernameServiceNameForm ? GSSName.NT_USER_NAME
                     : GSSName.NT_HOSTBASED_SERVICE);
             secContext = gssManager.createContext(gssService, oid, null, GSSContext.DEFAULT_LIFETIME);
 

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/AttachmentUtils.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/AttachmentUtils.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/AttachmentUtils.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/AttachmentUtils.java Mon Feb 13 11:20:02 2017
@@ -490,8 +490,8 @@ public final class AttachmentUtils {
                 while (read != ivLen) {
                     read += super.in.read(ivBytes, read, ivLen - read);
                 }
-                
-                AlgorithmParameterSpec paramSpec = 
+
+                AlgorithmParameterSpec paramSpec =
                     XMLCipherUtil.constructBlockCipherParameters(encAlgo, ivBytes, AttachmentUtils.class);
 
                 try {
@@ -571,10 +571,10 @@ public final class AttachmentUtils {
                     //the encryption. If a header listed in the profile is present it MUST be included in
                     //the encryption. If a header is not listed in this profile, then it MUST NOT be
                     //included in the encryption.
-                    if (AttachmentUtils.MIME_HEADER_CONTENT_DESCRIPTION.equals(key) 
-                        || AttachmentUtils.MIME_HEADER_CONTENT_DISPOSITION.equals(key) 
-                        || AttachmentUtils.MIME_HEADER_CONTENT_ID.equals(key) 
-                        || AttachmentUtils.MIME_HEADER_CONTENT_LOCATION.equals(key) 
+                    if (AttachmentUtils.MIME_HEADER_CONTENT_DESCRIPTION.equals(key)
+                        || AttachmentUtils.MIME_HEADER_CONTENT_DISPOSITION.equals(key)
+                        || AttachmentUtils.MIME_HEADER_CONTENT_ID.equals(key)
+                        || AttachmentUtils.MIME_HEADER_CONTENT_LOCATION.equals(key)
                         || AttachmentUtils.MIME_HEADER_CONTENT_TYPE.equals(key)) {
                         iterator.remove();
                         outputStreamWriter.write(key);

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/DOM2Writer.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/DOM2Writer.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/DOM2Writer.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/DOM2Writer.java Mon Feb 13 11:20:02 2017
@@ -238,7 +238,7 @@ public final class DOM2Writer {
                                            PrintWriter out) {
         String namespaceURI = node.getNamespaceURI();
         String prefix = node.getPrefix();
-        if (!(namespaceURI.equals(XMLUtils.XMLNS_NS) && prefix.equals("xmlns")) 
+        if (!(namespaceURI.equals(XMLUtils.XMLNS_NS) && prefix.equals("xmlns"))
             && !(namespaceURI.equals(XMLUtils.XML_NS) && prefix.equals("xml"))) {
             if (XMLUtils.getNamespace(prefix, owner) == null) {
                 out.print(" xmlns:" + prefix + "=\"" + namespaceURI + '\"');

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/NSStack.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/NSStack.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/NSStack.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/NSStack.java Mon Feb 13 11:20:02 2017
@@ -87,7 +87,7 @@ public class NSStack {
             // Reset the currentDefaultNS to ignore the frame just removed.
             currentDefaultNS = top;
             while (currentDefaultNS > 0) {
-                if (stack[currentDefaultNS] != null 
+                if (stack[currentDefaultNS] != null
                     && stack[currentDefaultNS].getPrefix().length() == 0) {
                     break;
                 }
@@ -205,7 +205,7 @@ public class NSStack {
 
         // If defaults are OK, and the given NS is the current default,
         // return "" as the prefix to favor defaults where possible.
-        if (!noDefault && currentDefaultNS > 0 && stack[currentDefaultNS] != null 
+        if (!noDefault && currentDefaultNS > 0 && stack[currentDefaultNS] != null
             && namespaceURI.equals(stack[currentDefaultNS].getNamespaceURI())) {
             return "";
         }

Modified: webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/attachment/AttachmentTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/attachment/AttachmentTest.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/attachment/AttachmentTest.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/attachment/AttachmentTest.java Mon Feb 13 11:20:02 2017
@@ -23,7 +23,7 @@ import org.junit.Test;
 import org.apache.wss4j.common.util.AttachmentUtils;
 
 public class AttachmentTest {
-    
+
     @Test
     public void testMatch() {
         Assert.assertTrue("text/xml".matches("(?i)(text/xml).*"));

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSConstants.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSConstants.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/WSConstants.java Mon Feb 13 11:20:02 2017
@@ -132,7 +132,7 @@ public final class WSConstants extends W
     /**
      * An unsupported signature or encryption algorithm was used
      */
-    public static final QName UNSUPPORTED_ALGORITHM  =
+    public static final QName UNSUPPORTED_ALGORITHM =
         new QName(WSSE_NS, "UnsupportedAlgorithm");
 
     /**

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/AbstractDerivedAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/AbstractDerivedAction.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/AbstractDerivedAction.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/AbstractDerivedAction.java Mon Feb 13 11:20:02 2017
@@ -56,7 +56,7 @@ public abstract class AbstractDerivedAct
         }
         Node firstChild = secHeader.getFirstChild();
         while (firstChild != null) {
-            if (firstChild instanceof Element 
+            if (firstChild instanceof Element
                 && namespace.equals(((Element)firstChild).getNamespaceURI())
                 && localName.equals(((Element)firstChild).getLocalName())
                 && firstChild.getNextSibling() != null) {

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/SignatureAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/SignatureAction.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/SignatureAction.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/action/SignatureAction.java Mon Feb 13 11:20:02 2017
@@ -146,7 +146,7 @@ public class SignatureAction implements
 
             List<javax.xml.crypto.dsig.Reference> referenceList = wsSign.addReferencesToSign(parts);
 
-            if (signBST 
+            if (signBST
                 || reqData.isAppendSignatureAfterTimestamp() && siblingElementToPrepend == null) {
                 wsSign.computeSignature(referenceList, false, null);
             } else {

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/engine/WSSecurityEngineResult.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/engine/WSSecurityEngineResult.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/engine/WSSecurityEngineResult.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/engine/WSSecurityEngineResult.java Mon Feb 13 11:20:02 2017
@@ -151,7 +151,7 @@ public class WSSecurityEngineResult exte
      *
      * The value under this tag is of type STRParser.REFERENCE_TYPE.
      */
-    public static final String TAG_X509_REFERENCE_TYPE  = "x509-reference-type";
+    public static final String TAG_X509_REFERENCE_TYPE = "x509-reference-type";
 
     /**
      * Tag denoting the encrypted key bytes

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java Mon Feb 13 11:20:02 2017
@@ -1336,7 +1336,7 @@ public abstract class WSHandler {
             );
         reqData.setExpandXopIncludeForSignature(expandXOP);
     }
-    
+
     private Collection<Pattern> getCertConstraints(String certConstraints) throws WSSecurityException {
         String[] certConstraintsList = certConstraints.split(",");
         if (certConstraintsList != null && certConstraintsList.length > 0) {
@@ -1350,7 +1350,7 @@ public abstract class WSHandler {
                     throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, ex);
                 }
             }
-            
+
             return certConstraintsCollection;
         }
         return Collections.emptyList();

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java Mon Feb 13 11:20:02 2017
@@ -70,7 +70,7 @@ import org.w3c.dom.NodeList;
  * A class to encrypt references.
  */
 public class Encryptor {
-    
+
     private Document doc;
     private WSSecHeader securityHeader;
     private WsuIdAllocator idAllocator;
@@ -132,7 +132,7 @@ public class Encryptor {
             if (expandXopInclude) {
                 for (Element elementToEncrypt : elementsToEncrypt) {
                     Element encrElement = elementToEncrypt;
-                    
+
                     // Look for xop:Include Nodes
                     List<Element> includeElements =
                         XMLUtils.findElements(elementToEncrypt.getFirstChild(), "Include", WSConstants.XOP_NS);
@@ -154,10 +154,10 @@ public class Encryptor {
                                 String xopURI = includeElement.getAttributeNS(null, "href");
                                 if (xopURI != null) {
                                     // Delete the attachment
-                                    
+
                                     AttachmentRequestCallback attachmentRequestCallback = new AttachmentRequestCallback();
                                     attachmentRequestCallback.setAttachmentId(WSSecurityUtil.getAttachmentId(xopURI));
-                                    
+
                                     try {
                                         attachmentCallbackHandler.handle(new Callback[]{attachmentRequestCallback});
                                     } catch (UnsupportedCallbackException | IOException e) {
@@ -167,7 +167,7 @@ public class Encryptor {
                             }
                         }
                     }
-                    
+
                     if (storeBytesInAttachment) {
                         try {
                             String id =
@@ -214,26 +214,26 @@ public class Encryptor {
 
         return encDataRef;
     }
-    
+
     private Element findMatchingExpandedElement(Element element) {
         Element matchingElement = null;
-        
+
         if (element.hasAttributeNS(WSConstants.WSU_NS, "Id")) {
             String id = element.getAttributeNS(WSConstants.WSU_NS, "Id");
             matchingElement = wsDocInfo.getTokenElement(id);
         }
-        
+
         if (matchingElement == null && element.hasAttributeNS(null, "Id")) {
             String id = element.getAttributeNS(null, "Id");
             matchingElement = wsDocInfo.getTokenElement(id);
         }
-        
+
         // Check the Elements are the same
         if (matchingElement != null && matchingElement.getNamespaceURI().equals(element.getNamespaceURI())
             && matchingElement.getLocalName().equals(element.getLocalName())) {
             return matchingElement;
         }
-        
+
         return null;
     }
 
@@ -290,7 +290,7 @@ public class Encryptor {
             if (null != children) {
                 serializedOctets = serializer.serializeToByteArray(children);
             } else {
-                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_ENCRYPTION, 
+                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_ENCRYPTION,
                                               "Element has no content.");
             }
         } else {
@@ -427,10 +427,10 @@ public class Encryptor {
         String jceAlgorithm = JCEMapper.translateURItoJCEID(encryptionAlgorithm);
         try {
             Cipher cipher = Cipher.getInstance(jceAlgorithm);
-            
+
             int ivLen = JCEMapper.getIVLengthFromURI(encryptionAlgorithm) / 8;
             byte[] iv = XMLSecurityConstants.generateBytes(ivLen);
-            AlgorithmParameterSpec paramSpec = 
+            AlgorithmParameterSpec paramSpec =
                 XMLCipherUtil.constructBlockCipherParameters(encryptionAlgorithm, iv, Encryptor.class);
             cipher.init(Cipher.ENCRYPT_MODE, secretKey, paramSpec);
 

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecBase.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecBase.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecBase.java Mon Feb 13 11:20:02 2017
@@ -64,16 +64,16 @@ public class WSSecBase {
             doc = null;
         }
     }
-    
+
     public WSSecBase(Document doc) {
         this.doc = doc;
         securityHeader = new WSSecHeader(doc);
     }
-    
+
     protected Document getDocument() {
         return doc;
     }
-    
+
     public WSSecHeader getSecurityHeader() {
         return securityHeader;
     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKEncrypt.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKEncrypt.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKEncrypt.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKEncrypt.java Mon Feb 13 11:20:02 2017
@@ -48,13 +48,13 @@ public class WSSecDKEncrypt extends WSSe
     private int derivedKeyLength = -1;
 
     private List<Element> attachmentEncryptedDataElements;
-    
+
     private Serializer encryptionSerializer;
-    
+
     public WSSecDKEncrypt(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecDKEncrypt(Document doc) {
         super(doc);
     }
@@ -103,7 +103,7 @@ public class WSSecDKEncrypt extends WSSe
 
         return encryptForExternalRef(null, getParts());
     }
-    
+
     /**
      * Encrypt one or more parts or elements of the message (external).
      *
@@ -143,7 +143,7 @@ public class WSSecDKEncrypt extends WSSe
         encryptor.setWsDocInfo(getWsDocInfo());
         List<String> encDataRefs =
             encryptor.doEncryption(keyInfo, key, symEncAlgo, references, attachmentEncryptedDataElements);
-        
+
         if (dataRef == null) {
             dataRef =
                 getDocument().createElementNS(

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKSign.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKSign.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKSign.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDKSign.java Mon Feb 13 11:20:02 2017
@@ -80,7 +80,7 @@ public class WSSecDKSign extends WSSecDe
         super(securityHeader);
         init();
     }
-    
+
     public WSSecDKSign(Document doc) {
         super(doc);
         init();

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDerivedKeyBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDerivedKeyBase.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDerivedKeyBase.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecDerivedKeyBase.java Mon Feb 13 11:20:02 2017
@@ -106,7 +106,7 @@ public abstract class WSSecDerivedKeyBas
         super(securityHeader);
         setKeyIdentifierType(0);
     }
-    
+
     public WSSecDerivedKeyBase(Document doc) {
         super(doc);
         setKeyIdentifierType(0);

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncrypt.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncrypt.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncrypt.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncrypt.java Mon Feb 13 11:20:02 2017
@@ -75,13 +75,13 @@ public class WSSecEncrypt extends WSSecE
     private boolean embedEncryptedKey;
 
     private List<Element> attachmentEncryptedDataElements;
-    
+
     private Serializer encryptionSerializer;
-    
+
     public WSSecEncrypt(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecEncrypt(Document doc) {
         super(doc);
     }
@@ -157,7 +157,7 @@ public class WSSecEncrypt extends WSSecE
      *
      * This is a convenience method and for backward compatibility. The method
      * calls the single function methods in order to perform a <i>one shot
-     * encryption</i>. 
+     * encryption</i>.
      *
      * @param crypto an instance of the Crypto API to handle keystore and Certificates
      * @return the SOAP envelope with encrypted Body as <code>Document</code>
@@ -197,7 +197,7 @@ public class WSSecEncrypt extends WSSecE
 
         return encryptForRef(null, getParts());
     }
-    
+
     /**
      * Encrypt one or more parts or elements of the message.
      *
@@ -228,7 +228,7 @@ public class WSSecEncrypt extends WSSecE
         //this occurs e.g. with a kerberos session-key. It doesn't matter for the bouncy-castle provider
         //so create a new secretKeySpec to make everybody happy.
         SecretKeySpec secretKeySpec = new SecretKeySpec(symmetricKey.getEncoded(), symmetricKey.getAlgorithm());
-        
+
         Encryptor encryptor = new Encryptor();
         encryptor.setDoc(getDocument());
         encryptor.setSecurityHeader(getSecurityHeader());

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java Mon Feb 13 11:20:02 2017
@@ -128,7 +128,7 @@ public class WSSecEncryptedKey extends W
     private BinarySecurity bstToken;
 
     private X509Certificate useThisCert;
-    
+
     private PublicKey useThisPublicKey;
 
     /**
@@ -148,7 +148,7 @@ public class WSSecEncryptedKey extends W
     public WSSecEncryptedKey(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecEncryptedKey(Document doc) {
         super(doc);
     }
@@ -233,15 +233,15 @@ public class WSSecEncryptedKey extends W
                     }
                     remoteCert = certs[0];
                 }
-                
+
                 prepareInternal(symmetricKey, remoteCert, crypto);
             }
         } else {
             prepareInternal(symmetricKey);
         }
     }
-    
-    private void encryptSymmetricKey(PublicKey encryptingKey, SecretKey keyToBeEncrypted) 
+
+    private void encryptSymmetricKey(PublicKey encryptingKey, SecretKey keyToBeEncrypted)
         throws WSSecurityException {
         Cipher cipher = KeyUtils.getCipherInstance(keyEncAlgo);
         try {
@@ -457,7 +457,7 @@ public class WSSecEncryptedKey extends W
             xencCipherValue.appendChild(keyText);
         }
     }
-    
+
     protected void prepareInternal(
         SecretKey secretKey,
         PublicKey remoteKey,
@@ -483,7 +483,7 @@ public class WSSecEncryptedKey extends W
             encryptedKeyElement.appendChild(getDocument().adoptNode(customEKKeyInfoElement));
         } else {
             SecurityTokenReference secToken = null;
-            
+
             switch (keyIdentifierType) {
             case WSConstants.CUSTOM_SYMM_SIGNING :
                 secToken = new SecurityTokenReference(getDocument());
@@ -543,7 +543,7 @@ public class WSSecEncryptedKey extends W
                     } catch (NoSuchProviderException ex) {
                         signatureFactory = XMLSignatureFactory.getInstance("DOM");
                     }
-                    
+
                     KeyInfoFactory keyInfoFactory = signatureFactory.getKeyInfoFactory();
                     KeyValue keyValue = keyInfoFactory.newKeyValue(remoteKey);
                     String keyInfoUri = getIdAllocator().createSecureId("KI-", null);
@@ -551,7 +551,7 @@ public class WSSecEncryptedKey extends W
                         keyInfoFactory.newKeyInfo(
                             java.util.Collections.singletonList(keyValue), keyInfoUri
                         );
-                    
+
                     keyInfo.marshal(new DOMStructure(encryptedKeyElement), null);
                 } catch (java.security.KeyException | MarshalException ex) {
                     LOG.error("", ex);
@@ -560,7 +560,7 @@ public class WSSecEncryptedKey extends W
                     );
                 }
             }
-            
+
             if (secToken != null) {
                 Element keyInfoElement =
                     getDocument().createElementNS(
@@ -804,11 +804,11 @@ public class WSSecEncryptedKey extends W
     public void setUseThisCert(X509Certificate cert) {
         useThisCert = cert;
     }
-    
+
     public X509Certificate getUseThisCert() {
         return useThisCert;
     }
-    
+
     /**
      * Set the PublicKey to use for encryption.
      * @param key the PublicKey instance to use for encryption
@@ -816,7 +816,7 @@ public class WSSecEncryptedKey extends W
     public void setUseThisPublicKey(PublicKey key) {
         useThisPublicKey = key;
     }
-    
+
     public PublicKey getUseThisPublicKey() {
         return useThisPublicKey;
     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecHeader.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecHeader.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecHeader.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecHeader.java Mon Feb 13 11:20:02 2017
@@ -101,7 +101,7 @@ public class WSSecHeader {
     public Element getSecurityHeaderElement() {
         return securityHeader;
     }
-    
+
     public void setSecurityHeaderElement(Element securityHeaderElement) {
         this.securityHeader = securityHeaderElement;
     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSAMLToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSAMLToken.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSAMLToken.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSAMLToken.java Mon Feb 13 11:20:02 2017
@@ -42,7 +42,7 @@ public class WSSecSAMLToken extends WSSe
     public WSSecSAMLToken(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecSAMLToken(Document doc) {
         super(doc);
     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSecurityContextToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSecurityContextToken.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSecurityContextToken.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSecurityContextToken.java Mon Feb 13 11:20:02 2017
@@ -70,7 +70,7 @@ public class WSSecSecurityContextToken {
         }
         wssConfig = config;
     }
-    
+
     public WSSecSecurityContextToken(Document doc, WSSConfig config) {
         this.securityHeader = null;
         this.doc = doc;

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignature.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignature.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignature.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignature.java Mon Feb 13 11:20:02 2017
@@ -109,7 +109,7 @@ public class WSSecSignature extends WSSe
         super(securityHeader);
         init();
     }
-    
+
     public WSSecSignature(Document doc) {
         super(doc);
         init();
@@ -582,7 +582,7 @@ public class WSSecSignature extends WSSe
             sig.sign(signContext);
 
             signatureValue = sig.getSignatureValue().getValue();
-            
+
             cleanup();
         } catch (Exception ex) {
             LOG.error(ex.getMessage(), ex);

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureBase.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureBase.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureBase.java Mon Feb 13 11:20:02 2017
@@ -57,13 +57,13 @@ public class WSSecSignatureBase extends
 
     private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(WSSecSignatureBase.class);
-    
+
     private List<Element> clonedElements = new ArrayList<>();
 
     public WSSecSignatureBase(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecSignatureBase(Document doc) {
         super(doc);
     }
@@ -106,7 +106,7 @@ public class WSSecSignatureBase extends
             String idToSign = encPart.getId();
             String elemName = encPart.getName();
             Element element = encPart.getElement();
-            
+
             //
             // Set up the elements to sign. There is one reserved element
             // names: "STRTransform": Setup the ds:Reference to use STR Transform
@@ -150,7 +150,7 @@ public class WSSecSignatureBase extends
                     }
                     if (element != null) {
                         cloneElement(element);
-                        
+
                         wsDocInfo.addTokenElement(element, false);
                     } else if (!encPart.isRequired()) {
                         continue;
@@ -186,9 +186,9 @@ public class WSSecSignatureBase extends
                             new Object[] {nmSpace + ", " + elemName});
                     }
                     for (Element elementToSign : elementsToSign) {
-                        
+
                         cloneElement(elementToSign);
-                        
+
                         TransformParameterSpec transformSpec = null;
                         if (addInclusivePrefixes) {
                             List<String> prefixes = getInclusivePrefixes(elementToSign);
@@ -227,7 +227,7 @@ public class WSSecSignatureBase extends
         }
         return referenceList;
     }
-    
+
     private void cloneElement(Element element) throws WSSecurityException {
         if (expandXopInclude) {
             // Look for xop:Include Nodes
@@ -235,12 +235,12 @@ public class WSSecSignatureBase extends
                 XMLUtils.findElements(element.getFirstChild(), "Include", WSConstants.XOP_NS);
             if (includeElements != null && !includeElements.isEmpty()) {
                 // Clone the Element to be signed + insert the clone into the tree at the same level
-                // We will expand the xop:Include for one of the nodes + sign that (and then remove it), 
+                // We will expand the xop:Include for one of the nodes + sign that (and then remove it),
                 // while leaving the original in the tree to be sent in the message
                 Element clonedElement = (Element)element.cloneNode(true);
                 element.getParentNode().appendChild(clonedElement);
                 clonedElements.add(element);
-            
+
                 WSSecurityUtil.inlineAttachments(includeElements, attachmentCallbackHandler, false);
             }
         }
@@ -350,5 +350,5 @@ public class WSSecSignatureBase extends
             clonedElements.clear();
         }
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureConfirmation.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureConfirmation.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureConfirmation.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecSignatureConfirmation.java Mon Feb 13 11:20:02 2017
@@ -38,7 +38,7 @@ public class WSSecSignatureConfirmation
     public WSSecSignatureConfirmation(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecSignatureConfirmation(Document doc) {
         super(doc);
     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecTimestamp.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecTimestamp.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecTimestamp.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecTimestamp.java Mon Feb 13 11:20:02 2017
@@ -45,7 +45,7 @@ public class WSSecTimestamp extends WSSe
     public WSSecTimestamp(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecTimestamp(Document doc) {
         super(doc);
     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecUsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecUsernameToken.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecUsernameToken.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecUsernameToken.java Mon Feb 13 11:20:02 2017
@@ -56,7 +56,7 @@ public class WSSecUsernameToken extends
     public WSSecUsernameToken(WSSecHeader securityHeader) {
         super(securityHeader);
     }
-    
+
     public WSSecUsernameToken(Document doc) {
         super(doc);
     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/DerivedKeyToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/DerivedKeyToken.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/DerivedKeyToken.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/DerivedKeyToken.java Mon Feb 13 11:20:02 2017
@@ -111,7 +111,7 @@ public class DerivedKeyToken {
         this.bspEnforcer = bspEnforcer;
         QName el = new QName(element.getNamespaceURI(), element.getLocalName());
 
-        if (!(el.equals(ConversationConstants.DERIVED_KEY_TOKEN_QNAME_05_02) 
+        if (!(el.equals(ConversationConstants.DERIVED_KEY_TOKEN_QNAME_05_02)
             || el.equals(ConversationConstants.DERIVED_KEY_TOKEN_QNAME_05_12))) {
             throw new WSSecurityException(
                 WSSecurityException.ErrorCode.INVALID_SECURITY_TOKEN

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/KerberosSecurity.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/KerberosSecurity.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/KerberosSecurity.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/KerberosSecurity.java Mon Feb 13 11:20:02 2017
@@ -118,7 +118,7 @@ public class KerberosSecurity extends Bi
     public void retrieveServiceTicket(
         CallbackHandler callbackHandler
     ) throws WSSecurityException {
-        KerberosContextAndServiceNameCallback contextAndServiceNameCallback = 
+        KerberosContextAndServiceNameCallback contextAndServiceNameCallback =
             new KerberosContextAndServiceNameCallback();
         try {
             callbackHandler.handle(new Callback[]{contextAndServiceNameCallback});
@@ -128,12 +128,12 @@ public class KerberosSecurity extends Bi
 
         String jaasLoginModuleName = contextAndServiceNameCallback.getContextName();
         if (jaasLoginModuleName == null) {
-            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, 
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE,
                                           "kerberosCallbackContextNameNotSupplied");
         }
         String serviceName = contextAndServiceNameCallback.getServiceName();
         if (serviceName == null) {
-            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, 
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE,
                                           "kerberosCallbackServiceNameNotSupplied");
         }
 
@@ -324,17 +324,17 @@ public class KerberosSecurity extends Bi
         if (!(object instanceof KerberosSecurity)) {
             return false;
         }
-        
+
         KerberosSecurity that = (KerberosSecurity)object;
         if (secretKey != null && !secretKey.equals(that.secretKey)) {
             return false;
         } else if (secretKey == null && that.secretKey != null) {
             return false;
         }
-        
+
         return super.equals(object);
     }
-    
+
     @Override
     public int hashCode() {
         int hashCode = 17;

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/Timestamp.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/Timestamp.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/Timestamp.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/Timestamp.java Mon Feb 13 11:20:02 2017
@@ -75,7 +75,7 @@ public class Timestamp {
          ) {
             if (Node.ELEMENT_NODE == currentChild.getNodeType()) {
                 Element currentChildElement = (Element) currentChild;
-                if (WSConstants.CREATED_LN.equals(currentChild.getLocalName()) 
+                if (WSConstants.CREATED_LN.equals(currentChild.getLocalName())
                     && WSConstants.WSU_NS.equals(currentChild.getNamespaceURI())) {
                     if (strCreated == null) {
                         String valueType = currentChildElement.getAttributeNS(null, "ValueType");
@@ -88,7 +88,7 @@ public class Timestamp {
                         // Test for multiple Created elements
                         bspEnforcer.handleBSPRule(BSPRule.R3203);
                     }
-                } else if (WSConstants.EXPIRES_LN.equals(currentChild.getLocalName()) 
+                } else if (WSConstants.EXPIRES_LN.equals(currentChild.getLocalName())
                     && WSConstants.WSU_NS.equals(currentChild.getNamespaceURI())) {
                     if (strCreated == null) {
                         // Created must appear before Expires

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedKeyProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedKeyProcessor.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedKeyProcessor.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/EncryptedKeyProcessor.java Mon Feb 13 11:20:02 2017
@@ -92,7 +92,7 @@ public class EncryptedKeyProcessor imple
         String id = elem.getAttributeNS(null, "Id");
         if (!"".equals(id)) {
              WSSecurityEngineResult result = data.getWsDocInfo().getResult(id);
-             if (result != null 
+             if (result != null
                  && WSConstants.ENCR == (Integer)result.get(WSSecurityEngineResult.TAG_ACTION)
              ) {
                  return Collections.singletonList(result);
@@ -161,12 +161,12 @@ public class EncryptedKeyProcessor imple
                     } catch (NoSuchProviderException ex) {
                         signatureFactory = XMLSignatureFactory.getInstance("DOM");
                     }
-                    
-                    publicKey = X509Util.parseKeyValue((Element)keyInfoChildElement.getParentNode(), 
+
+                    publicKey = X509Util.parseKeyValue((Element)keyInfoChildElement.getParentNode(),
                                                        signatureFactory);
                 }
             }
-            
+
             if (publicKey == null && (certs == null || certs.length < 1 || certs[0] == null)) {
                 throw new WSSecurityException(
                                           WSSecurityException.ErrorCode.FAILURE,
@@ -242,7 +242,7 @@ public class EncryptedKeyProcessor imple
         data.getWsDocInfo().addTokenElement(elem);
         return Collections.singletonList(result);
     }
-    
+
     private PrivateKey getPrivateKey(
         RequestData data, X509Certificate[] certs, PublicKey publicKey
     ) throws WSSecurityException {
@@ -460,7 +460,7 @@ public class EncryptedKeyProcessor imple
                 } else if (WSConstants.X509_CERT_LN.equals(x509Child.getLocalName())) {
                     byte[] token = EncryptionUtils.getDecodedBase64EncodedData(x509Child);
                     if (token == null) {
-                        throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidCertData", 
+                        throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidCertData",
                                                       new Object[] {"0"});
                     }
                     try (InputStream in = new ByteArrayInputStream(token)) {
@@ -479,7 +479,7 @@ public class EncryptedKeyProcessor imple
 
         return null;
     }
-    
+
     private Element getFirstElement(Element element) {
         for (Node currentChild = element.getFirstChild();
              currentChild != null;

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java Mon Feb 13 11:20:02 2017
@@ -226,7 +226,7 @@ public class ReferenceListProcessor impl
             bspEnforcer.handleBSPRule(BSPRule.R5424);
         }
 
-        if (child == null || !WSConstants.WSSE_NS.equals(child.getNamespaceURI()) 
+        if (child == null || !WSConstants.WSSE_NS.equals(child.getNamespaceURI())
             || !SecurityTokenReference.SECURITY_TOKEN_REFERENCE.equals(child.getLocalName())) {
             bspEnforcer.handleBSPRule(BSPRule.R5426);
         }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java Mon Feb 13 11:20:02 2017
@@ -540,7 +540,7 @@ public class SignatureProcessor implemen
                             }
                         }
                     } else if (dereferencedData instanceof OctetStreamData) {
-                        se = doc.createElementNS("http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1", 
+                        se = doc.createElementNS("http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1",
                                                  "attachment");
                         attachment = true;
                     }

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/saml/WSSecSignatureSAML.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/saml/WSSecSignatureSAML.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/saml/WSSecSignatureSAML.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/saml/WSSecSignatureSAML.java Mon Feb 13 11:20:02 2017
@@ -80,7 +80,7 @@ public class WSSecSignatureSAML extends
         super(securityHeader);
         doDebug = LOG.isDebugEnabled();
     }
-    
+
     public WSSecSignatureSAML(Document doc) {
         super(doc);
         doDebug = LOG.isDebugEnabled();
@@ -378,7 +378,7 @@ public class WSSecSignatureSAML extends
 
         getWsDocInfo().addTokenElement(samlToken, false);
     }
-    
+
     private void configureKeyInfo(
         SecurityTokenReference secRef, X509Certificate cert,
         Crypto crypto, SamlAssertionWrapper samlAssertion

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentCompleteSignatureTransform.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentCompleteSignatureTransform.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentCompleteSignatureTransform.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentCompleteSignatureTransform.java Mon Feb 13 11:20:02 2017
@@ -61,7 +61,7 @@ public class AttachmentCompleteSignature
         Attachment attachment;
         if (attachmentTransformParameterSpec != null) {
             attachment = attachmentTransformParameterSpec.getAttachment();
-            context.setProperty(ATTACHMENT_CALLBACKHANDLER, 
+            context.setProperty(ATTACHMENT_CALLBACKHANDLER,
                                 attachmentTransformParameterSpec.getAttachmentCallbackHandler());
         } else {
             attachment = attachmentRequestCallback(context, attachmentId);

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentContentSignatureTransform.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentContentSignatureTransform.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentContentSignatureTransform.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/transform/AttachmentContentSignatureTransform.java Mon Feb 13 11:20:02 2017
@@ -107,7 +107,7 @@ public class AttachmentContentSignatureT
         Attachment attachment;
         if (attachmentTransformParameterSpec != null) {
             attachment = attachmentTransformParameterSpec.getAttachment();
-            context.setProperty(ATTACHMENT_CALLBACKHANDLER, 
+            context.setProperty(ATTACHMENT_CALLBACKHANDLER,
                                 attachmentTransformParameterSpec.getAttachmentCallbackHandler());
         } else {
             attachment = attachmentRequestCallback(context, attachmentId);
@@ -115,9 +115,9 @@ public class AttachmentContentSignatureT
         return processAttachment(context, os, attachmentUri, attachment);
     }
 
-    protected Attachment attachmentRequestCallback(XMLCryptoContext context, String attachmentId) 
+    protected Attachment attachmentRequestCallback(XMLCryptoContext context, String attachmentId)
         throws TransformException {
-        CallbackHandler attachmentCallbackHandler = 
+        CallbackHandler attachmentCallbackHandler =
             (CallbackHandler) context.getProperty(ATTACHMENT_CALLBACKHANDLER);
         if (attachmentCallbackHandler == null) {
             throw new TransformException("No attachment callbackhandler supplied");
@@ -136,9 +136,9 @@ public class AttachmentContentSignatureT
         return attachments.get(0);
     }
 
-    protected void attachmentResultCallback(XMLCryptoContext context, Attachment attachment) 
+    protected void attachmentResultCallback(XMLCryptoContext context, Attachment attachment)
         throws TransformException {
-        CallbackHandler attachmentCallbackHandler = 
+        CallbackHandler attachmentCallbackHandler =
             (CallbackHandler) context.getProperty(ATTACHMENT_CALLBACKHANDLER);
         if (attachmentCallbackHandler == null) {
             throw new TransformException("No attachment callbackhandler supplied");
@@ -154,7 +154,7 @@ public class AttachmentContentSignatureT
     }
 
     @SuppressWarnings("resource")
-    protected Data processAttachment(XMLCryptoContext context, OutputStream os, String attachmentUri, 
+    protected Data processAttachment(XMLCryptoContext context, OutputStream os, String attachmentUri,
                                      Attachment attachment) throws TransformException {
         try {
             //try to reuse the inputStream in the hope that the provided inputStream is backed by a disk storage

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/EncryptionUtils.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/EncryptionUtils.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/EncryptionUtils.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/EncryptionUtils.java Mon Feb 13 11:20:02 2017
@@ -118,9 +118,9 @@ public final class EncryptionUtils {
         String symEncAlgo,
         CallbackHandler attachmentCallbackHandler
     ) throws WSSecurityException {
-        return decryptEncryptedData(doc, dataRefURI, encData, symmetricKey, 
+        return decryptEncryptedData(doc, dataRefURI, encData, symmetricKey,
                                     symEncAlgo, attachmentCallbackHandler, null);
-        
+
     }
     /**
      * Decrypt the EncryptedData argument using a SecretKey.
@@ -146,8 +146,8 @@ public final class EncryptionUtils {
         // See if it is an attachment, and handle that differently
         String typeStr = encData.getAttributeNS(null, "Type");
         String xopURI = getXOPURIFromEncryptedData(encData);
-        if (typeStr != null 
-            && (WSConstants.SWA_ATTACHMENT_ENCRYPTED_DATA_TYPE_CONTENT_ONLY.equals(typeStr) 
+        if (typeStr != null
+            && (WSConstants.SWA_ATTACHMENT_ENCRYPTED_DATA_TYPE_CONTENT_ONLY.equals(typeStr)
                 || WSConstants.SWA_ATTACHMENT_ENCRYPTED_DATA_TYPE_COMPLETE.equals(typeStr))) {
 
             Element cipherData = XMLUtils.getDirectChildElement(encData, "CipherData", WSConstants.ENC_NS);
@@ -360,7 +360,7 @@ public final class EncryptionUtils {
     private static Node decryptXopAttachment(
        SecretKey symmetricKey, String symEncAlgo, CallbackHandler attachmentCallbackHandler,
        String xopURI, Element encData
-   ) throws WSSecurityException, IOException, UnsupportedCallbackException, NoSuchAlgorithmException, 
+   ) throws WSSecurityException, IOException, UnsupportedCallbackException, NoSuchAlgorithmException,
         NoSuchPaddingException, ParserConfigurationException, SAXException {
 
         if (attachmentCallbackHandler == null) {
@@ -388,7 +388,7 @@ public final class EncryptionUtils {
         InputStream attachmentInputStream =
                 AttachmentUtils.setupAttachmentDecryptionStream(
                         symEncAlgo, cipher, symmetricKey, attachment.getSourceStream());
-        
+
         // For the xop:Include case, we need to replace the xop:Include Element with the
         // decrypted Element
         DocumentBuilder db =
@@ -408,7 +408,7 @@ public final class EncryptionUtils {
                 throw ex;
             }
         }
-        
+
         Node decryptedNode =
             encData.getOwnerDocument().importNode(document.getDocumentElement(), true);
         encData.getParentNode().appendChild(decryptedNode);
@@ -422,12 +422,12 @@ public final class EncryptionUtils {
      */
     private static String setParentPrefixes(Element target, String str) {
         Node parent = target;
-        
+
         // Get the point at where to insert new prefix definitions
         int insertionIndex = str.indexOf('>');
         StringBuilder prefix = new StringBuilder(str.substring(0, insertionIndex));
         StringBuilder suffix = new StringBuilder(str.substring(insertionIndex, str.length()));
-        
+
         // Don't add more than 20 prefixes
         int prefixAddedCount = 0;
         while (parent.getParentNode() != null && prefixAddedCount < 20

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/SignatureUtils.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/SignatureUtils.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/SignatureUtils.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/SignatureUtils.java Mon Feb 13 11:20:02 2017
@@ -66,14 +66,14 @@ public final class SignatureUtils {
             WSSecurityException.ErrorCode.FAILED_CHECK, "elementNotSigned",
             new Object[] {elem});
     }
-    
+
     /**
      * Get the List of inclusive prefixes from the DOM Element argument
      */
     public static List<String> getInclusivePrefixes(Element target, boolean excludeVisible) {
         List<String> result = new ArrayList<>();
         Node parent = target;
-        while (parent.getParentNode() != null 
+        while (parent.getParentNode() != null
             && !(Node.DOCUMENT_NODE == parent.getParentNode().getNodeType())) {
             parent = parent.getParentNode();
             NamedNodeMap attributes = parent.getAttributes();

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java?rev=1782748&r1=1782747&r2=1782748&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java Mon Feb 13 11:20:02 2017
@@ -99,7 +99,7 @@ public final class WSSecurityUtil {
      * Returns the first WS-Security header element for a given actor. Only one
      * WS-Security header is allowed for an actor.
      */
-    public static Element getSecurityHeader(Element soapHeader, String actor, boolean soap12) 
+    public static Element getSecurityHeader(Element soapHeader, String actor, boolean soap12)
         throws WSSecurityException {
 
         String actorLocal = WSConstants.ATTR_ACTOR;
@@ -525,15 +525,15 @@ public final class WSSecurityUtil {
             );
         }
     }
-    
-    public static void inlineAttachments(List<Element> includeElements, 
+
+    public static void inlineAttachments(List<Element> includeElements,
                                          CallbackHandler attachmentCallbackHandler,
                                          boolean removeAttachments) throws WSSecurityException {
         for (Element includeElement : includeElements) {
             String xopURI = includeElement.getAttributeNS(null, "href");
             if (xopURI != null) {
                 // Retrieve the attachment bytes
-                byte[] attachmentBytes = 
+                byte[] attachmentBytes =
                     WSSecurityUtil.getBytesFromAttachment(xopURI, attachmentCallbackHandler, removeAttachments);
                 String encodedBytes = Base64.getMimeEncoder().encodeToString(attachmentBytes);
 
@@ -588,7 +588,7 @@ public final class WSSecurityUtil {
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_CHECK, e);
         }
     }
-    
+
     public static String getAttachmentId(String xopUri) throws WSSecurityException {
         try {
             return URLDecoder.decode(xopUri.substring("cid:".length()), StandardCharsets.UTF_8.name());
@@ -628,6 +628,6 @@ public final class WSSecurityUtil {
         }
 
     }
-    
-    
+
+
 }