You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2013/04/19 16:00:27 UTC
svn commit: r1469832 -
/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
Author: coheigea
Date: Fri Apr 19 14:00:26 2013
New Revision: 1469832
URL: http://svn.apache.org/r1469832
Log:
Fixing SAML EncryptedKey tests
Modified:
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
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=1469832&r1=1469831&r2=1469832&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 Apr 19 14:00:26 2013
@@ -405,8 +405,6 @@ public class SAMLTokenHOKTest extends Ab
}
}
- /*
- todo: test commented until we get clarification from Colm to the encryptedKey case...
@Test
public void testSAML1AttrAssertionOutbound() throws Exception {
@@ -421,11 +419,11 @@ public class SAMLTokenHOKTest extends Ab
callbackHandler.setIssuer("www.example.com");
securityProperties.setSamlCallbackHandler(callbackHandler);
KeyStore keyStore = KeyStore.getInstance("jks");
- keyStore.load(this.getClass().getClassLoader().getResourceAsStream("transmitter.jks"), "default".toCharArray());
+ keyStore.load(this.getClass().getClassLoader().getResourceAsStream("receiver.jks"), "default".toCharArray());
Merlin crypto = new Merlin();
crypto.setKeyStore(keyStore);
CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
- cryptoType.setAlias("transmitter");
+ cryptoType.setAlias("receiver");
callbackHandler.setCerts(crypto.getX509Certificates(cryptoType));
securityProperties.loadSignatureKeyStore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
securityProperties.setSignatureUser("transmitter");
@@ -459,7 +457,6 @@ public class SAMLTokenHOKTest extends Ab
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
}
}
- */
@Test
public void testSAML1AttrAssertionInbound() throws Exception {
@@ -900,8 +897,6 @@ public class SAMLTokenHOKTest extends Ab
}
}
- /*
- todo: test commented until we get clarification from Colm to the encryptedKey case...
@Test
public void testSAML2AttrAssertionOutbound() throws Exception {
@@ -921,10 +916,10 @@ public class SAMLTokenHOKTest extends Ab
Merlin crypto = new Merlin();
crypto.setKeyStore(keyStore);
CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
- cryptoType.setAlias("transmitter");
+ cryptoType.setAlias("receiver");
callbackHandler.setCerts(crypto.getX509Certificates(cryptoType));
securityProperties.loadSignatureKeyStore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
- securityProperties.setSignatureUser("transmitter");
+ securityProperties.setSignatureUser("receiver");
securityProperties.setSignatureAlgorithm("http://www.w3.org/2001/04/xmldsig-more#hmac-sha256");
securityProperties.setCallbackHandler(new CallbackHandlerImpl());
@@ -934,7 +929,6 @@ public class SAMLTokenHOKTest extends Ab
XmlReaderToWriter.writeAll(xmlStreamReader, xmlStreamWriter);
xmlStreamWriter.close();
- System.out.println(baos.toString());
Document document = documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray()));
NodeList nodeList = document.getElementsByTagNameNS(WSSConstants.TAG_dsig_Signature.getNamespaceURI(), WSSConstants.TAG_dsig_Signature.getLocalPart());
Assert.assertEquals(nodeList.getLength(), 2);
@@ -956,7 +950,6 @@ public class SAMLTokenHOKTest extends Ab
doInboundSecurityWithWSS4J_1(documentBuilderFactory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray())), action, properties, false);
}
}
-*/
@Test
public void testSAML2AttrAssertionInbound() throws Exception {