why do not "gpgme-1.1.4/tests/gpg/t-decrypt.c" and "gpgme-1.1.4/tests/gpg/t-encrypt.c" working?
marcus.brinkmann at ruhr-uni-bochum.de
Wed Feb 20 13:49:23 CET 2008
At Wed, 20 Feb 2008 09:15:11 +0200,
"Metin KAYA" <kayameti at gmail.com> wrote:
> Another question: In the file "t-encrypt-sign.c", why I could not alter the
> strings (A0FF4590BB6122EDEF6E3C542D727CC768697734,
> D695676BDCEDCC2CDD6152BCFE180B1DA9E3B0B2) of these functions? Are they
> fixed values? If not so, how I can generate these strings?
> err = gpgme_get_key (ctx, "A0FF4590BB6122EDEF6E3C542D727CC768697734",
> &key, 0);
> err = gpgme_get_key (ctx, "D695676BDCEDCC2CDD6152BCFE180B1DA9E3B0B2",
> &key, 0);
The test suite tests against the keys used in the test suite.
It's a good idea to use the GPGME test programs as examples and basis
for your own work. But you will also need to read the manual and have
an understanding of encryption in general and GPG in particular.
As you can find in the reference manual, the second argument to
gpgme_get_key is the fingerprint of the key. The fingerprint is shown
by gpg --with-fingerprint -kv, for example.
Or you can do a key listing based on other properties, and search
through the list of keys returned. Please see the reference manual.
More information about the Gnupg-devel