aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java')
-rw-r--r--src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java b/src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java
deleted file mode 100644
index 34f4e1b..0000000
--- a/src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package at.gv.egiz.moazs;
-
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.ISignatureVerificationService;
-import at.gv.egiz.moazs.backend.SignatureVerifier;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.TestConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.test.context.junit4.SpringRunner;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-
-//Note: Certificate that signed these delivery responses expires in 2023-09-27.
-@RunWith(SpringRunner.class)
-@SpringBootTest
- public class ITMoaSPSSSignatureVerifierTest {
-
- private final String resourcesPath = "src/test/resources/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest/";
-
- @TestConfiguration
- public class Config{
-
- @Bean
- public SignatureVerifier verifier(@Autowired ISignatureVerificationService service){
- return new SignatureVerifier(service, "test-trust-profile", true);
- }
-
- }
-
- @Autowired
- private SignatureVerifier verifier;
-
- @Test
- public void acceptValidSignedDeliveryResponse() throws IOException {
-
- var path = resourcesPath + "valid-signed-delivery-response.xml";
- var signature = Files.readAllBytes(new File(path).toPath());
-
- verifier.accept(signature);
- }
-
- @Test(expected = MoaZSException.class)
- public void rejectInvalidSignedDeliveryResponse() throws IOException {
-
- var path = resourcesPath + "invalid-signed-delivery-response.xml";
- var signature = Files.readAllBytes(new File(path).toPath());
-
- verifier.accept(signature);
- }
-
-}