verify and recover

Marcus Brinkmann marcus.brinkmann at
Sat Mar 14 16:37:49 CET 2009

Oguz Yarimtepe wrote:
> I tried gpgme_op_decrypt_verify but it seems there should be an
> encrypted data. gpgme_op_verify may be achieve this but i am not so sure
> how to use it.

>From the manual:

@deftypefun gpgme_error_t gpgme_op_verify (@w{gpgme_ctx_t @var{ctx}},
@w{gpgme_data_t @var{sig}}, @w{gpgme_data_t @var{signed_text}},
@w{gpgme_data_t @var{plain}})
The function @code{gpgme_op_verify} verifies that the signature in the
data object @var{sig} is a valid signature.  If @var{sig} is a
detached signature, then the signed text should be provided in
@var{signed_text} and @var{plain} should be a null pointer.
Otherwise, if @var{sig} is a normal (or cleartext) signature,
@var{signed_text} should be a null pointer and @var{plain} should be a
writable data object that will contain the plaintext after successful

So, depending on detached or inline signature, you have to invoke it with
different paramters.  gpgme/tests/gpg/ contains example code.


More information about the Gnupg-devel mailing list