aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/test/java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-07-17 09:18:28 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-07-17 09:18:28 +0200
commit98dbb23fa5dcd9518beb56fd2410667b385b5524 (patch)
treeb95ad14a2401f553d72d6dc911814980689866b5 /id/server/idserverlib/src/test/java
parentd774a81910498c9ee1277c1611d57b07bf069fbd (diff)
downloadmoa-id-spss-98dbb23fa5dcd9518beb56fd2410667b385b5524.tar.gz
moa-id-spss-98dbb23fa5dcd9518beb56fd2410667b385b5524.tar.bz2
moa-id-spss-98dbb23fa5dcd9518beb56fd2410667b385b5524.zip
first beta version of new MOA-ID WebGUI module for configuration
Diffstat (limited to 'id/server/idserverlib/src/test/java')
-rw-r--r--id/server/idserverlib/src/test/java/test/tlenz/simpletest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java b/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java
index 6e1f612c8..fd1473b1f 100644
--- a/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java
+++ b/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java
@@ -1,10 +1,19 @@
package test.tlenz;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import org.w3c.dom.Element;
+
import iaik.asn1.structures.Name;
import iaik.utils.RFC2253NameParser;
import iaik.utils.RFC2253NameParserException;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
import at.gv.egovernment.moa.id.data.AuthenticationRole;
import at.gv.egovernment.moa.id.data.AuthenticationRoleFactory;
+import at.gv.egovernment.moa.id.util.IdentityLinkReSigner;
+import at.gv.egovernment.moa.util.DOMUtils;
/*******************************************************************************
* Copyright 2014 Federal Chancellery Austria
@@ -49,6 +58,19 @@ import at.gv.egovernment.moa.id.data.AuthenticationRoleFactory;
public class simpletest {
//
public static void main(String[] args) {
+ try {
+ InputStream s = new FileInputStream("D:/idl_test/identity_link.xml");
+ Element idlTemplate = DOMUtils.parseXmlValidating(s);
+
+ //resign IDL
+ IdentityLinkReSigner identitylinkresigner = IdentityLinkReSigner.getInstance();
+ Element resignedilAssertion = identitylinkresigner.resignIdentityLink(idlTemplate, "IDLSigning");
+ IdentityLink identityLink = new IdentityLinkAssertionParser(resignedilAssertion).parseIdentityLink();
+
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+
+ }
String subjectName = "serialNumber=896929130327, givenName=OCSP, SN=Responder 03-1, CN=OCSP Responder 03-1, C=AT";