Example for callback function
Marcus Brinkmann
marcus.brinkmann at ruhr-uni-bochum.de
Sun Mar 14 22:13:24 CET 2004
At Sun, 14 Mar 2004 21:37:23 +0100,
Florian Lindner wrote:
> I'm looking for an example how to use the gpgme callback function to obtain
> the password. I just don't get it managed to install the callback.
From tests/gpg/*:
gpgme_error_t
passphrase_cb (void *opaque, const char *uid_hint, const char *passphrase_info,
int last_was_bad, int fd)
{
write (fd, "abc\n", 4);
return 0;
}
and:
gpgme_set_passphrase_cb (ctx, passphrase_cb, NULL);
Thanks,
Marcus
More information about the Gnupg-devel
mailing list