Fwd: GPGME status callback not working for need entropy

Jacob Adams tookmund at gmail.com
Thu Aug 23 22:58:47 CEST 2018


Resending with a compressed log file since it ended up way bigger than I
expected.


-------- Forwarded Message --------
Subject: Re: GPGME status callback not working for need entropy
Date: Thu, 23 Aug 2018 16:54:13 -0400
From: Jacob Adams <tookmund at gmail.com>
To: gnupg-users at gnupg.org

On 08/22/2018 04:38 AM, Werner Koch wrote:
> On Wed,  1 Aug 2018 21:28, tookmund at gmail.com said:
>> generating a key without enough randomness, the whole application just
>> locks up with no indication of what is happening. Is there anything else
>> I could query to inform the user of what's occurring in this scenario?
> 
> You need to install a progress callback.  Something like:

I have a progress callback installed but it's not reporting anything.

My progress callback currently looks like this:
def _progress(what, type, current, total, prog):
    if what == "primegen":
        prog.inc()
    else:
        _log.info(what+" "+type+" "+current+" "+total)
    if prog.gk.redraw:
        prog.screen.finish()
        prog.screen = newt.Screen()
        prog.recreate()

(_log is a Logger that logs to a file, and prog is a progress bar I
setup earlier)

But I don't have anything logged when the application runs out of
entropy. The progress callback is simply not called as far as I can
tell. So I was hoping I could maybe get something out of status, but I
guess not. Any idea why progress wouldn't be called?

I've captured a GPGME debug log from an affected system and attached it
below. It seems _gpgme_io_select is just waiting on some file
descriptor, probably for randomness that never arrives. This same test
system completely locked up on shutdown and had to be forced off. Not
sure if that's related but seems likely.

Thanks,
Jacob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpgme.log.gz
Type: application/gzip
Size: 16178 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20180823/9f4f12fb/attachment-0001.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20180823/9f4f12fb/attachment-0001.sig>


More information about the Gnupg-users mailing list