diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-09-16 20:48:46 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-09-16 20:48:46 +0200 |
commit | 76465fc687f8dc1cfe9011f683fbe24ddc92005f (patch) | |
tree | 5e939b2e8ecb771ac651fad79d682f42d7b308b3 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain | |
parent | 01038d6a2640ce3c6327389798077bb4b35a6c9b (diff) | |
download | open-keychain-76465fc687f8dc1cfe9011f683fbe24ddc92005f.tar.gz open-keychain-76465fc687f8dc1cfe9011f683fbe24ddc92005f.tar.bz2 open-keychain-76465fc687f8dc1cfe9011f683fbe24ddc92005f.zip |
mime: add failure case if openpgp processing fails!
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
2 files changed, 6 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/InputDataOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/InputDataOperation.java index 99bd0ebef..b95a42b82 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/InputDataOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/InputDataOperation.java @@ -91,6 +91,11 @@ public class InputDataOperation extends BaseOperation<InputDataParcel> { } log.addByMerge(decryptResult, 2); + if (!decryptResult.success()) { + log.add(LogType.MSG_DATA_ERROR_OPENPGP, 1); + return new InputDataResult(InputDataResult.RESULT_ERROR, log); + } + } else { currentInputUri = input.getInputUri(); } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java index 6db2539d5..590a93872 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java @@ -829,6 +829,7 @@ public abstract class OperationResult implements Parcelable { MSG_DATA (LogLevel.START, R.string.msg_data), MSG_DATA_OPENPGP (LogLevel.DEBUG, R.string.msg_data_openpgp), MSG_DATA_ERROR_IO (LogLevel.ERROR, R.string.msg_data_error_io), + MSG_DATA_ERROR_OPENPGP (LogLevel.ERROR, R.string.msg_data_error_openpgp), MSG_DATA_MIME_ERROR (LogLevel.ERROR, R.string.msg_data_mime_error), MSG_DATA_MIME_FILENAME (LogLevel.DEBUG, R.string.msg_data_mime_filename), MSG_DATA_MIME_LENGTH (LogLevel.DEBUG, R.string.msg_data_mime_length), |