aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/test/java')
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/AuthConfigurationProviderLegacyCompatibilityTest.java2
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/TestLegacyAuthConfigurationProvider.java4
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java6
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java6
-rw-r--r--id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java4
-rw-r--r--id/server/idserverlib/src/test/java/test/tlenz/simpletest.java24
6 files changed, 31 insertions, 15 deletions
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/AuthConfigurationProviderLegacyCompatibilityTest.java b/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/AuthConfigurationProviderLegacyCompatibilityTest.java
index 7606bc9bf..313038e08 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/AuthConfigurationProviderLegacyCompatibilityTest.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/AuthConfigurationProviderLegacyCompatibilityTest.java
@@ -10,8 +10,8 @@ import java.util.Collections;
import org.junit.Test;
import org.unitils.reflectionassert.ReflectionAssert;
+import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
import at.gv.egovernment.moa.id.commons.config.persistence.Configuration;
-import at.gv.egovernment.moa.id.commons.db.MOAIDConfigurationConstants;
import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes;
import at.gv.egovernment.moa.id.commons.db.dao.config.GeneralConfiguration;
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/TestLegacyAuthConfigurationProvider.java b/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/TestLegacyAuthConfigurationProvider.java
index 39c8ef310..483731179 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/TestLegacyAuthConfigurationProvider.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovnerment/moa/id/config/auth/TestLegacyAuthConfigurationProvider.java
@@ -2,10 +2,10 @@ package at.gv.egovnerment.moa.id.config.auth;
import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
import at.gv.egovernment.moa.id.config.ConfigurationException;
-import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.JaxBAuthConfigurationProvider;
public class TestLegacyAuthConfigurationProvider extends
- AuthConfigurationProvider {
+ JaxBAuthConfigurationProvider {
private final MOAIDConfiguration moaidConfiguration;
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java
index 0aa1ffab9..df21e17bf 100644
--- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java
@@ -59,7 +59,7 @@ import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser;
import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
import at.gv.egovernment.moa.id.config.ConfigurationProvider;
-import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.JaxBAuthConfigurationProvider;
@@ -107,7 +107,7 @@ public class VerifyXMLSignatureRequestBuilderTest extends MOASPSSTestCase {
InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
IdentityLink idl = irrp.parseIdentityLink();
VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
- AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ JaxBAuthConfigurationProvider authConf = JaxBAuthConfigurationProvider.getInstance();
Element requestBuild = vsrb.build(idl, authConf.getMoaSpIdentityLinkTrustProfileID());
@@ -128,7 +128,7 @@ public class VerifyXMLSignatureRequestBuilderTest extends MOASPSSTestCase {
VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
- AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ JaxBAuthConfigurationProvider authConf = JaxBAuthConfigurationProvider.getInstance();
Element request = vsrb.build(csr, authConf.getMoaSpAuthBlockVerifyTransformsInfoIDs(), authConf.getMoaSpIdentityLinkTrustProfileID());
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java
index 0876cfac6..c5c17f623 100644
--- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java
@@ -60,7 +60,7 @@ import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser;
import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
import at.gv.egovernment.moa.id.auth.validator.VerifyXMLSignatureResponseValidator;
import at.gv.egovernment.moa.id.config.ConfigurationProvider;
-import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.JaxBAuthConfigurationProvider;
import at.gv.egovernment.moa.id.config.auth.data.DynamicOAAuthParameters;
import at.gv.egovernment.moa.util.DOMUtils;
@@ -118,7 +118,7 @@ System.setProperty(
IdentityLink idl = irrp.parseIdentityLink();
VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
- AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ JaxBAuthConfigurationProvider authConf = JaxBAuthConfigurationProvider.getInstance();
Element request = vsrb.build(idl, authConf.getMoaSpIdentityLinkTrustProfileID());
s =new RandomAccessFile("D://PatricksVerifyXMLSignatureRequestWithInfoboxReadResponse.xml","rw");
@@ -159,7 +159,7 @@ System.setProperty(
VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
- AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ JaxBAuthConfigurationProvider authConf = JaxBAuthConfigurationProvider.getInstance();
Element request = vsrb.build(csr, authConf.getMoaSpAuthBlockVerifyTransformsInfoIDs(), authConf.getMoaSpIdentityLinkTrustProfileID());
// Element request = DOMUtils.parseDocument(vsrb.build(xmlInfoboxReadResponse,"TrustProfile1"),false,null,null).getDocumentElement();
diff --git a/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java b/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java
index 4a89f031e..74e89c833 100644
--- a/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java
+++ b/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java
@@ -56,7 +56,7 @@ import org.w3c.dom.Element;
import at.gv.egovernment.moa.id.auth.AuthenticationServer;
import at.gv.egovernment.moa.id.config.ConfigurationProvider;
-import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.JaxBAuthConfigurationProvider;
import at.gv.egovernment.moa.id.proxy.builder.SAMLRequestBuilder;
import at.gv.egovernment.moa.util.DOMUtils;
import at.gv.egovernment.moa.util.StreamUtils;
@@ -108,7 +108,7 @@ public class LasttestClient {
System.setProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME, TESTDATA_ROOT + "xmldata/L000/Configuration.xml");
- AuthConfigurationProvider.reload();
+ JaxBAuthConfigurationProvider.reload();
this.turns = turns;
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 549eb4f2b..6e1f612c8 100644
--- a/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java
+++ b/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java
@@ -1,5 +1,8 @@
package test.tlenz;
+import iaik.asn1.structures.Name;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
import at.gv.egovernment.moa.id.data.AuthenticationRole;
import at.gv.egovernment.moa.id.data.AuthenticationRoleFactory;
@@ -47,11 +50,24 @@ public class simpletest {
//
public static void main(String[] args) {
- AuthenticationRole test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION(key=A\\,B)");
+ String subjectName = "serialNumber=896929130327, givenName=OCSP, SN=Responder 03-1, CN=OCSP Responder 03-1, C=AT";
- test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION");
- test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION(key=A)");
- test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION(keyA=A,keyB=B)");
+ try {
+ Name test = new RFC2253NameParser(subjectName).parse();
+
+ System.out.println(test.getRFC2253String());
+
+ } catch (RFC2253NameParserException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
+// AuthenticationRole test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION(key=A\\,B)");
+//
+// test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION");
+// test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION(key=A)");
+// test = AuthenticationRoleFactory.buildFormPVPole("ecas-demo-EUROPEAN_COMMISSION(keyA=A,keyB=B)");
//
// System.setProperty("mandates.configuration", "D:/Projekte/svn/moa-id/moa-id.properties");