Merge branch 'master' of github.com:open-keychain/open-keychain

This commit is contained in:
Dominik Schürmann 2014-08-19 14:46:15 +02:00
commit 26e82afa8e

View File

@ -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;