aboutsummaryrefslogtreecommitdiff
path: root/id/moa-id-webgui/src/main/java/at/gv/egovernment
diff options
context:
space:
mode:
Diffstat (limited to 'id/moa-id-webgui/src/main/java/at/gv/egovernment')
-rw-r--r--id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java37
-rw-r--r--id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java4
2 files changed, 25 insertions, 16 deletions
diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java
index 0ec230324..80ee9d8c1 100644
--- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java
+++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java
@@ -219,19 +219,7 @@ public class MOAIDConfigurationModul implements ConfigurationModul{
}
//delete all unused keys
- logger.debug("Delete {} keys pairs from configuration", deleted.size());
- Iterator<String> deleteInterator = deleted.iterator();
- while (deleteInterator.hasNext()) {
- String el = deleteInterator.next();
- try {
- config.deleteIds(el);
- logger.trace("Delete key {}", el);
-
- } catch (ConfigurationException e) {
- logger.error("Delete key: " + el + " FAILED.", e);
-
- }
- }
+ deleteEntries(deleted);
} catch (Exception e) {
logger.warn("Configuration post-processing FAILED.", e);
@@ -239,13 +227,34 @@ public class MOAIDConfigurationModul implements ConfigurationModul{
}
+
+ } else if (deleted != null && deleted.size() > 0) {
+ deleteEntries(deleted);
+
} else {
- logger.info("Configuration saving process finished: No key/value pairs found.");
+ logger.info("Configuration saving process finished without operations: No key/value pairs found.");
}
}
+ private void deleteEntries(List<String> deleted) {
+ logger.debug("Delete {} keys pairs from configuration", deleted.size());
+ Iterator<String> deleteInterator = deleted.iterator();
+ while (deleteInterator.hasNext()) {
+ String el = deleteInterator.next();
+ try {
+ config.deleteIds(el);
+ logger.trace("Delete key {}", el);
+
+ } catch (ConfigurationException e) {
+ logger.error("Delete key: " + el + " FAILED.", e);
+
+ }
+ }
+
+ }
+
private void loadType(String name, String resource) {
InputStream is = null;
try {
diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java
index 6da1bc389..787cd136d 100644
--- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java
+++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java
@@ -112,8 +112,8 @@ public class ServicesProtocolPVP2XTask extends AbstractTaskValidator implements
try {
byte[] certSerialized = null;
- if (MiscUtil.isNotEmpty(certBase64)) {
- certSerialized = Base64Utils.decode(certBase64, true);
+ if (MiscUtil.isNotEmpty(splittet[1])) {
+ certSerialized = Base64Utils.decode(splittet[1], true);
X509Certificate cert = new X509Certificate(certSerialized);
newConfigValues.put(
MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE_SUBJECT,