mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-05 03:41:07 +01:00
parent
ce6866fd6d
commit
bc5c3f98a9
1 changed files with 3 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue