GPGME Problem: Unspecified source: Invalid argument

Mike Winter mike.winter at
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 
gcc: gcc-3.4
gpg: 1.4.3
gpgme: 1.1.2

Program (modified from tests/t-verify.c):


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);
  err = gpgme_op_verify(ctx, mesg, NULL, cleartext);
  fail_if_err (err);

More information about the Gnupg-devel mailing list