pgp as a C programming library in Linux?

Marcus Brinkmann Marcus.Brinkmann at
Wed Dec 19 21:47:02 CET 2001

On Wed, Dec 19, 2001 at 02:25:18PM -0600, Tie Kan wrote:
> About why some of the tests failed after the package is installed, I
> think this is because gpgme library uses only keys in default keyring. 
> For example, in 't-encrypt', two keys are added: 'Bob' and 'Alpha'.
> These two keys are not added to my default keyring in
> ~/.gnupg/pubring.gpg. As a result, the keys are invalid and an error of
> "no recipient" is thrown. After I modified the lines where keys for
> 'Bob' and 'Alpha' are added to some valid keys in my default keyring,
> everything works fine.
> This raises another question: how can I test gpgme library using a user
> specified keyring rather than the default keyring? (For example, the
> pubring.gpg file that locates in the tests/gpg directory?)

All tests are run with the following environment:


(that means, the source dir as figured out by automake).
So, if you want to try a test manually, without using make check, you have
to set those variables.  If you build in a seperate directory (VPATH):

tar xzf gpgm-0.3.0.tar.gz
mkdir gpgme-build; cd gpgme-build
../gpgme-0.3.0/configure; make
cd tests/gpg
GNUPGHOME=. srcdir=../../../gpgme-0.3.0/tests/gpg ./t-encrypt

Otherwise it won't work.  Of course, if you build in the source tree, you
can just put srcdir=. and be happy.

However, this can't be the reason why "make check" is sometimes partially
failing.  I suspect that it has to do with some unclean housekeeping of the
various files (eg, make clean/distclean doesn't work properly), and I will
pay attention to that soon.


`Rhubarb is no Egyptian god.' Debian brinkmd at
Marcus Brinkmann              GNU    marcus at
Marcus.Brinkmann at

More information about the Gnupg-devel mailing list