gpgme-android dies when it needs pinentry

Hans-Christoph Steiner hans at guardianproject.info
Mon Jul 8 22:07:48 CEST 2013



On 06/19/2013 12:41 PM, Werner Koch wrote:
> On Wed, 19 Jun 2013 06:30, hans at guardianproject.info said:
> 
>> But for things like creating a new key, decrypting, signing, etc. gpgme always
>> crashes.  It does not seem to even try to launch pinentry, because we're not
>> seeing and logging from pinentry. Attached in the gpgme log for trying to
> 
> I can't see a gpgme crash for the log.  It might be a crash in gpg or
> gpg-agent.  Can you please check?  Having gpg-agent and gpg log files
> would also be useful.
> 
>> GPGME 2013-06-19 00:22:03 <0x4227>    _gpgme_io_read: enter: fd=0x2b, buffer=0x5c8339b0, count=1024
>> GPGME 2013-06-19 00:22:03 <0x4227>    _gpgme_io_read: leave: result=0
> 
> The first read of the status-fd returns 0, i.e. EOF.  That should not
> happen.

We're working thru all of the various issues here and are finally making good
progress. There were a couple different issues happening here, two of which I
recently fixed.  First, GnuPG-for-Android was making certain gpgme calls in
the main UI thread.  Those gpgme calls block.  pinentry-android launches an
Activity, which happens in the UI thread by default.  Therefore when a gpgme
needed to launch pinentry, gpgme would block waiting for pinentry, and then
pinentry could not launch the password prompt because the gpgme call was
blocking the UI thread.

For generating keys in gpgme, I was giving it the data in the wrong format.
Troubleshooting from the command line gave me lots more feedback, and that's
now working.

I think there are some other lingering issues, but I have to leave them be for
now.

.hc


-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81



More information about the Gnupg-devel mailing list