aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-01-23 14:03:23 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-01-23 14:03:23 +0100
commit587971b14627083236df96b8a79f005f92990d75 (patch)
tree7d2c7aca9c30356fd579190434b1f199ce447abd
parent4216a1b9910506f2699a5a7cfa38be9762d654be (diff)
downloadmoa-id-spss-587971b14627083236df96b8a79f005f92990d75.tar.gz
moa-id-spss-587971b14627083236df96b8a79f005f92990d75.tar.bz2
moa-id-spss-587971b14627083236df96b8a79f005f92990d75.zip
some short changes
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Messages.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java7
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/MandateNaturalPersonSourcePinAttributeBuilder.java10
5 files changed, 16 insertions, 9 deletions
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Messages.java b/common/src/main/java/at/gv/egovernment/moa/util/Messages.java
index 94dc3ab47..20de46b43 100644
--- a/common/src/main/java/at/gv/egovernment/moa/util/Messages.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Messages.java
@@ -47,7 +47,7 @@ public class Messages {
+ "Die Fehlertexte konnten nicht geladen werden.";
/** Error message indicating that the message is not available. */
private static final String ERROR_NO_MESSAGE =
- "Keine Fehlermeldung für Fehler-Nr.={0}";
+ "No errormesseage for error with number.={0}";
/** The names of the resources containing the messages. */
private String[] resourceNames;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
index 556d26c67..c98af695b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
@@ -26,6 +26,8 @@ package at.gv.egovernment.moa.id.auth;
import iaik.pki.PKIException;
import iaik.pki.jsse.IAIKX509TrustManager;
+import iaik.security.ecc.provider.ECCProvider;
+import iaik.security.provider.IAIK;
import java.io.IOException;
import java.security.GeneralSecurityException;
@@ -79,7 +81,7 @@ public class MOAIDAuthInitializer {
// register content data handlers for S/MIME types
MailcapCommandMap mc = new MailcapCommandMap();
CommandMap.setDefaultCommandMap(mc);
-
+
// create some properties and get the default Session
Properties props = new Properties();
props.put("mail.smtp.host", "localhost");
@@ -130,6 +132,9 @@ public class MOAIDAuthInitializer {
"init.01", null), e);
}
+ IAIK.addAsProvider();
+ ECCProvider.addAsProvider();
+
// Initializes SSLSocketFactory store
SSLUtils.initialize();
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java
index 6e5d0c2f0..a9ef8a19b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java
@@ -128,7 +128,7 @@ public final class OAuth20AttributeBuilder {
}
}
catch (AttributeException e) {
- Logger.warn("Cannot add attribute " + b.getName(), e);
+ Logger.info("Cannot add attribute " + b.getName());
}
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java
index b01b2eae7..3dceaecdf 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java
@@ -143,10 +143,10 @@ class OAuth20TokenAction implements IAction {
} else if (s.equalsIgnoreCase("eID")) {
OAuth20AttributeBuilder.addScopeEID(token.getPayloadAsJsonObject(), session, oaParam, authData);
resultScopes.append(" eID");
- } else if (s.equalsIgnoreCase("eID_gov") && oaParam.getBusinessService()) {
+ } else if (s.equalsIgnoreCase("eID_gov")) {
OAuth20AttributeBuilder.addScopeEIDGov(token.getPayloadAsJsonObject(), session, oaParam, authData);
resultScopes.append(" eID_gov");
- } else if (s.equalsIgnoreCase("mandate") && session.getUseMandate() && oaParam.getBusinessService()) {
+ } else if (s.equalsIgnoreCase("mandate")) {
OAuth20AttributeBuilder.addScopeMandate(token.getPayloadAsJsonObject(), session, oaParam, authData);
resultScopes.append(" mandate");
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/MandateNaturalPersonSourcePinAttributeBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/MandateNaturalPersonSourcePinAttributeBuilder.java
index b0c2261ef..7c59faeb2 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/MandateNaturalPersonSourcePinAttributeBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/MandateNaturalPersonSourcePinAttributeBuilder.java
@@ -38,11 +38,13 @@ public class MandateNaturalPersonSourcePinAttributeBuilder implements IPVPAttri
}
IdentificationType id = null;
id = physicalPerson.getIdentification().get(0);
- /*if(authSession.getBusinessService()) {
+
+ if(authSession.getBusinessService()) {
id = MandateBuilder.getWBPKIdentification(physicalPerson);
- } else {
- id = MandateBuilder.getBPKIdentification(physicalPerson);
- }*/
+
+// } else {
+// id = MandateBuilder.getBPKIdentification(physicalPerson);
+ }
if(id == null) {
Logger.error("Failed to generate IdentificationType");
throw new NoMandateDataAttributeException();