[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-cvs-commits
Subject: [jboss-cvs] webservice/test/java/org/jboss/test/ws/wsse ...
From: Jason Thomas Greene <jgreene () jboss ! com>
Date: 2005-09-30 23:24:46
Message-ID: E1ELUFC-00021M-K0 () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]
User: jgreene
Date: 05/09/30 19:24:46
Modified: test/java/org/jboss/test/ws/wsse SunInteropTestCase.java
Log:
Add support for X509IssuerSerial references
Dynamically discover encrypted key encryption algorithm
Add support for 3DES
Add another interoperability test that tests the above features
Add a tests-wsse target which runs all ws-security related tests
Revision Changes Path
1.3 +36 -1 \
webservice/test/java/org/jboss/test/ws/wsse/SunInteropTestCase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SunInteropTestCase.java
===================================================================
RCS file: /cvsroot/jboss/webservice/test/java/org/jboss/test/ws/wsse/SunInteropTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- SunInteropTestCase.java 29 Sep 2005 04:11:28 -0000 1.2
+++ SunInteropTestCase.java 30 Sep 2005 23:24:46 -0000 1.3
@@ -6,7 +6,7 @@
*/
package org.jboss.test.ws.wsse;
-// $Id: SunInteropTestCase.java,v 1.2 2005/09/29 04:11:28 jgreene Exp $
+// $Id: SunInteropTestCase.java,v 1.3 2005/09/30 23:24:46 jgreene Exp $
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
@@ -70,6 +70,41 @@
log.debug("Decoded message:" + decodedString);
}
+ /** Test that we can build an envelope from InputStream */
+ public void testSunIssuerSerialSignEncrypt() throws Exception
+ {
+ InputStream inputStream = new \
FileInputStream("resources/wsse/sun-xws-issuerserial-sign-encrypt.xml"); +
+ MessageFactory factory = new MessageFactoryImpl();
+ SOAPMessage soapMsg = factory.createMessage(null, inputStream);
+ SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();
+ Document doc = env.getOwnerDocument();
+
+ // The Sun JWSDP message is timestamp protected like so:
+ // <wsu:Timestamp wsu:Id="Timestamp-9e3e6632-f2a1-4b26-a682-9301a75003a7">
+ // <wsu:Created>2005-09-26T22:17:32Z</wsu:Created>
+ // <wsu:Expires>2005-09-26T22:22:32Z</wsu:Expires>
+ // </wsu:Timestamp>
+
+ Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
+ cal.set(Calendar.DAY_OF_MONTH, 30);
+ cal.set(Calendar.MONTH, 8);
+ cal.set(Calendar.YEAR, 2005);
+ cal.set(Calendar.HOUR_OF_DAY, 22);
+ cal.set(Calendar.MINUTE, 8);
+ cal.set(Calendar.SECOND, 40);
+
+
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal);
+ decoder.decode(doc);
+ decoder.complete();
+
+ cleanupWsuIds(doc.getDocumentElement());
+
+ String decodedString = prettyPrint(doc);
+ log.debug("Decoded message:" + decodedString);
+ }
+
private String prettyPrint(Document doc)
{
ByteArrayOutputStream stream = new ByteArrayOutputStream();
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic