diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2015-08-17 18:22:05 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2015-08-17 18:22:05 +0200 |
commit | 730b8bc2de32be13016066a86498ae0181b0ee1e (patch) | |
tree | 4d200ce16626cf4bdf15d20ea8af7ddfb3b4434a /id/moa-id-webgui | |
parent | 456513332389b2dbb7a6d1461f77dda9b7393050 (diff) | |
download | moa-id-spss-MOA-ID-3.0.0.tar.gz moa-id-spss-MOA-ID-3.0.0.tar.bz2 moa-id-spss-MOA-ID-3.0.0.zip |
final changes for Release MOA-ID 3.0.0MOA-ID-3.0.0
Diffstat (limited to 'id/moa-id-webgui')
-rw-r--r-- | id/moa-id-webgui/pom.xml | 2 | ||||
-rw-r--r-- | id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java | 34 |
2 files changed, 19 insertions, 17 deletions
diff --git a/id/moa-id-webgui/pom.xml b/id/moa-id-webgui/pom.xml index d71de8fc1..8d35abd20 100644 --- a/id/moa-id-webgui/pom.xml +++ b/id/moa-id-webgui/pom.xml @@ -9,7 +9,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>MOA.id</groupId> <artifactId>moa-id-webgui</artifactId> - <version>1.0-SNAPSHOT</version> + <version>1.0</version> <name>MOA-ID WebGUI Module</name> <properties> 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 787cd136d..c55c35da0 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 @@ -104,26 +104,28 @@ public class ServicesProtocolPVP2XTask extends AbstractTaskValidator implements Map<String, String> newConfigValues = new HashMap<String, String>(); String certBase64 = input.get(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE); - String[] splittet = certBase64.split(","); - if (splittet.length > 1) { - newConfigValues.put(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE, - splittet[1]); - log.debug("Extract PVP2X metadata validation certificate from GUI upload and add it to key: {}", MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE); + if (MiscUtil.isNotEmpty(certBase64)) { + String[] splittet = certBase64.split(","); + if (splittet.length > 1) { + newConfigValues.put(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE, + splittet[1]); + log.debug("Extract PVP2X metadata validation certificate from GUI upload and add it to key: {}", MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE); - try { - byte[] certSerialized = null; - if (MiscUtil.isNotEmpty(splittet[1])) { - certSerialized = Base64Utils.decode(splittet[1], true); - X509Certificate cert = new X509Certificate(certSerialized); - newConfigValues.put( - MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE_SUBJECT, - cert.getSubjectDN().getName()); + try { + byte[] certSerialized = null; + if (MiscUtil.isNotEmpty(splittet[1])) { + certSerialized = Base64Utils.decode(splittet[1], true); + X509Certificate cert = new X509Certificate(certSerialized); + newConfigValues.put( + MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE_SUBJECT, + cert.getSubjectDN().getName()); - } + } - } catch (IOException | CertificateException e) { - log.error("PVP2X metadata signing certificate is not parseable.", e); + } catch (IOException | CertificateException e) { + log.error("PVP2X metadata signing certificate is not parseable.", e); + } } } |