ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1720192 [28/33] - in /webservices/wss4j/trunk: bindings/src/main/java/org/apache/wss4j/binding/wss10/ bindings/src/main/java/org/apache/wss4j/binding/wss11/ bindings/src/main/java/org/apache/wss4j/binding/wssc13/ bindings/src/main/java/org...
Date Tue, 15 Dec 2015 16:40:42 GMT
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java Tue Dec 15 16:40:37 2015
@@ -59,19 +59,19 @@ import java.util.List;
  * SOAP body.
  */
 public class SignedSamlTokenHOKTest extends org.junit.Assert {
-    private static final org.slf4j.Logger LOG = 
+    private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(SignedSamlTokenHOKTest.class);
     private WSSecurityEngine secEngine = new WSSecurityEngine();
     private CallbackHandler callbackHandler = new KeystoreCallbackHandler();
     private Crypto trustCrypto = null;
     private Crypto issuerCrypto = null;
     private Crypto userCrypto = CryptoFactory.getInstance("wss40.properties");
-    
+
     @org.junit.AfterClass
     public static void cleanup() throws Exception {
         SecurityTestUtil.cleanup();
     }
-    
+
     public SignedSamlTokenHOKTest() throws Exception {
         WSSConfig.init();
         // Load the issuer keystore
@@ -81,7 +81,7 @@ public class SignedSamlTokenHOKTest exte
         InputStream input = Merlin.loadInputStream(loader, "keys/wss40_server.jks");
         keyStore.load(input, "security".toCharArray());
         ((Merlin)issuerCrypto).setKeyStore(keyStore);
-        
+
         // Load the server truststore
         trustCrypto = new Merlin();
         KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
@@ -89,7 +89,7 @@ public class SignedSamlTokenHOKTest exte
         trustStore.load(input, "security".toCharArray());
         ((Merlin)trustCrypto).setTrustStore(trustStore);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 1.1 authentication assertion.
      */
@@ -100,11 +100,11 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
         callbackHandler.setConfirmationMethod(SAML1Constants.CONF_HOLDER_KEY);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
 
         WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
@@ -117,10 +117,10 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Signed SAML 1.1 Authn Assertion (key holder):");
@@ -128,9 +128,9 @@ public class SignedSamlTokenHOKTest exte
         }
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmlenc#sha256"));
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"));
-        
+
         WSHandlerResult results = verify(signedDoc, trustCrypto);
-        
+
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -139,28 +139,28 @@ public class SignedSamlTokenHOKTest exte
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
         assertTrue(receivedSamlAssertion.getSignatureValue() != null);
-        
+
         // Test we have a WSDataRef for the signed SAML token as well
         List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Header/wsse:Security/saml1:Assertion", xpath);
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
         assertFalse(actionResult.isEmpty());
         refs = (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         wsDataRef = refs.get(0);
         xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 1.1 attribute assertion.
      */
@@ -170,11 +170,11 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setStatement(SAML1CallbackHandler.Statement.ATTR);
         callbackHandler.setConfirmationMethod(SAML1Constants.CONF_HOLDER_KEY);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
         byte[] ephemeralKey = callbackHandler.getEphemeralKey();
 
@@ -188,19 +188,19 @@ public class SignedSamlTokenHOKTest exte
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Signed SAML 1.1 Attr Assertion (key holder):");
             LOG.debug(outputString);
         }
-        
+
         /* https://issues.apache.org/jira/browse/WSS-265 */
         WSHandlerResult results = verify(signedDoc, trustCrypto);
-        
+
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -208,7 +208,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedAssertion != null);
         assertTrue(receivedAssertion.isSigned());
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -217,12 +217,12 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 2 authentication assertion.
      */
@@ -233,11 +233,11 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setStatement(SAML2CallbackHandler.Statement.AUTHN);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
 
         WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
@@ -250,10 +250,10 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Signed SAML 2 Authn Assertion (key holder):");
@@ -261,9 +261,9 @@ public class SignedSamlTokenHOKTest exte
         }
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmlenc#sha256"));
         assertTrue(outputString.contains("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"));
-        
+
         WSHandlerResult results = verify(signedDoc, trustCrypto);
-        
+
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -271,7 +271,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -279,12 +279,12 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 2 attribute assertion.
      */
@@ -294,11 +294,11 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setStatement(SAML2CallbackHandler.Statement.ATTR);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
         byte[] ephemeralKey = callbackHandler.getEphemeralKey();
 
@@ -313,19 +313,19 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Signed SAML 2 Attr Assertion (key holder):");
             LOG.debug(outputString);
         }
-        
+
         /* https://issues.apache.org/jira/browse/WSS-265 */
         WSHandlerResult results = verify(signedDoc, trustCrypto);
-        
+
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -333,7 +333,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedAssertion != null);
         assertTrue(receivedAssertion.isSigned());
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -342,12 +342,12 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 1.1 authentication assertion,
      * where the subject cert is referenced using IssuerSerial
@@ -360,11 +360,11 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setConfirmationMethod(SAML1Constants.CONF_HOLDER_KEY);
         callbackHandler.setCertIdentifier(CERT_IDENTIFIER.X509_ISSUER_SERIAL);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
 
         WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
@@ -377,17 +377,17 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("SAML 1.1 Authn Assertion Issuer Serial (holder-of-key):");
             LOG.debug(outputString);
         }
         assertTrue(outputString.contains("X509IssuerSerial"));
-        
+
         WSHandlerResult results = verify(signedDoc, userCrypto);
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -395,7 +395,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -403,12 +403,12 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 1.1 authentication assertion,
      * where the subject cert is referenced using a Key Value
@@ -421,11 +421,11 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setConfirmationMethod(SAML1Constants.CONF_HOLDER_KEY);
         callbackHandler.setCertIdentifier(CERT_IDENTIFIER.KEY_VALUE);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
 
         WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
@@ -438,17 +438,17 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("SAML 1.1 Authn Assertion Key Value (holder-of-key):");
             LOG.debug(outputString);
         }
         assertTrue(outputString.contains("KeyValue"));
-        
+
         WSHandlerResult results = verify(signedDoc, userCrypto);
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -456,7 +456,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assert receivedSamlAssertion.isSigned();
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -464,12 +464,12 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 2 authentication assertion,
      * where the subject cert is referenced using a Key Value
@@ -482,11 +482,11 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         callbackHandler.setCertIdentifier(CERT_IDENTIFIER.KEY_VALUE);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
 
         WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
@@ -499,17 +499,17 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("SAML 2 Authn Assertion Key Value (holder-of-key):");
             LOG.debug(outputString);
         }
         assertTrue(outputString.contains("KeyValue"));
-        
+
         WSHandlerResult results = verify(signedDoc, userCrypto);
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -517,7 +517,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -525,12 +525,12 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Test that creates, sends and processes a signed SAML 1.1 authentication assertion.
      * The difference is that we don't trust the user signature, but as we trust the
@@ -548,11 +548,11 @@ public class SignedSamlTokenHOKTest exte
         cryptoType.setAlias("16c73ab6-b892-458f-abf5-2f875f74882e");
         X509Certificate[] certs = crypto.getX509Certificates(cryptoType);
         callbackHandler.setCerts(certs);
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
 
         WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
@@ -565,18 +565,18 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, crypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Signed SAML 1.1 Authn Assertion (key holder):");
             LOG.debug(outputString);
         }
-        
+
         WSHandlerResult results = verify(signedDoc, trustCrypto);
-        
+
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -584,7 +584,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedSamlAssertion != null);
         assertTrue(receivedSamlAssertion.isSigned());
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -592,12 +592,12 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     @org.junit.Test
     @org.junit.Ignore
     public void testSAML2Advice() throws Exception {
@@ -606,13 +606,13 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setStatement(SAML2CallbackHandler.Statement.ATTR);
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_BEARER);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
-        
+
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         Element adviceElement = samlAssertion.toDOM(doc);
 
@@ -622,13 +622,13 @@ public class SignedSamlTokenHOKTest exte
         callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         callbackHandler.setIssuer("www.example.com");
         callbackHandler.setAssertionAdviceElement(adviceElement);
-        
+
         samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("wss40_server", "security", issuerCrypto, false);
-        
+
         byte[] ephemeralKey = callbackHandler.getEphemeralKey();
 
         WSSecSignatureSAML wsSign = new WSSecSignatureSAML();
@@ -641,20 +641,20 @@ public class SignedSamlTokenHOKTest exte
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
 
-        Document signedDoc = 
+        Document signedDoc =
             wsSign.build(doc, userCrypto, samlAssertion, null, null, null, secHeader);
 
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(signedDoc);
         if (LOG.isDebugEnabled()) {
             LOG.debug("Signed SAML 2 Attr Assertion (key holder):");
             LOG.debug(outputString);
         }
         System.out.println(outputString);
-        
+
         /* https://issues.apache.org/jira/browse/WSS-265 */
         WSHandlerResult results = verify(signedDoc, trustCrypto);
-        
+
         // Test we processed a SAML assertion
         WSSecurityEngineResult actionResult =
             results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
@@ -662,7 +662,7 @@ public class SignedSamlTokenHOKTest exte
             (SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(receivedAssertion != null);
         assertTrue(receivedAssertion.isSigned());
-        
+
         // Test we processed a signature (SOAP body)
         actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
         assertTrue(actionResult != null);
@@ -671,24 +671,24 @@ public class SignedSamlTokenHOKTest exte
         final List<WSDataRef> refs =
             (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
         assertTrue(refs.size() == 1);
-        
+
         WSDataRef wsDataRef = refs.get(0);
         String xpath = wsDataRef.getXpath();
         assertEquals("/SOAP-ENV:Envelope/SOAP-ENV:Body", xpath);
     }
-    
+
     /**
      * Verifies the soap envelope
-     * 
+     *
      * @param doc
      * @throws Exception Thrown when there is a problem in verification
      */
     private WSHandlerResult verify(Document doc, Crypto sigCrypto) throws Exception {
-        WSHandlerResult results = 
+        WSHandlerResult results =
             secEngine.processSecurityHeader(
                 doc, null, callbackHandler, sigCrypto, userCrypto
             );
-        String outputString = 
+        String outputString =
             XMLUtils.PrettyDocumentToString(doc);
         assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
         return results;

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/ext/AssertionSigningTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/ext/AssertionSigningTest.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/ext/AssertionSigningTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/ext/AssertionSigningTest.java Tue Dec 15 16:40:37 2015
@@ -69,7 +69,7 @@ public class AssertionSigningTest extend
     public static void cleanup() throws Exception {
         SecurityTestUtil.cleanup();
     }
-    
+
     public AssertionSigningTest() throws Exception {
         WSSConfig.init();
         // Load the issuer keystore
@@ -80,7 +80,7 @@ public class AssertionSigningTest extend
                 "keys/client_keystore.jks");
         keyStore.load(input, "password".toCharArray());
         ((Merlin) issuerCrypto).setKeyStore(keyStore);
-        
+
         dbf = DocumentBuilderFactory.newInstance();
         dbf.setNamespaceAware(true);
     }
@@ -97,11 +97,11 @@ public class AssertionSigningTest extend
         callbackHandler
                 .setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("client_certchain", "password", issuerCrypto,
                 false);
         Signature signature = samlAssertion.getSaml2().getSignature();
@@ -111,18 +111,18 @@ public class AssertionSigningTest extend
                         defaultDSASignatureAlgorithm));
         Assert.assertEquals(defaultCanonicalizationAlgorithm,
                 signature.getCanonicalizationAlgorithm());
-        
+
         // Verify Signature
         SAMLKeyInfo keyInfo = new SAMLKeyInfo();
         CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
         cryptoType.setAlias("client_certchain");
         keyInfo.setCerts(issuerCrypto.getX509Certificates(cryptoType));
-        
+
         Document doc = dbf.newDocumentBuilder().newDocument();
-        
+
         Element assertionElement = samlAssertion.toDOM(doc);
         doc.appendChild(assertionElement);
-        
+
         samlAssertion = new SamlAssertionWrapper(assertionElement);
         samlAssertion.verifySignature(keyInfo);
     }
@@ -138,11 +138,11 @@ public class AssertionSigningTest extend
         callbackHandler
                 .setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES);
         callbackHandler.setIssuer("www.example.com");
-        
+
         SAMLCallback samlCallback = new SAMLCallback();
         SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
         SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-        
+
         samlAssertion.signAssertion("client_certchain", "password", issuerCrypto,
                 false, customCanonicalizationAlgorithm,
                 customSignatureAlgorithm, customSignatureDigestAlgorithm);
@@ -151,9 +151,9 @@ public class AssertionSigningTest extend
                 signature.getSignatureAlgorithm());
         Assert.assertEquals(customCanonicalizationAlgorithm,
                 signature.getCanonicalizationAlgorithm());
-        
+
         Document doc = dbf.newDocumentBuilder().newDocument();
-        
+
         Element assertionElement = samlAssertion.toDOM(doc);
         doc.appendChild(assertionElement);
         String assertionString = DOM2Writer.nodeToString(assertionElement);
@@ -164,9 +164,9 @@ public class AssertionSigningTest extend
         CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
         cryptoType.setAlias("client_certchain");
         keyInfo.setCerts(issuerCrypto.getX509Certificates(cryptoType));
-        
+
         samlAssertion = new SamlAssertionWrapper(assertionElement);
         samlAssertion.verifySignature(keyInfo);
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java Tue Dec 15 16:40:37 2015
@@ -58,10 +58,10 @@ import org.w3c.dom.Document;
  * Validator implementations.
  */
 public class ValidatorTest extends org.junit.Assert {
-    private static final org.slf4j.Logger LOG = 
+    private static final org.slf4j.Logger LOG =
         org.slf4j.LoggerFactory.getLogger(ValidatorTest.class);
     private WSSecurityEngine secEngine = new WSSecurityEngine();
-    
+
     @org.junit.AfterClass
     public static void cleanup() throws Exception {
         SecurityTestUtil.cleanup();
@@ -76,31 +76,31 @@ public class ValidatorTest extends org.j
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
-        
+
         WSSecTimestamp timestamp = new WSSecTimestamp();
         timestamp.setTimeToLive(-1);
         Document createdDoc = timestamp.build(doc, secHeader);
 
         if (LOG.isDebugEnabled()) {
-            String outputString = 
+            String outputString =
                 XMLUtils.PrettyDocumentToString(createdDoc);
             LOG.debug(outputString);
         }
-        
+
         // The default behaviour is that the Timestamp validation will fail
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         try {
             verify(createdDoc, wssConfig, null, null);
             fail("Expected failure on an expired timestamp");
         } catch (WSSecurityException ex) {
-            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.MESSAGE_EXPIRED); 
+            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.MESSAGE_EXPIRED);
         }
 
         // Now switch out the default Timestamp validator
         wssConfig.setValidator(WSConstants.TIMESTAMP, NoOpValidator.class);
         verify(createdDoc, wssConfig, null, null);
     }
-    
+
     /**
      * Test for processing an untrusted signature
      */
@@ -116,13 +116,13 @@ public class ValidatorTest extends org.j
         secHeader.insertSecurityHeader();
         Crypto crypto = CryptoFactory.getInstance("wss40.properties");
         Document signedDoc = sign.build(doc, crypto, secHeader);
-        
+
         if (LOG.isDebugEnabled()) {
-            String outputString = 
+            String outputString =
                 XMLUtils.PrettyDocumentToString(signedDoc);
             LOG.debug(outputString);
         }
-        
+
         // The default behaviour is that trust verification will fail
         Crypto cryptoCA = CryptoFactory.getInstance("crypto.properties");
         // Turn off BSP spec compliance
@@ -134,9 +134,9 @@ public class ValidatorTest extends org.j
             newEngine.processSecurityHeader(signedDoc, data);
             fail("Failure expected on issuer serial");
         } catch (WSSecurityException ex) {
-            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILURE); 
+            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILURE);
         }
-        
+
         // Now switch out the default signature validator
         WSSConfig config = WSSConfig.getNewInstance();
         config.setValidator(WSConstants.SIGNATURE, NoOpValidator.class);
@@ -144,7 +144,7 @@ public class ValidatorTest extends org.j
         data.setWssConfig(config);
         newEngine.processSecurityHeader(signedDoc, data);
     }
-    
+
     /**
      * Test that adds a UserNameToken with (bad) password text to a WS-Security envelope
      */
@@ -153,18 +153,18 @@ public class ValidatorTest extends org.j
         WSSecUsernameToken builder = new WSSecUsernameToken();
         builder.setPasswordType(WSConstants.PASSWORD_TEXT);
         builder.setUserInfo("wernerd", "verySecre");
-        
+
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
         Document signedDoc = builder.build(doc, secHeader);
-        
+
         if (LOG.isDebugEnabled()) {
-            String outputString = 
+            String outputString =
                 XMLUtils.PrettyDocumentToString(signedDoc);
             LOG.debug(outputString);
         }
-        
+
         // The default behaviour is that password verification will fail
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         try {
@@ -173,12 +173,12 @@ public class ValidatorTest extends org.j
         } catch (WSSecurityException ex) {
             assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILED_AUTHENTICATION);
         }
-        
+
         // Now switch out the default UsernameToken validator
         wssConfig.setValidator(WSConstants.USERNAME_TOKEN, NoOpValidator.class);
         verify(signedDoc, wssConfig, new UsernamePasswordCallbackHandler(), null);
     }
-    
+
     /**
      * In this test, a BinarySecurityToken is added to the SOAP header. A custom processor
      * validates the BST and transforms it into a SAML Assertion.
@@ -189,48 +189,48 @@ public class ValidatorTest extends org.j
 
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
-        
+
         X509Security bst = new X509Security(doc);
         CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
         cryptoType.setAlias("wss40");
         Crypto crypto = CryptoFactory.getInstance("wss40.properties");
         X509Certificate[] certs = crypto.getX509Certificates(cryptoType);
         bst.setX509Certificate(certs[0]);
-        
+
         WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), bst.getElement());
-        
+
         if (LOG.isDebugEnabled()) {
             LOG.debug("BST output");
-            String outputString = 
+            String outputString =
                 XMLUtils.PrettyDocumentToString(doc);
             LOG.debug(outputString);
         }
-        
+
         WSSConfig config = WSSConfig.getNewInstance();
         config.setValidator(WSConstants.BINARY_TOKEN, new BSTValidator());
         WSSecurityEngine secEngine = new WSSecurityEngine();
         secEngine.setWssConfig(config);
-        WSHandlerResult results = 
+        WSHandlerResult results =
             secEngine.processSecurityHeader(doc, null, null, crypto);
-        
-        List<WSSecurityEngineResult> bstResults = 
+
+        List<WSSecurityEngineResult> bstResults =
             results.getActionResults().get(WSConstants.BST);
         WSSecurityEngineResult actionResult = bstResults.get(0);
 
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         assertTrue(token != null);
-        
+
         SamlAssertionWrapper samlAssertion =
             (SamlAssertionWrapper)actionResult.get(WSSecurityEngineResult.TAG_TRANSFORMED_TOKEN);
         assertTrue(samlAssertion != null);
     }
-    
+
     /**
-     * In this test, a SOAP request is constructed where the SOAP body is signed via a 
+     * In this test, a SOAP request is constructed where the SOAP body is signed via a
      * BinarySecurityToken. The receiving side does not trust the BST, and so the test fails.
      * The second time, a custom Validator (NoOpValidator for this case) is installed for the
-     * BST, and so trust verification passes on the Signature. 
+     * BST, and so trust verification passes on the Signature.
      */
     @org.junit.Test
     public void testValidatedBSTSignature() throws Exception {
@@ -243,11 +243,11 @@ public class ValidatorTest extends org.j
         Document signedDoc = builder.build(doc, CryptoFactory.getInstance(), secHeader);
 
         if (LOG.isDebugEnabled()) {
-            String outputString = 
+            String outputString =
                 XMLUtils.PrettyDocumentToString(signedDoc);
             LOG.debug(outputString);
         }
-        
+
         Crypto crypto = CryptoFactory.getInstance("wss40.properties");
         WSSConfig config = WSSConfig.getNewInstance();
         WSSecurityEngine secEngine = new WSSecurityEngine();
@@ -256,17 +256,17 @@ public class ValidatorTest extends org.j
             secEngine.processSecurityHeader(doc, null, null, crypto);
             fail("Expected failure on untrusted signature");
         } catch (WSSecurityException ex) {
-            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILURE); 
+            assertTrue(ex.getErrorCode() == WSSecurityException.ErrorCode.FAILURE);
         }
-        
+
         config.setValidator(WSConstants.BINARY_TOKEN, new BSTValidator());
-        WSHandlerResult results = 
+        WSHandlerResult results =
             secEngine.processSecurityHeader(doc, null, null, crypto);
-        
-        List<WSSecurityEngineResult> bstResults = 
+
+        List<WSSecurityEngineResult> bstResults =
             results.getActionResults().get(WSConstants.BST);
         WSSecurityEngineResult actionResult = bstResults.get(0);
-        
+
         BinarySecurity token =
             (BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
         assertTrue(token != null);
@@ -275,7 +275,7 @@ public class ValidatorTest extends org.j
 
     /**
      * Verifies the soap envelope
-     * 
+     *
      * @param env soap envelope
      * @param wssConfig
      * @throws java.lang.Exception Thrown when there is a problem in verification
@@ -286,8 +286,8 @@ public class ValidatorTest extends org.j
         secEngine.setWssConfig(wssConfig);
         return secEngine.processSecurityHeader(doc, null, cb, crypto);
     }
-    
-    
+
+
     /**
      * A validator for a BST token.
      */
@@ -303,19 +303,19 @@ public class ValidatorTest extends org.j
                 SAML1CallbackHandler callbackHandler = new SAML1CallbackHandler();
                 callbackHandler.setStatement(SAML1CallbackHandler.Statement.AUTHN);
                 callbackHandler.setIssuer("www.example.com");
-                
+
                 SAMLCallback samlCallback = new SAMLCallback();
                 SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
                 SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
-    
+
                 credential.setTransformedToken(samlAssertion);
                 return credential;
             } catch (Exception ex) {
                 throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
             }
         }
-        
+
     }
-    
-    
+
+
 }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/DummyPolicyAsserter.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/DummyPolicyAsserter.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/DummyPolicyAsserter.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/DummyPolicyAsserter.java Tue Dec 15 16:40:37 2015
@@ -30,17 +30,17 @@ public class DummyPolicyAsserter impleme
     public void assertPolicy(Assertion assertion) {
         // Do nothing
     }
-    
+
     public void unassertPolicy(Assertion assertion, String reason) {
         // Do nothing
     }
-    
+
     public void assertPolicy(QName qName) {
         // Do nothing
     }
-    
+
     public void unassertPolicy(QName qName, String reason) {
         // Do nothing
     }
-    
+
 }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/OperationPolicy.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/OperationPolicy.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/OperationPolicy.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/OperationPolicy.java Tue Dec 15 16:40:37 2015
@@ -73,7 +73,7 @@ public class OperationPolicy {
         OperationPolicy other = (OperationPolicy) obj;
         return getOperationName().equals(other.getOperationName());
     }
-    
+
     @Override
     public int hashCode() {
         int hashcode = 17;

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyAsserter.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyAsserter.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyAsserter.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyAsserter.java Tue Dec 15 16:40:37 2015
@@ -29,10 +29,10 @@ import org.apache.neethi.Assertion;
 public interface PolicyAsserter {
 
     void assertPolicy(Assertion assertion);
-    
+
     void unassertPolicy(Assertion assertion, String reason);
-    
+
     void assertPolicy(QName qName);
-    
+
     void unassertPolicy(QName qName, String reason);
 }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyUtils.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyUtils.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyUtils.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/PolicyUtils.java Tue Dec 15 16:40:37 2015
@@ -25,7 +25,7 @@ import java.util.LinkedList;
 import java.util.List;
 
 public final class PolicyUtils {
-    
+
     private PolicyUtils() {
         // complete
     }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/AlgorithmSuiteAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/AlgorithmSuiteAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/AlgorithmSuiteAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/AlgorithmSuiteAssertionState.java Tue Dec 15 16:40:37 2015
@@ -39,17 +39,17 @@ import org.apache.xml.security.stax.secu
 public class AlgorithmSuiteAssertionState extends AssertionState implements Assertable {
 
     private PolicyAsserter policyAsserter;
-    
-    public AlgorithmSuiteAssertionState(AbstractSecurityAssertion assertion, 
+
+    public AlgorithmSuiteAssertionState(AbstractSecurityAssertion assertion,
                                         PolicyAsserter policyAsserter,
                                         boolean asserted) {
         super(assertion, asserted);
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             AlgorithmSuite algorithmSuite = (AlgorithmSuite) getAssertion();
             policyAsserter.assertPolicy(getAssertion());
@@ -217,13 +217,13 @@ public class AlgorithmSuiteAssertionStat
                 policyAsserter.unassertPolicy(getAssertion(), getErrorMessage());
             }
         } else if (WSSConstants.XPath.equals(keyUsage) &&
-            algorithmSuite.getXPathType() != null && 
+            algorithmSuite.getXPathType() != null &&
             !algorithmSuite.getXPathType().getValue().equals(algorithmSuiteSecurityEvent.getAlgorithmURI())) {
             setAsserted(false);
             setErrorMessage("XPath algorithm " + algorithmSuiteSecurityEvent.getAlgorithmURI() + " does not meet policy");
             policyAsserter.unassertPolicy(getAssertion(), getErrorMessage());
         }
-        
+
         if (isAsserted()) {
             policyAsserter.assertPolicy(getAssertion());
             String namespace = algorithmSuite.getAlgorithmSuiteType().getNamespace();
@@ -233,7 +233,7 @@ public class AlgorithmSuiteAssertionStat
                 policyAsserter.assertPolicy(new QName(namespace, algorithmSuite.getC14n().name()));
             }
         }
-        
+
         return isAsserted();
     }
 }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ContentEncryptedElementsAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ContentEncryptedElementsAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ContentEncryptedElementsAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ContentEncryptedElementsAssertionState.java Tue Dec 15 16:40:37 2015
@@ -58,12 +58,12 @@ public class ContentEncryptedElementsAss
             List<QName> elements = PolicyUtils.getElementPath(xPath);
             pathElements.add(elements);
         }
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             policyAsserter.assertPolicy(getAssertion());
         }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedElementsAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedElementsAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedElementsAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedElementsAssertionState.java Tue Dec 15 16:40:37 2015
@@ -47,7 +47,7 @@ public class EncryptedElementsAssertionS
     private final List<List<QName>> pathElements = new ArrayList<>();
     private PolicyAsserter policyAsserter;
 
-    public EncryptedElementsAssertionState(AbstractSecurityAssertion assertion, 
+    public EncryptedElementsAssertionState(AbstractSecurityAssertion assertion,
                                            PolicyAsserter policyAsserter,
                                            boolean asserted) {
         super(assertion, asserted);
@@ -58,12 +58,12 @@ public class EncryptedElementsAssertionS
             List<QName> elements = PolicyUtils.getElementPath(xPath);
             pathElements.add(elements);
         }
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             policyAsserter.assertPolicy(getAssertion());
         }
@@ -79,7 +79,7 @@ public class EncryptedElementsAssertionS
 
     @Override
     public boolean assertEvent(SecurityEvent securityEvent) throws WSSPolicyException {
-        AbstractSecuredElementSecurityEvent encryptedElementSecurityEvent = 
+        AbstractSecuredElementSecurityEvent encryptedElementSecurityEvent =
             (AbstractSecuredElementSecurityEvent) securityEvent;
 
         Iterator<List<QName>> pathElementIterator = pathElements.iterator();

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedPartsAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedPartsAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedPartsAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/EncryptedPartsAssertionState.java Tue Dec 15 16:40:37 2015
@@ -42,24 +42,24 @@ import java.util.List;
  * WSP1.3, 4.2.1 EncryptedParts Assertion
  */
 public class EncryptedPartsAssertionState extends AssertionState implements Assertable {
-    
+
     private int attachmentCount;
     private int encryptedAttachmentCount;
     private boolean encryptedAttachmentRequired;
     private PolicyAsserter policyAsserter;
 
     public EncryptedPartsAssertionState(
-        AbstractSecurityAssertion assertion, 
+        AbstractSecurityAssertion assertion,
         PolicyAsserter policyAsserter,
         boolean asserted, int attachmentCount) {
         super(assertion, asserted);
         this.attachmentCount = attachmentCount;
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             policyAsserter.assertPolicy(getAssertion());
         }
@@ -77,7 +77,7 @@ public class EncryptedPartsAssertionStat
 
         EncryptedPartSecurityEvent encryptedPartSecurityEvent = (EncryptedPartSecurityEvent) securityEvent;
         EncryptedParts encryptedParts = (EncryptedParts) getAssertion();
-        
+
         if (encryptedParts.getAttachments() != null) {
             encryptedAttachmentRequired = true;
             if (encryptedPartSecurityEvent.isAttachment()) {
@@ -128,7 +128,7 @@ public class EncryptedPartsAssertionStat
         policyAsserter.assertPolicy(getAssertion());
         return true;
     }
-    
+
     @Override
     public boolean isAsserted() {
         if (encryptedAttachmentRequired && encryptedAttachmentCount < attachmentCount) {

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/HttpsTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/HttpsTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/HttpsTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/HttpsTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -41,7 +41,7 @@ public class HttpsTokenAssertionState ex
     public HttpsTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
                                     PolicyAsserter policyAsserter, boolean initiator) {
         super(assertion, asserted, policyAsserter, initiator);
-        
+
         if (asserted) {
             HttpsToken token = (HttpsToken) getAssertion();
             String namespace = token.getName().getNamespaceURI();
@@ -75,7 +75,7 @@ public class HttpsTokenAssertionState ex
         }
         if (!isInitiator() && httpsToken.getAuthenticationType() != null) {
             String namespace = getAssertion().getName().getNamespaceURI();
-            
+
             switch (httpsToken.getAuthenticationType()) {
                 case HttpBasicAuthentication:
                     if (httpsTokenSecurityEvent.getAuthenticationType() != HttpsTokenSecurityEvent.AuthenticationType.HttpBasicAuthentication) {
@@ -106,7 +106,7 @@ public class HttpsTokenAssertionState ex
                     break;
             }
         }
-        
+
         getPolicyAsserter().assertPolicy(getAssertion());
         return true;
     }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IncludeTimeStampAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IncludeTimeStampAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IncludeTimeStampAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IncludeTimeStampAssertionState.java Tue Dec 15 16:40:37 2015
@@ -35,10 +35,10 @@ import org.apache.wss4j.stax.securityEve
  * WSP1.3, 6.2 Timestamp Property
  */
 public class IncludeTimeStampAssertionState extends AssertionState implements Assertable {
-    
+
     private PolicyAsserter policyAsserter;
 
-    public IncludeTimeStampAssertionState(AbstractSecurityAssertion assertion, 
+    public IncludeTimeStampAssertionState(AbstractSecurityAssertion assertion,
                                           PolicyAsserter policyAsserter,
                                           boolean asserted) {
         super(assertion, asserted);
@@ -46,7 +46,7 @@ public class IncludeTimeStampAssertionSt
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             String namespace = getAssertion().getName().getNamespaceURI();
             policyAsserter.assertPolicy(new QName(namespace, SPConstants.INCLUDE_TIMESTAMP));
@@ -72,7 +72,7 @@ public class IncludeTimeStampAssertionSt
         } else {
             setAsserted(false);
             setErrorMessage("Timestamp must not be present");
-            policyAsserter.unassertPolicy(new QName(namespace, SPConstants.INCLUDE_TIMESTAMP), 
+            policyAsserter.unassertPolicy(new QName(namespace, SPConstants.INCLUDE_TIMESTAMP),
                 getErrorMessage());
         }
         return isAsserted();

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IssuedTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IssuedTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IssuedTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/IssuedTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -50,8 +50,8 @@ import java.util.Map;
  */
 
 public class IssuedTokenAssertionState extends TokenAssertionState {
-    
-    private static final String DEFAULT_CLAIMS_NAMESPACE = 
+
+    private static final String DEFAULT_CLAIMS_NAMESPACE =
         "http://schemas.xmlsoap.org/ws/2005/05/identity";
 
     public IssuedTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
@@ -77,7 +77,7 @@ public class IssuedTokenAssertionState e
         }
 
         IssuedToken issuedToken = (IssuedToken) abstractToken;
-        IssuedTokenSecurityEvent<? extends SecurityToken> issuedTokenSecurityEvent 
+        IssuedTokenSecurityEvent<? extends SecurityToken> issuedTokenSecurityEvent
             = (IssuedTokenSecurityEvent<? extends SecurityToken>) tokenSecurityEvent;
         try {
             if (issuedToken.getIssuerName() != null &&
@@ -106,10 +106,10 @@ public class IssuedTokenAssertionState e
                     }
                 }
             }
-            
+
             Element claims = issuedToken.getClaims();
             if (claims != null && issuedTokenSecurityEvent instanceof SamlTokenSecurityEvent) {
-                String errorMsg = 
+                String errorMsg =
                     validateClaims((Element) claims, (SamlTokenSecurityEvent)issuedTokenSecurityEvent);
                 if (errorMsg != null) {
                     setErrorMessage(errorMsg);
@@ -202,7 +202,7 @@ public class IssuedTokenAssertionState e
         if (!DEFAULT_CLAIMS_NAMESPACE.equals(dialect)) {
             return null;
         }
-        
+
         Node child = claimsPolicy.getFirstChild();
         while (child != null) {
             if (child.getNodeType() != Node.ELEMENT_NODE) {

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KerberosTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KerberosTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KerberosTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KerberosTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -43,7 +43,7 @@ public class KerberosTokenAssertionState
     public KerberosTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
                                        PolicyAsserter policyAsserter, boolean initiator) {
         super(assertion, asserted, policyAsserter, initiator);
-        
+
         if (asserted) {
             KerberosToken token = (KerberosToken) getAssertion();
             String namespace = token.getName().getNamespaceURI();
@@ -80,7 +80,7 @@ public class KerberosTokenAssertionState
             getPolicyAsserter().unassertPolicy(getAssertion(), getErrorMessage());
             return false;
         }
-        
+
         String namespace = getAssertion().getName().getNamespaceURI();
         if (kerberosToken.isRequireKeyIdentifierReference()) {
             if (!WSSecurityTokenConstants.KeyIdentifier_EmbeddedKeyIdentifierRef.equals(kerberosServiceSecurityToken.getKeyIdentifier())) {

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KeyValueTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KeyValueTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KeyValueTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/KeyValueTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -42,7 +42,7 @@ public class KeyValueTokenAssertionState
     public KeyValueTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
                                        PolicyAsserter policyAsserter, boolean initiator) {
         super(assertion, asserted, policyAsserter, initiator);
-        
+
         if (asserted) {
             KeyValueToken token = (KeyValueToken) getAssertion();
             String namespace = token.getName().getNamespaceURI();
@@ -68,7 +68,7 @@ public class KeyValueTokenAssertionState
 
         KeyValueTokenSecurityEvent keyValueTokenSecurityEvent = (KeyValueTokenSecurityEvent) tokenSecurityEvent;
         KeyValueToken keyValueToken = (KeyValueToken) abstractToken;
-        
+
         String namespace = getAssertion().getName().getNamespaceURI();
         if (keyValueToken.isRsaKeyValue()) {
             if (!(keyValueTokenSecurityEvent.getSecurityToken() instanceof RsaKeyValueSecurityToken)) {

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/OnlySignEntireHeadersAndBodyAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/OnlySignEntireHeadersAndBodyAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/OnlySignEntireHeadersAndBodyAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/OnlySignEntireHeadersAndBodyAssertionState.java Tue Dec 15 16:40:37 2015
@@ -43,18 +43,18 @@ public class OnlySignEntireHeadersAndBod
     private String roleOrActor;
     private PolicyAsserter policyAsserter;
 
-    public OnlySignEntireHeadersAndBodyAssertionState(AbstractSecurityAssertion assertion, 
+    public OnlySignEntireHeadersAndBodyAssertionState(AbstractSecurityAssertion assertion,
                                                       PolicyAsserter policyAsserter,
-                                                      boolean asserted, 
+                                                      boolean asserted,
                                                       String roleOrActor) {
         super(assertion, asserted);
         this.roleOrActor = roleOrActor;
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             String namespace = getAssertion().getName().getNamespaceURI();
             policyAsserter.assertPolicy(new QName(namespace, SPConstants.ONLY_SIGN_ENTIRE_HEADERS_AND_BODY));
@@ -72,7 +72,7 @@ public class OnlySignEntireHeadersAndBod
     @Override
     public boolean assertEvent(SecurityEvent securityEvent) throws WSSPolicyException {
         String namespace = getAssertion().getName().getNamespaceURI();
-        
+
         AbstractSecuredElementSecurityEvent abstractSecuredElementSecurityEvent = (AbstractSecuredElementSecurityEvent) securityEvent;
         if (abstractSecuredElementSecurityEvent.isSigned() && !abstractSecuredElementSecurityEvent.isAttachment()) {
             List<QName> elementPath = abstractSecuredElementSecurityEvent.getElementPath();
@@ -97,7 +97,7 @@ public class OnlySignEntireHeadersAndBod
                                           getErrorMessage());
             return false;
         }
-        
+
         policyAsserter.assertPolicy(new QName(namespace, SPConstants.ONLY_SIGN_ENTIRE_HEADERS_AND_BODY));
         return true;
     }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ProtectionOrderAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ProtectionOrderAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ProtectionOrderAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ProtectionOrderAssertionState.java Tue Dec 15 16:40:37 2015
@@ -46,7 +46,7 @@ import java.util.List;
 public class ProtectionOrderAssertionState extends AssertionState implements Assertable {
 
     private PolicyAsserter policyAsserter;
-    
+
     public ProtectionOrderAssertionState(AbstractSecurityAssertion assertion,
                                          PolicyAsserter policyAsserter,
                                          boolean asserted) {
@@ -55,7 +55,7 @@ public class ProtectionOrderAssertionSta
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             String namespace = getAssertion().getName().getNamespaceURI();
             AbstractSymmetricAsymmetricBinding.ProtectionOrder protectionOrder = ((AbstractSymmetricAsymmetricBinding) getAssertion()).getProtectionOrder();
@@ -128,7 +128,7 @@ public class ProtectionOrderAssertionSta
 
     private void testProtectionOrder(AbstractSymmetricAsymmetricBinding.ProtectionOrder protectionOrder, List<XMLSecurityConstants.ContentType> contentTypes, List<QName> elementPath) {
         String namespace = getAssertion().getName().getNamespaceURI();
-        
+
         switch (protectionOrder) {
             case SignBeforeEncrypting: {
                 int lastSignature = contentTypes.lastIndexOf(XMLSecurityConstants.ContentType.SIGNATURE);

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RelTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RelTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RelTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RelTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -35,7 +35,7 @@ import org.apache.wss4j.stax.securityEve
 
 public class RelTokenAssertionState extends TokenAssertionState {
 
-    public RelTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted, 
+    public RelTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
                                   PolicyAsserter policyAsserter, boolean initiator) {
         super(assertion, asserted, policyAsserter, initiator);
     }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredElementsAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredElementsAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredElementsAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredElementsAssertionState.java Tue Dec 15 16:40:37 2015
@@ -48,7 +48,7 @@ public class RequiredElementsAssertionSt
     private final Map<List<QName>, Boolean> pathElements = new HashMap<>();
     private PolicyAsserter policyAsserter;
 
-    public RequiredElementsAssertionState(AbstractSecurityAssertion assertion, 
+    public RequiredElementsAssertionState(AbstractSecurityAssertion assertion,
                                           PolicyAsserter policyAsserter,
                                           boolean asserted) {
         super(assertion, asserted);
@@ -61,12 +61,12 @@ public class RequiredElementsAssertionSt
                 pathElements.put(elements, Boolean.FALSE);
             }
         }
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             policyAsserter.assertPolicy(getAssertion());
         }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredPartsAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredPartsAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredPartsAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/RequiredPartsAssertionState.java Tue Dec 15 16:40:37 2015
@@ -55,12 +55,12 @@ public class RequiredPartsAssertionState
             Header header = requiredParts.getHeaders().get(i);
             headers.put(header, Boolean.FALSE);
         }
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             policyAsserter.assertPolicy(getAssertion());
         }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SamlTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SamlTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SamlTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SamlTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -42,10 +42,10 @@ import org.apache.xml.security.stax.secu
 
 public class SamlTokenAssertionState extends TokenAssertionState {
 
-    public SamlTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted, 
+    public SamlTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
                                    PolicyAsserter policyAsserter, boolean initiator) {
         super(assertion, asserted, policyAsserter, initiator);
-        
+
         if (asserted) {
             SamlToken token = (SamlToken) getAssertion();
             String namespace = token.getName().getNamespaceURI();
@@ -79,7 +79,7 @@ public class SamlTokenAssertionState ext
             getPolicyAsserter().unassertPolicy(getAssertion(), getErrorMessage());
             return false;
         }
-        
+
         String namespace = getAssertion().getName().getNamespaceURI();
         if (samlToken.isRequireKeyIdentifierReference()) {
             if (!WSSecurityTokenConstants.KeyIdentifier_X509KeyIdentifier.equals(samlTokenSecurityEvent.getSecurityToken().getKeyIdentifier())) {

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecureConversationTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecureConversationTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecureConversationTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecureConversationTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -31,8 +31,8 @@ public class SecureConversationTokenAsse
 
     //todo sp:SC13SecurityContextToken:
     //todo MustNotSendCancel etc...
-    
-    public SecureConversationTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted, 
+
+    public SecureConversationTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
                                                  PolicyAsserter policyAsserter, boolean initiator) {
         super(assertion, asserted, policyAsserter, initiator);
     }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecurityContextTokenAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecurityContextTokenAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecurityContextTokenAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SecurityContextTokenAssertionState.java Tue Dec 15 16:40:37 2015
@@ -38,10 +38,10 @@ import org.apache.wss4j.stax.securityEve
 
 public class SecurityContextTokenAssertionState extends TokenAssertionState {
 
-    public SecurityContextTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted, 
+    public SecurityContextTokenAssertionState(AbstractSecurityAssertion assertion, boolean asserted,
                                               PolicyAsserter policyAsserter, boolean initiator) {
         super(assertion, asserted, policyAsserter, initiator);
-        
+
         if (asserted) {
             SecurityContextToken token = (SecurityContextToken) getAssertion();
             String namespace = token.getName().getNamespaceURI();
@@ -78,7 +78,7 @@ public class SecurityContextTokenAsserti
             getPolicyAsserter().unassertPolicy(getAssertion(), getErrorMessage());
             return false;
         }
-        
+
         String namespace = getAssertion().getName().getNamespaceURI();
         if (securityContextToken.isRequireExternalUriReference()) {
             if (!securityContextTokenSecurityEvent.isExternalUriRef()) {
@@ -99,7 +99,7 @@ public class SecurityContextTokenAsserti
         if (securityContextToken.isSc13SecurityContextToken()) {
             getPolicyAsserter().assertPolicy(new QName(namespace, SPConstants.SC13_SECURITY_CONTEXT_TOKEN));
         }
-        
+
         getPolicyAsserter().assertPolicy(getAssertion());
         return true;
     }

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureConfirmationAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureConfirmationAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureConfirmationAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureConfirmationAssertionState.java Tue Dec 15 16:40:37 2015
@@ -35,17 +35,17 @@ import org.apache.xml.security.stax.secu
 public class SignatureConfirmationAssertionState extends AssertionState implements Assertable {
 
     private PolicyAsserter policyAsserter;
-    
-    public SignatureConfirmationAssertionState(AbstractSecurityAssertion assertion, 
+
+    public SignatureConfirmationAssertionState(AbstractSecurityAssertion assertion,
                                                PolicyAsserter policyAsserter,
                                                boolean asserted) {
         super(assertion, asserted);
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             String namespace = getAssertion().getName().getNamespaceURI();
             policyAsserter.assertPolicy(new QName(namespace, SPConstants.REQUIRE_SIGNATURE_CONFIRMATION));

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureProtectionAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureProtectionAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureProtectionAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignatureProtectionAssertionState.java Tue Dec 15 16:40:37 2015
@@ -54,7 +54,7 @@ public class SignatureProtectionAssertio
     private final List<List<QName>> elementPaths = new ArrayList<>();
     private PolicyAsserter policyAsserter;
 
-    public SignatureProtectionAssertionState(AbstractSecurityAssertion assertion, 
+    public SignatureProtectionAssertionState(AbstractSecurityAssertion assertion,
                                              PolicyAsserter policyAsserter,
                                              boolean asserted) {
         super(assertion, asserted);
@@ -69,12 +69,12 @@ public class SignatureProtectionAssertio
         signatureConfirmation11Path.add(WSSConstants.TAG_wsse_Security);
         signatureConfirmation11Path.add(WSSConstants.TAG_wsse11_SignatureConfirmation);
         elementPaths.add(signatureConfirmation11Path);
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             String namespace = getAssertion().getName().getNamespaceURI();
             policyAsserter.assertPolicy(new QName(namespace, SPConstants.ENCRYPT_SIGNATURE));
@@ -97,11 +97,11 @@ public class SignatureProtectionAssertio
                 WSSecurityEventConstants.Operation,
         };
     }
-    
+
     @Override
     public boolean assertEvent(SecurityEvent securityEvent) throws WSSPolicyException {
         if (securityEvent instanceof EncryptedElementSecurityEvent) {
-            EncryptedElementSecurityEvent encryptedElementSecurityEvent = 
+            EncryptedElementSecurityEvent encryptedElementSecurityEvent =
                 (EncryptedElementSecurityEvent) securityEvent;
             // Store all matching Signature/SignatureConfirmation Elements
             Iterator<List<QName>> pathElementsIterator = elementPaths.iterator();
@@ -113,18 +113,18 @@ public class SignatureProtectionAssertio
             }
         } else if (securityEvent instanceof TokenSecurityEvent) {
             @SuppressWarnings("unchecked")
-            TokenSecurityEvent<? extends SecurityToken> tokenSecurityEvent 
+            TokenSecurityEvent<? extends SecurityToken> tokenSecurityEvent
                 = (TokenSecurityEvent<? extends SecurityToken>) securityEvent;
             tokenSecurityEvents.add(tokenSecurityEvent);
         }
-        
+
         return true;
     }
-    
+
     @Override
     public boolean isAsserted() {
         clearErrorMessage();
-        
+
         // If we only have one (main) Signature, then check that it matches the policy
         if (encryptedElementEvents.size() == 1) {
             return testEncryptedSignature(encryptedElementEvents.get(0));
@@ -145,12 +145,12 @@ public class SignatureProtectionAssertio
 
         return true;
     }
-    
+
     private String findEndorsingSignatureId() {
         for (int i = 0; i < tokenSecurityEvents.size(); i++) {
             TokenSecurityEvent<? extends SecurityToken> tokenSecurityEvent = tokenSecurityEvents.get(i);
             try {
-                SecurityToken securityToken = 
+                SecurityToken securityToken =
                     getEffectiveSignatureToken(tokenSecurityEvent.getSecurityToken());
                 if (isSignatureToken(securityToken) && !isMainSignatureToken(securityToken)) {
                     return tokenSecurityEvent.getCorrelationID();
@@ -162,7 +162,7 @@ public class SignatureProtectionAssertio
         }
         return null;
     }
-    
+
     private boolean isSignatureToken(SecurityToken securityToken) {
         List<WSSecurityTokenConstants.TokenUsage> tokenUsages = securityToken.getTokenUsages();
         for (int i = 0; i < tokenUsages.size(); i++) {
@@ -175,13 +175,13 @@ public class SignatureProtectionAssertio
         }
         return false;
     }
-    
+
     private boolean isMainSignatureToken(SecurityToken securityToken) throws XMLSecurityException {
         SecurityToken rootToken = WSSUtils.getRootToken(securityToken);
         List<WSSecurityTokenConstants.TokenUsage> tokenUsages = rootToken.getTokenUsages();
         return tokenUsages.contains(WSSecurityTokenConstants.TokenUsage_MainSignature);
     }
-    
+
     private SecurityToken getEffectiveSignatureToken(SecurityToken securityToken) throws XMLSecurityException {
         SecurityToken tmp = WSSUtils.getRootToken(securityToken);
         List<? extends SecurityToken> wrappedTokens = tmp.getWrappedTokens();
@@ -200,11 +200,11 @@ public class SignatureProtectionAssertio
     }
 
     private boolean testEncryptedSignature(EncryptedElementSecurityEvent encryptedElementSecurityEvent) {
-        AbstractSymmetricAsymmetricBinding abstractSymmetricAsymmetricBinding = 
+        AbstractSymmetricAsymmetricBinding abstractSymmetricAsymmetricBinding =
             (AbstractSymmetricAsymmetricBinding) getAssertion();
-        
+
         String namespace = getAssertion().getName().getNamespaceURI();
-        
+
         if (encryptedElementSecurityEvent.isEncrypted()) {
             if (abstractSymmetricAsymmetricBinding.isEncryptSignature()) {
                 setAsserted(true);

Modified: webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignedElementsAssertionState.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignedElementsAssertionState.java?rev=1720192&r1=1720191&r2=1720192&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignedElementsAssertionState.java (original)
+++ webservices/wss4j/trunk/ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/SignedElementsAssertionState.java Tue Dec 15 16:40:37 2015
@@ -47,7 +47,7 @@ public class SignedElementsAssertionStat
     private final List<List<QName>> pathElements = new ArrayList<>();
     private PolicyAsserter policyAsserter;
 
-    public SignedElementsAssertionState(AbstractSecurityAssertion assertion, 
+    public SignedElementsAssertionState(AbstractSecurityAssertion assertion,
                                         PolicyAsserter policyAsserter,
                                         boolean asserted) {
         super(assertion, asserted);
@@ -60,12 +60,12 @@ public class SignedElementsAssertionStat
                 pathElements.add(elements);
             }
         }
-        
+
         this.policyAsserter = policyAsserter;
         if (this.policyAsserter == null) {
             this.policyAsserter = new DummyPolicyAsserter();
         }
-        
+
         if (asserted) {
             policyAsserter.assertPolicy(getAssertion());
         }




Mime
View raw message