[PATCH] agent, gpg: Forward progress output for --gen-key

Daiki Ueno ueno at gnu.org
Sun Nov 1 02:53:06 CET 2015


Hello,

I noticed that gpg --gen-key does not output any progress feedback, even
when it is invoked with --enable-progress-filter, despite the mention of
it in doc/DETAILS:

  *** PROGRESS <what> <char> <cur> <total>
  [...]
      Well known values for WHAT are:

             - pk_dsa   :: DSA key generation
             - pk_elg   :: Elgamal key generation
             - primegen :: Prime generation
             - need_entropy :: Waiting for new entropy in the RNG

With the attached patch, gpg-agent connects to the libgcrypt's progress
handler and forward the output to the caller, and gpg writes it if
requested.  I think this would also give GPGME an opportunity to
terminate the running gpg process with gpgme_cancel:

https://bugs.gnupg.org/gnupg/issue1415

(If I understand correctly, GPGME does not explictly kill the running gpg
process, but expects that it is terminated on write error.)

Regards,
-- 
Daiki Ueno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-agent-gpg-Forward-progress-output-for-gen-key.patch
Type: text/x-patch
Size: 2885 bytes
Desc: not available
URL: </pipermail/attachments/20151101/50fa543c/attachment.bin>


More information about the Gnupg-devel mailing list