diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-05-04 03:38:58 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-05-04 03:38:58 +0200 |
commit | b5647b2062e3233451532f44ce03c8b1bcdb7a3e (patch) | |
tree | ba419a49a80c98ca4305e40c86b30ba23c263727 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java | |
parent | f524fa692c8ab9bd737f7b03a5104ff2b2867669 (diff) | |
download | open-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.java | 8 |
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); |