Hi all,
when I call gpg to import some crap data, a proper error message is returned, e.g.:
<snip>
user@host:~$ gpg --import <<< 'some crap'
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
</snip>
However, calling gpgme_op_import() on the same data, and then reading gpgme_op_import_result(), no usable error information is returned. E.g. running the attached simple code, the result is
<snip>
user@host:~$ ./gpgme-import
GpgME version: 1.12.0
gpgme_new: 0
gpgme_set_protocol: 0
gpgme_data_new_from_mem: 0
gpgme_op_import: 0
gpgme_op_import_result: imported=0, not imported=0, imports=(nil)
</snip>
I would expect that imports is not NULL, and imports->result indicate the error (probably GPG_ERR_INV_DATA).
Did I miss something here (i.e. I have to read the error information somewhere else), or is this information left out intentionally?
Thanks
Albrecht.
when I call gpg to import some crap data, a proper error message is returned, e.g.:
<snip>
user@host:~$ gpg --import <<< 'some crap'
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
</snip>
However, calling gpgme_op_import() on the same data, and then reading gpgme_op_import_result(), no usable error information is returned. E.g. running the attached simple code, the result is
<snip>
user@host:~$ ./gpgme-import
GpgME version: 1.12.0
gpgme_new: 0
gpgme_set_protocol: 0
gpgme_data_new_from_mem: 0
gpgme_op_import: 0
gpgme_op_import_result: imported=0, not imported=0, imports=(nil)
</snip>
I would expect that imports is not NULL, and imports->result indicate the error (probably GPG_ERR_INV_DATA).
Did I miss something here (i.e. I have to read the error information somewhere else), or is this information left out intentionally?
Thanks
Albrecht.