From f7576abd3557ae0c97f7617a1c26be6445159e5c Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 20 Jun 2023 17:37:18 +0200 Subject: [PATCH] Minimal revocation certificate test: Test merging --- .../key/modification/RevocationCertificateTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevocationCertificateTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevocationCertificateTest.java index 5cb6163d..48b5d5b7 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevocationCertificateTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevocationCertificateTest.java @@ -67,6 +67,11 @@ public class RevocationCertificateTest { assertFalse(key.getUserIDs().hasNext()); assertFalse(key.getUserAttributes().hasNext()); assertNull(key.getTrustData()); + + PGPPublicKeyRing originalCert = PGPainless.extractCertificate(secretKeys); + PGPPublicKeyRing mergedCert = PGPainless.mergeCertificate(originalCert, minimalRevocationCert); + + assertTrue(PGPainless.inspectKeyRing(mergedCert).getRevocationState().isSoftRevocation()); } @Test @@ -85,6 +90,11 @@ public class RevocationCertificateTest { assertFalse(key.getUserIDs().hasNext()); assertFalse(key.getUserAttributes().hasNext()); assertNull(key.getTrustData()); + + PGPPublicKeyRing originalCert = PGPainless.extractCertificate(secretKeys); + PGPPublicKeyRing mergedCert = PGPainless.mergeCertificate(originalCert, minimalRevocationCert); + + assertTrue(PGPainless.inspectKeyRing(mergedCert).getRevocationState().isSoftRevocation()); } @Test