make masterKeyId and subKeyId strictly required in CryptoInputParcel

This commit is contained in:
Vincent Breitmoser
2015-05-28 19:16:36 +02:00
parent 1deb5dbfda
commit 18844a20bb
3 changed files with 17 additions and 25 deletions

View File

@@ -602,7 +602,8 @@ public class PgpDecryptVerify extends BaseOperation {
} catch (NfcSyncPublicKeyDataDecryptorFactoryBuilder.NfcInteractionNeeded e) {
log.add(LogType.MSG_DC_PENDING_NFC, indent + 1);
return new DecryptVerifyResult(log, RequiredInputParcel.createNfcDecryptOperation(
e.encryptedSessionKey, secretEncryptionKey.getKeyId()
secretEncryptionKey.getRing().getMasterKeyId(),
secretEncryptionKey.getKeyId(), e.encryptedSessionKey
));
}
encryptedData = encryptedDataAsymmetric;

View File

@@ -497,6 +497,7 @@ public class PgpSignEncryptOperation extends BaseOperation {
// this secret key diverts to a OpenPGP card, throw exception with hash that will be signed
log.add(LogType.MSG_PSE_PENDING_NFC, indent);
return new PgpSignEncryptResult(log, RequiredInputParcel.createNfcSignOperation(
signingKey.getRing().getMasterKeyId(), signingKey.getKeyId(),
e.hashToSign, e.hashAlgo, cryptoInput.getSignatureTime()));
}
}