Author: anil.saldhana(a)jboss.com
Date: 2009-03-17 11:44:37 -0400 (Tue, 17 Mar 2009)
New Revision: 374
Modified:
identity-federation/trunk/identity-fed-api/.classpath
identity-federation/trunk/identity-fed-api/src/test/java/org/jboss/test/identity/federation/api/util/XMLEncryptionUnitTestCase.java
Log:
decrypt
Modified: identity-federation/trunk/identity-fed-api/.classpath
===================================================================
--- identity-federation/trunk/identity-fed-api/.classpath 2009-03-17 15:44:06 UTC (rev
373)
+++ identity-federation/trunk/identity-fed-api/.classpath 2009-03-17 15:44:37 UTC (rev
374)
@@ -24,5 +24,5 @@
<classpathentry kind="lib"
path="src/test/resources/endorsed/xalan.jar"/>
<classpathentry kind="lib"
path="src/test/resources/endorsed/xercesImpl.jar"/>
<classpathentry kind="lib"
path="src/test/resources/endorsed/xml-apis.jar"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="output" path="target-eclipse/classes"/>
</classpath>
Modified:
identity-federation/trunk/identity-fed-api/src/test/java/org/jboss/test/identity/federation/api/util/XMLEncryptionUnitTestCase.java
===================================================================
---
identity-federation/trunk/identity-fed-api/src/test/java/org/jboss/test/identity/federation/api/util/XMLEncryptionUnitTestCase.java 2009-03-17
15:44:06 UTC (rev 373)
+++
identity-federation/trunk/identity-fed-api/src/test/java/org/jboss/test/identity/federation/api/util/XMLEncryptionUnitTestCase.java 2009-03-17
15:44:37 UTC (rev 374)
@@ -25,6 +25,7 @@
import java.io.StringWriter;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
+import java.security.PrivateKey;
import java.security.PublicKey;
import java.util.ArrayList;
import java.util.List;
@@ -156,6 +157,11 @@
assertEquals(wrappedNode.getLocalName(),qname.getLocalPart());
assertEquals(wrappedNode.getNamespaceURI(), qname.getNamespaceURI());
assertEquals(wrappedNode.getPrefix(), qname.getPrefix());
+
+ //Let us decrypt the document
+ PrivateKey privateKey = kp.getPrivate();
+ Element decryptedElement = XMLEncryptionUtil.decryptElementInDocument(doc,
privateKey);
+ assertEquals("a", decryptedElement.getLocalName());
}
public void testArbitraryXMLWithOuterKeyInfo() throws Exception
Show replies by date