1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-05 03:41:07 +01:00

Disable test if test vector key is expired

Works around #484
This commit is contained in:
Paul Schaub 2025-10-22 11:04:59 +02:00
parent ce6866fd6d
commit bc5c3f98a9
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -6,11 +6,13 @@ package org.pgpainless.policy;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Date;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.api.OpenPGPCertificate;
@ -157,6 +159,7 @@ public class WeakRSAKeyTest {
public void cannotSignWithWeakKey() throws IOException {
PGPainless api = PGPainless.getInstance();
OpenPGPKey secretKeys = api.readKey().parseKey(WEAK_RSA_KEY);
assumeTrue(secretKeys.getExpirationTime().after(new Date()));
SecretKeyRingProtector protector = SecretKeyRingProtector.unprotectedKeys();
SigningOptions signingOptions = SigningOptions.get();