1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-10 18:59:39 +02:00

Replace JcaPGPObjectFactory with custom PGPObjectFactory.

Workaround for https://github.com/bcgit/bc-java/issues/1428
This commit is contained in:
Paul Schaub 2023-06-15 15:20:08 +02:00
parent 56cb9ba3c6
commit 82cea93e7b
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 11 additions and 9 deletions

View file

@ -4,13 +4,14 @@
package org.pgpainless.key;
import java.io.IOException;
import org.bouncycastle.openpgp.PGPPublicKeyRing;
import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.pgpainless.PGPainless;
import java.io.IOException;
import org.pgpainless.util.TestAllImplementations;
public class V6OpenPgpKeyTest {
@ -43,12 +44,14 @@ public class V6OpenPgpKeyTest {
"I8kWVkXU6vFOi+HWvv/ira7ofJu16NnoUkhclkUrk0mXubZvyl4GBg==\n" +
"-----END PGP PUBLIC KEY BLOCK-----";
@Test
@TestTemplate
@ExtendWith(TestAllImplementations.class)
public void testParseCert() throws IOException {
PGPPublicKeyRing cert = PGPainless.readKeyRing().publicKeyRing(CERT);
}
@Test
@TestTemplate
@ExtendWith(TestAllImplementations.class)
public void testParseKey() throws IOException {
PGPSecretKeyRing key = PGPainless.readKeyRing().secretKeyRing(KEY);
}