Failure to sign with an external GnuPG key that requires the use of a signing subkey
Categories
(MailNews Core :: Security: OpenPGP, defect, P3)
Tracking
(thunderbird_esr140? affected)
People
(Reporter: KaiE, Assigned: KaiE)
References
(Blocks 1 open bug)
Details
(Whiteboard: [mailsec-broken-fixwanted])
Attachments
(2 files)
In the following scenario, adding a digital OpenPGP signature fails:
- external GnuPG configuration is enabled
- for that key, the primary key doesn't have signing capability
The current code asks GPG for a key handle to the configured external key ID, and then adds that key handle as a signer.
Apparently that fails in certain scenarios. GPGME reports a failure to sign.
I assume that GPGME doesn't have the capability to automatically select the corresponding signing subkey, but rather returns a failure because the given key handle cannot be used directly for signing.
This bug was reported for a split-qubes configuration.
| Assignee | ||
Comment 1•5 months ago
|
||
I suggest to fix this in the following way:
If Thunderbird is asked to use signing with external GnuPG, TB should inspect the corresponding public key (that the user was required to import, that's a precondition for using external secret key, as documented).
The code should find the most recently created subkey, and prefer that one (we use that preference already when selecting a suitable encryption key). If non exists, it should fall back to use the primary key (if it has signing capability).
That approach should fix this bug.
| Assignee | ||
Comment 2•5 months ago
|
||
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 3•4 days ago
|
||
I don't want to require the gnupg tools to be available in our CI environment.
But it would be nice to have an automated test that we can execute manually, locally on a developer machine.
| Assignee | ||
Comment 4•4 days ago
|
||
| Assignee | ||
Updated•3 days ago
|
| Assignee | ||
Comment 5•3 days ago
|
||
Updated•3 days ago
|
Pushed by arschmitz@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/106037f54581
Prefer signing subkey in external secret key configuration, only use primary as fall back. r=mkmelin
https://hg.mozilla.org/comm-central/rev/805e3cdb2427
Add an optional Linux-only external-gnupg test (only if binaries are installed). r=mkmelin
Description
•