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/src/main/java | |
parent | 456513332389b2dbb7a6d1461f77dda9b7393050 (diff) | |
download | moa-id-spss-730b8bc2de32be13016066a86498ae0181b0ee1e.tar.gz moa-id-spss-730b8bc2de32be13016066a86498ae0181b0ee1e.tar.bz2 moa-id-spss-730b8bc2de32be13016066a86498ae0181b0ee1e.zip |
final changes for Release MOA-ID 3.0.0MOA-ID-3.0.0
Diffstat (limited to 'id/moa-id-webgui/src/main/java')
-rw-r--r-- | id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolPVP2XTask.java | 34 |
1 files changed, 18 insertions, 16 deletions
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); + } } } |