gpgme_op_keylist_start: error: Invalid crypto engine <GPGME>

Hans-Christoph Steiner hans at guardianproject.info
Tue Oct 23 03:46:03 CEST 2012



On 10/22/2012 04:19 PM, Hans-Christoph Steiner wrote:
> 
> 
> On 10/22/2012 05:13 AM, Werner Koch wrote:
>> Hi,
>>
>> looking closer at the logs shows that none of the tools return any
>> information for a call with EGNINE --version.
>>
>>  <0x0391>  _gpgme_io_spawn: check: path=0x4a2ea798, argv[ 0] = /data/data/info.guardianproject.gpg/app_opt/bin/gpg2
>>  <0x0391>  _gpgme_io_spawn: check: path=0x4a2ea798, argv[ 1] = --version
>>  <0x0391>  _gpgme_io_spawn: check: path=0x4a2ea798, fd[0] = 0x26 -> 0x1
>>
>> Setup everything for an exec.  Register to connect stdout of gpg2 to the
>> pipe.
>>
>>  <0x0391>  _gpgme_io_spawn: check: path=0x4a2ea798, waiting for child
>>  process pid=941
>>
>> Wait in the parent for gpg to finish.
>>
>>  <0x03ae>    gpgme:max_fds: call: 0=0x0, max fds=1024 (RLIMIT_NOFILE)
>>
>> The child is about to close all file descriptors.  Actually this is the
>> grandchild because gpgme uses double forking to let init reap the
>> children.
>>
>>  <0x0391>    _gpgme_io_close: enter: fd=0x26
>>  <0x0391>    _gpgme_io_close: leave: result=0
>>
>> Close other end of the pipe in the parent.
>>
>>  <0x0391>  _gpgme_io_spawn: leave: result=0
>>
>> Finished.
>>
>>  <0x0391>  _gpgme_io_read: enter: fd=0x25, buffer=0xbeac65e4, count=79
>>  <0x0391>  _gpgme_io_read: leave: result=0
>>
>> Read end of the pipe was called with a 79 byte buffer but returned
>> nothing.  Here is what you should have seen between these two log lines:
>>
>>  <0x0391>  _gpgme_io_read: check: 6770672028476e75 50472920312e342e gpg (GnuPG) 1.4
>>  [...]
>>
>>
>> I assume you already verified that 
>>
>>  $ /data/data/info.guardianproject.gpg/app_opt/bin/gpg2 --version 
> 
> I have a menu item in the test Android app that downloads a key from a
> keyserver using the gpg2 command line binary.  That has been working fine for
> a while now.  In case you're curious, I ran this from 'adb shell', i.e. a
> terminal to an Android emulator:
> 
> # export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/info.guardianproject.gpg/app_opt/lib
> # /data/data/info.guardianproject.gpg/app_opt/bin/gpg2 --version
> gpg (GnuPG) 2.1.0-beta82
> libgcrypt 1.6.0-git38fcd59
> NOTE: THIS IS A DEVELOPMENT VERSION!
> It is only intended for test purposes and should NOT be
> used in a production environment or with production keys!
> Copyright (C) 2011 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> Home: ~/.gnupg
> Supported algorithms:
> Pubkey: RSA, ELG, DSA, ECDH, ECDSA
> Cipher: 3DES, CAST5, BLOWFISH, AES128, AES192, AES256, TWOFISH, CAMELLIA128,
>         CAMELLIA192, CAMELLIA256
> Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
> Compression: Uncompressed, ZIP, ZLIB
> 
> 
>> return something to stdout.  The next step would be to enable the trace
>> calls in  src/posix-io.c:gpgme_io_spawn .  The are all "#if 0"-ed to
>> avoid problems with pthread.  Change the all to "#if 1" and check the
>> logs again.
> 
> I'll run that now.
> 
>> How long would it take me to setup a test environment?  Does that make
>> sense?
> 
> If you are interested in GnuPG on Android beyond just this problem, I think it
> does make sense. If you are running a Debian-deriv, its not too bad to setup,
> I think the whole thing might take no more than an hour, if you ignore the
> Eclipse setup:
> 
>  apt-get install ia32-libs (only if running amd64 64-bit)
>  apt-get install autoconf automake libtool transfig wget patch \
>        texinfo ant gettext build-essential bison
> 
>  cd /path/to/folder/for/your/android/tools
>  wget https://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2
>  tar xjf android-ndk-r8b-linux-x86.tar.bz2
>  wget https://dl.google.com/android/android-sdk_r20.0.3-linux.tgz
>  tar xjf android-sdk_r20.0.3-linux.tgz
> 
> I source a ~/.android/bashrc file to set the relevant vars for locating the
> NDK and SDK, I attached the one I use.
> 
> Next you need to install setup an emulator, unless you have an Android phone
> you want to use:
> http://developer.android.com/sdk/installing/adding-packages.html  Then it
> should just be:

I forgot the submodules:

 git clone https://github.com/guardianproject/gnupg-for-android
 cd gnupg-for-android
 git submodule init
 git submodule update
 . /path/to/your/android-bashrc
 make -C external/ distclean
 make -C external/ gnupg-install
 make -C external/ gnupg-static
 make -C external/ gpgme-install
 make -C external/ android-assets
 ndk-build
 android update project --path . --target android-8 --name GnuPrivacyGuard
 ant clean debug
 adb install bin/info.guardianproject.gpg.GnuPrivacyGuard.apk

.hc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 937 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20121022/48999bfa/attachment-0001.pgp>


More information about the Gnupg-devel mailing list