diff options
author | Dominik <dominik@dominikschuermann.de> | 2012-09-08 22:45:12 +0200 |
---|---|---|
committer | Dominik <dominik@dominikschuermann.de> | 2012-09-08 22:45:12 +0200 |
commit | e92971a6c0a3d9a5a8578b6fe671dcbfdd0b3656 (patch) | |
tree | d16ccc4dd826b6fb3e050589066132e29dcf7174 /org_apg/src/org/thialfihar/android/apg/service | |
parent | 3995c96149695cf553cde692ead61f8eb6ff1cef (diff) | |
download | open-keychain-e92971a6c0a3d9a5a8578b6fe671dcbfdd0b3656.tar.gz open-keychain-e92971a6c0a3d9a5a8578b6fe671dcbfdd0b3656.tar.bz2 open-keychain-e92971a6c0a3d9a5a8578b6fe671dcbfdd0b3656.zip |
lookup key fixes
Diffstat (limited to 'org_apg/src/org/thialfihar/android/apg/service')
-rw-r--r-- | org_apg/src/org/thialfihar/android/apg/service/ApgHandler.java | 4 | ||||
-rw-r--r-- | org_apg/src/org/thialfihar/android/apg/service/ApgService.java | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/org_apg/src/org/thialfihar/android/apg/service/ApgHandler.java b/org_apg/src/org/thialfihar/android/apg/service/ApgHandler.java index d69d3fd4b..bb9e94938 100644 --- a/org_apg/src/org/thialfihar/android/apg/service/ApgHandler.java +++ b/org_apg/src/org/thialfihar/android/apg/service/ApgHandler.java @@ -31,10 +31,6 @@ public class ApgHandler extends Handler { public static final int MESSAGE_OKAY = 1; public static final int MESSAGE_EXCEPTION = 2; public static final int MESSAGE_UPDATE_PROGRESS = 3; - - // used in decrypt - public static final int MESSAGE_UNKOWN_KEY = 4; - // possible data keys for messages public static final String DATA_ERROR = "error"; diff --git a/org_apg/src/org/thialfihar/android/apg/service/ApgService.java b/org_apg/src/org/thialfihar/android/apg/service/ApgService.java index 5e7daa48c..b6811d2ee 100644 --- a/org_apg/src/org/thialfihar/android/apg/service/ApgService.java +++ b/org_apg/src/org/thialfihar/android/apg/service/ApgService.java @@ -86,11 +86,12 @@ public class ApgService extends IntentService implements ProgressDialogUpdater { public static final String OUTPUT_FILE = "outputFile"; public static final String PROVIDER_URI = "providerUri"; - // decrypt + // decrypt/verify public static final String SIGNED_ONLY = "signedOnly"; public static final String RETURN_BYTES = "returnBinary"; public static final String CIPHERTEXT_BYTES = "ciphertextBytes"; public static final String ASSUME_SYMMETRIC = "assumeSymmetric"; + public static final String LOOKUP_UNKNOWN_KEY = "lookup_unknown_key"; // edit keys public static final String NEW_PASSPHRASE = "newPassphrase"; @@ -132,14 +133,16 @@ public class ApgService extends IntentService implements ProgressDialogUpdater { public static final String RESULT_ENCRYPTED_DATA = "encryptedData"; public static final String RESULT_URI = "resultUri"; - // decrypt + // decrypt/verify public static final String RESULT_DECRYPTED_MESSAGE = "decryptedMessage"; public static final String RESULT_DECRYPTED_DATA = "decryptedData"; public static final String RESULT_SIGNATURE = "signature"; public static final String RESULT_SIGNATURE_KEY_ID = "signatureKeyId"; public static final String RESULT_SIGNATURE_USER_ID = "signatureUserId"; + public static final String RESULT_SIGNATURE_SUCCESS = "signatureSuccess"; public static final String RESULT_SIGNATURE_UNKNOWN = "signatureUnknown"; + public static final String RESULT_SIGNATURE_LOOKUP_KEY = "lookupKey"; Messenger mMessenger; @@ -340,6 +343,8 @@ public class ApgService extends IntentService implements ProgressDialogUpdater { boolean returnBytes = data.getBoolean(RETURN_BYTES); boolean assumeSymmetricEncryption = data.getBoolean(ASSUME_SYMMETRIC); + boolean lookupUnknownKey = data.getBoolean(LOOKUP_UNKNOWN_KEY); + InputStream inStream = null; long inLength = -1; InputData inputData = null; @@ -416,7 +421,8 @@ public class ApgService extends IntentService implements ProgressDialogUpdater { // verifyText and decrypt returning additional resultData values for the // verification of signatures if (signedOnly) { - resultData = PGPMain.verifyText(this, inputData, outStream, this); + resultData = PGPMain.verifyText(this, inputData, outStream, lookupUnknownKey, + this); } else { resultData = PGPMain.decrypt(this, inputData, outStream, PGPMain.getCachedPassPhrase(secretKeyId), this, |