Page MenuHome GnuPG

Kleopatra: gpg.exe hangs on trying to exportably certify an already locally signed certificate with multiple UIDs
Testing, HighPublic

Description

with VS-Desktop-3.3.90.10-Beta, not reproducible in VS-Desktop-3.3.90.6-Beta

  • Import a pubkey with 2 UIDs
  • locally certify on import
  • then (from the certificate list) try to certify it exportably with a tag

The cli of the gpg.exe, taken from process explorer:

c:\\\\Program Files (x86)\\\\GnuPG VS-Desktop\\\\GnuPG\\\\bin\\\\gpg.exe" "--status-fd" "4" "--logger-fd" "8" "--no-tty" "--charset=utf8" "--enable-progress-filter" "--exit-on-status-write-error" "--ttyname=/dev/tty" "--command-fd" "12" "--with-colons" "--expert" "-u" "B0FBC8D8324859B9" "--set-notation=rem@gnupg.org=test" "--no-ask-cert-expire" "--default-cert-expire" "0" "--edit-key" "--" "FADC4675146CFAF3D86F137E1D3C5E6E3DB3C71D

gpgme-log:

Details

Version
VS-Desktop-3.3.90.10-Beta

Event Timeline

ebo renamed this task from Kleopatra: gpg.exe hangs on trying to exportably certify an already locally signed certificate with multible UIDs to Kleopatra: gpg.exe hangs on trying to exportably certify an already locally signed certificate with multiple UIDs.Wed, Apr 9, 3:12 PM
ebo triaged this task as High priority.
ebo created this task.
ebo added subscribers: werner, ikloecker.

The dialog between gpg and Kleopatra looks like this:

[GNUPG:] KEY_CONSIDERED FADC4675146CFAF3D86F137E1D3C5E6E3DB3C71D 0<LF>
[GNUPG:] GET_LINE keyedit.prompt<LF>
sign
<LF>
[GNUPG:] GOT_IT<LF>
[GNUPG:] GET_BOOL keyedit.sign_all.okay<LF>
N
<LF>
[GNUPG:] GOT_IT<LF>
[GNUPG:] GET_LINE keyedit.prompt<LF>
uid D2C00A207DC184562E41517CBC5EF7175E8535E8
<LF>
[GNUPG:] GOT_IT<LF>
[GNUPG:] GET_LINE keyedit.prompt<LF>
uid 648AC172C3EC45F85AA2E68E46D3FEFABD1F5BD7
<LF>
[GNUPG:] GOT_IT<LF>
[GNUPG:] GET_LINE keyedit.prompt<LF>
sign
<LF>
[GNUPG:] GOT_IT<LF>
[GNUPG:] KEY_CONSIDERED FFDFEE2F0C8F278023284D90B0FBC8D8324859B9 0<LF>
[GNUPG:] GET_BOOL sign_uid.local_promote_okay<LF>
Y
<LF>
[GNUPG:] GOT_IT<LF>
[GNUPG:] GET_BOOL sign_uid.okay<LF>

and then nothing else.

I don't see why it breaks/hangs. The code of GpgSignKeyEditInteractor didn't change since GpgME 1.19.

The state machine in GpgSignKeyEditInteractor expects to see GET_BOOL sign_uid.okay and it should have answered with Y.

After further investigation it looks like this bug exists since quite some time.

yeah, I did not have exactly the same setting for the tests in the different versions… so no regression

Fixed in gpgmepp for gpd5x. I think for VSD 3.3 we'll add a patch to gpg4win.

ikloecker changed the task status from Open to Testing.Thu, Apr 10, 3:54 PM
ikloecker moved this task from Backlog to WIP on the gpd5x board.

Very likely this bug exists since 2017 when support for promotion of local certifications to exportable certifications was added.

this exact case is fixed in VS-Desktop-3.3.90.12-Beta
Adding further UIDs and making more certifications still works, too.

But now I get an error when certifying a certificate with one UID globally after a previous local certification: "userdefined errorcode 1"
The same when certifying only one UID of a certificate with several in the same way.

That error code is actually not an error code but it is the ERROR state from the Kleo SFM. We have seen that yesterday already.