diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-14 14:50:13 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-14 14:50:13 +0200 |
commit | ad69e47cec58287d82978b28416db50f6c3feb77 (patch) | |
tree | f821989b21e0e26ae078f99460e983f3ada29d1c /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | |
parent | 6da17ef6bbe9569e53268b446e59dcc69aaa2da4 (diff) | |
download | open-keychain-ad69e47cec58287d82978b28416db50f6c3feb77.tar.gz open-keychain-ad69e47cec58287d82978b28416db50f6c3feb77.tar.bz2 open-keychain-ad69e47cec58287d82978b28416db50f6c3feb77.zip |
Support for multiple hash algos
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | 5 |
1 files changed, 3 insertions, 2 deletions
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 6bc623b85..44d37b926 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -138,11 +138,12 @@ public class OpenPgpService extends RemoteService { return result; } - private Intent getNfcIntent(Intent data, byte[] hashToSign) { + private Intent getNfcIntent(Intent data, byte[] hashToSign, int hashAlgo) { // build PendingIntent for Yubikey NFC operations Intent intent = new Intent(getBaseContext(), NfcActivity.class); intent.setAction(NfcActivity.ACTION_SIGN_HASH); intent.putExtra(NfcActivity.EXTRA_NFC_HASH_TO_SIGN, hashToSign); + intent.putExtra(NfcActivity.EXTRA_NFC_HASH_ALGO, hashAlgo); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP); // pass params through to activity that it can be returned again later to repeat pgp operation intent.putExtra(NfcActivity.EXTRA_DATA, data); @@ -239,7 +240,7 @@ public class OpenPgpService extends RemoteService { // pass through the signature creation timestamp to be used again on second execution // of PgpSignEncrypt when we have the signed hash! data.putExtra(OpenPgpApi.EXTRA_NFC_SIG_CREATION_TIMESTAMP, e.mCreationTimestamp.getTime()); - return getNfcIntent(data, e.mHashToSign); + return getNfcIntent(data, e.mHashToSign, e.mHashAlgo); } } finally { is.close(); |