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 2013/09/26 15:21:21 UTC
svn commit: r1526479 [3/3] - in /webservices/wss4j/trunk:
ws-security-common/src/main/java/org/apache/wss4j/common/
ws-security-dom/src/main/java/org/apache/wss4j/dom/
ws-security-dom/src/main/java/org/apache/wss4j/dom/action/
ws-security-dom/src/main/...
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureAlgorithmSuiteTest.java Thu Sep 26 13:21:19 2013
@@ -28,6 +28,7 @@ import javax.xml.crypto.dsig.SignatureMe
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.apache.wss4j.common.SignatureActionToken;
import org.apache.wss4j.common.bsp.BSPRule;
import org.apache.wss4j.common.crypto.AlgorithmSuite;
import org.apache.wss4j.common.crypto.Crypto;
@@ -166,7 +167,9 @@ public class SignatureAlgorithmSuiteTest
WSSecurityEngine secEngine = new WSSecurityEngine();
RequestData data = new RequestData();
- data.setSigCrypto(crypto);
+ SignatureActionToken actionToken = new SignatureActionToken();
+ actionToken.setCrypto(crypto);
+ data.setSignatureToken(actionToken);
data.setCallbackHandler(secretKeyCallbackHandler);
data.setAlgorithmSuite(algorithmSuite);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java Thu Sep 26 13:21:19 2013
@@ -30,12 +30,14 @@ import org.apache.wss4j.common.crypto.Cr
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.util.XMLUtils;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.util.WSSecurityUtil;
import org.w3c.dom.Document;
import java.security.cert.X509Certificate;
+import java.util.Collections;
import java.util.List;
/**
@@ -269,7 +271,6 @@ public class SignatureCertTest extends o
@org.junit.Test
public void testMultipleCertsWSHandler() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.SIGN;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
reqData.setUsername("wss40");
@@ -280,15 +281,13 @@ public class SignatureCertTest extends o
config.put(WSHandlerConstants.USE_SINGLE_CERTIFICATE, "false");
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(action);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.SIGN);
handler.send(
- action,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureEncryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureEncryptionTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureEncryptionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureEncryptionTest.java Thu Sep 26 13:21:19 2013
@@ -21,7 +21,6 @@ package org.apache.wss4j.dom.message;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDataRef;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSSecurityEngineResult;
@@ -30,6 +29,7 @@ import org.apache.wss4j.dom.common.SOAPU
import org.apache.wss4j.dom.common.SecretKeyCallbackHandler;
import org.apache.wss4j.dom.common.SecurityTestUtil;
import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.bsp.BSPRule;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java Thu Sep 26 13:21:19 2013
@@ -19,10 +19,10 @@
package org.apache.wss4j.dom.message;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.dom.SOAPConstants;
import org.apache.wss4j.dom.WSDataRef;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSConstants;
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureTest.java Thu Sep 26 13:21:19 2013
@@ -25,13 +25,13 @@ import java.util.List;
import javax.security.auth.callback.CallbackHandler;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.bsp.BSPRule;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.util.XMLUtils;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSSecurityEngineResult;
@@ -39,6 +39,7 @@ import org.apache.wss4j.dom.common.Custo
import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
import org.apache.wss4j.dom.common.SOAPUtil;
import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.message.token.Reference;
@@ -541,7 +542,6 @@ public class SignatureTest extends org.j
public void
testWSS170() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.SIGN;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
reqData.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
@@ -558,15 +558,13 @@ public class SignatureTest extends org.j
);
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(action);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.SIGN);
handler.send(
- action,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
String outputString =
@@ -755,7 +753,6 @@ public class SignatureTest extends org.j
public void
testWSS231() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.SIGN | WSConstants.TS;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
reqData.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
@@ -768,13 +765,12 @@ public class SignatureTest extends org.j
);
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.SIGN);
- actions.add(WSConstants.TS);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ List<HandlerAction> actions = new ArrayList<HandlerAction>();
+ actions.add(new HandlerAction(WSConstants.SIGN));
+ actions.add(new HandlerAction(WSConstants.TS));
handler.send(
- action,
doc,
reqData,
actions,
@@ -788,14 +784,17 @@ public class SignatureTest extends org.j
}
List<WSSecurityEngineResult> results = verify(doc);
- assertTrue(handler.checkResults(results, actions));
+
+ List<Integer> receivedActions = new ArrayList<Integer>();
+ receivedActions.add(WSConstants.SIGN);
+ receivedActions.add(WSConstants.TS);
+ assertTrue(handler.checkResults(results, receivedActions));
}
@org.junit.Test
public void
testSignatureEncryptTimestampOrder() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.SIGN | WSConstants.ENCR | WSConstants.TS;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
reqData.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
@@ -809,14 +808,13 @@ public class SignatureTest extends org.j
);
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.SIGN);
- actions.add(WSConstants.ENCR);
- actions.add(WSConstants.TS);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ List<HandlerAction> actions = new ArrayList<HandlerAction>();
+ actions.add(new HandlerAction(WSConstants.SIGN));
+ actions.add(new HandlerAction(WSConstants.ENCR));
+ actions.add(new HandlerAction(WSConstants.TS));
handler.send(
- action,
doc,
reqData,
actions,
@@ -834,7 +832,6 @@ public class SignatureTest extends org.j
public void
testEncryptSignatureTimestampOrder() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.ENCR | WSConstants.SIGN | WSConstants.TS;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
reqData.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
@@ -848,14 +845,13 @@ public class SignatureTest extends org.j
);
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.ENCR);
- actions.add(WSConstants.SIGN);
- actions.add(WSConstants.TS);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ List<HandlerAction> actions = new ArrayList<HandlerAction>();
+ actions.add(new HandlerAction(WSConstants.ENCR));
+ actions.add(new HandlerAction(WSConstants.SIGN));
+ actions.add(new HandlerAction(WSConstants.TS));
handler.send(
- action,
doc,
reqData,
actions,
@@ -872,7 +868,6 @@ public class SignatureTest extends org.j
@org.junit.Test
public void testWSHandlerSignatureCanonicalization() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.SIGN;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
reqData.setUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
@@ -883,15 +878,13 @@ public class SignatureTest extends org.j
config.put("password", "security");
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.SIGN);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.SIGN);
handler.send(
- action,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
String outputString =
@@ -913,7 +906,7 @@ public class SignatureTest extends org.j
WSSecurityEngine newSecEngine = new WSSecurityEngine();
List<WSSecurityEngineResult> results =
newSecEngine.processSecurityHeader(doc, "", data);
- assertTrue(handler.checkResults(results, actions));
+ assertTrue(handler.checkResults(results, Collections.singletonList(WSConstants.SIGN)));
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignedBSTTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignedBSTTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignedBSTTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignedBSTTest.java Thu Sep 26 13:21:19 2013
@@ -21,18 +21,20 @@ package org.apache.wss4j.dom.message;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSSecurityEngineResult;
import org.apache.wss4j.dom.common.CustomHandler;
import org.apache.wss4j.dom.common.SOAPUtil;
import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.crypto.CryptoType;
@@ -125,7 +127,6 @@ public class SignedBSTTest extends org.j
@org.junit.Test
public void testSignedBSTAction() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.SIGN;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
reqData.setUsername("wss40");
@@ -140,15 +141,13 @@ public class SignedBSTTest extends org.j
);
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.SIGN);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.SIGN);
handler.send(
- action,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
String outputString =
@@ -159,7 +158,7 @@ public class SignedBSTTest extends org.j
}
List<WSSecurityEngineResult> results = verify(doc);
- assertTrue(handler.checkResults(results, actions));
+ assertTrue(handler.checkResults(results, Collections.singletonList(WSConstants.SIGN)));
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SymmetricSignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SymmetricSignatureTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SymmetricSignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SymmetricSignatureTest.java Thu Sep 26 13:21:19 2013
@@ -20,6 +20,7 @@
package org.apache.wss4j.dom.message;
import java.io.IOException;
+import java.util.Collections;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
@@ -40,6 +41,7 @@ import org.apache.wss4j.common.crypto.Cr
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.ext.WSPasswordCallback;
import org.apache.wss4j.common.util.XMLUtils;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.util.WSSecurityUtil;
@@ -219,15 +221,13 @@ public class SymmetricSignatureTest exte
reqData.setMsgContext(messageContext);
reqData.setUsername("");
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.SIGN);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.SIGN);
handler.send(
- WSConstants.SIGN,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
@@ -244,7 +244,7 @@ public class SymmetricSignatureTest exte
reqData.setMsgContext(messageContext);
reqData.setUsername("");
- handler.receive(WSConstants.SIGN, reqData);
+ handler.receive(Collections.singletonList(WSConstants.SIGN), reqData);
secEngine.processSecurityHeader(doc, null, this, null, crypto);
}
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UTSignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UTSignatureTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UTSignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UTSignatureTest.java Thu Sep 26 13:21:19 2013
@@ -31,6 +31,7 @@ import org.apache.wss4j.common.crypto.Cr
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.util.XMLUtils;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.util.WSSecurityUtil;
@@ -38,6 +39,7 @@ import org.w3c.dom.Document;
import javax.security.auth.callback.CallbackHandler;
+import java.util.Collections;
import java.util.List;
/**
@@ -167,16 +169,13 @@ public class UTSignatureTest extends org
reqData.setMsgContext(messageContext);
reqData.setUsername("bob");
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.UT_SIGN);
-
Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.UT_SIGN);
handler.send(
- WSConstants.UT_SIGN,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
@@ -213,16 +212,13 @@ public class UTSignatureTest extends org
reqData.setMsgContext(messageContext);
reqData.setUsername("bob");
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.UT_SIGN);
-
Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.UT_SIGN);
handler.send(
- WSConstants.UT_SIGN,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java Thu Sep 26 13:21:19 2013
@@ -34,6 +34,7 @@ import org.apache.wss4j.common.ext.WSPas
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.util.WSTimeSource;
import org.apache.wss4j.common.util.XMLUtils;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.message.token.UsernameToken;
@@ -801,10 +802,13 @@ public class UsernameTokenTest extends o
reqData.setUsername("wernerd");
reqData.setMsgContext(config);
- java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.UT);
-
- handler.send(WSConstants.UT, doc, reqData, actions, true);
+ HandlerAction action = new HandlerAction(WSConstants.UT);
+ handler.send(
+ doc,
+ reqData,
+ Collections.singletonList(action),
+ true
+ );
if (LOG.isDebugEnabled()) {
LOG.debug("Username Token via WSHandler");
@@ -828,10 +832,13 @@ public class UsernameTokenTest extends o
reqData.setUsername("wernerd");
reqData.setMsgContext(config);
- java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.UT);
-
- handler.send(WSConstants.UT, doc, reqData, actions, true);
+ HandlerAction action = new HandlerAction(WSConstants.UT);
+ handler.send(
+ doc,
+ reqData,
+ Collections.singletonList(action),
+ true
+ );
if (LOG.isDebugEnabled()) {
LOG.debug("Username Token via WSHandler");
@@ -856,10 +863,13 @@ public class UsernameTokenTest extends o
reqData.setUsername("emptyuser");
reqData.setMsgContext(config);
- java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.UT);
-
- handler.send(WSConstants.UT, doc, reqData, actions, true);
+ HandlerAction action = new HandlerAction(WSConstants.UT);
+ handler.send(
+ doc,
+ reqData,
+ Collections.singletonList(action),
+ true
+ );
if (LOG.isDebugEnabled()) {
LOG.debug("Username Token with an empty password via WSHandler");
@@ -1056,10 +1066,13 @@ public class UsernameTokenTest extends o
reqData.setUsername("wernerd");
reqData.setMsgContext(config);
- java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(WSConstants.UT);
-
- handler.send(WSConstants.UT, doc, reqData, actions, true);
+ HandlerAction action = new HandlerAction(WSConstants.UT);
+ handler.send(
+ doc,
+ reqData,
+ Collections.singletonList(action),
+ true
+ );
if (LOG.isDebugEnabled()) {
LOG.debug("Username Token via WSHandler");
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java Thu Sep 26 13:21:19 2013
@@ -19,7 +19,6 @@
package org.apache.wss4j.dom.message.token;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSConstants;
@@ -27,6 +26,7 @@ import org.apache.wss4j.dom.WSSecurityEn
import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
import org.apache.wss4j.dom.common.SOAPUtil;
import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.ext.WSSecurityException;
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/EncryptedKeyDataRefTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/EncryptedKeyDataRefTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/EncryptedKeyDataRefTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/EncryptedKeyDataRefTest.java Thu Sep 26 13:21:19 2013
@@ -26,13 +26,13 @@ import javax.security.auth.callback.Call
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDataRef;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSSecurityEngineResult;
import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
import org.apache.wss4j.dom.common.SOAPUtil;
import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.dom.message.WSSecEncrypt;
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/ReferenceListDataRefTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/ReferenceListDataRefTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/ReferenceListDataRefTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/processor/ReferenceListDataRefTest.java Thu Sep 26 13:21:19 2013
@@ -26,13 +26,13 @@ import javax.security.auth.callback.Call
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDataRef;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSSecurityEngineResult;
import org.apache.wss4j.dom.common.KeystoreCallbackHandler;
import org.apache.wss4j.dom.common.SOAPUtil;
import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.dom.message.WSSecEncrypt;
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java Thu Sep 26 13:21:19 2013
@@ -19,10 +19,10 @@
package org.apache.wss4j.dom.saml;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDataRef;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSSecurityEngineResult;
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java Thu Sep 26 13:21:19 2013
@@ -19,10 +19,10 @@
package org.apache.wss4j.dom.saml;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDataRef;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngine;
import org.apache.wss4j.dom.WSSecurityEngineResult;
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java Thu Sep 26 13:21:19 2013
@@ -44,6 +44,7 @@ import org.apache.wss4j.dom.message.WSSe
import org.apache.wss4j.dom.util.WSSecurityUtil;
import org.w3c.dom.Document;
+import java.util.Collections;
import java.util.List;
import javax.security.auth.callback.CallbackHandler;
@@ -349,7 +350,7 @@ public class SamlTokenSVTest extends org
reqData.setMsgContext(msgContext);
CustomHandler handler = new CustomHandler();
- handler.receive(WSConstants.ST_SIGNED, reqData);
+ handler.receive(Collections.singletonList(WSConstants.ST_SIGNED), reqData);
secEngine.processSecurityHeader(
signedDoc, null, callbackHandler, reqData.getSigVerCrypto(), reqData.getDecCrypto()
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java Thu Sep 26 13:21:19 2013
@@ -37,6 +37,7 @@ import org.apache.wss4j.common.saml.SAML
import org.apache.wss4j.common.saml.bean.SubjectConfirmationDataBean;
import org.apache.wss4j.common.saml.builder.SAML1Constants;
import org.apache.wss4j.common.util.XMLUtils;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.message.WSSecHeader;
@@ -54,6 +55,7 @@ import org.opensaml.xml.schema.XSInteger
import org.w3c.dom.Document;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -347,22 +349,19 @@ public class SamlTokenTest extends org.j
@org.junit.Test
public void testSaml1Action() throws Exception {
final WSSConfig cfg = WSSConfig.getNewInstance();
- final int action = WSConstants.ST_UNSIGNED;
final RequestData reqData = new RequestData();
reqData.setWssConfig(cfg);
java.util.Map<String, Object> config = new java.util.TreeMap<String, Object>();
config.put(WSHandlerConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler());
reqData.setMsgContext(config);
- final java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
- actions.add(action);
final Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
CustomHandler handler = new CustomHandler();
+ HandlerAction action = new HandlerAction(WSConstants.ST_UNSIGNED);
handler.send(
- action,
doc,
reqData,
- actions,
+ Collections.singletonList(action),
true
);
String outputString =
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java Thu Sep 26 13:21:19 2013
@@ -27,6 +27,7 @@ import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.WSSecurityEngineResult;
import org.apache.wss4j.dom.common.SecurityTestUtil;
+import org.apache.wss4j.dom.handler.HandlerAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandler;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
@@ -211,7 +212,6 @@ public abstract class AbstractTestBase {
RequestData requestData = new RequestData();
requestData.setMsgContext(messageContext);
- requestData.setNoSerialization(true);
requestData.setCallbackHandler(new WSS4JCallbackHandlerImpl());
requestData.setWssConfig(WSSConfig.getNewInstance());
@@ -373,8 +373,6 @@ public abstract class AbstractTestBase {
public boolean doSender(Map<String, Object> mc, RequestData reqData, boolean isRequest)
throws WSSecurityException, TransformerException {
- reqData.getSignatureParts().clear();
- reqData.getEncryptParts().clear();
/*
* Get the action first.
*/
@@ -382,9 +380,8 @@ public abstract class AbstractTestBase {
if (action == null) {
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "empty", "WSS4JHandler: No action defined");
}
- List<Integer> actions = new ArrayList<Integer>();
- int doAction = WSSecurityUtil.decodeAction(action, actions);
- if (doAction == WSConstants.NO_SECURITY) {
+ List<HandlerAction> actions = WSSecurityUtil.decodeHandlerAction(action, null);
+ if (actions.isEmpty()) {
return true;
}
@@ -402,8 +399,16 @@ public abstract class AbstractTestBase {
* functions. No need to do it for encryption only. Check if username
* is available and then get a password.
*/
- if (((doAction & (WSConstants.SIGN | WSConstants.UT | WSConstants.UT_SIGN)) != 0)
- && (reqData.getUsername() == null || reqData.getUsername().equals(""))) {
+ boolean usernameRequired = false;
+ for (HandlerAction handlerAction : actions) {
+ if (handlerAction.getAction() == WSConstants.SIGN
+ || handlerAction.getAction() == WSConstants.UT
+ || handlerAction.getAction() == WSConstants.UT_SIGN) {
+ usernameRequired = true;
+ break;
+ }
+ }
+ if (usernameRequired && (reqData.getUsername() == null || reqData.getUsername().equals(""))) {
/*
* We need a username - if none throw a WSSecurityException. For encryption
* there is a specific parameter to get a username.
@@ -413,7 +418,6 @@ public abstract class AbstractTestBase {
);
}
if (doDebug) {
- log.debug("Action: " + doAction);
log.debug("Actor: " + reqData.getActor());
}
/*
@@ -432,7 +436,7 @@ public abstract class AbstractTestBase {
log.debug("WSS4JHandler: orginal SOAP request: ");
log.debug(XMLUtils.PrettyDocumentToString(doc));
}
- doSenderAction(doAction, doc, reqData, actions, isRequest);
+ doSenderAction(doc, reqData, actions, isRequest);
mc.put(SECURED_DOCUMENT, doc);
@@ -446,8 +450,7 @@ public abstract class AbstractTestBase {
if (action == null) {
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "empty", "WSS4JHandler: No action defined");
}
- List<Integer> actions = new ArrayList<Integer>();
- int doAction = WSSecurityUtil.decodeAction(action, actions);
+ List<Integer> actions = WSSecurityUtil.decodeAction(action);
String actor = (String) mc.get(WSHandlerConstants.ACTOR);
@@ -475,7 +478,7 @@ public abstract class AbstractTestBase {
* Get and check the Signature specific parameters first because they
* may be used for encryption too.
*/
- doReceiverAction(doAction, reqData);
+ doReceiverAction(actions, reqData);
Element elem = WSSecurityUtil.getSecurityHeader(doc, actor);
@@ -492,7 +495,7 @@ public abstract class AbstractTestBase {
}
if (wsResult == null || wsResult.size() == 0) {
// no security header found
- if (doAction == WSConstants.NO_SECURITY) {
+ if (actions.isEmpty()) {
return true;
} else {
throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY, "empty",
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java Thu Sep 26 13:21:19 2013
@@ -21,12 +21,12 @@ package org.apache.wss4j.stax.test;
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
import org.apache.wss4j.common.ConfigurationConstants;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.bsp.BSPRule;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.message.WSSecEncrypt;
import org.apache.wss4j.dom.message.WSSecHeader;
@@ -69,6 +69,7 @@ import javax.xml.transform.stream.Stream
import javax.xml.transform.stream.StreamSource;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCRLTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCRLTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCRLTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCRLTest.java Thu Sep 26 13:21:19 2013
@@ -157,7 +157,6 @@ public class SignatureCRLTest extends Ab
RequestData requestData = new RequestData();
requestData.setMsgContext(messageContext);
- requestData.setNoSerialization(true);
requestData.setCallbackHandler(new WSS4JCallbackHandlerImpl());
wss4JHandler.doSender(messageContext, requestData, true);
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCertConstaintsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCertConstaintsTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCertConstaintsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureCertConstaintsTest.java Thu Sep 26 13:21:19 2013
@@ -192,7 +192,6 @@ public class SignatureCertConstaintsTest
RequestData requestData = new RequestData();
requestData.setMsgContext(messageContext);
- requestData.setNoSerialization(true);
wss4JHandler.doSender(messageContext, requestData, true);
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java Thu Sep 26 13:21:19 2013
@@ -18,6 +18,7 @@
*/
package org.apache.wss4j.stax.test.saml;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.crypto.CryptoType;
@@ -28,7 +29,6 @@ import org.apache.wss4j.common.saml.SAML
import org.apache.wss4j.common.saml.builder.SAML1Constants;
import org.apache.wss4j.common.saml.builder.SAML2Constants;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.dom.message.WSSecEncrypt;
import org.apache.wss4j.dom.message.WSSecHeader;
@@ -58,6 +58,7 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SamlTokenDerivedTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SamlTokenDerivedTest.java?rev=1526479&r1=1526478&r2=1526479&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SamlTokenDerivedTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SamlTokenDerivedTest.java Thu Sep 26 13:21:19 2013
@@ -18,6 +18,7 @@
*/
package org.apache.wss4j.stax.test.saml;
+import org.apache.wss4j.common.WSEncryptionPart;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.crypto.CryptoType;
@@ -27,7 +28,6 @@ import org.apache.wss4j.common.saml.SAML
import org.apache.wss4j.common.saml.SAMLUtil;
import org.apache.wss4j.common.saml.builder.SAML1Constants;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSEncryptionPart;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.message.WSSecDKSign;
import org.apache.wss4j.dom.message.WSSecHeader;
@@ -51,6 +51,7 @@ import org.w3c.dom.NodeList;
import javax.xml.stream.XMLStreamReader;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.security.cert.X509Certificate;