aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2015-05-28 02:27:44 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2015-05-28 02:27:44 +0200
commita8e95f676e580cfbab030aa0f58167a41149d00f (patch)
tree1b89cb6a072cb5fe51b3465e3bbee96551fe47cc /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations
parent426d17bd0aba478e52770449e0adb46d9dc33780 (diff)
downloadopen-keychain-a8e95f676e580cfbab030aa0f58167a41149d00f.tar.gz
open-keychain-a8e95f676e580cfbab030aa0f58167a41149d00f.tar.bz2
open-keychain-a8e95f676e580cfbab030aa0f58167a41149d00f.zip
don't show allowed key list if no key exists, and some minor PgpDecryptVerify changes
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DecryptVerifyResult.java11
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java2
2 files changed, 8 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DecryptVerifyResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DecryptVerifyResult.java
index 917b3415f..7680107f8 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DecryptVerifyResult.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DecryptVerifyResult.java
@@ -27,12 +27,19 @@ import org.sufficientlysecure.keychain.util.Passphrase;
public class DecryptVerifyResult extends InputPendingResult {
+ public static final int RESULT_NO_DATA = RESULT_ERROR + 16;
+ public static final int RESULT_KEY_DISALLOWED = RESULT_ERROR + 32;
+
OpenPgpSignatureResult mSignatureResult;
OpenPgpMetadata mDecryptMetadata;
// This holds the charset which was specified in the ascii armor, if specified
// https://tools.ietf.org/html/rfc4880#page56
String mCharset;
+ public boolean isKeysDisallowed () {
+ return (mResult & RESULT_KEY_DISALLOWED) == RESULT_KEY_DISALLOWED;
+ }
+
public OpenPgpSignatureResult getSignatureResult() {
return mSignatureResult;
}
@@ -57,10 +64,6 @@ public class DecryptVerifyResult extends InputPendingResult {
mCharset = charset;
}
- public boolean isPending() {
- return (mResult & RESULT_PENDING) == RESULT_PENDING;
- }
-
public DecryptVerifyResult(int result, OperationLog log) {
super(result, log);
}
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 82f157d4c..54d2e6e8a 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
@@ -598,7 +598,7 @@ public abstract class OperationResult implements Parcelable {
MSG_DC_ERROR_EXTRACT_KEY (LogLevel.ERROR, R.string.msg_dc_error_extract_key),
MSG_DC_ERROR_INTEGRITY_CHECK (LogLevel.ERROR, R.string.msg_dc_error_integrity_check),
MSG_DC_ERROR_INTEGRITY_MISSING (LogLevel.ERROR, R.string.msg_dc_error_integrity_missing),
- MSG_DC_ERROR_INVALID_SIGLIST(LogLevel.ERROR, R.string.msg_dc_error_invalid_siglist),
+ MSG_DC_ERROR_INVALID_DATA (LogLevel.ERROR, R.string.msg_dc_error_invalid_data),
MSG_DC_ERROR_IO (LogLevel.ERROR, R.string.msg_dc_error_io),
MSG_DC_ERROR_NO_DATA (LogLevel.ERROR, R.string.msg_dc_error_no_data),
MSG_DC_ERROR_NO_KEY (LogLevel.ERROR, R.string.msg_dc_error_no_key),