GPGME Problem: Unspecified source: Invalid argument
Mike Winter
mike.winter at gmail.com
Sat May 20 00:05:29 CEST 2006
Hi, I get the above error when trying to do a seek on a cleartext gpgme_data_t
variable after a gpgme_op_verify() operation. Does anyone have any ideas?
Thanks for any help.
My system:
Ubuntu Linux
CPU: AMD64
gcc: gcc-3.4
gpg: 1.4.3
gpgme: 1.1.2
Program (modified from tests/t-verify.c):
[...]
int
main (int argc, char *argv[])
{
gpgme_ctx_t ctx;
gpgme_error_t err;
gpgme_data_t in;
gpgme_data_t mesg;
gpgme_data_t cleartext;
const char *pubkey_1_asc = make_filename ("my.key.asc");
const char *sig_asc = make_filename("encrypt.gpg");
init_gpgme (GPGME_PROTOCOL_OpenPGP);
err = gpgme_new (&ctx);
fail_if_err (err);
err = gpgme_data_new_from_file (&in, pubkey_1_asc, 1);
fail_if_err (err);
err = gpgme_data_new_from_file (&mesg, sig_asc, 1);
fail_if_err (err);
err = gpgme_op_import (ctx, in);
fail_if_err (err);
err = gpgme_data_new(&cleartext);
fail_if_err(err);
err = gpgme_op_verify(ctx, mesg, NULL, cleartext);
fail_if_err (err);
print_data(cleartext);
[...]
More information about the Gnupg-devel
mailing list