From 0b46b0b5cbdbdcf11859365891cff57e227eff1c Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 20 Mar 2015 13:55:15 +0100 Subject: added KeyIdentifier selection for MOA via PDF-AS-WEB --- .../gv/egiz/pdfas/web/config/WebConfiguration.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/config') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/config/WebConfiguration.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/config/WebConfiguration.java index 8404fa65..0e6f2c67 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/config/WebConfiguration.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/config/WebConfiguration.java @@ -55,6 +55,11 @@ public class WebConfiguration implements IConfigurationConstants { public static final String RELOAD_PASSWORD = "reload.pwd"; public static final String RELOAD_ENABLED = "reload.enabled"; + public static final String MOA_LIST = "moal"; + public static final String MOA_URL = "url"; + public static final String MOA_KEYID = "KeyIdentifier"; + public static final String MOA_CERT = "Certificate"; + public static final String KEYSTORE_LIST = "ksl"; public static final String KEYSTORE_DEFAULT = "ks"; @@ -233,6 +238,28 @@ public class WebConfiguration implements IConfigurationConstants { return properties.getProperty(KEYSTORE_DEFAULT_KEY_PASS); } + public static boolean isMoaEnabled(String keyIdentifier) { + String value = properties.getProperty(MOA_LIST + "." + keyIdentifier + ".enabled"); + if (value != null) { + if (value.equals("true")) { + return true; + } + } + return false; + } + + public static String getMoaURL(String keyIdentifier) { + return properties.getProperty(MOA_LIST + "." + keyIdentifier + "." + MOA_URL); + } + + public static String getMoaKeyID(String keyIdentifier) { + return properties.getProperty(MOA_LIST + "." + keyIdentifier + "." + MOA_KEYID); + } + + public static String getMoaCertificate(String keyIdentifier) { + return properties.getProperty(MOA_LIST + "." + keyIdentifier + "." + MOA_CERT); + } + public static String getKeystoreFile(String keyIdentifier) { return properties.getProperty(KEYSTORE_LIST + "." + keyIdentifier + "." + KEYSTORE_FILE); } -- cgit v1.2.3