aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-12-10 15:24:23 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2015-12-10 15:24:23 +0100
commit8dd63138266670295bbf081a97afa698a6a92a76 (patch)
tree7f28bbdf7ba1e27359dff2e3916b365a5941f28f /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
parent1b141c61e15526d8a979c917b632bba91b77b859 (diff)
downloadopen-keychain-8dd63138266670295bbf081a97afa698a6a92a76.tar.gz
open-keychain-8dd63138266670295bbf081a97afa698a6a92a76.tar.bz2
open-keychain-8dd63138266670295bbf081a97afa698a6a92a76.zip
Nicer RESULT_INSECURE fallback for old API versions
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
index 5f48e44bd..78c02681b 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
@@ -573,18 +573,11 @@ public class OpenPgpService extends Service {
// case RESULT_NOT_ENCRYPTED, but a signature, fallback to deprecated signatureOnly variable
if (decryptionResult.getResult() == OpenPgpDecryptionResult.RESULT_NOT_ENCRYPTED
&& signatureResult.getResult() != OpenPgpSignatureResult.RESULT_NO_SIGNATURE) {
- // noinspection deprecation, TODO
+ // noinspection deprecation
signatureResult.setSignatureOnly(true);
}
- // case RESULT_INSECURE, fallback to an error
- if (decryptionResult.getResult() == OpenPgpDecryptionResult.RESULT_INSECURE) {
- Intent resultError = new Intent();
- resultError.putExtra(OpenPgpApi.RESULT_ERROR, new OpenPgpError(OpenPgpError.GENERIC_ERROR,
- "Insecure encryption: An outdated algorithm has been used!"));
- resultError.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR);
- return resultError;
- }
+ // case RESULT_INSECURE, simply accept as a fallback like in previous API versions
// case RESULT_ENCRYPTED
// nothing to do!