From dd9e461075a23bc75f9db708609a9d0f0ece3901 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 31 Aug 2018 13:13:07 +0200 Subject: more updates --- .../modules/authmodule_eIDASv2/SZRClientTest.java | 62 ++++++++++------------ 1 file changed, 29 insertions(+), 33 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java index 7f9497fc..ca993554 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java @@ -4,7 +4,6 @@ import java.io.IOException; import java.security.InvalidKeyException; import java.security.MessageDigest; import java.security.NoSuchProviderException; -import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.StringUtils; @@ -17,7 +16,6 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.Base64Utils; import org.w3._2000._09.xmldsig.KeyValueType; -import org.w3._2000._09.xmldsig.RSAKeyValueType; import org.w3c.dom.Element; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.Constants; @@ -48,8 +46,8 @@ public class SZRClientTest { private static final String givenName = "Franz"; private static final String familyName = "Mustermann"; - private static final String dateOfBirth = "1988-05-05"; - private static final String eIDASeID = "IS/AT/123456789ABCDEF"; + private static final String dateOfBirth = "1989-05-05"; + private static final String eIDASeID = "IS/AT/1234sdgsdfg56789ABCDEF"; //Dummy public RSA Key private static final String PUBKEY_EXPONENT = "AQAB"; @@ -84,7 +82,7 @@ public class SZRClientTest { // // } -// @Test + @Test public void getIdentityLinkRawMode() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException { log.debug("Starting connecting SZR Gateway"); IdentityLinkType result = szrClient.getIdentityLinkInRawMode( @@ -183,40 +181,38 @@ public class SZRClientTest { Constants.SZR_CONSTANTS_DEFAULT_DOCUMENT_TYPE)); //TODO: that should be removed - eDocument.setIssueDate(basicConfig.getBasicConfiguration( - Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_ISSUING_DATE, - Constants.SZR_CONSTANTS_DEFAULT_ISSUING_DATE)); - eDocument.setIssuingAuthority(basicConfig.getBasicConfiguration( - Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_ISSUING_AUTHORITY, - Constants.SZR_CONSTANTS_DEFAULT_ISSUING_AUTHORITY)); +// eDocument.setIssueDate(basicConfig.getBasicConfiguration( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_ISSUING_DATE)); +// eDocument.setIssuingAuthority(basicConfig.getBasicConfiguration( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_ISSUING_AUTHORITY)); return personInfo; } private List dummyCodeForKeys() throws IOException, NoSuchProviderException, InvalidKeyException { - if (basicConfig.getBasicMOAIDConfigurationBoolean( - Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_KEYS_USEDUMMY, - false)) { - List keyvalueList = new ArrayList(); - try { - // set key values - RSAKeyValueType rsa = new RSAKeyValueType(); - rsa.setExponent(PUBKEY_EXPONENT); - rsa.setModulus(PUBKEY_MODULUS); - - KeyValueType key = new KeyValueType(); - key.setRSAKeyValue(rsa); - keyvalueList.add(key); - - return keyvalueList; - } catch (Exception e) { - log.error("TestCode has an internal ERROR", e); - throw e; - - } - - } +// if (basicConfig.getBasicMOAIDConfigurationBoolean( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_KEYS_USEDUMMY, +// false)) { +// List keyvalueList = new ArrayList(); +// try { +// // set key values +// RSAKeyValueType rsa = new RSAKeyValueType(); +// rsa.setExponent(PUBKEY_EXPONENT); +// rsa.setModulus(PUBKEY_MODULUS); +// +// KeyValueType key = new KeyValueType(); +// key.setRSAKeyValue(rsa); +// keyvalueList.add(key); +// +// return keyvalueList; +// } catch (Exception e) { +// log.error("TestCode has an internal ERROR", e); +// throw e; +// +// } +// +// } return null; -- cgit v1.2.3