WSS-669 - Rename ConfigurationConstants ENCRYPT actions
diff --git a/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java b/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java
index 56c9e68..6c74aa4 100644
--- a/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java
+++ b/performance/src/test/java/org/apache/wss4j/performance/PerformanceMemoryTest.java
@@ -334,7 +334,7 @@
properties.setProperty(WSHandlerConstants.ENC_SYM_ALGO, "http://www.w3.org/2001/04/xmlenc#aes256-cbc");
properties.setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT, "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
properties.setProperty(WSHandlerConstants.TTL_TIMESTAMP, "" + 60 * 60 * 24 * 7);
- Document doc = doOutboundSecurityWithWSS4J(new FileInputStream(input), WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT, properties);
+ Document doc = doOutboundSecurityWithWSS4J(new FileInputStream(input), WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION, properties);
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(output));
}
@@ -367,7 +367,7 @@
}
private void doDOMInSecurity(File input) throws Exception {
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.TTL_TIMESTAMP, "" + 60 * 60 * 24 * 7);
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(input), action, properties, false);
diff --git a/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java b/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java
index 2988856..ae3548d 100644
--- a/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java
+++ b/performance/src/test/java/org/apache/wss4j/performance/PerformanceTimingTest.java
@@ -254,7 +254,7 @@
properties.setProperty(WSHandlerConstants.ENC_SYM_ALGO, "http://www.w3.org/2001/04/xmlenc#aes256-cbc");
properties.setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT, "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
properties.setProperty(WSHandlerConstants.TTL_TIMESTAMP, "" + 60 * 60 * 24 * 7);
- Document doc = doOutboundSecurityWithWSS4J(new FileInputStream(input), WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT, properties);
+ Document doc = doOutboundSecurityWithWSS4J(new FileInputStream(input), WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION, properties);
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(output));
}
@@ -287,7 +287,7 @@
}
private void doDOMInSecurity(File input) throws Exception {
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.TTL_TIMESTAMP, "" + 60 * 60 * 24 * 7);
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(input), action, properties, false);
diff --git a/src/site/asciidoc/config.adoc b/src/site/asciidoc/config.adoc
index f7ab907..d550a5e 100644
--- a/src/site/asciidoc/config.adoc
+++ b/src/site/asciidoc/config.adoc
@@ -119,11 +119,13 @@
* SAML_TOKEN_UNSIGNED (SAMLTokenUnsigned) - Perform an unsigned SAML Token action.
* SAML_TOKEN_SIGNED (SAMLTokenSigned) - Perform a signed SAML Token action.
* SIGNATURE (Signature) - Perform a signature action.
- * ENCRYPT (Encrypt) - Perform an encryption action.
+ * *WSS4J 2.3.0* ENCRYPTION (Encryption) - Perform an encryption action.
+Note that for previous releases, this configuration tag was called ENCRYPT (Encrypt).
* TIMESTAMP (Timestamp) - Perform a Timestamp action.
* *WSS4J 2.0.0* SIGNATURE_DERIVED (SignatureDerived) - Perform a Signature action with derived keys.
- * *WSS4J 2.0.0* ENCRYPT_DERIVED (EncryptDerived) - Perform a Encryption action with derived keys.
- * *WSS4J 2.0.0* SIGNATURE_WITH_KERBEROS_TOKEN (SignatureWithKerberosToken) - Perform a Signature action with a kerberos token. Only for StAX code.
+ * *WSS4J 2.3.0* ENCRYPTION_DERIVED (EncryptionDerived) - Perform a Encryption action with derived keys.
+Note that for releases from 2.0.0 → 2.2.x, this configuration tag was called ENCRYPT_DERIVED (EncryptDerived).
+* *WSS4J 2.0.0* SIGNATURE_WITH_KERBEROS_TOKEN (SignatureWithKerberosToken) - Perform a Signature action with a kerberos token. Only for StAX code.
* *WSS4J 2.3.0* ENCRYPTION_WITH_KERBEROS_TOKEN (EncryptionWithKerberosToken) - Perform a Encryption action with a kerberos token. Only for StAX code.
Note that for releases from 2.0.0 -> 2.2.x, this configuration tag was called ENCRYPT_WITH_KERBEROS_TOKEN (EncryptWithKerberosToken).
* *WSS4J 2.0.0* KERBEROS_TOKEN (KerberosToken) - Add a kerberos token. Only for StAX code.
diff --git a/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java b/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java
index 16b6786..85208c3 100644
--- a/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java
+++ b/ws-security-common/src/main/java/org/apache/wss4j/common/ConfigurationConstants.java
@@ -77,9 +77,16 @@
* Perform an Encryption action. The encryption specific parameters define how
* to encrypt, which keys to use, and so on.
*/
+ @Deprecated
public static final String ENCRYPT = "Encrypt";
/**
+ * Perform an Encryption action. The encryption specific parameters define how
+ * to encrypt, which keys to use, and so on.
+ */
+ public static final String ENCRYPTION = "Encryption";
+
+ /**
* Add a timestamp to the security header.
*/
public static final String TIMESTAMP = "Timestamp";
@@ -94,9 +101,16 @@
* Perform an Encryption action with derived keys. The encryption specific parameters define how
* to encrypt, which keys to use, and so on.
*/
+ @Deprecated
public static final String ENCRYPT_DERIVED = "EncryptDerived";
/**
+ * Perform an Encryption action with derived keys. The encryption specific parameters define how
+ * to encrypt, which keys to use, and so on.
+ */
+ public static final String ENCRYPTION_DERIVED = "EncryptionDerived";
+
+ /**
* Perform a Signature action with a kerberos token. The signature specific parameters define how
* to sign, which keys to use, and so on.
*/
diff --git a/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java b/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
index 9bb281f..53d3bce 100644
--- a/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
+++ b/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
@@ -539,9 +539,11 @@
actions.add(WSConstants.SIGN);
} else if (single[i].equals(WSHandlerConstants.SIGNATURE_DERIVED)) {
actions.add(WSConstants.DKT_SIGN);
- } else if (single[i].equals(WSHandlerConstants.ENCRYPT)) {
+ } else if (single[i].equals(WSHandlerConstants.ENCRYPT)
+ || single[i].equals(WSHandlerConstants.ENCRYPTION)) {
actions.add(WSConstants.ENCR);
- } else if (single[i].equals(WSHandlerConstants.ENCRYPT_DERIVED)) {
+ } else if (single[i].equals(WSHandlerConstants.ENCRYPT_DERIVED)
+ || single[i].equals(WSHandlerConstants.ENCRYPTION_DERIVED)) {
actions.add(WSConstants.DKT_ENCR);
} else if (single[i].equals(WSHandlerConstants.SAML_TOKEN_UNSIGNED)) {
actions.add(WSConstants.ST_UNSIGNED);
@@ -593,9 +595,11 @@
actions.add(new HandlerAction(WSConstants.SIGN));
} else if (single[i].equals(WSHandlerConstants.SIGNATURE_DERIVED)) {
actions.add(new HandlerAction(WSConstants.DKT_SIGN));
- } else if (single[i].equals(WSHandlerConstants.ENCRYPT)) {
+ } else if (single[i].equals(WSHandlerConstants.ENCRYPT)
+ || single[i].equals(WSHandlerConstants.ENCRYPTION)) {
actions.add(new HandlerAction(WSConstants.ENCR));
- } else if (single[i].equals(WSHandlerConstants.ENCRYPT_DERIVED)) {
+ } else if (single[i].equals(WSHandlerConstants.ENCRYPT_DERIVED)
+ || single[i].equals(WSHandlerConstants.ENCRYPTION_DERIVED)) {
actions.add(new HandlerAction(WSConstants.DKT_ENCR));
} else if (single[i].equals(WSHandlerConstants.SAML_TOKEN_UNSIGNED)) {
actions.add(new HandlerAction(WSConstants.ST_UNSIGNED));
diff --git a/ws-security-dom/src/test/java/org/apache/wss4j/dom/util/WSSecurityUtilTest.java b/ws-security-dom/src/test/java/org/apache/wss4j/dom/util/WSSecurityUtilTest.java
new file mode 100644
index 0000000..5005dec
--- /dev/null
+++ b/ws-security-dom/src/test/java/org/apache/wss4j/dom/util/WSSecurityUtilTest.java
@@ -0,0 +1,106 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.wss4j.dom.util;
+
+import java.util.List;
+
+import org.apache.wss4j.common.ConfigurationConstants;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.engine.WSSConfig;
+import org.apache.wss4j.dom.handler.HandlerAction;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+public class WSSecurityUtilTest {
+
+ @Test
+ public void testNewEncryptionAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPTION;
+ List<Integer> decodeActions = WSSecurityUtil.decodeAction(action);
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0));
+ assertEquals(WSConstants.ENCR, decodeActions.get(1));
+ }
+
+ @Test
+ public void testNewEncryptionHandlerAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPTION;
+ List<HandlerAction> decodeActions = WSSecurityUtil.decodeHandlerAction(action, WSSConfig.getNewInstance());
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0).getAction());
+ assertEquals(WSConstants.ENCR, decodeActions.get(1).getAction());
+ }
+
+ @Test
+ public void testDeprecatedEncryptionAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPT;
+ List<Integer> decodeActions = WSSecurityUtil.decodeAction(action);
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0));
+ assertEquals(WSConstants.ENCR, decodeActions.get(1));
+ }
+
+ @Test
+ public void testDeprecatedEncryptionHandlerAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPT;
+ List<HandlerAction> decodeActions = WSSecurityUtil.decodeHandlerAction(action, WSSConfig.getNewInstance());
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0).getAction());
+ assertEquals(WSConstants.ENCR, decodeActions.get(1).getAction());
+ }
+
+ @Test
+ public void testNewEncryptionDerivedAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPTION_DERIVED;
+ List<Integer> decodeActions = WSSecurityUtil.decodeAction(action);
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0));
+ assertEquals(WSConstants.DKT_ENCR, decodeActions.get(1));
+ }
+
+ @Test
+ public void testNewEncryptionHandlerDerivedAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPTION_DERIVED;
+ List<HandlerAction> decodeActions = WSSecurityUtil.decodeHandlerAction(action, WSSConfig.getNewInstance());
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0).getAction());
+ assertEquals(WSConstants.DKT_ENCR, decodeActions.get(1).getAction());
+ }
+
+ @Test
+ public void testDeprecatedEncryptionDerivedAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPT_DERIVED;
+ List<Integer> decodeActions = WSSecurityUtil.decodeAction(action);
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0));
+ assertEquals(WSConstants.DKT_ENCR, decodeActions.get(1));
+ }
+
+ @Test
+ public void testDeprecatedEncryptionHandlerDerivedAction() throws Exception {
+ String action = ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPT_DERIVED;
+ List<HandlerAction> decodeActions = WSSecurityUtil.decodeHandlerAction(action, WSSConfig.getNewInstance());
+ assertEquals(2, decodeActions.size());
+ assertEquals(WSConstants.SIGN, decodeActions.get(0).getAction());
+ assertEquals(WSConstants.DKT_ENCR, decodeActions.get(1).getAction());
+ }
+}
\ No newline at end of file
diff --git a/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/VulnerabliltyVectorsTest.java b/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/VulnerabliltyVectorsTest.java
index 5429201..e56078e 100644
--- a/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/VulnerabliltyVectorsTest.java
+++ b/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/VulnerabliltyVectorsTest.java
@@ -107,7 +107,7 @@
public void testSignedBodyRelocationToHeader() throws Exception {
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ENC_SYM_ALGO, "http://www.w3.org/2001/04/xmlenc#aes256-cbc");
diff --git a/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java b/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java
index a44fa5a..5db798f 100644
--- a/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java
+++ b/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java
@@ -96,7 +96,8 @@
actions.add(WSSConstants.USERNAMETOKEN);
} else if (single[i].equals(ConfigurationConstants.SIGNATURE)) {
actions.add(WSSConstants.SIGNATURE);
- } else if (single[i].equals(ConfigurationConstants.ENCRYPT)) {
+ } else if (single[i].equals(ConfigurationConstants.ENCRYPT)
+ || single[i].equals(ConfigurationConstants.ENCRYPTION)) {
actions.add(WSSConstants.ENCRYPTION);
} else if (single[i].equals(ConfigurationConstants.SAML_TOKEN_UNSIGNED)) {
actions.add(WSSConstants.SAML_TOKEN_UNSIGNED);
@@ -108,7 +109,8 @@
actions.add(WSSConstants.USERNAMETOKEN_SIGNED);
} else if (single[i].equals(ConfigurationConstants.SIGNATURE_DERIVED)) {
actions.add(WSSConstants.SIGNATURE_WITH_DERIVED_KEY);
- } else if (single[i].equals(ConfigurationConstants.ENCRYPT_DERIVED)) {
+ } else if (single[i].equals(ConfigurationConstants.ENCRYPT_DERIVED)
+ || single[i].equals(ConfigurationConstants.ENCRYPTION_DERIVED)) {
actions.add(WSSConstants.ENCRYPTION_WITH_DERIVED_KEY);
} else if (single[i].equals(ConfigurationConstants.SIGNATURE_WITH_KERBEROS_TOKEN)) {
actions.add(WSSConstants.SIGNATURE_WITH_KERBEROS_TOKEN);
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java
index c13e18f..f60e06c 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java
@@ -125,7 +125,7 @@
@Test
public void testOutboundEncryptionConfiguration() throws Exception {
Map<String, Object> config = new HashMap<>();
- config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPTION);
config.put(ConfigurationConstants.USER, "transmitter");
config.put(ConfigurationConstants.PW_CALLBACK_REF, new CallbackHandlerImpl());
config.put(ConfigurationConstants.ENC_KEY_TRANSPORT, WSSConstants.NS_XENC_RSA15);
@@ -156,8 +156,59 @@
}
@Test
+ public void testOutboundEncryptionConfigurationOldConfigTag() throws Exception {
+ Map<String, Object> config = new HashMap<>();
+ config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ config.put(ConfigurationConstants.USER, "transmitter");
+ config.put(ConfigurationConstants.PW_CALLBACK_REF, new CallbackHandlerImpl());
+ config.put(ConfigurationConstants.ENC_KEY_TRANSPORT, WSSConstants.NS_XENC_RSA15);
+ config.put(ConfigurationConstants.ENC_KEY_ID, "EncryptedKeySHA1");
+ config.put(ConfigurationConstants.ENC_PROP_FILE, "receiver-crypto.properties");
+ config.put(ConfigurationConstants.ENCRYPTION_PARTS,
+ "{}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
+
+ WSSSecurityProperties properties = ConfigurationConverter.convert(config);
+
+ assertEquals(properties.getEncryptionUser(), "transmitter");
+ assertEquals(properties.getActions().size(), 1);
+ assertEquals(properties.getActions().get(0), WSSConstants.ENCRYPTION);
+ assertTrue(properties.getCallbackHandler() instanceof CallbackHandlerImpl);
+ assertEquals(properties.getEncryptionKeyTransportAlgorithm(),
+ WSSConstants.NS_XENC_RSA15);
+ assertEquals(properties.getEncryptionKeyIdentifier(),
+ WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER);
+ assertNotNull(properties.getEncryptionCrypto());
+ assertNotNull(properties.getEncryptionSecureParts());
+ assertEquals(properties.getEncryptionSecureParts().size(), 1);
+ assertEquals(properties.getEncryptionSecureParts().get(0).getName().getLocalPart(),
+ "Body");
+ assertEquals(properties.getEncryptionSecureParts().get(0).getName().getNamespaceURI(),
+ "http://schemas.xmlsoap.org/soap/envelope/");
+
+ WSSec.validateAndApplyDefaultsToOutboundSecurityProperties(properties);
+ }
+
+ @Test
public void testInboundEncryptionConfiguration() throws Exception {
Map<String, Object> config = new HashMap<>();
+ config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPTION);
+ config.put(ConfigurationConstants.PW_CALLBACK_REF, new CallbackHandlerImpl());
+ config.put(ConfigurationConstants.DEC_PROP_FILE, "receiver-crypto.properties");
+ config.put(ConfigurationConstants.ALLOW_RSA15_KEY_TRANSPORT_ALGORITHM, "true");
+
+ WSSSecurityProperties properties = ConfigurationConverter.convert(config);
+
+ assertEquals(properties.getActions().size(), 1);
+ assertEquals(properties.getActions().get(0), WSSConstants.ENCRYPTION);
+ assertTrue(properties.getCallbackHandler() instanceof CallbackHandlerImpl);
+ assertNotNull(properties.getDecryptionCrypto());
+
+ WSSec.validateAndApplyDefaultsToInboundSecurityProperties(properties);
+ }
+
+ @Test
+ public void testInboundEncryptionConfigurationOldConfigTag() throws Exception {
+ Map<String, Object> config = new HashMap<>();
config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
config.put(ConfigurationConstants.PW_CALLBACK_REF, new CallbackHandlerImpl());
config.put(ConfigurationConstants.DEC_PROP_FILE, "receiver-crypto.properties");
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
index a3bab34..64634af 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
@@ -108,7 +108,7 @@
assertEquals(nodeList.item(0).getParentNode().getLocalName(), WSSConstants.TAG_SOAP11_BODY.getLocalPart());
}
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -140,7 +140,7 @@
assertEquals(nodeList.item(0).getParentNode().getLocalName(), WSSConstants.TAG_SOAP11_BODY.getLocalPart());
}
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -247,7 +247,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT_DERIVED;
+ String action = WSHandlerConstants.ENCRYPTION_DERIVED;
Properties properties = new Properties();
properties.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "EncryptedKey");
@@ -346,7 +346,7 @@
assertEquals(nodeList.item(0).getParentNode().getLocalName(), WSSConstants.TAG_SOAP11_BODY.getLocalPart());
}
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -415,7 +415,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT_DERIVED;
+ String action = WSHandlerConstants.ENCRYPTION_DERIVED;
Properties properties = new Properties();
properties.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "EncryptedKey");
@@ -479,7 +479,7 @@
assertEquals(nodeList.item(0).getParentNode().getLocalName(), WSSConstants.TAG_WSSE_SECURITY.getLocalPart());
}
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -621,7 +621,7 @@
assertEquals(nodeList.getLength(), 1);
}
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -755,7 +755,7 @@
assertEquals(nodeList.getLength(), 1);
}
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -888,7 +888,7 @@
assertEquals(nodeList.getLength(), 1);
}
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -1098,7 +1098,7 @@
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.SIGNATURE_DERIVED + " " + WSHandlerConstants.ENCRYPT_DERIVED;
+ String action = WSHandlerConstants.SIGNATURE_DERIVED + " " + WSHandlerConstants.ENCRYPTION_DERIVED;
Properties properties = new Properties();
properties.put(WSHandlerConstants.DERIVED_TOKEN_REFERENCE, "EncryptedKey");
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
index 2eabdde..ad9b812 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
@@ -146,7 +146,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -158,7 +158,7 @@
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, new Properties());
//some test that we can really sure we get what we want from WSS4J
@@ -290,7 +290,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -302,7 +302,7 @@
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, new Properties());
//some test that we can really sure we get what we want from WSS4J
@@ -430,7 +430,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -442,7 +442,7 @@
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENCRYPTION_PARTS, "{Content}{http://www.w3.org/1999/XMLSchema}simpleType;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -705,7 +705,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -744,7 +744,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -755,7 +755,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENCRYPTION_PARTS, "{Element}{http://www.w3.org/1999/XMLSchema}simpleType;");
@@ -872,7 +872,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-encryptedHeader.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENCRYPTION_PARTS, "{Header}{http://www.example.com}testEncryptedHeader;");
@@ -1073,7 +1073,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -1084,7 +1084,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENC_KEY_ID, "IssuerSerial");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -1150,7 +1150,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -1161,7 +1161,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENC_KEY_ID, "DirectReference");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -1201,7 +1201,7 @@
* ByteArrayOutputStream baos = new ByteArrayOutputStream();
* {
* InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- * String action = WSHandlerConstants.ENCRYPT;
+ * String action = WSHandlerConstants.ENCRYPTION;
* Properties properties = new Properties();
* properties.setProperty(WSHandlerConstants.ENC_KEY_ID, "DirectReference");
* Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -1319,7 +1319,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
}
@@ -1331,7 +1331,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENC_KEY_ID, "X509KeyIdentifier");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -1397,7 +1397,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -1408,7 +1408,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENC_KEY_ID, "SKIKeyIdentifier");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -1474,7 +1474,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -1485,7 +1485,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ENC_KEY_ID, "Thumbprint");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -1555,7 +1555,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -1666,7 +1666,7 @@
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, new Properties());
Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
@@ -1886,7 +1886,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
} finally {
@@ -1900,7 +1900,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.put(WSHandlerConstants.ENC_SYM_ALGO, "http://www.w3.org/2009/xmlenc11#aes128-gcm");
properties.put(WSHandlerConstants.ENC_KEY_TRANSPORT, "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
@@ -1997,7 +1997,7 @@
}
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
} finally {
@@ -2011,7 +2011,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.put(WSHandlerConstants.ENC_SYM_ALGO, "http://www.w3.org/2009/xmlenc11#aes192-gcm");
properties.put(WSHandlerConstants.ENC_KEY_TRANSPORT, "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
@@ -2387,7 +2387,7 @@
ByteArrayOutputStream baos;
{
Map<String, Object> config = new HashMap<>();
- config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPTION);
config.put(ConfigurationConstants.ENCRYPTION_USER, "receiver");
config.put(ConfigurationConstants.ENC_PROP_FILE, "transmitter-crypto.properties");
@@ -2454,7 +2454,7 @@
//test streaming decryption
{
Map<String, Object> config = new HashMap<>();
- config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ config.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPTION);
config.put(ConfigurationConstants.DEC_PROP_FILE, "receiver-crypto.properties");
config.put(ConfigurationConstants.PW_CALLBACK_REF, new CallbackHandlerImpl());
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java
index 0f12854..e3be269 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/HeaderOrderingTest.java
@@ -521,7 +521,7 @@
//done UsernameToken; now verification:
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -592,7 +592,7 @@
//done UsernameToken; now verification:
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -772,7 +772,7 @@
//done UsernameToken; now verification:
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java
index 15cae7e..7f17462 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java
@@ -83,7 +83,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -184,7 +184,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.2.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://www.w3.org/2003/05/soap-envelope}Body;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -239,7 +239,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ENCRYPTION_PARTS, "{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
@@ -353,7 +353,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.SIGNATURE;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPTION + " " + WSHandlerConstants.SIGNATURE;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ENCRYPTION_PARTS, "{Content}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
@@ -389,7 +389,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP;
+ String action = WSHandlerConstants.ENCRYPTION + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP;
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, new Properties());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -491,7 +491,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
ByteArrayOutputStream baos = doOutboundSecurity(securityProperties, sourceDocument);
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
@@ -513,7 +513,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
ByteArrayOutputStream baos = doOutboundSecurity(securityProperties, sourceDocument);
- String action = WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP;
+ String action = WSHandlerConstants.ENCRYPTION + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
@@ -542,7 +542,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ENCRYPTION_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
@@ -663,7 +663,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
Map<String, Object> messageContext = doOutboundSecurityWithWSS4J_1(sourceDocument, action, properties);
@@ -739,7 +739,7 @@
//verify SigConf response:
{
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, true);
}
@@ -782,7 +782,7 @@
//done signature; now test sig-verification:
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
}
@@ -829,7 +829,7 @@
}
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
}
@@ -952,7 +952,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ACTOR, "test");
@@ -1008,7 +1008,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ACTOR, "test");
@@ -1050,7 +1050,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.2.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ACTOR, "test");
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://www.w3.org/2003/05/soap-envelope}Body;");
@@ -1106,7 +1106,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.2.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://www.w3.org/2003/05/soap-envelope}Body;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -1161,7 +1161,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
ByteArrayOutputStream baos = doOutboundSecurity(securityProperties, sourceDocument);
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ACTOR, "test");
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
@@ -1186,7 +1186,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
ByteArrayOutputStream baos = doOutboundSecurity(securityProperties, sourceDocument);
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ACTOR, "anotherTest");
try {
@@ -1217,7 +1217,7 @@
ByteArrayOutputStream baos = doOutboundSecurity(securityProperties, sourceDocument);
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ACTOR, "test");
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
@@ -1245,7 +1245,7 @@
securityProperties.setActor("test");
baos = doOutboundSecurity(securityProperties, new ByteArrayInputStream(baos.toByteArray()));
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.ACTOR, "test");
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
@@ -1259,7 +1259,7 @@
while (i < e) {
- String action = WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PasswordEncryptorTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PasswordEncryptorTest.java
index e7e3fa4..c55bce8 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PasswordEncryptorTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PasswordEncryptorTest.java
@@ -159,7 +159,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java
index 52a00c4..01a1698 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java
@@ -119,7 +119,7 @@
assertEquals(nodeList.getLength(), 0);
}
{
- String action = WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
WSS4JCallbackHandlerImpl callbackHandler = new WSS4JCallbackHandlerImpl(secret);
properties.put(WSHandlerConstants.PW_CALLBACK_REF, callbackHandler);
@@ -222,7 +222,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.ENCRYPT_DERIVED;
+ String action = WSHandlerConstants.ENCRYPTION_DERIVED;
Properties properties = new Properties();
CallbackHandlerImpl callbackHandler = new CallbackHandlerImpl(tempSecret);
@@ -707,7 +707,7 @@
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
String action =
- WSHandlerConstants.SIGNATURE_DERIVED + " " + WSHandlerConstants.ENCRYPT_DERIVED;
+ WSHandlerConstants.SIGNATURE_DERIVED + " " + WSHandlerConstants.ENCRYPTION_DERIVED;
Properties properties = new Properties();
CallbackHandlerImpl callbackHandler = new CallbackHandlerImpl(tempSecret);
@@ -933,7 +933,7 @@
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
String action =
- WSHandlerConstants.ENCRYPT_DERIVED + " " + WSHandlerConstants.SIGNATURE_DERIVED;
+ WSHandlerConstants.ENCRYPTION_DERIVED + " " + WSHandlerConstants.SIGNATURE_DERIVED;
Properties properties = new Properties();
CallbackHandlerImpl callbackHandler = new CallbackHandlerImpl(tempSecret);
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java
index cef1665..a0b01dd 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java
@@ -101,7 +101,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.TIMESTAMP;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION + " " + WSHandlerConstants.TIMESTAMP;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -175,7 +175,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.TIMESTAMP;
+ String action = WSHandlerConstants.ENCRYPTION + " " + WSHandlerConstants.TIMESTAMP;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -277,7 +277,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.TIMESTAMP;
+ String action = WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION + " " + WSHandlerConstants.TIMESTAMP;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
@@ -379,7 +379,7 @@
//done encryption; now test decryption:
{
- String action = WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP;
+ String action = WSHandlerConstants.ENCRYPTION + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP;
doInboundSecurityWithWSS4J(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action);
}
}
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java
index 46404b6..5dc850c 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/TimestampTest.java
@@ -225,7 +225,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.ENCRYPTION;
Properties outboundProperties = new Properties();
outboundProperties.setProperty(WSHandlerConstants.TTL_TIMESTAMP, "1");
outboundProperties.setProperty(WSHandlerConstants.ENCRYPTION_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;");
diff --git a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/VulnerabliltyVectorsTest.java b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/VulnerabliltyVectorsTest.java
index 9a6c298..4011953 100644
--- a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/VulnerabliltyVectorsTest.java
+++ b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/VulnerabliltyVectorsTest.java
@@ -59,7 +59,7 @@
public void testRecursiveKeyReferencesDOS() throws Exception {
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -118,7 +118,7 @@
public void testRecursiveKeyReferencesDOS2() throws Exception {
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -149,7 +149,7 @@
Element securityHeaderNode = (Element) encryptedKeyElement.getParentNode();
securityHeaderNode.insertBefore(clonedEncryptedElement, encryptedKeyElement);
- doInboundSecurityWithWSS4J(securedDocument, WSHandlerConstants.ENCRYPT);
+ doInboundSecurityWithWSS4J(securedDocument, WSHandlerConstants.ENCRYPTION);
}
*/
@@ -163,7 +163,7 @@
public void test_publicURIReferenceDOS() throws Exception {
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ENC_SYM_ALGO, "http://www.w3.org/2001/04/xmlenc#aes256-cbc");
@@ -208,7 +208,7 @@
public void test_DosAttackWithRecursiveEntity() throws Exception {
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
properties.setProperty(WSHandlerConstants.ENC_SYM_ALGO, "http://www.w3.org/2001/04/xmlenc#aes256-cbc");
@@ -268,7 +268,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://www.w3.org/1999/XMLSchema}complexType;{Element}{http://www.w3.org/1999/XMLSchema}simpleType;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);
@@ -333,7 +333,7 @@
InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
- String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT;
+ String action = WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPTION;
Properties properties = new Properties();
properties.setProperty(WSHandlerConstants.SIGNATURE_PARTS, "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;");
Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument, action, properties);