diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-12 08:31:42 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-12 08:40:38 +0200 |
commit | 9dc0e72571a895e34a55c11d015c5d359b485aff (patch) | |
tree | db7a3fc270b55722b218b0c890eed38ac93a7f3b /src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java | |
parent | 8aba1b4f18f5fbfebdf239b4b4945b628e439905 (diff) | |
download | moa-zs-9dc0e72571a895e34a55c11d015c5d359b485aff.tar.gz moa-zs-9dc0e72571a895e34a55c11d015c5d359b485aff.tar.bz2 moa-zs-9dc0e72571a895e34a55c11d015c5d359b485aff.zip |
Renamed and Simplified SignatureVerifier
Diffstat (limited to 'src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java')
-rw-r--r-- | src/test/java/at/gv/egiz/moazs/ITMoaSPSSSignatureVerifierTest.java | 55 |
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); - } - -} |