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 2016/11/25 12:31:20 UTC
svn commit: r1771308 [4/4] - in /webservices/wss4j/trunk:
integration/src/test/java/org/apache/wss4j/integration/test/kerberos/
ws-security-dom/src/main/java/org/apache/wss4j/dom/action/
ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/ ws-se...
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlConditionsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlConditionsTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlConditionsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlConditionsTest.java Fri Nov 25 12:31:19 2016
@@ -160,7 +160,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 2 Authn Assertion (sender vouches):");
@@ -198,7 +198,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 2 Authn Assertion (sender vouches):");
@@ -239,7 +239,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 2 Authn Assertion (sender vouches):");
@@ -272,7 +272,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 1 Authn Assertion (sender vouches):");
@@ -353,7 +353,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -397,7 +397,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -440,7 +440,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -480,7 +480,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -540,7 +540,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -608,7 +608,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -653,7 +653,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -725,7 +725,7 @@ public class SamlConditionsTest extends
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
String outputString =
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlNegativeTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlNegativeTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlNegativeTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlNegativeTest.java Fri Nov 25 12:31:19 2016
@@ -125,7 +125,7 @@ public class SamlNegativeTest extends or
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, userCrypto, "wss40", "security"
+ null, samlAssertion, userCrypto, "wss40", "security"
);
//
@@ -176,7 +176,7 @@ public class SamlNegativeTest extends or
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document signedDoc = wsSign.build(doc, samlAssertion);
+ Document signedDoc = wsSign.build(samlAssertion);
//
// Modify the assertion
@@ -228,7 +228,7 @@ public class SamlNegativeTest extends or
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document signedDoc = wsSign.build(doc, samlAssertion);
+ Document signedDoc = wsSign.build(samlAssertion);
//
// Modify the assertion
//
@@ -274,7 +274,7 @@ public class SamlNegativeTest extends or
secHeader.insertSecurityHeader();
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document signedDoc = wsSign.build(doc, samlAssertion);
+ Document signedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -317,7 +317,7 @@ public class SamlNegativeTest extends or
secHeader.insertSecurityHeader();
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document signedDoc = wsSign.build(doc, samlAssertion);
+ Document signedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -365,7 +365,7 @@ public class SamlNegativeTest extends or
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
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=1771308&r1=1771307&r2=1771308&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 Fri Nov 25 12:31:19 2016
@@ -120,7 +120,7 @@ public class SamlReferenceTest extends o
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -184,7 +184,7 @@ public class SamlReferenceTest extends o
wsSign.setUseDirectReferenceToAssertion(true);
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -251,7 +251,7 @@ public class SamlReferenceTest extends o
wsSign.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(doc);
@@ -316,7 +316,7 @@ public class SamlReferenceTest extends o
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(doc);
@@ -375,15 +375,14 @@ public class SamlReferenceTest extends o
Crypto crypto = CryptoFactory.getInstance("crypto.properties");
WSSecSignatureSAML wsSign = new WSSecSignatureSAML(secHeader);
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
- Document samlDoc =
- wsSign.build(doc, null, samlAssertion, crypto,
- "16c73ab6-b892-458f-abf5-2f875f74882e", "security"
- );
+ wsSign.build(null, samlAssertion, crypto,
+ "16c73ab6-b892-458f-abf5-2f875f74882e", "security"
+ );
WSSecEncrypt builder = new WSSecEncrypt(secHeader);
builder.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e");
builder.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
- Document encryptedDoc = builder.build(samlDoc, crypto);
+ Document encryptedDoc = builder.build(crypto);
//
// Remove the assertion its place in the security header and then append it
@@ -441,7 +440,7 @@ public class SamlReferenceTest extends o
builder.setKeyIdentifierType(WSConstants.CUSTOM_KEY_IDENTIFIER);
builder.setCustomEKTokenValueType(WSConstants.WSS_SAML_KI_VALUE_TYPE);
builder.setCustomEKTokenId(samlAssertion.getId());
- builder.prepare(doc, userCrypto);
+ builder.prepare(userCrypto);
WSEncryptionPart encP =
new WSEncryptionPart(
@@ -517,7 +516,7 @@ public class SamlReferenceTest extends o
builder.setKeyIdentifierType(WSConstants.CUSTOM_SYMM_SIGNING);
builder.setCustomEKTokenValueType(WSConstants.WSS_SAML_KI_VALUE_TYPE);
builder.setCustomEKTokenId(samlAssertion.getId());
- builder.prepare(doc, userCrypto);
+ builder.prepare(userCrypto);
WSEncryptionPart encP =
new WSEncryptionPart(
@@ -583,7 +582,7 @@ public class SamlReferenceTest extends o
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -646,7 +645,7 @@ public class SamlReferenceTest extends o
wsSign.setUseDirectReferenceToAssertion(true);
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -713,7 +712,7 @@ public class SamlReferenceTest extends o
wsSign.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(doc);
@@ -779,7 +778,7 @@ public class SamlReferenceTest extends o
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(doc);
@@ -845,7 +844,7 @@ public class SamlReferenceTest extends o
builder.setKeyIdentifierType(WSConstants.CUSTOM_KEY_IDENTIFIER);
builder.setCustomEKTokenValueType(WSConstants.WSS_SAML2_KI_VALUE_TYPE);
builder.setCustomEKTokenId(samlAssertion.getId());
- builder.prepare(doc, userCrypto);
+ builder.prepare(userCrypto);
WSEncryptionPart encP =
new WSEncryptionPart(
@@ -921,7 +920,7 @@ public class SamlReferenceTest extends o
builder.setKeyIdentifierType(WSConstants.CUSTOM_SYMM_SIGNING);
builder.setCustomEKTokenValueType(WSConstants.WSS_SAML2_KI_VALUE_TYPE);
builder.setCustomEKTokenId(samlAssertion.getId());
- builder.prepare(doc, userCrypto);
+ builder.prepare(userCrypto);
WSEncryptionPart encP =
new WSEncryptionPart(
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenCustomSignatureTest.java Fri Nov 25 12:31:19 2016
@@ -188,7 +188,7 @@ public class SamlTokenCustomSignatureTes
encP.setRequired(false);
sign.getParts().add(encP);
- Document signedDoc = sign.build(doc, crypto);
+ Document signedDoc = sign.build(crypto);
if (LOG.isDebugEnabled()) {
String outputString = XMLUtils.prettyDocumentToString(doc);
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=1771308&r1=1771307&r2=1771308&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 Fri Nov 25 12:31:19 2016
@@ -106,7 +106,7 @@ public class SamlTokenDerivedTest extend
// Create a Derived Key object for signature
//
WSSecDKSign sigBuilder = createDKSign(doc, secRefSaml, secHeader);
- Document signedDoc = sigBuilder.build(doc);
+ Document signedDoc = sigBuilder.build();
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 1.1 Authn Assertion Derived (sender vouches):");
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java Fri Nov 25 12:31:19 2016
@@ -88,7 +88,7 @@ public class SamlTokenHOKTest extends or
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document signedDoc = wsSign.build(doc, samlAssertion);
+ Document signedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 1.1 Authn Assertion (holder-of-key):");
@@ -129,7 +129,7 @@ public class SamlTokenHOKTest extends or
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document signedDoc = wsSign.build(doc, samlAssertion);
+ Document signedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 1.1 Attr Assertion (holder-of-key):");
@@ -180,7 +180,7 @@ public class SamlTokenHOKTest extends or
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 2 Authn Assertion (holder-of-key):");
@@ -220,7 +220,7 @@ public class SamlTokenHOKTest extends or
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 2 Attr Assertion (holder-of-key):");
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=1771308&r1=1771307&r2=1771308&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 Fri Nov 25 12:31:19 2016
@@ -94,7 +94,7 @@ public class SamlTokenSVTest extends org
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -154,7 +154,7 @@ public class SamlTokenSVTest extends org
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -214,7 +214,7 @@ public class SamlTokenSVTest extends org
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -274,7 +274,7 @@ public class SamlTokenSVTest extends org
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
@@ -336,7 +336,7 @@ public class SamlTokenSVTest extends org
Document signedDoc =
wsSign.build(
- doc, null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
+ null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e",
"security"
);
//
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=1771308&r1=1771307&r2=1771308&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 Fri Nov 25 12:31:19 2016
@@ -342,7 +342,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -383,7 +383,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -424,7 +424,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -466,7 +466,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -507,7 +507,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -549,7 +549,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -610,7 +610,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 2 Attr Assertion (sender vouches):");
@@ -690,7 +690,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -730,7 +730,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- wsSign.prepare(doc, samlAssertion);
+ wsSign.prepare(samlAssertion);
// Get the Element + add it to the security header as an EncryptedAssertion
Element assertionElement = wsSign.getElement();
@@ -794,7 +794,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- wsSign.prepare(doc, samlAssertion);
+ wsSign.prepare(samlAssertion);
// Get the Element + add it to the security header as an EncryptedAssertion
Element assertionElement = wsSign.getElement();
@@ -907,7 +907,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- wsSign.prepare(doc, samlAssertion);
+ wsSign.prepare(samlAssertion);
// Get the Element + add it to the security header as an EncryptedAssertion
Element assertionElement = wsSign.getElement();
@@ -1031,7 +1031,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
WSSConfig config = WSSConfig.getNewInstance();
SamlAssertionValidator assertionValidator = new SamlAssertionValidator();
@@ -1059,7 +1059,7 @@ public class SamlTokenTest extends org.j
wsSign = new WSSecSAMLToken(secHeader);
- unsignedDoc = wsSign.build(doc, samlAssertion);
+ unsignedDoc = wsSign.build(samlAssertion);
try {
newEngine.processSecurityHeader(unsignedDoc, null, null, null);
fail("Failure expected on an incorrect subject confirmation method");
@@ -1085,7 +1085,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
WSSecurityEngine newEngine = new WSSecurityEngine();
try {
@@ -1127,7 +1127,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
WSSecurityEngine newEngine = new WSSecurityEngine();
try {
@@ -1181,7 +1181,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -1222,7 +1222,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString = XMLUtils.prettyDocumentToString(unsignedDoc);
// assertTrue(outputString.contains("j\u00f6e") && outputString.contains("j\u00f6an"));
@@ -1262,7 +1262,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
String outputString =
XMLUtils.prettyDocumentToString(unsignedDoc);
@@ -1352,7 +1352,7 @@ public class SamlTokenTest extends org.j
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document unsignedDoc = wsSign.build(doc, samlAssertion);
+ Document unsignedDoc = wsSign.build(samlAssertion);
if (LOG.isDebugEnabled()) {
String outputString =
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java Fri Nov 25 12:31:19 2016
@@ -121,7 +121,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -193,7 +193,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setSecretKey(ephemeralKey);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -255,7 +255,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -318,7 +318,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setSecretKey(ephemeralKey);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -382,7 +382,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -443,7 +443,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -504,7 +504,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -570,7 +570,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Document signedDoc =
- wsSign.build(doc, crypto, samlAssertion, null, null, null);
+ wsSign.build(crypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
@@ -646,7 +646,7 @@ public class SignedSamlTokenHOKTest exte
wsSign.setSecretKey(ephemeralKey);
Document signedDoc =
- wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ wsSign.build(userCrypto, samlAssertion, null, null, null);
String outputString =
XMLUtils.prettyDocumentToString(signedDoc);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java Fri Nov 25 12:31:19 2016
@@ -80,7 +80,7 @@ public class ValidatorTest extends org.j
WSSecTimestamp timestamp = new WSSecTimestamp(secHeader);
timestamp.setTimeToLive(-1);
- Document createdDoc = timestamp.build(doc);
+ Document createdDoc = timestamp.build();
if (LOG.isDebugEnabled()) {
String outputString =
@@ -116,7 +116,7 @@ public class ValidatorTest extends org.j
sign.setKeyIdentifierType(WSConstants.X509_KEY_IDENTIFIER);
Crypto crypto = CryptoFactory.getInstance("wss40.properties");
- Document signedDoc = sign.build(doc, crypto);
+ Document signedDoc = sign.build(crypto);
if (LOG.isDebugEnabled()) {
String outputString =
@@ -159,7 +159,7 @@ public class ValidatorTest extends org.j
builder.setPasswordType(WSConstants.PASSWORD_TEXT);
builder.setUserInfo("wernerd", "verySecre");
- Document signedDoc = builder.build(doc);
+ Document signedDoc = builder.build();
if (LOG.isDebugEnabled()) {
String outputString =
@@ -243,7 +243,7 @@ public class ValidatorTest extends org.j
WSSecSignature builder = new WSSecSignature(secHeader);
builder.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security");
builder.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
- Document signedDoc = builder.build(doc, CryptoFactory.getInstance());
+ Document signedDoc = builder.build(CryptoFactory.getInstance());
if (LOG.isDebugEnabled()) {
String outputString =
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java Fri Nov 25 12:31:19 2016
@@ -656,7 +656,7 @@ public class AttachmentTest extends Abst
encrypt.setAttachmentCallbackHandler(attachmentCallbackHandler);
- encrypt.prepare(doc, CryptoFactory.getInstance("transmitter-crypto.properties"));
+ encrypt.prepare(CryptoFactory.getInstance("transmitter-crypto.properties"));
Element refs = encrypt.encrypt();
encrypt.addAttachmentEncryptedDataElements();
encrypt.addExternalRefElement(refs);
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java Fri Nov 25 12:31:19 2016
@@ -138,13 +138,13 @@ public class DerivedKeyTokenTest extends
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
sctBuilder.setWscVersion(version);
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
//EncryptedKey
WSSecEncryptedKey encrKeyBuilder = new WSSecEncryptedKey(secHeader);
encrKeyBuilder.setUserInfo("receiver");
encrKeyBuilder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
- encrKeyBuilder.prepare(doc, crypto);
+ encrKeyBuilder.prepare(crypto);
//Key information from the EncryptedKey
byte[] ek = encrKeyBuilder.getEphemeralKey();
@@ -155,7 +155,7 @@ public class DerivedKeyTokenTest extends
encrBuilder.setWscVersion(version);
encrBuilder.setSymmetricEncAlgorithm(WSConstants.TRIPLE_DES);
encrBuilder.setExternalKey(ek, tokenIdentifier);
- encrBuilder.build(doc);
+ encrBuilder.build();
encrKeyBuilder.prependToHeader();
encrKeyBuilder.prependBSTElementToHeader();
@@ -339,13 +339,13 @@ public class DerivedKeyTokenTest extends
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
sctBuilder.setWscVersion(version);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
//EncryptedKey
WSSecEncryptedKey encrKeyBuilder = new WSSecEncryptedKey(secHeader);
encrKeyBuilder.setUserInfo("receiver");
encrKeyBuilder.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
- encrKeyBuilder.prepare(doc, crypto);
+ encrKeyBuilder.prepare(crypto);
//Key information from the EncryptedKey
byte[] ek = encrKeyBuilder.getEphemeralKey();
@@ -356,7 +356,7 @@ public class DerivedKeyTokenTest extends
encrBuilder.setWscVersion(version);
encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
encrBuilder.setExternalKey(ek, tokenIdentifier);
- encrBuilder.build(doc);
+ encrBuilder.build();
encrKeyBuilder.prependToHeader();
encrKeyBuilder.prependBSTElementToHeader();
@@ -469,7 +469,7 @@ public class DerivedKeyTokenTest extends
encrKeyBuilder.setUserInfo("receiver");
encrKeyBuilder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- encrKeyBuilder.prepare(doc, crypto);
+ encrKeyBuilder.prepare(crypto);
//Key information from the EncryptedKey
byte[] ek = encrKeyBuilder.getEphemeralKey();
@@ -480,7 +480,7 @@ public class DerivedKeyTokenTest extends
sigBuilder.setWscVersion(version);
sigBuilder.setExternalKey(ek, tokenIdentifier);
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
encrKeyBuilder.prependToHeader();
encrKeyBuilder.prependBSTElementToHeader();
@@ -612,7 +612,7 @@ public class DerivedKeyTokenTest extends
java.security.Key key = crypto.getPrivateKey("transmitter", "default");
sigBuilder.setExternalKey(key.getEncoded(), secToken.getElement());
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
sigBuilder.prependDKElementToHeader();
@@ -743,7 +743,7 @@ public class DerivedKeyTokenTest extends
java.security.Key key = crypto.getPrivateKey("transmitter", "default");
sigBuilder.setExternalKey(key.getEncoded(), secToken.getElement());
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
sigBuilder.prependDKElementToHeader();
@@ -867,7 +867,7 @@ public class DerivedKeyTokenTest extends
WSSecEncryptedKey encrKeyBuilder = new WSSecEncryptedKey(secHeader);
encrKeyBuilder.setUserInfo("receiver");
encrKeyBuilder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
- encrKeyBuilder.prepare(doc, crypto);
+ encrKeyBuilder.prepare(crypto);
//Key information from the EncryptedKey
byte[] ek = encrKeyBuilder.getEphemeralKey();
@@ -878,14 +878,14 @@ public class DerivedKeyTokenTest extends
sigBuilder.setWscVersion(version);
sigBuilder.setExternalKey(ek, tokenIdentifier);
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- Document signedDoc = sigBuilder.build(doc);
+ sigBuilder.build();
//Derived key signature
WSSecDKEncrypt encrBuilder = new WSSecDKEncrypt(secHeader);
encrBuilder.setWscVersion(version);
encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
encrBuilder.setExternalKey(ek, tokenIdentifier);
- encrBuilder.build(signedDoc);
+ encrBuilder.build();
encrKeyBuilder.prependToHeader();
encrKeyBuilder.prependBSTElementToHeader();
@@ -990,7 +990,7 @@ public class DerivedKeyTokenTest extends
WSSecEncryptedKey encrKeyBuilder = new WSSecEncryptedKey(secHeader);
encrKeyBuilder.setUserInfo("receiver");
encrKeyBuilder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
- encrKeyBuilder.prepare(doc, crypto);
+ encrKeyBuilder.prepare(crypto);
//Key information from the EncryptedKey
byte[] ek = encrKeyBuilder.getEphemeralKey();
@@ -1001,14 +1001,14 @@ public class DerivedKeyTokenTest extends
encrBuilder.setWscVersion(version);
encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
encrBuilder.setExternalKey(ek, tokenIdentifier);
- encrBuilder.build(doc);
+ encrBuilder.build();
//Derived key encryption
WSSecDKSign sigBuilder = new WSSecDKSign(secHeader);
sigBuilder.setWscVersion(version);
sigBuilder.setExternalKey(ek, tokenIdentifier);
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
encrKeyBuilder.prependToHeader();
encrKeyBuilder.prependBSTElementToHeader();
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=1771308&r1=1771307&r2=1771308&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 Fri Nov 25 12:31:19 2016
@@ -1572,7 +1572,7 @@ public class EncDecryptionTest extends A
builder.setKeyIdentifierType(WSConstants.ENCRYPTED_KEY_SHA1_IDENTIFIER);
builder.setSymmetricKey(key);
builder.setEncryptSymmKey(false);
- Document securedDocument = builder.build(doc, null);
+ Document securedDocument = builder.build(null);
XPathExpression xPathExpression = getXPath("/soap:Envelope/soap:Body/xenc:EncryptedData/dsig:KeyInfo/wsse:SecurityTokenReference/wsse:KeyIdentifier[@ValueType='http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKeySHA1']");
Node node = (Node) xPathExpression.evaluate(securedDocument, XPathConstants.NODE);
@@ -2567,7 +2567,7 @@ public class EncDecryptionTest extends A
builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
builder.setUserInfo("receiver");
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- builder.prepare(doc, crypto);
+ builder.prepare(crypto);
WSEncryptionPart encP = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
List<WSEncryptionPart> encryptionParts = new ArrayList<WSEncryptionPart>();
@@ -2611,7 +2611,7 @@ public class EncDecryptionTest extends A
builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
builder.setUserInfo("receiver");
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- builder.prepare(doc, crypto);
+ builder.prepare(crypto);
WSEncryptionPart encP = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
List<WSEncryptionPart> encryptionParts = new ArrayList<WSEncryptionPart>();
@@ -2654,7 +2654,7 @@ public class EncDecryptionTest extends A
builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
builder.setUserInfo("receiver");
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- builder.prepare(doc, crypto);
+ builder.prepare(crypto);
WSEncryptionPart encP = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
List<WSEncryptionPart> encryptionParts = new ArrayList<WSEncryptionPart>();
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SecurityContextTokenTest.java Fri Nov 25 12:31:19 2016
@@ -149,7 +149,7 @@ public class SecurityContextTokenTest ex
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
sctBuilder.setWscVersion(version);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
// Store the secret
SecretKeyCallbackHandler callbackHandler = new SecretKeyCallbackHandler();
@@ -162,9 +162,9 @@ public class SecurityContextTokenTest ex
encrBuilder.setWscVersion(version);
encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
encrBuilder.setExternalKey(tempSecret, tokenId);
- encrBuilder.build(doc);
+ encrBuilder.build();
- sctBuilder.prependSCTElementToHeader(doc);
+ sctBuilder.prependSCTElementToHeader();
javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(baos));
@@ -359,7 +359,7 @@ public class SecurityContextTokenTest ex
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
sctBuilder.setWscVersion(version);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
// Store the secret
SecretKeyCallbackHandler callbackHandler = new SecretKeyCallbackHandler();
@@ -372,9 +372,9 @@ public class SecurityContextTokenTest ex
sigBuilder.setWscVersion(version);
sigBuilder.setExternalKey(tempSecret, tokenId);
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
- sctBuilder.prependSCTElementToHeader(doc);
+ sctBuilder.prependSCTElementToHeader();
javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(baos));
@@ -542,7 +542,7 @@ public class SecurityContextTokenTest ex
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
sctBuilder.setWscVersion(version);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
// Store the secret
SecretKeyCallbackHandler callbackHandler = new SecretKeyCallbackHandler();
@@ -554,9 +554,9 @@ public class SecurityContextTokenTest ex
sigBuilder.setExternalKey(tempSecret, sctBuilder.getIdentifier());
sigBuilder.setTokenIdDirectId(true);
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
- sctBuilder.prependSCTElementToHeader(doc);
+ sctBuilder.prependSCTElementToHeader();
javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(baos));
@@ -589,7 +589,7 @@ public class SecurityContextTokenTest ex
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
sctBuilder.setWscVersion(version);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
// Store the secret
SecretKeyCallbackHandler callbackHandler = new SecretKeyCallbackHandler();
@@ -607,7 +607,7 @@ public class SecurityContextTokenTest ex
}
sigBuilder.setExternalKey(tempSecret, tokenId);
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
// Derived key encryption
WSSecDKEncrypt encrBuilder = new WSSecDKEncrypt(secHeader);
@@ -619,9 +619,9 @@ public class SecurityContextTokenTest ex
}
encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
encrBuilder.setExternalKey(tempSecret, tokenId);
- encrBuilder.build(doc);
+ encrBuilder.build();
- sctBuilder.prependSCTElementToHeader(doc);
+ sctBuilder.prependSCTElementToHeader();
javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(baos));
@@ -812,7 +812,7 @@ public class SecurityContextTokenTest ex
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
sctBuilder.setWscVersion(version);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
// Store the secret
SecretKeyCallbackHandler callbackHandler = new SecretKeyCallbackHandler();
@@ -830,7 +830,7 @@ public class SecurityContextTokenTest ex
}
encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
encrBuilder.setExternalKey(tempSecret, tokenId);
- encrBuilder.build(doc);
+ encrBuilder.build();
// Derived key signature
WSSecDKSign sigBuilder = new WSSecDKSign(secHeader);
@@ -842,9 +842,9 @@ public class SecurityContextTokenTest ex
}
sigBuilder.setExternalKey(tempSecret, tokenId);
sigBuilder.setSignatureAlgorithm(WSConstants.HMAC_SHA1);
- sigBuilder.build(doc);
+ sigBuilder.build();
- sctBuilder.prependSCTElementToHeader(doc);
+ sctBuilder.prependSCTElementToHeader();
javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(baos));
@@ -1036,7 +1036,7 @@ public class SecurityContextTokenTest ex
WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken(secHeader, null);
sctBuilder.setWscVersion(version);
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sctBuilder.prepare(doc, crypto);
+ sctBuilder.prepare(crypto);
// Store the secret
SecretKeyCallbackHandler callbackHandler = new SecretKeyCallbackHandler();
@@ -1050,9 +1050,9 @@ public class SecurityContextTokenTest ex
builder.setCustomTokenValueType(WSConstants.WSC_SCT);
builder.setCustomTokenId(tokenId);
builder.setSignatureAlgorithm(SignatureMethod.HMAC_SHA1);
- builder.build(doc, crypto);
+ builder.build(crypto);
- sctBuilder.prependSCTElementToHeader(doc);
+ sctBuilder.prependSCTElementToHeader();
javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(baos));
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureEncryptionTest.java Fri Nov 25 12:31:19 2016
@@ -398,12 +398,12 @@ public class SignatureEncryptionTest ext
Crypto crypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- sign.build(doc, crypto);
+ sign.build( crypto);
WSSecEncrypt builder = new WSSecEncrypt(secHeader);
builder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
builder.setUserInfo("receiver");
- builder.prepare(doc, crypto);
+ builder.prepare(crypto);
WSEncryptionPart bst = new WSEncryptionPart("BinarySecurityToken", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Element");
WSEncryptionPart def = new WSEncryptionPart("definitions", "http://schemas.xmlsoap.org/wsdl/", "Element");
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java Fri Nov 25 12:31:19 2016
@@ -1169,7 +1169,7 @@ public class SignatureTest extends Abstr
sign.setSecretKey(key.getEncoded());
sign.setSignatureAlgorithm(SignatureMethod.HMAC_SHA1);
- Document securedDocument = sign.build(doc, null);
+ Document securedDocument = sign.build(null);
//some test that we can really sure we get what we want from WSS4J
XPathExpression xPathExpression =
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/XOPAttachmentTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/XOPAttachmentTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/XOPAttachmentTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/XOPAttachmentTest.java Fri Nov 25 12:31:19 2016
@@ -138,7 +138,7 @@ public class XOPAttachmentTest extends A
sigProperties.setProperty("org.apache.wss4j.crypto.merlin.keystore.file", "transmitter.jks");
sigProperties.setProperty("org.apache.wss4j.crypto.merlin.keystore.password", "default");
Crypto crypto = new Merlin(sigProperties, this.getClass().getClassLoader(), null);
- Document encryptedDoc = encrypt.build(doc, crypto);
+ Document encryptedDoc = encrypt.build(crypto);
// Find the SOAP Body + replace with a xop:Include to the attachment!
Element soapBody = WSSecurityUtil.findBodyElement(encryptedDoc);
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java Fri Nov 25 12:31:19 2016
@@ -198,10 +198,10 @@ public class SAMLCallbackHandlerImpl imp
Document doc = docBuilder.newDocument();
// Create an Encrypted Key
- WSSecEncryptedKey encrKey = new WSSecEncryptedKey(null);
+ WSSecEncryptedKey encrKey = new WSSecEncryptedKey(doc);
encrKey.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
encrKey.setUseThisCert(certs[0]);
- encrKey.prepare(doc, null);
+ encrKey.prepare(null);
ephemeralKey = encrKey.getEphemeralKey();
keyInfo.setEphemeralKey(ephemeralKey);
Element encryptedKeyElement = encrKey.getEncryptedKeyElement();
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java Fri Nov 25 12:31:19 2016
@@ -489,7 +489,7 @@ public class SAMLTokenHOKTest extends Ab
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document securedDocument = wsSign.build(doc, samlAssertion);
+ Document securedDocument = wsSign.build(samlAssertion);
//some test that we can really sure we get what we want from WSS4J
NodeList nodeList = securedDocument.getElementsByTagNameNS(WSSConstants.TAG_dsig_Signature.getNamespaceURI(), WSSConstants.TAG_dsig_Signature.getLocalPart());
@@ -989,7 +989,7 @@ public class SAMLTokenHOKTest extends Ab
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- Document securedDocument = wsSign.build(doc, samlAssertion);
+ Document securedDocument = wsSign.build(samlAssertion);
//some test that we can really sure we get what we want from WSS4J
NodeList nodeList = securedDocument.getElementsByTagNameNS(WSSConstants.TAG_dsig_Signature.getNamespaceURI(), WSSConstants.TAG_dsig_Signature.getLocalPart());
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=1771308&r1=1771307&r2=1771308&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 Fri Nov 25 12:31:19 2016
@@ -376,7 +376,7 @@ public class SAMLTokenReferenceTest exte
builder.setCustomEKTokenId(samlAssertion.getId());
Crypto userCrypto = CryptoFactory.getInstance("receiver-crypto.properties");
- builder.prepare(doc, userCrypto);
+ builder.prepare(userCrypto);
List<WSEncryptionPart> parts = new ArrayList<WSEncryptionPart>();
WSEncryptionPart encP =
@@ -461,7 +461,7 @@ public class SAMLTokenReferenceTest exte
builder.setCustomEKTokenId(samlAssertion.getId());
Crypto userCrypto = CryptoFactory.getInstance("receiver-crypto.properties");
- builder.prepare(doc, userCrypto);
+ builder.prepare(userCrypto);
List<WSEncryptionPart> parts = new ArrayList<WSEncryptionPart>();
WSEncryptionPart encP =
@@ -814,7 +814,7 @@ public class SAMLTokenReferenceTest exte
wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
Crypto userCrypto = CryptoFactory.getInstance("transmitter-crypto.properties");
- Document securedDocument = wsSign.build(doc, userCrypto, samlAssertion, null, null, null);
+ Document securedDocument = wsSign.build(userCrypto, samlAssertion, null, null, null);
//some test that we can really sure we get what we want from WSS4J
NodeList nodeList = securedDocument.getElementsByTagNameNS(WSSConstants.TAG_dsig_Signature.getNamespaceURI(), WSSConstants.TAG_dsig_Signature.getLocalPart());
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java?rev=1771308&r1=1771307&r2=1771308&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java Fri Nov 25 12:31:19 2016
@@ -894,7 +894,7 @@ public class SAMLTokenTest extends Abstr
WSSecSAMLToken wsSign = new WSSecSAMLToken(secHeader);
- wsSign.prepare(doc, samlAssertion);
+ wsSign.prepare(samlAssertion);
// Get the Element + add it to the security header as an EncryptedAssertion
Element assertionElement = wsSign.getElement();
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=1771308&r1=1771307&r2=1771308&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 Fri Nov 25 12:31:19 2016
@@ -94,7 +94,7 @@ public class SamlTokenDerivedTest extend
// Create a Derived Key object for signature
//
WSSecDKSign sigBuilder = createDKSign(doc, secRefSaml, secHeader);
- Document securedDocument = sigBuilder.build(doc);
+ Document securedDocument = sigBuilder.build();
//todo remove the following lines when the header ordering no longer does matter...
/*Node firstChild = secHeader.getSecurityHeader().getFirstChild();