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