aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/gv/egiz/moazs/config/MoaSigConfig.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/config/MoaSigConfig.java b/src/main/java/at/gv/egiz/moazs/config/MoaSigConfig.java
index c611f9e..84e5299 100644
--- a/src/main/java/at/gv/egiz/moazs/config/MoaSigConfig.java
+++ b/src/main/java/at/gv/egiz/moazs/config/MoaSigConfig.java
@@ -22,6 +22,7 @@ public class MoaSigConfig {
private static final String MOA_SPSS_CONFIG_FILE_PROPERTY = "moa.spss.server.configuration";
private static final String JAVAX_SSL_TRUSTSTORE_TYPE_PROPERTY = "javax.net.ssl.trustStoreType";
private static final String JAVAX_SSL_KEYSTORE_TYPE_PROPERTY = "javax.net.ssl.keyStoreType";
+ private static final String SET_PROPERTY_MSG_TEMPLATE = "Set system property '{}' to {}" ;
private final String trustStoreType;
private final String keyStoreType;
@@ -48,7 +49,7 @@ public class MoaSigConfig {
var realFile = new File(realPath);
if(realFile.exists() && realFile.canRead()) {
- log.info("Set system property '{}' to {}", MOA_SPSS_CONFIG_FILE_PROPERTY, realPath);
+ log.info(SET_PROPERTY_MSG_TEMPLATE, MOA_SPSS_CONFIG_FILE_PROPERTY, realPath);
System.getProperties().setProperty(MOA_SPSS_CONFIG_FILE_PROPERTY, realPath);
} else {
throw new FileNotFoundException("File '" + realPath + "' does not exist or is not readable.");
@@ -68,12 +69,12 @@ public class MoaSigConfig {
private void fallBackToSpringEnvForJavaxNetSSLStoreTypeProperty() {
if (System.getProperty(JAVAX_SSL_TRUSTSTORE_TYPE_PROPERTY) == null) {
- log.info("Set system property '{}' to {}", JAVAX_SSL_TRUSTSTORE_TYPE_PROPERTY, trustStoreType);
+ log.info(SET_PROPERTY_MSG_TEMPLATE, JAVAX_SSL_TRUSTSTORE_TYPE_PROPERTY, trustStoreType);
System.getProperties().setProperty(JAVAX_SSL_TRUSTSTORE_TYPE_PROPERTY, trustStoreType);
}
if (System.getProperty(JAVAX_SSL_KEYSTORE_TYPE_PROPERTY) == null) {
- log.info("Set system property '{}' to {}", JAVAX_SSL_KEYSTORE_TYPE_PROPERTY, keyStoreType);
+ log.info(SET_PROPERTY_MSG_TEMPLATE, JAVAX_SSL_KEYSTORE_TYPE_PROPERTY, keyStoreType);
System.getProperties().setProperty(JAVAX_SSL_KEYSTORE_TYPE_PROPERTY, keyStoreType);
}
}
@@ -95,7 +96,7 @@ public class MoaSigConfig {
return new MoaSPSSSignatureVerifier(moaSigVerifyService(), defaultTrustProfile);
} else {
log.warn("Moa SPSS is not active. Signatures in SOAP Messages will not be verified.");
- return (signedXMLdocument) -> true;
+ return signedXMLdocument -> true;
}
}
}