From 374e6452f0d49384f3540255024e68fe31a6ecdb Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Sat, 7 May 2022 14:12:18 +0200 Subject: [PATCH] Add RevokedKeyException --- .../main/java/org/pgpainless/exception/KeyException.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/exception/KeyException.java b/pgpainless-core/src/main/java/org/pgpainless/exception/KeyException.java index 7ffc66ee..66c5d2cf 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/exception/KeyException.java +++ b/pgpainless-core/src/main/java/org/pgpainless/exception/KeyException.java @@ -38,6 +38,13 @@ public abstract class KeyException extends RuntimeException { } } + public static class RevokedKeyException extends KeyException { + + public RevokedKeyException(@Nonnull OpenPgpFingerprint fingerprint) { + super("Key " + fingerprint + " appears to be revoked.", fingerprint); + } + } + public static class UnacceptableEncryptionKeyException extends KeyException { public UnacceptableEncryptionKeyException(@Nonnull OpenPgpFingerprint fingerprint) {