Note: this bug report is for gpgme 1.0.2. I haven't checked it in 1.1.2, but I
want you to know anyway.
When gpg is misconfigured, like say
>grep XXX .gnupg/options |
trusted-key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
, gnupg does not handle this sanely but reports no error but just
returns no data.
The following code outputs "Huh?" in such situations
(with both the stable version and a vanilla unstable version
compiled on stable):
assert( gpgme_data_new_from_file(&sig, filename, 1) == 0 );
assert( gpgme_data_new(&plain) == 0);
if( gpgme_op_verify(context,sig,NULL,plain) == 0 ) {
plain_data = gpgme_data_release_and_get_mem(plain,&plain_len); if( plain_data == NULL ) { fprintf(stderr, "Huh?"); }
}
(Debian bug #389235)