From 07704c2726e66b3834834d76c4046b144348b58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Wed, 24 Sep 2014 00:50:58 +0200 Subject: Yubikey decryption --- .../java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote') 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 1b4ad1fc1..090f2ceb6 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -526,8 +526,9 @@ public class OpenPgpService extends RemoteService { "Decryption of symmetric content not supported by API!"); } else if ((pgpResult.getResult() & DecryptVerifyResult.RESULT_PENDING_NFC) == DecryptVerifyResult.RESULT_PENDING_NFC) { - return getNfcDecryptIntent( - data, pgpResult.getNfcPassphrase(), pgpResult.getNfcEncryptedSessionKey()); + // we assume that the pin has been cached before + String pin = passphraseCacheInterface.getCachedPassphrase(pgpResult.getNfcKeyId()); + return getNfcDecryptIntent(data, pin, pgpResult.getNfcEncryptedSessionKey()); } else { throw new PgpGeneralException( "Encountered unhandled type of pending action not supported by API!"); -- cgit v1.2.3