diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-06 16:39:48 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-06 16:39:48 +0200 |
commit | 7f20a84eafbb40491450add5307d39b23b7a7748 (patch) | |
tree | e20cfceb08387f27e7fff3cf6610627c6d325f87 | |
parent | b81e28c3f71b35f3bf3b587ee744c92fb54c2745 (diff) | |
parent | e9e9cf2374cbe9d04ed1820dca03a73f87c41268 (diff) | |
download | open-keychain-7f20a84eafbb40491450add5307d39b23b7a7748.tar.gz open-keychain-7f20a84eafbb40491450add5307d39b23b7a7748.tar.bz2 open-keychain-7f20a84eafbb40491450add5307d39b23b7a7748.zip |
Merge branch 'master' of github.com:open-keychain/open-keychain
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java | 5 |
1 files changed, 3 insertions, 2 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 026d7bb03..f72956981 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerify.java @@ -45,6 +45,7 @@ import org.spongycastle.openpgp.operator.jcajce.CachingDataDecryptorFactory; import org.spongycastle.openpgp.operator.jcajce.JcaPGPContentVerifierBuilderProvider; import org.spongycastle.openpgp.operator.jcajce.JcaPGPDigestCalculatorProviderBuilder; import org.spongycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder; +import org.spongycastle.util.encoders.DecoderException; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.operations.BaseOperation; @@ -167,10 +168,10 @@ public class PgpDecryptVerify extends BaseOperation<PgpDecryptVerifyInputParcel> OperationLog log = new OperationLog(); log.add(LogType.MSG_DC_ERROR_PGP_EXCEPTION, 1); return new DecryptVerifyResult(DecryptVerifyResult.RESULT_ERROR, log); - } catch (ArrayIndexOutOfBoundsException e) { + } catch (DecoderException | ArrayIndexOutOfBoundsException e) { // these can happen if assumptions in JcaPGPObjectFactory.nextObject() aren't // fulfilled, so we need to catch them here to handle this gracefully - Log.d(Constants.TAG, "array index out of bounds", e); + Log.d(Constants.TAG, "data error", e); OperationLog log = new OperationLog(); log.add(LogType.MSG_DC_ERROR_IO, 1); return new DecryptVerifyResult(DecryptVerifyResult.RESULT_ERROR, log); |