added revocation tag NO_REASON to all revocations via PgpKeyOperation
This commit is contained in:
@@ -22,6 +22,7 @@ import org.spongycastle.bcpg.PublicKeyAlgorithmTags;
|
|||||||
import org.spongycastle.bcpg.S2K;
|
import org.spongycastle.bcpg.S2K;
|
||||||
import org.spongycastle.bcpg.sig.Features;
|
import org.spongycastle.bcpg.sig.Features;
|
||||||
import org.spongycastle.bcpg.sig.KeyFlags;
|
import org.spongycastle.bcpg.sig.KeyFlags;
|
||||||
|
import org.spongycastle.bcpg.sig.RevocationReasonTags;
|
||||||
import org.spongycastle.jce.spec.ElGamalParameterSpec;
|
import org.spongycastle.jce.spec.ElGamalParameterSpec;
|
||||||
import org.spongycastle.openpgp.PGPException;
|
import org.spongycastle.openpgp.PGPException;
|
||||||
import org.spongycastle.openpgp.PGPKeyFlags;
|
import org.spongycastle.openpgp.PGPKeyFlags;
|
||||||
@@ -1525,6 +1526,9 @@ public class PgpKeyOperation {
|
|||||||
|
|
||||||
throws IOException, PGPException, SignatureException {
|
throws IOException, PGPException, SignatureException {
|
||||||
PGPSignatureSubpacketGenerator subHashedPacketsGen = new PGPSignatureSubpacketGenerator();
|
PGPSignatureSubpacketGenerator subHashedPacketsGen = new PGPSignatureSubpacketGenerator();
|
||||||
|
// we use the tag NO_REASON since gnupg does not care about the tag while verifying
|
||||||
|
// signatures with a revoked key, the warning is the same
|
||||||
|
subHashedPacketsGen.setRevocationReason(true, RevocationReasonTags.NO_REASON, "");
|
||||||
subHashedPacketsGen.setSignatureCreationTime(true, creationTime);
|
subHashedPacketsGen.setSignatureCreationTime(true, creationTime);
|
||||||
sGen.setHashedSubpackets(subHashedPacketsGen.generate());
|
sGen.setHashedSubpackets(subHashedPacketsGen.generate());
|
||||||
sGen.init(PGPSignature.CERTIFICATION_REVOCATION, masterPrivateKey);
|
sGen.init(PGPSignature.CERTIFICATION_REVOCATION, masterPrivateKey);
|
||||||
@@ -1537,6 +1541,9 @@ public class PgpKeyOperation {
|
|||||||
throws IOException, PGPException, SignatureException {
|
throws IOException, PGPException, SignatureException {
|
||||||
|
|
||||||
PGPSignatureSubpacketGenerator subHashedPacketsGen = new PGPSignatureSubpacketGenerator();
|
PGPSignatureSubpacketGenerator subHashedPacketsGen = new PGPSignatureSubpacketGenerator();
|
||||||
|
// we use the tag NO_REASON since gnupg does not care about the tag while verifying
|
||||||
|
// signatures with a revoked key, the warning is the same
|
||||||
|
subHashedPacketsGen.setRevocationReason(true, RevocationReasonTags.NO_REASON, "");
|
||||||
subHashedPacketsGen.setSignatureCreationTime(true, creationTime);
|
subHashedPacketsGen.setSignatureCreationTime(true, creationTime);
|
||||||
sGen.setHashedSubpackets(subHashedPacketsGen.generate());
|
sGen.setHashedSubpackets(subHashedPacketsGen.generate());
|
||||||
// Generate key revocation or subkey revocation, depending on master/subkey-ness
|
// Generate key revocation or subkey revocation, depending on master/subkey-ness
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
package org.sufficientlysecure.keychain.ui;
|
package org.sufficientlysecure.keychain.ui;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|||||||
Reference in New Issue
Block a user