mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 00:18:51 -05:00
fix primary user id in master key flag modification
This commit is contained in:
parent
4a280f6ba3
commit
6a3150d878
@ -881,10 +881,12 @@ public class PgpKeyOperation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add shiny new user id certificate
|
// add shiny new user id certificate
|
||||||
|
boolean isPrimary = currentCert.getHashedSubPackets() != null &&
|
||||||
|
currentCert.getHashedSubPackets().isPrimaryUserID();
|
||||||
modifiedPublicKey = PGPPublicKey.removeCertification(
|
modifiedPublicKey = PGPPublicKey.removeCertification(
|
||||||
modifiedPublicKey, userId, currentCert);
|
modifiedPublicKey, userId, currentCert);
|
||||||
PGPSignature newCert = generateUserIdSignature(
|
PGPSignature newCert = generateUserIdSignature(
|
||||||
masterPrivateKey, masterPublicKey, userId, true, flags, expiry);
|
masterPrivateKey, masterPublicKey, userId, isPrimary, flags, expiry);
|
||||||
modifiedPublicKey = PGPPublicKey.addCertification(
|
modifiedPublicKey = PGPPublicKey.addCertification(
|
||||||
modifiedPublicKey, userId, newCert);
|
modifiedPublicKey, userId, newCert);
|
||||||
ok = true;
|
ok = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user