Page MenuHome GnuPG

Kleopatra: General error if ADSK is not configured correctly
Testing, NormalPublic

Description

If you mistakenly give a fingerprint of a primary key instead of a subkey fingerprint for encryption to the configuration option default-new-key-adsk and try to create a new keypair in Kleopatra, you get a general error:

We need a specific error for that instead of the general one.
Gpg reports "invalid ADSK specified".

Event Timeline

ikloecker added a subscriber: ikloecker.

Yes, gpg logs "invalid ADSK ... specified", but it doesn't emit a status error. This needs to be changed in gpg.

With the new patch you get this now:

[GNUPG:] KEY_CONSIDERED F40ADB902B24264AA42E50BF92EDB04BFF325CF3 1
[GNUPG:] ERROR add_adsk 53
gpg: key "F40ADB902B24264AA42E50BF92EDB04BFF325CF3!" not found: Unusable public key
gpg: Did you specify the fingerprint of a subkey?
[GNUPG:] FAILURE gpg-exit 33554433

This is not on any workboard. But I tested it with 4win-Beta-64 and the error shown in Kleopatra is now "Unusable public key".
So I'll put it on vsd33.

Which is of course technically correct but why can't we have the much more clear "invalid ADSK ... specified"? I think this would help troubleshooting.

In T7322#192972, @ebo wrote:

Which is of course technically correct but why can't we have the much more clear "invalid ADSK ... specified"? I think this would help troubleshooting.

There isn't a more specific error defined in libgpg-error: https://dev.gnupg.org/source/libgpg-error/browse/master/src/err-codes.h.in

Unfortuantely, the error dialog lacks a way to show the output of gpg (as in the decryption result window).

ebo added a project: Restricted Project.Oct 31 2024, 3:54 PM

ok, regarding better access to the more detailed error dialog see the above mentioned ticket

ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Oct 31 2024, 3:54 PM

Werner backported this to GnuPG 2.2.45.

ebo changed the task status from Open to Testing.Nov 4 2024, 10:42 AM