summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core_utils/src/main')
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/KeyStoreConfiguration.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/KeyStoreConfiguration.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/KeyStoreConfiguration.java
index 6dbbba3e..970efd22 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/KeyStoreConfiguration.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/KeyStoreConfiguration.java
@@ -4,9 +4,10 @@ import java.util.Map;
import javax.annotation.Nonnull;
+import at.gv.egiz.eaaf.core.exceptions.EaafConfigurationException;
+
import org.apache.commons.lang3.StringUtils;
-import at.gv.egiz.eaaf.core.exceptions.EaafConfigurationException;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
@@ -139,7 +140,7 @@ public class KeyStoreConfiguration {
/**
* Validate the internal state of this configuration object.
- *
+ *
* @throws EaafConfigurationException In case of a configuration error
*/
public void validate() throws EaafConfigurationException {
@@ -147,7 +148,7 @@ public class KeyStoreConfiguration {
log.trace("Validate HSM-Facade KeyStore ... ");
checkConfigurationValue(keyStoreName, EaafKeyStoreFactory.ERRORCODE_07,
friendlyName, "Missing 'KeyName' for HSM-Facade");
-
+
} else if (KeyStoreType.PKCS12.equals(keyStoreType)
|| KeyStoreType.JKS.equals(keyStoreType)) {
log.trace("Validate software KeyStore ... ");
@@ -155,13 +156,13 @@ public class KeyStoreConfiguration {
friendlyName, "Missing 'KeyPath' for software keystore");
checkConfigurationValue(softKeyStorePassword, EaafKeyStoreFactory.ERRORCODE_07,
friendlyName, "Missing 'KeyPassword' for software keystore");
-
+
} else {
log.info("Validation of type: {} not supported yet", keyStoreType);
-
+
}
}
-
+
public enum KeyStoreType {
PKCS12("pkcs12"), JKS("jks"), HSMFACADE("hsmfacade"), PKCS11("pkcs11");
@@ -209,16 +210,16 @@ public class KeyStoreConfiguration {
final String configValue = config.get(configParamKey);
checkConfigurationValue(configValue, EaafKeyStoreFactory.ERRORCODE_04, configParamKey);
return configValue;
-
+
}
- private static void checkConfigurationValue(String configValue, String errorCode, String... params)
+ private static void checkConfigurationValue(String configValue, String errorCode, String... params)
throws EaafConfigurationException {
if (StringUtils.isEmpty(configValue)) {
- throw new EaafConfigurationException(errorCode,
- new Object[] { params});
-
+ throw new EaafConfigurationException(errorCode,
+ params);
+
}
-
+
}
}