aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpg/t-decrypt-verify.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2002-12-24 13:08:56 +0000
committerMarcus Brinkmann <[email protected]>2002-12-24 13:08:56 +0000
commitb6e5bb310ee28ed3a8066968083b1767ab913ec7 (patch)
tree025317957f47ccee32b04f856ea008d315b4c9cf /tests/gpg/t-decrypt-verify.c
parent2002-12-24 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-b6e5bb310ee28ed3a8066968083b1767ab913ec7.tar.gz
gpgme-b6e5bb310ee28ed3a8066968083b1767ab913ec7.zip
doc/
2002-12-24 Marcus Brinkmann <[email protected]> * gpgme.texi (Verify): Drop R_STAT argument in gpgme_op_verify. * gpgme.texi (Decrypt and Verify): Likewise for gpgme_op_decrypt_verify. gpgme/ 2002-12-24 Marcus Brinkmann <[email protected]> * gpgme.h (gpgme_op_verify, gpgme_op_decrypt_verify): Drop R_STAT argument. * decrypt-verify.c (gpgme_op_decrypt_verify): Drop R_STAT argument. * verify.c (gpgme_op_verify): Drop R_STAT argument. (_gpgme_intersect_stati): Function removed. * ops.h (_gpgme_intersect_stati): Remove prototype. tests/ 2002-12-24 Marcus Brinkmann <[email protected]> * gpgsm/t-verify.c (main): Adjust caller of gpgme_op_verify. * gpg/t-verify.c (main): Likewise. * gpg/t-decrypt-verify.c (main): Likewise for gpgme_op_decrypt_verify.
Diffstat (limited to '')
-rw-r--r--tests/gpg/t-decrypt-verify.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/tests/gpg/t-decrypt-verify.c b/tests/gpg/t-decrypt-verify.c
index 276f7e6d..1a129a79 100644
--- a/tests/gpg/t-decrypt-verify.c
+++ b/tests/gpg/t-decrypt-verify.c
@@ -1,23 +1,22 @@
/* t-decrypt-verify.c - regression test
- * Copyright (C) 2000 Werner Koch (dd9jn)
- * Copyright (C) 2001 g10 Code GmbH
- *
- * This file is part of GPGME.
- *
- * GPGME is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPGME is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000 Werner Koch (dd9jn)
+ Copyright (C) 2001, 2002 g10 Code GmbH
+
+ This file is part of GPGME.
+
+ GPGME is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GPGME is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GPGME; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
@@ -102,7 +101,7 @@ main (int argc, char **argv)
GpgmeData in, out, pwdata = NULL;
struct passphrase_cb_info_s info;
const char *cipher_2_asc = mk_fname ("cipher-2.asc");
- GpgmeSigStat stat;
+ GpgmeSigStat status;
char *p;
do
@@ -124,15 +123,20 @@ main (int argc, char **argv)
err = gpgme_data_new (&out);
fail_if_err (err);
- err = gpgme_op_decrypt_verify (ctx, in, out, &stat);
+ err = gpgme_op_decrypt_verify (ctx, in, out);
fail_if_err (err);
fflush (NULL);
fputs ("Begin Result:\n", stdout);
print_data (out);
fputs ("End Result.\n", stdout);
-
- if (stat != GPGME_SIG_STAT_GOOD)
+
+ if (!gpgme_get_sig_status (ctx, 0, &status, NULL))
+ {
+ fprintf (stderr, "Signature check failed unexpectedly.\n");
+ exit (1);
+ }
+ if (status != GPGME_SIG_STAT_GOOD)
{
fprintf (stderr, "Signature check failed unexpectedly.\n");
exit (1);