some small notation data fixes

This commit is contained in:
Vincent Breitmoser 2014-12-30 13:07:56 +01:00
parent 22ea1defa8
commit 2223cdd405
2 changed files with 10 additions and 10 deletions

View File

@ -933,7 +933,8 @@ public class PgpKeyOperation {
PGPSignature emptySig = sGen.generateCertification(masterPublicKey);
masterPublicKey = PGPPublicKey.addCertification(masterPublicKey, emptySig);
PGPSecretKey.replacePublicKey(sKR.getSecretKey(), masterPublicKey);
sKR = PGPSecretKeyRing.insertSecretKey(sKR,
PGPSecretKey.replacePublicKey(sKR.getSecretKey(), masterPublicKey));
return sKR;
}
@ -956,7 +957,8 @@ public class PgpKeyOperation {
PGPSignature emptySig = sGen.generateCertification(masterPublicKey);
masterPublicKey = PGPPublicKey.addCertification(masterPublicKey, emptySig);
PGPSecretKey.replacePublicKey(sKR.getSecretKey(), masterPublicKey);
sKR = PGPSecretKeyRing.insertSecretKey(sKR,
PGPSecretKey.replacePublicKey(sKR.getSecretKey(), masterPublicKey));
return sKR;
}

View File

@ -349,14 +349,6 @@ public class UncachedKeyRing {
continue;
}
if (cert.isLocal()) {
// Remove revocation certs with "local" flag
log.add(LogType.MSG_KC_REVOKE_BAD_LOCAL, indent);
modified = PGPPublicKey.removeCertification(modified, zert);
badCerts += 1;
continue;
}
// special case: direct key signatures!
if (cert.getSignatureType() == PGPSignature.DIRECT_KEY) {
// must be local, otherwise strip!
@ -382,6 +374,12 @@ public class UncachedKeyRing {
redundantCerts += 1;
}
continue;
} else if (cert.isLocal()) {
// Remove revocation certs with "local" flag
log.add(LogType.MSG_KC_REVOKE_BAD_LOCAL, indent);
modified = PGPPublicKey.removeCertification(modified, zert);
badCerts += 1;
continue;
}
// first revocation? fine then.