diff options
Diffstat (limited to 'tests/gpg/t-decrypt.c')
-rw-r--r-- | tests/gpg/t-decrypt.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/gpg/t-decrypt.c b/tests/gpg/t-decrypt.c index b674653a..7b406a76 100644 --- a/tests/gpg/t-decrypt.c +++ b/tests/gpg/t-decrypt.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <string.h> #include <errno.h> +#include <unistd.h> #include <gpgme.h> @@ -56,13 +57,10 @@ print_data (gpgme_data_t dh) static gpgme_error_t -passphrase_cb (void *opaque, const char *desc, void **hd, const char **result) +passphrase_cb (void *opaque, const char *uid_hint, const char *passphrase_info, + int last_was_bad, int fd) { - /* Cleanup by looking at *hd. */ - if (!desc) - return 0; - - *result = "abc"; + write (fd, "abc\n", 4); return 0; } |