aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/config
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-29 09:49:02 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-29 13:30:03 +0200
commite165ef27812874bee7062a4e7ecc8bec99ced328 (patch)
tree6fb60c546adda519281be0f3682f5659afd036ec /src/main/java/at/gv/egiz/moazs/config
parentcef481f2ad56764f71e8b0f1d4340b8af0686a96 (diff)
downloadmoa-zs-e165ef27812874bee7062a4e7ecc8bec99ced328.tar.gz
moa-zs-e165ef27812874bee7062a4e7ecc8bec99ced328.tar.bz2
moa-zs-e165ef27812874bee7062a4e7ecc8bec99ced328.zip
Integrate MoaSig Verification into SignatureVerifier
- Verify signature via ISignatureVerificationService. - Override System Property moa.spss.server.configuration via spring's environment (Reason: can configure path to moa SPSS config file via application.yaml & moa SPSS needs this parameter to find the config file) - Setup test configuration directory for moaspss in src/main/resources/moa-spss - Readme: Explain how to install moaspss' dependencies into local repository.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/config')
-rw-r--r--src/main/java/at/gv/egiz/moazs/config/MoaSigConfig.java29
1 files changed, 29 insertions, 0 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
new file mode 100644
index 0000000..e96d851
--- /dev/null
+++ b/src/main/java/at/gv/egiz/moazs/config/MoaSigConfig.java
@@ -0,0 +1,29 @@
+package at.gv.egiz.moazs.config;
+
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.ISignatureVerificationService;
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.SignatureVerificationService;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class MoaSigConfig {
+
+ private final String defaultTrustProfile;
+
+ public MoaSigConfig(@Value("${moa.spss.server.default-trustprofile}") String defaultTrustProfile,
+ @Value("${moa.spss.server.configuration}") String serverConfigUrl) {
+ this.defaultTrustProfile = defaultTrustProfile;
+ System.getProperties().setProperty("moa.spss.server.configuration", serverConfigUrl);
+ }
+
+ @Bean
+ public String moaSPSSServerDefaultTrustProfile() {
+ return defaultTrustProfile;
+ }
+
+ @Bean
+ public ISignatureVerificationService moaSigVerifyService() {
+ return new SignatureVerificationService();
+ }
+}