Skip to content

Commit 821b71e

Browse files
committed
Deprecate RevocationKey signature subpacket.
RFC9580 §5.2.3.23 states that applications MUST NOT generate such a packet.
1 parent 74a6244 commit 821b71e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pg/src/main/java/org/bouncycastle/bcpg/sig/RevocationKey.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
/**
77
* Represents revocation key OpenPGP signature sub packet.
8+
* Note: This packet is deprecated. Applications MUST NOT generate such a packet.
9+
*
10+
* @deprecated since RFC9580
811
*/
912
public class RevocationKey extends SignatureSubpacket
1013
{

pg/src/main/java/org/bouncycastle/openpgp/PGPSignatureSubpacketGenerator.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ public void setRevocationReason(boolean isCritical, byte reason, String descript
368368
*
369369
* @param isCritical true if should be treated as critical, false otherwise.
370370
* @param keyAlgorithm algorithm of the revocation key
371-
* @param fingerprint fingerprint of the revocation key
372-
* @deprecated use {@link #addRevocationKey(boolean, int, byte[])} instead.
371+
* @param fingerprint fingerprint of the revocation key (v4 only)
372+
* @deprecated the revocation key mechanism is deprecated. Applications MUST NOT generate such a packet.
373373
*/
374374
public void setRevocationKey(boolean isCritical, int keyAlgorithm, byte[] fingerprint)
375375
{
@@ -381,7 +381,8 @@ public void setRevocationKey(boolean isCritical, int keyAlgorithm, byte[] finger
381381
*
382382
* @param isCritical true if should be treated as critical, false otherwise.
383383
* @param keyAlgorithm algorithm of the revocation key
384-
* @param fingerprint fingerprint of the revocation key
384+
* @param fingerprint fingerprint of the revocation key (v4 only)
385+
* @deprecated the revocation key mechanism is deprecated. Applications MUST NOT generate such a packet.
385386
*/
386387
public void addRevocationKey(boolean isCritical, int keyAlgorithm, byte[] fingerprint)
387388
{

0 commit comments

Comments
 (0)