From 5a37051361cd2d8c47c49f7ac3c4ae6fd0e0c206 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 6 Feb 2003 20:09:24 +0000 Subject: doc/ 2003-02-06 Marcus Brinkmann * gpgme.texi (Cancelling an Operation): Removed. (Passphrase Callback): Document new type for GpgmePassphraseCb. gpgme/ 2003-02-06 Marcus Brinkmann * gpgme.h (GpgmePassphraseCb): Change type to return GpgmeError, and add argument for returning the result string. (gpgme_cancel): Remove prototype. * gpgme.c (gpgme_cancel): Remove function. * context.h (struct gpgme_context_s): Remove member cancel. * passphrase.c (_gpgme_passphrase_command_handler): Call the passphrase callback in the new way. tests/ 2003-02-06 Marcus Brinkmann * gpg/t-decrypt.c (passphrase_cb): Fix to new prototype. * gpg/t-decrypt-verify.c (passphrase_cb): Likewise. * gpg/t-edit.c (passphrase_cb): Likewise. * gpg/t-encrypt-sign.c (passphrase_cb): Likewise. * gpg/t-encrypt-sym.c (passphrase_cb): Likewise. * gpg/t-sign.c (passphrase_cb): Likewise. * gpg/t-signers.c (passphrase_cb): Likewise. --- tests/gpg/t-encrypt-sign.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'tests/gpg/t-encrypt-sign.c') diff --git a/tests/gpg/t-encrypt-sign.c b/tests/gpg/t-encrypt-sign.c index dfd54bed..36bd888c 100644 --- a/tests/gpg/t-encrypt-sign.c +++ b/tests/gpg/t-encrypt-sign.c @@ -62,23 +62,19 @@ print_data (GpgmeData dh) } -static const char * -passphrase_cb ( void *opaque, const char *desc, void **r_hd ) +static GpgmeError +passphrase_cb (void *opaque, const char *desc, + void **r_hd, const char **result) { - const char *pass; - - if ( !desc ) { - /* cleanup by looking at *r_hd */ - - - return NULL; - } - - pass = "abc"; - fprintf (stderr, "%% requesting passphrase for `%s': ", desc ); - fprintf (stderr, "sending `%s'\n", pass ); + if (!desc) + /* Cleanup by looking at *r_hd. */ + return 0; - return pass; + *result = "abc"; + fprintf (stderr, "%% requesting passphrase for `%s': ", desc); + fprintf (stderr, "sending `%s'\n", *result); + + return 0; } -- cgit v1.2.3