From 76dd4489a0b0b93ff08c7c684ca229df6f29c0cb Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 14 Mar 2014 13:39:50 +0100 Subject: Revert "change PKIX chaining mode constant" This reverts commit 6c9e452d5ab984c1ef221c4a2e746454aa41e014. --- .../moa/id/config/legacy/BuildFromLegacyConfig.java | 13 +++++++++++-- .../moa/id/config/legacy/ConfigurationBuilder.java | 5 +---- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'id/server/idserverlib/src') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java index 9d105f151..7039bdb7f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java @@ -446,8 +446,17 @@ public class BuildFromLegacyConfig { //set chaining modes ChainingModes moa_chainingModes = new ChainingModes(); moaIDConfig.setChainingModes(moa_chainingModes); - - ChainingModeType type = ChainingModeType.fromValue(builder.getDefaultChainingMode()); + + + + String defaultmode = builder.getDefaultChainingMode(); + ChainingModeType type; + if (defaultmode.equals(iaik.pki.pathvalidation.ChainingModes.CHAIN_MODE)) + type = ChainingModeType.CHAINING; + else + type = ChainingModeType.PKIX; + + moa_chainingModes.setSystemDefaultMode(type); Map chainingModes = builder.buildChainingModes(); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java index 682b00702..6ad45d8c9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java @@ -113,7 +113,7 @@ public class ConfigurationBuilder { // chaining mode constants appearing in the configuration file // /** an XPATH-Expression */ - public static final String CM_CHAINING = "chaining"; + protected static final String CM_CHAINING = "chaining"; /** an XPATH-Expression */ protected static final String CM_PKIX = "pkix"; /** an XPATH-Expression */ @@ -939,13 +939,10 @@ public List getTrustedTemplateURLs() { protected String translateChainingMode(String chainingMode) { if (chainingMode.equals(CM_CHAINING)) { return ChainingModes.CHAIN_MODE; - } else if (chainingMode.equals(CM_PKIX)) { return ChainingModes.PKIX_MODE; - } else { return ChainingModes.CHAIN_MODE; - } } -- cgit v1.2.3