From 91d3e5aa57bd9a75e77ddbd4753897b6a372c323 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 17 Feb 2004 17:26:20 +0000 Subject: [PATCH] * gpgsm/t-import.c (check_result): gpgsm does now return info in the result->imports; adjust for that. * gpgsm/Makefile.am (TESTS_ENVIRONMENT): Reset the GPG_AGENT_INFO. * gpg/t-keylist-sig.c (main): s/class/sig_class/. * gpg/t-signers.c (check_result): Ditto. * gpg/t-sign.c (check_result): Ditto. * gpg/t-encrypt-sign.c (check_result): Ditto. * gpgsm/t-sign.c (check_result): Ditto. --- NEWS | 4 ++++ tests/ChangeLog | 16 ++++++++++++++++ tests/gpg/t-decrypt-verify.c | 6 ++++++ tests/gpg/t-decrypt.c | 6 ++++++ tests/gpg/t-edit.c | 6 ++++++ tests/gpg/t-encrypt-sign.c | 10 ++++++++-- tests/gpg/t-encrypt-sym.c | 6 ++++++ tests/gpg/t-encrypt.c | 6 ++++++ tests/gpg/t-eventloop.c | 6 ++++++ tests/gpg/t-export.c | 6 ++++++ tests/gpg/t-genkey.c | 6 ++++++ tests/gpg/t-import.c | 6 ++++++ tests/gpg/t-keylist-sig.c | 20 +++++++++++++------- tests/gpg/t-keylist.c | 6 ++++++ tests/gpg/t-sign.c | 10 ++++++++-- tests/gpg/t-signers.c | 10 ++++++++-- tests/gpg/t-thread1.c | 6 ++++++ tests/gpg/t-trustlist.c | 6 ++++++ tests/gpg/t-verify.c | 6 ++++++ tests/gpgsm/Makefile.am | 2 +- tests/gpgsm/t-decrypt.c | 7 +++++++ tests/gpgsm/t-encrypt.c | 6 ++++++ tests/gpgsm/t-export.c | 6 ++++++ tests/gpgsm/t-genkey.c | 6 ++++++ tests/gpgsm/t-import.c | 17 ++++++++++++++++- tests/gpgsm/t-keylist.c | 6 ++++++ tests/gpgsm/t-sign.c | 10 ++++++++-- tests/gpgsm/t-verify.c | 6 ++++++ tests/t-data.c | 6 ++++++ 29 files changed, 203 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index 067cae6..5812dcf 100644 --- a/NEWS +++ b/NEWS @@ -54,11 +54,15 @@ Noteworthy changes in version 0.4.5 (unreleased) needed. Still, it is there if necessary. If in doubt, contact us and we will give our advise for your specific situation. + * A new key listing mode for validation of the key has been added. + See the manual. + * Interface changes relative to the 0.4.4 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_data_seek_cb_t CHANGED: off_t is now a largefile type. gpgme_data_seek CHANGED: off_t is now a largefile type. gpgme_data_new_from_filepart CHANGED: off_t is now a largefile type. +GPGME_KEYLIST_MODE_VALIDATE NEW. Noteworthy changes in version 0.4.4 (2004-01-12) diff --git a/tests/ChangeLog b/tests/ChangeLog index f17e812..e80cf7b 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,19 @@ +2004-02-17 Werner Koch + + * gpgsm/t-import.c (check_result): gpgsm does now return info in + the result->imports; adjust for that. + + * gpgsm/Makefile.am (TESTS_ENVIRONMENT): Reset the GPG_AGENT_INFO. + + Include config.h at the top of each C source. This is required + due to LFS support. + + * gpg/t-keylist-sig.c (main): s/class/sig_class/. + * gpg/t-signers.c (check_result): Ditto. + * gpg/t-sign.c (check_result): Ditto. + * gpg/t-encrypt-sign.c (check_result): Ditto. + * gpgsm/t-sign.c (check_result): Ditto. + 2004-01-12 Werner Koch * gpg/t-keylist-sig.c (main): Temporary disabled one test due top diff --git a/tests/gpg/t-decrypt-verify.c b/tests/gpg/t-decrypt-verify.c index 5cbfd0d..5cdfa07 100644 --- a/tests/gpg/t-decrypt-verify.c +++ b/tests/gpg/t-decrypt-verify.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-decrypt.c b/tests/gpg/t-decrypt.c index bfe05b2..c9f6eb1 100644 --- a/tests/gpg/t-decrypt.c +++ b/tests/gpg/t-decrypt.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-edit.c b/tests/gpg/t-edit.c index cefcbc4..fb69e54 100644 --- a/tests/gpg/t-edit.c +++ b/tests/gpg/t-edit.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-encrypt-sign.c b/tests/gpg/t-encrypt-sign.c index 19618c4..7885b62 100644 --- a/tests/gpg/t-encrypt-sign.c +++ b/tests/gpg/t-encrypt-sign.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -59,10 +65,10 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type) result->signatures->hash_algo); exit (1); } - if (result->signatures->class != 0) + if (result->signatures->sig_class != 0) { fprintf (stderr, "Wrong signature class reported: %u\n", - result->signatures->class); + result->signatures->sig_class); exit (1); } if (strcmp ("A0FF4590BB6122EDEF6E3C542D727CC768697734", diff --git a/tests/gpg/t-encrypt-sym.c b/tests/gpg/t-encrypt-sym.c index 29a3f47..015ff19 100644 --- a/tests/gpg/t-encrypt-sym.c +++ b/tests/gpg/t-encrypt-sym.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-encrypt.c b/tests/gpg/t-encrypt.c index 756d216..c180668 100644 --- a/tests/gpg/t-encrypt.c +++ b/tests/gpg/t-encrypt.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-eventloop.c b/tests/gpg/t-eventloop.c index 1ffaea5..7b08ba8 100644 --- a/tests/gpg/t-eventloop.c +++ b/tests/gpg/t-eventloop.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-export.c b/tests/gpg/t-export.c index 44c48f9..ddac43e 100644 --- a/tests/gpg/t-export.c +++ b/tests/gpg/t-export.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-genkey.c b/tests/gpg/t-genkey.c index 52bb99f..09bbd1e 100644 --- a/tests/gpg/t-genkey.c +++ b/tests/gpg/t-genkey.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-import.c b/tests/gpg/t-import.c index 4a304d8..b2c11aa 100644 --- a/tests/gpg/t-import.c +++ b/tests/gpg/t-import.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-keylist-sig.c b/tests/gpg/t-keylist-sig.c index 9edaf03..41fa4af 100644 --- a/tests/gpg/t-keylist-sig.c +++ b/tests/gpg/t-keylist-sig.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -43,7 +49,7 @@ struct char *name; char *comment; char *email; - unsigned int class; + unsigned int sig_class; int exportable; } sig; } uid[3]; @@ -405,10 +411,10 @@ main (int argc, char **argv) key->uids->signatures->email); exit (1); } - if (keys[i].uid[0].sig.class != key->uids->signatures->class) + if (keys[i].uid[0].sig.sig_class != key->uids->signatures->sig_class) { fprintf (stderr, "Unexpected class in first user ID sig: %i\n", - key->uids->signatures->class); + key->uids->signatures->sig_class); exit (1); } if (keys[i].uid[0].sig.exportable != key->uids->signatures->exportable) @@ -497,10 +503,10 @@ main (int argc, char **argv) key->uids->next->signatures->email); exit (1); } - if (keys[i].uid[1].sig.class != key->uids->next->signatures->class) + if (keys[i].uid[1].sig.sig_class != key->uids->next->signatures->sig_class) { fprintf (stderr, "Unexpected class in second user ID sig: %i\n", - key->uids->next->signatures->class); + key->uids->next->signatures->sig_class); exit (1); } if (keys[i].uid[1].sig.exportable != key->uids->next->signatures->exportable) @@ -586,10 +592,10 @@ main (int argc, char **argv) key->uids->next->next->signatures->email); exit (1); } - if (keys[i].uid[2].sig.class != key->uids->next->next->signatures->class) + if (keys[i].uid[2].sig.sig_class != key->uids->next->next->signatures->sig_class) { fprintf (stderr, "Unexpected class in third user ID sig: %i\n", - key->uids->next->next->signatures->class); + key->uids->next->next->signatures->sig_class); exit (1); } if (keys[i].uid[2].sig.exportable != key->uids->next->next->signatures->exportable) diff --git a/tests/gpg/t-keylist.c b/tests/gpg/t-keylist.c index 17c35ed..41332f6 100644 --- a/tests/gpg/t-keylist.c +++ b/tests/gpg/t-keylist.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-sign.c b/tests/gpg/t-sign.c index 1b9d06d..ae366ff 100644 --- a/tests/gpg/t-sign.c +++ b/tests/gpg/t-sign.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -59,10 +65,10 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type) result->signatures->hash_algo); exit (1); } - if (result->signatures->class != 1) + if (result->signatures->sig_class != 1) { fprintf (stderr, "Wrong signature class reported: %u\n", - result->signatures->class); + result->signatures->sig_class); exit (1); } if (strcmp ("A0FF4590BB6122EDEF6E3C542D727CC768697734", diff --git a/tests/gpg/t-signers.c b/tests/gpg/t-signers.c index f8288b4..199942e 100644 --- a/tests/gpg/t-signers.c +++ b/tests/gpg/t-signers.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -66,10 +72,10 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type) signature->hash_algo); exit (1); } - if (signature->class != 1) + if (signature->sig_class != 1) { fprintf (stderr, "Wrong signature class reported: %u\n", - signature->class); + signature->sig_class); exit (1); } if (strcmp ("A0FF4590BB6122EDEF6E3C542D727CC768697734", diff --git a/tests/gpg/t-thread1.c b/tests/gpg/t-thread1.c index 5054974..cc2e010 100644 --- a/tests/gpg/t-thread1.c +++ b/tests/gpg/t-thread1.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-trustlist.c b/tests/gpg/t-trustlist.c index c8c82f8..677ecec 100644 --- a/tests/gpg/t-trustlist.c +++ b/tests/gpg/t-trustlist.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpg/t-verify.c b/tests/gpg/t-verify.c index 0df8991..bf0b887 100644 --- a/tests/gpg/t-verify.c +++ b/tests/gpg/t-verify.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am index 71984ff..ad114a5 100644 --- a/tests/gpgsm/Makefile.am +++ b/tests/gpgsm/Makefile.am @@ -21,7 +21,7 @@ GPGSM = @GPGSM@ -TESTS_ENVIRONMENT = GNUPGHOME=. +TESTS_ENVIRONMENT = GNUPGHOME=. GPG_AGENT_INFO= noinst_HEADERS = t-support.h TESTS = t-import t-keylist t-encrypt t-verify t-decrypt t-sign t-export diff --git a/tests/gpgsm/t-decrypt.c b/tests/gpgsm/t-decrypt.c index ca5757d..db507f0 100644 --- a/tests/gpgsm/t-decrypt.c +++ b/tests/gpgsm/t-decrypt.c @@ -18,6 +18,13 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpgsm/t-encrypt.c b/tests/gpgsm/t-encrypt.c index ff61394..a5c2dc1 100644 --- a/tests/gpgsm/t-encrypt.c +++ b/tests/gpgsm/t-encrypt.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpgsm/t-export.c b/tests/gpgsm/t-export.c index ce7dadb..f876de7 100644 --- a/tests/gpgsm/t-export.c +++ b/tests/gpgsm/t-export.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpgsm/t-genkey.c b/tests/gpgsm/t-genkey.c index a4d60c1..0c67597 100644 --- a/tests/gpgsm/t-genkey.c +++ b/tests/gpgsm/t-genkey.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpgsm/t-import.c b/tests/gpgsm/t-import.c index 4338156..8270492 100644 --- a/tests/gpgsm/t-import.c +++ b/tests/gpgsm/t-import.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -110,11 +116,20 @@ check_result (gpgme_import_result_t result, char *fpr, int total) result->not_imported); exit (1); } - if (result->imports) + + { + int n; + gpgme_import_status_t r; + + for (n=0, r=result->imports; r; r=r->next) + n++; + + if (n != total) { fprintf (stderr, "Unexpected number of status reports\n"); exit (1); } + } } diff --git a/tests/gpgsm/t-keylist.c b/tests/gpgsm/t-keylist.c index cf4073f..3c38fa7 100644 --- a/tests/gpgsm/t-keylist.c +++ b/tests/gpgsm/t-keylist.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/gpgsm/t-sign.c b/tests/gpgsm/t-sign.c index 2cfac7d..406c72f 100644 --- a/tests/gpgsm/t-sign.c +++ b/tests/gpgsm/t-sign.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -57,10 +63,10 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type) result->signatures->hash_algo); exit (1); } - if (result->signatures->class != 0) + if (result->signatures->sig_class != 0) { fprintf (stderr, "Wrong signature class reported: %u\n", - result->signatures->class); + result->signatures->sig_class); exit (1); } if (strcmp ("3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E", diff --git a/tests/gpgsm/t-verify.c b/tests/gpgsm/t-verify.c index 6fb32a9..19652e3 100644 --- a/tests/gpgsm/t-verify.c +++ b/tests/gpgsm/t-verify.c @@ -18,6 +18,12 @@ along with GPGME; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/tests/t-data.c b/tests/t-data.c index d7950ad..8e61dba 100644 --- a/tests/t-data.c +++ b/tests/t-data.c @@ -18,6 +18,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include -- 2.26.2