From 8c8ddf0a97c65b1b39dad580c45e19cfa7e20a7e Mon Sep 17 00:00:00 2001 From: kstranacher Date: Fri, 17 Feb 2012 18:41:30 +0000 Subject: Update libs (iaik_moa-1.32.jar und iaik_ixsil-1.2.2.5.jar) git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1251 d688527b-c9ab-4aba-bd8d-4036d912da1d --- id/history.txt | 4 ++-- id/readme_1.5.1.txt | 4 ++-- id/server/.classpath | 2 +- id/server/auth/.classpath | 2 +- id/server/idserverlib/.classpath | 2 +- .../moa/id/auth/AuthenticationServer.java | 2 ++ .../moa/id/auth/builder/SAMLArtifactBuilder.java | 22 ++++++++++++---------- .../moa/id/util/ParamValidatorUtils.java | 4 ++-- id/server/proxy/.classpath | 2 +- id/templates/.classpath | 2 +- 10 files changed, 25 insertions(+), 21 deletions(-) (limited to 'id') diff --git a/id/history.txt b/id/history.txt index 907a01952..b8122f762 100644 --- a/id/history.txt +++ b/id/history.txt @@ -17,8 +17,8 @@ Version MOA-ID 1.5.1: - Weiterer optionaler Parameter sourceID beim MOA-ID Aufruf - Update der Standard Trustprofile - Libraries aktualisiert: -@TODO - iaik-moa: Version 1.31 + iaik-moa: Version 1.31 + iaik-ixsil: Version 1.2.2.5 Axis: Version 1.0_IAIK ===== diff --git a/id/readme_1.5.1.txt b/id/readme_1.5.1.txt index e86ee5968..dc7df1837 100644 --- a/id/readme_1.5.1.txt +++ b/id/readme_1.5.1.txt @@ -21,8 +21,8 @@ gleichen Verzeichnis): - Weiterer optionaler Parameter sourceID beim MOA-ID Aufruf - Update der Standard Trustprofile - Libraries aktualisiert: -@TODO - iaik-moa: Version 1.31 + iaik-moa: Version 1.31 + iaik-ixsil: Version 1.2.2.5 Axis: Version 1.0_IAIK ------------------------------------------------------------------------------- diff --git a/id/server/.classpath b/id/server/.classpath index f93d181b5..d7501e2c4 100644 --- a/id/server/.classpath +++ b/id/server/.classpath @@ -1,6 +1,6 @@ - + diff --git a/id/server/auth/.classpath b/id/server/auth/.classpath index f724d4325..b730116a1 100644 --- a/id/server/auth/.classpath +++ b/id/server/auth/.classpath @@ -1,7 +1,6 @@ - @@ -10,5 +9,6 @@ + diff --git a/id/server/idserverlib/.classpath b/id/server/idserverlib/.classpath index 1c79cc393..9757920d7 100644 --- a/id/server/idserverlib/.classpath +++ b/id/server/idserverlib/.classpath @@ -3,7 +3,7 @@ - + diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 093d22732..bf35b31f2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1679,6 +1679,8 @@ public class AuthenticationServer implements MOAIDAuthConstants { if (isPrPerson.equalsIgnoreCase("pr:PhysicalPerson")) { Node prIdentification = mandatePerson.getFirstChild(); prIdentification.getFirstChild().setTextContent(""); +// Element.appendChild(Document.createTextNode(String)); +// prIdentification.getFirstChild(). } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java index 145664a2b..6a78df9b2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java @@ -74,13 +74,21 @@ public class SAMLArtifactBuilder { // alternative sourceId String alternativeSourceID = AuthConfigurationProvider.getInstance().getGenericConfigurationParameter(GENERIC_CONFIG_PARAM_SOURCEID); - //System.out.println("alternativeSourceID: " + alternativeSourceID); - //System.out.println("authURL: " + authURL); - // if sourceID is given in GET/POST param - use this as source id if (!ParepUtils.isEmpty(sourceIdParam)) { // if GET/POST parameter sourceID is set, use that sourceID instead of authURL; - sourceID = md.digest(sourceIdParam.getBytes()); + //sourceID = md.digest(sourceIdParam.getBytes()); + + // if sourceIdParam is too short (must have 20 characters) - add " " + int length = sourceIdParam.length(); + if (length < 20) { + int l = 20 - length; + for (int i = 0; i < l; i++) { + sourceIdParam += " "; + } + } + + sourceID = sourceIdParam.getBytes(); Logger.info("Building SAMArtifact from sourceID \"" + sourceIdParam + "\" instead of authURL \"" + authURL + "\"."); byte[] assertionHandle = md.digest(sessionID.getBytes()); @@ -90,9 +98,7 @@ public class SAMLArtifactBuilder { out.write(sourceID, 0, 20); out.write(assertionHandle, 0, 20); byte[] samlArtifact = out.toByteArray(); - //System.out.println("samlArtifact: " + new String(samlArtifact)); String samlArtifactBase64 = Base64Utils.encode(samlArtifact); - //System.out.println("samlArtifact Base64: " + samlArtifactBase64); return samlArtifactBase64; } @@ -108,9 +114,7 @@ public class SAMLArtifactBuilder { out.write(sourceID, 0, 20); out.write(assertionHandle, 0, 20); byte[] samlArtifact = out.toByteArray(); - System.out.println("samlArtifact: " + new String(samlArtifact)); String samlArtifactBase64 = Base64Utils.encode(samlArtifact); - System.out.println("samlArtifact Base64: " + samlArtifactBase64); return samlArtifactBase64; } @@ -123,9 +127,7 @@ public class SAMLArtifactBuilder { out.write(sourceID, 0, 20); out.write(assertionHandle, 0, 20); byte[] samlArtifact = out.toByteArray(); - //System.out.println("samlArtifact: " + new String(samlArtifact)); String samlArtifactBase64 = Base64Utils.encode(samlArtifact); - //System.out.println("samlArtifact Base64: " + samlArtifactBase64); return samlArtifactBase64; //System.out.println("sourceID: " + new String(sourceID)); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java index 644e59f72..9df55724e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java @@ -94,7 +94,7 @@ public class ParamValidatorUtils { } - Pattern pattern = Pattern.compile("[\\w-_]{1,50}"); + Pattern pattern = Pattern.compile("[\\w-_]{1,20}"); Matcher matcher = pattern.matcher(sourceID); boolean b = matcher.matches(); if (b) { @@ -102,7 +102,7 @@ public class ParamValidatorUtils { return true; } else { - Logger.error("Fehler Überprüfung Parameter sourceID. SourceID entspricht nicht den Kriterien (nur Zeichen a-z, A-Z, - und _, sowie 1-50 Zeichen lang)"); + Logger.error("Fehler Überprüfung Parameter sourceID. SourceID entspricht nicht den Kriterien (nur Zeichen a-z, A-Z, - und _, sowie 1-20 Zeichen lang)"); return false; } diff --git a/id/server/proxy/.classpath b/id/server/proxy/.classpath index af4743f8a..df4174ed6 100644 --- a/id/server/proxy/.classpath +++ b/id/server/proxy/.classpath @@ -1,6 +1,5 @@ - @@ -8,5 +7,6 @@ + diff --git a/id/templates/.classpath b/id/templates/.classpath index af4743f8a..df4174ed6 100644 --- a/id/templates/.classpath +++ b/id/templates/.classpath @@ -1,6 +1,5 @@ - @@ -8,5 +7,6 @@ + -- cgit v1.2.3