aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java22
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java2
2 files changed, 21 insertions, 3 deletions
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 5968736f8..ce158d7fe 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
@@ -5,6 +5,8 @@ package at.gv.egovernment.moa.id.auth;
import java.io.IOException;
import java.security.GeneralSecurityException;
+import java.security.Provider;
+import java.security.Security;
import javax.activation.CommandMap;
import javax.activation.MailcapCommandMap;
@@ -204,12 +206,11 @@ public class MOAIDAuthInitializer implements WebApplicationInitializer {
Logger.warn(MOAIDMessageProvider.getInstance().getMessage(
"init.01", null), e);
}
-
- Logger.info("Loading security providers.");
+
+ Logger.info("Loading Java security providers.");
IAIK.addAsProvider();
ECCProvider.addAsProvider();
-
// Initializes SSLSocketFactory store
SSLUtils.initialize();
@@ -242,6 +243,21 @@ public class MOAIDAuthInitializer implements WebApplicationInitializer {
}
+
+ //IAIK.addAsProvider();
+ //ECCProvider.addAsProvider();
+
+ Security.insertProviderAt(IAIK.getInstance(), 0);
+ Security.addProvider(new ECCProvider());
+
+ if (Logger.isDebugEnabled()) {
+ Logger.debug("Loaded Security Provider:");
+ Provider[] providerList = Security.getProviders();
+ for (int i=0; i<providerList.length; i++)
+ Logger.debug(i + ": " + providerList[i].getName() + " Version " + providerList[i].getVersion());
+
+ }
+
// Starts the session cleaner thread to remove unpicked authentication data
AuthenticationSessionCleaner sessioncleaner = rootContext.getBean("AuthenticationSessionCleaner", AuthenticationSessionCleaner.class);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java
index bb89f2e03..0b2fe879a 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java
@@ -119,6 +119,8 @@ public abstract class AbstractAuthProtocolModulController extends AbstractContro
//if Single Sign-On functionality is enabled for this request
if (pendingReq.needSingleSignOnFunctionality()) {
+ Logger.debug("Add SSO information to MOASession.");
+
//Store SSO information into database
newSSOSessionId = ssomanager.createSSOSessionInformations(moaSession.getSessionID(),
pendingReq.getOAURL());