allow explicit re-certification in SaveKeyringParcel

This commit is contained in:
Vincent Breitmoser 2015-01-24 23:11:54 +01:00
parent 0e0970c347
commit fb2fa195bf
3 changed files with 10 additions and 2 deletions

View file

@ -659,7 +659,8 @@ public class PgpKeyOperationTest {
{ // re-add second subkey
parcel.reset();
parcel.mChangeSubKeys.add(new SubkeyChange(keyId, null, null));
// re-certify the revoked subkey
parcel.mChangeSubKeys.add(new SubkeyChange(keyId, true));
modified = applyModificationWithChecks(parcel, modified, onlyA, onlyB);

View file

@ -730,7 +730,7 @@ public class PgpKeyOperation {
}
// This doesn't concern us any further
if (change.mExpiry == null && change.mFlags == null) {
if (!change.mRecertify && (change.mExpiry == null && change.mFlags == null)) {
continue;
}

View file

@ -118,11 +118,18 @@ public class SaveKeyringParcel implements Parcelable {
public boolean mDummyStrip;
// if this flag is true, the subkey should be changed to a divert-to-card key
public boolean mDummyDivert;
// if this flag is true, the key will be recertified even if the above values are no-ops
public boolean mRecertify;
public SubkeyChange(long keyId) {
mKeyId = keyId;
}
public SubkeyChange(long keyId, boolean recertify) {
mKeyId = keyId;
mRecertify = recertify;
}
public SubkeyChange(long keyId, Integer flags, Long expiry) {
mKeyId = keyId;
mFlags = flags;