From 6cc7b6141a42870840a290455e16d7e599fa3469 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Mon, 30 Mar 2015 23:56:09 +0200 Subject: [PATCH] update OpenPgpApi, re-add EXTRA_PASSPHRASE --- .../keychain/remote/OpenPgpService.java | 13 +++++++++++++ extern/openpgp-api-lib | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) 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 4760412ea..e6b3a2167 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -56,6 +56,7 @@ import org.sufficientlysecure.keychain.ui.PassphraseDialogActivity; import org.sufficientlysecure.keychain.ui.ViewKeyActivity; import org.sufficientlysecure.keychain.util.InputData; import org.sufficientlysecure.keychain.util.Log; +import org.sufficientlysecure.keychain.util.Passphrase; import java.io.IOException; import java.io.InputStream; @@ -242,6 +243,10 @@ public class OpenPgpService extends RemoteService { InputData inputData = new InputData(is, inputLength); CryptoInputParcel cryptoInput = data.getParcelableExtra(OpenPgpApi.EXTRA_CRYPTO_INPUT); + if (data.hasExtra(OpenPgpApi.EXTRA_PASSPHRASE)) { + cryptoInput = new CryptoInputParcel(cryptoInput.getSignatureTime(), + new Passphrase(data.getStringExtra(OpenPgpApi.EXTRA_PASSPHRASE))); + } // sign-only PgpSignEncryptInputParcel pseInput = new PgpSignEncryptInputParcel() @@ -374,6 +379,10 @@ public class OpenPgpService extends RemoteService { } CryptoInputParcel cryptoInput = data.getParcelableExtra(OpenPgpApi.EXTRA_CRYPTO_INPUT); + if (data.hasExtra(OpenPgpApi.EXTRA_PASSPHRASE)) { + cryptoInput = new CryptoInputParcel(cryptoInput.getSignatureTime(), + new Passphrase(data.getStringExtra(OpenPgpApi.EXTRA_PASSPHRASE))); + } PgpSignEncryptOperation op = new PgpSignEncryptOperation(this, new ProviderHelper(getContext()), null); @@ -455,6 +464,10 @@ public class OpenPgpService extends RemoteService { ); CryptoInputParcel cryptoInput = data.getParcelableExtra(OpenPgpApi.EXTRA_CRYPTO_INPUT); + if (data.hasExtra(OpenPgpApi.EXTRA_PASSPHRASE)) { + cryptoInput = new CryptoInputParcel(cryptoInput.getSignatureTime(), + new Passphrase(data.getStringExtra(OpenPgpApi.EXTRA_PASSPHRASE))); + } byte[] detachedSignature = data.getByteArrayExtra(OpenPgpApi.EXTRA_DETACHED_SIGNATURE); diff --git a/extern/openpgp-api-lib b/extern/openpgp-api-lib index 9abb91d3a..97cf30e5b 160000 --- a/extern/openpgp-api-lib +++ b/extern/openpgp-api-lib @@ -1 +1 @@ -Subproject commit 9abb91d3a69964a547f26aa1d56de233e75c4410 +Subproject commit 97cf30e5b9190d06aba29ad08426bbfeb2ab3a28