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-edit.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'tests/gpg/t-edit.c') diff --git a/tests/gpg/t-edit.c b/tests/gpg/t-edit.c index 8117d587..b78a7fe2 100644 --- a/tests/gpg/t-edit.c +++ b/tests/gpg/t-edit.c @@ -1,6 +1,6 @@ /* t-edit.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) - * Copyright (C) 2001, 2002 g10 Code GmbH + * Copyright (C) 2001, 2002, 2003 g10 Code GmbH * * This file is part of GPGME. * @@ -57,22 +57,19 @@ flush_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; - } + /* Cleanup by looking at *r_hd. */ + return 0; - pass = "abc"; + *result = "abc"; fprintf (stderr, "%% requesting passphrase for `%s': ", desc); - fprintf (stderr, "sending `%s'\n", pass ); - - return pass; + fprintf (stderr, "sending `%s'\n", *result); + + return 0; } -- cgit v1.2.3