diff options
author | Marcus Brinkmann <[email protected]> | 2003-02-06 20:09:24 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2003-02-06 20:09:24 +0000 |
commit | 5a37051361cd2d8c47c49f7ac3c4ae6fd0e0c206 (patch) | |
tree | ae288a94cdbbc1d5b36583ed3130a16df35ee017 /tests/gpg/t-encrypt-sym.c | |
parent | 2003-01-30 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-5a37051361cd2d8c47c49f7ac3c4ae6fd0e0c206.tar.gz gpgme-5a37051361cd2d8c47c49f7ac3c4ae6fd0e0c206.zip |
doc/
2003-02-06 Marcus Brinkmann <[email protected]>
* gpgme.texi (Cancelling an Operation): Removed.
(Passphrase Callback): Document new type for GpgmePassphraseCb.
gpgme/
2003-02-06 Marcus Brinkmann <[email protected]>
* 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 <[email protected]>
* 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.
Diffstat (limited to 'tests/gpg/t-encrypt-sym.c')
-rw-r--r-- | tests/gpg/t-encrypt-sym.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/tests/gpg/t-encrypt-sym.c b/tests/gpg/t-encrypt-sym.c index db3f3e9e..520005ca 100644 --- a/tests/gpg/t-encrypt-sym.c +++ b/tests/gpg/t-encrypt-sym.c @@ -1,6 +1,6 @@ -/* t-encrypt.c - regression test +/* t-encrypt-sym.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) - * Copyright (C) 2001 g10 Code GmbH + * Copyright (C) 2001, 2003 g10 Code GmbH * * This file is part of GPGME. * @@ -47,24 +47,19 @@ print_data (GpgmeData dh) fail_if_err (GPGME_File_Error); } - -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; - } + if (!desc) + /* Cleanup by looking at *r_hd. */ + return 0; - pass = "abc"; - fprintf (stderr, "%% requesting passphrase for `%s': ", desc ); - fprintf (stderr, "sending `%s'\n", pass ); - - return pass; + *result = "abc"; + fprintf (stderr, "%% requesting passphrase for `%s': ", desc); + fprintf (stderr, "sending `%s'\n", *result); + + return 0; } |