mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-16 01:12:05 +01:00
RevocationSignatureBuilder: Allow for generation of external revocation signatures
This commit is contained in:
parent
04724808b5
commit
1e56d11b0b
1 changed files with 2 additions and 2 deletions
|
@ -52,8 +52,8 @@ public class RevocationSignatureBuilder extends AbstractSignatureBuilder<Revocat
|
||||||
public PGPSignature build(PGPPublicKey revokeeSubkey) throws PGPException {
|
public PGPSignature build(PGPPublicKey revokeeSubkey) throws PGPException {
|
||||||
PGPSignatureGenerator signatureGenerator = buildAndInitSignatureGenerator();
|
PGPSignatureGenerator signatureGenerator = buildAndInitSignatureGenerator();
|
||||||
if (signatureType == SignatureType.KEY_REVOCATION) {
|
if (signatureType == SignatureType.KEY_REVOCATION) {
|
||||||
if (revokeeSubkey.getKeyID() != publicSigningKey.getKeyID()) {
|
if (!revokeeSubkey.isMasterKey()) {
|
||||||
throw new IllegalArgumentException("Signature type is KEY_REVOCATION, but provided revokeeSubkey is != signingPublicKey.");
|
throw new IllegalArgumentException("Signature type is KEY_REVOCATION, but provided revokeeSubkey does not appear to be a primary key.");
|
||||||
}
|
}
|
||||||
return signatureGenerator.generateCertification(publicSigningKey);
|
return signatureGenerator.generateCertification(publicSigningKey);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue