aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-05-04 03:38:58 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-05-04 03:38:58 +0200
commitb5647b2062e3233451532f44ce03c8b1bcdb7a3e (patch)
treeba419a49a80c98ca4305e40c86b30ba23c263727 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java
parentf524fa692c8ab9bd737f7b03a5104ff2b2867669 (diff)
downloadopen-keychain-b5647b2062e3233451532f44ce03c8b1bcdb7a3e.tar.gz
open-keychain-b5647b2062e3233451532f44ce03c8b1bcdb7a3e.tar.bz2
open-keychain-b5647b2062e3233451532f44ce03c8b1bcdb7a3e.zip
wrapped-key-ring: no more pgp imports in PassphraseDialogFragment
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java
index 37dfee8b9..27e9e8ebd 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java
@@ -344,9 +344,11 @@ public class PgpDecryptVerify {
currentProgress += 5;
updateProgress(R.string.progress_extracting_key, currentProgress, 100);
try {
- secretEncryptionKey.unlock(mPassphrase);
- } catch (PgpGeneralException e) {
- throw new WrongPassphraseException();
+ if (!secretEncryptionKey.unlock(mPassphrase)) {
+ throw new WrongPassphraseException();
+ }
+ } catch(PgpGeneralException e) {
+ throw new KeyExtractionException();
}
currentProgress += 5;
updateProgress(R.string.progress_preparing_streams, currentProgress, 100);