summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_auth_sl20/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_modules/eaaf_module_auth_sl20/src/test')
-rw-r--r--eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/AbstractJsonSecurityUtilsTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/AbstractJsonSecurityUtilsTest.java b/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/AbstractJsonSecurityUtilsTest.java
index cfa8868e..89e4b326 100644
--- a/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/AbstractJsonSecurityUtilsTest.java
+++ b/eaaf_modules/eaaf_module_auth_sl20/src/test/java/at/gv/egiz/eaaf/modules/auth/sl20/utils/AbstractJsonSecurityUtilsTest.java
@@ -316,6 +316,33 @@ public abstract class AbstractJsonSecurityUtilsTest {
}
@Test
+ public void validSigningRsaPss() throws CertificateEncodingException, KeyStoreException,
+ JoseException, IOException, EaafException {
+
+ //
+ config.putConfigValue("modules.sl20.security.sigalg.rsa", "PS256");
+
+ setRsaSigningKey();
+ setRsaEncryptionKey();
+
+ final String payLoad = "{\"aac\":\"" + RandomStringUtils.randomAlphanumeric(100) + "\"}";
+
+ final String jws = joseTools.createSignature(payLoad);
+ Assert.assertNotNull("Signed msg", jws);
+
+ final VerificationResult verify = joseTools.validateSignature(
+ jws,
+ keyStoreFactory.buildNewKeyStore(getSigTrustStoreConfigValid()).getFirst(),
+ getDefaultAlgorithmConstrains());
+ Assert.assertTrue("wrong verify state", verify.isValidSigned());
+ Assert.assertNotNull("JWS Header", verify.getJoseHeader());
+ Assert.assertNotNull("JWS Payload", verify.getPayload());
+ Assert.assertNotNull("CertChain", verify.getCertChain());
+
+
+ }
+
+ @Test
public void validSigningEc() throws CertificateEncodingException, KeyStoreException,
JoseException, IOException, EaafException {
setEcSigningKey();