From 09026f56b066b6c6e82b91c541ef205460e67ce5 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 4 Jan 2022 17:53:37 +0100 Subject: [PATCH] Document workaround for https://github.com/bcgit/bc-java/pull/1085 --- .../signature/subpackets/SignatureSubpacketsUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java index 986fcb7c..396311c6 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java @@ -584,7 +584,9 @@ public final class SignatureSubpacketsUtil { if (type == SignatureSubpacket.revocationKey) { // RevocationKey subpackets are not castable for some reason - // We need to manually construct the new object + // See https://github.com/bcgit/bc-java/pull/1085 for an upstreamed fix + // We need to manually construct the new object for now. + // TODO: Remove workaround when BC 1.71 is released (and has our fix) return (P) new RevocationKey(last.isCritical(), last.isLongLength(), last.getData()); }