[FEATURE] Support force-subkey syntax in .gpg-id
l3ibi opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
Hello,
To use password store on different devices I use multiple subkeys for one pubkey.
So, on password-store I use the ! character to force the subkey ID like : https://lists.zx2c4.com/pipermail/password-store/2017-February/002757.html
The application send me this message, when I want to create a new password on android.
Found .gpg-id, but it contains an invalid key ID, fingerprint or user ID.
Describe the solution you'd like
Not send en error when the .gpg-id use ! to force the using subkey.
Describe alternatives you've considered
Ignore ! before \n
Additional context
No response
This cannot be fixed in OpenKeychain since it does not have support for specifying subkeys when decrypting (which is part of why the old issue was closed), but it should be possible to resolve for the new PGPainless backend.
Implementation notes
The force syntax is essentially {{ valid key id }}!, with the exclamation mark indicating that the PGP implementation should use the key as-is and not attempt to find the primary key for the specified key. The .gpg-id parser currently only allows a key id and no suffixes or prefixes, and needs to be loosened up a bit to allow for the optional exclamation mark.
I'll have to check with the PGPainless maintainers to see if there's an API for this and if not can it be added.