Skip to content

Sign/encrypt user interaction loop with YubiKey #2507

@M66B

Description

@M66B

When using the API ACTION_SIGN_AND_ENCRYPT with a Yubikey it keeps returning a pending intent to scan a Yubikey (and possibly other keys).

Expected Behavior

One or maybe two NFC scans only

Current Behavior

Repeating user interaction to scan Yubikey

Possible Solution

The problem seems to occur here:
https://github.com/open-keychain/open-keychain/blob/master/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncryptOperation.java#L578

Steps to Reproduce (for bugs)

  1. Generate/store key
  2. Call ACTION_SIGN_AND_ENCRYPT
  3. Scan Yubikey

Context

I am trying to make sign and encrypt working with a Yubikey for FairEmail:
https://github.com/M66B/FairEmail/blob/master/app/src/main/java/eu/faircode/email/FragmentCompose.java#L1689

Sign and encrypt without Yubikey works properly.

Your Environment

  • Android Version: 10
  • Device Model: Pixel 3a
  • OpenKeychain Version: master
  • From Google Play or F-Droid?: both + self built

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions