fix primary user id in master key flag modification
This commit is contained in:
1 parent
4a280f6ba3
commit
6a3150d878
1 file changed
+3
-1
@@ -881,10 +881,12 @@ public class PgpKeyOperation {
|
||||
}
|
||||
|
||||
// add shiny new user id certificate
|
||||
boolean isPrimary = currentCert.getHashedSubPackets() != null &&
|
||||
currentCert.getHashedSubPackets().isPrimaryUserID();
|
||||
modifiedPublicKey = PGPPublicKey.removeCertification(
|
||||
modifiedPublicKey, userId, currentCert);
|
||||
PGPSignature newCert = generateUserIdSignature(
|
||||
masterPrivateKey, masterPublicKey, userId, true, flags, expiry);
|
||||
masterPrivateKey, masterPublicKey, userId, isPrimary, flags, expiry);
|
||||
modifiedPublicKey = PGPPublicKey.addCertification(
|
||||
modifiedPublicKey, userId, newCert);
|
||||
ok = true;
|
||||
|
||||
Reference in new issue
Block a user