allowed operations to modify CryptoInputParcel they receive
This commit is contained in:
@@ -459,7 +459,8 @@ public class PgpDecryptVerify extends BaseOperation<PgpDecryptVerifyInputParcel>
|
||||
log.add(LogType.MSG_DC_PENDING_PASSPHRASE, indent + 1);
|
||||
return new DecryptVerifyResult(log,
|
||||
RequiredInputParcel.createRequiredDecryptPassphrase(
|
||||
secretKeyRing.getMasterKeyId(), secretEncryptionKey.getKeyId()));
|
||||
secretKeyRing.getMasterKeyId(), secretEncryptionKey.getKeyId()),
|
||||
cryptoInput);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,7 +499,8 @@ public class PgpDecryptVerify extends BaseOperation<PgpDecryptVerifyInputParcel>
|
||||
if (passphrase == null) {
|
||||
log.add(LogType.MSG_DC_PENDING_PASSPHRASE, indent + 1);
|
||||
return new DecryptVerifyResult(log,
|
||||
RequiredInputParcel.createRequiredSymmetricPassphrase());
|
||||
RequiredInputParcel.createRequiredSymmetricPassphrase(),
|
||||
cryptoInput);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -544,7 +546,7 @@ public class PgpDecryptVerify extends BaseOperation<PgpDecryptVerifyInputParcel>
|
||||
} catch (PGPDataValidationException e) {
|
||||
log.add(LogType.MSG_DC_ERROR_SYM_PASSPHRASE, indent +1);
|
||||
return new DecryptVerifyResult(log,
|
||||
RequiredInputParcel.createRequiredSymmetricPassphrase());
|
||||
RequiredInputParcel.createRequiredSymmetricPassphrase(), cryptoInput);
|
||||
}
|
||||
|
||||
encryptedData = encryptedDataSymmetric;
|
||||
@@ -580,7 +582,8 @@ public class PgpDecryptVerify extends BaseOperation<PgpDecryptVerifyInputParcel>
|
||||
return new DecryptVerifyResult(log, RequiredInputParcel.createNfcDecryptOperation(
|
||||
secretEncryptionKey.getRing().getMasterKeyId(),
|
||||
secretEncryptionKey.getKeyId(), encryptedDataAsymmetric.getSessionKey()[0]
|
||||
));
|
||||
),
|
||||
cryptoInput);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@ public class PgpKeyOperation {
|
||||
log.add(LogType.MSG_MF_REQUIRE_PASSPHRASE, indent);
|
||||
return new PgpEditKeyResult(log, RequiredInputParcel.createRequiredSignPassphrase(
|
||||
masterSecretKey.getKeyID(), masterSecretKey.getKeyID(),
|
||||
cryptoInput.getSignatureTime()));
|
||||
cryptoInput.getSignatureTime()), cryptoInput);
|
||||
}
|
||||
|
||||
// read masterKeyFlags, and use the same as before.
|
||||
@@ -1105,12 +1105,12 @@ public class PgpKeyOperation {
|
||||
|
||||
if (!nfcSignOps.isEmpty()) {
|
||||
log.add(LogType.MSG_MF_REQUIRE_DIVERT, indent);
|
||||
return new PgpEditKeyResult(log, nfcSignOps.build());
|
||||
return new PgpEditKeyResult(log, nfcSignOps.build(), cryptoInput);
|
||||
}
|
||||
|
||||
if (!nfcKeyToCardOps.isEmpty()) {
|
||||
log.add(LogType.MSG_MF_REQUIRE_DIVERT, indent);
|
||||
return new PgpEditKeyResult(log, nfcKeyToCardOps.build());
|
||||
return new PgpEditKeyResult(log, nfcKeyToCardOps.build(), cryptoInput);
|
||||
}
|
||||
|
||||
log.add(LogType.MSG_MF_SUCCESS, indent);
|
||||
|
||||
@@ -200,7 +200,7 @@ public class PgpSignEncryptOperation extends BaseOperation {
|
||||
log.add(LogType.MSG_PSE_PENDING_PASSPHRASE, indent + 1);
|
||||
return new PgpSignEncryptResult(log, RequiredInputParcel.createRequiredSignPassphrase(
|
||||
signingKeyRing.getMasterKeyId(), signingKey.getKeyId(),
|
||||
cryptoInput.getSignatureTime()));
|
||||
cryptoInput.getSignatureTime()), cryptoInput);
|
||||
}
|
||||
if (!signingKey.unlock(localPassphrase)) {
|
||||
log.add(LogType.MSG_PSE_ERROR_BAD_PASSPHRASE, indent);
|
||||
@@ -513,7 +513,7 @@ public class PgpSignEncryptOperation extends BaseOperation {
|
||||
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()));
|
||||
e.hashToSign, e.hashAlgo, cryptoInput.getSignatureTime()), cryptoInput);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user