diff --git a/tests/ChangeLog b/tests/ChangeLog index ab1454cd..770b4b54 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2002-09-30 Werner Koch + + * gpgsm/t-keylist.c (doit): Add arg SECRET. + (main): Add option --secret. + 2002-09-28 Marcus Brinkmann * t-version.c: Include . Reported by Stéphane Corthésy. diff --git a/tests/gpgsm/t-keylist.c b/tests/gpgsm/t-keylist.c index bb14ee8d..2307ad67 100644 --- a/tests/gpgsm/t-keylist.c +++ b/tests/gpgsm/t-keylist.c @@ -33,12 +33,12 @@ } while(0) static void -doit ( GpgmeCtx ctx, const char *pattern ) +doit ( GpgmeCtx ctx, const char *pattern, int secret ) { GpgmeError err; GpgmeKey key; - err = gpgme_op_keylist_start (ctx, pattern, 0 ); + err = gpgme_op_keylist_start (ctx, pattern, secret ); fail_if_err (err); while ( !(err = gpgme_op_keylist_next ( ctx, &key )) ) { @@ -147,6 +147,7 @@ main (int argc, char **argv ) GpgmeCtx ctx; GpgmeError err; int loop = 0; + int secret = 0; const char *pattern; if( argc ) { @@ -157,6 +158,10 @@ main (int argc, char **argv ) loop = 1; argc--; argv++; } + if (argc && !strcmp( *argv, "--secret" ) ) { + secret = 1; + argc--; argv++; + } pattern = argc? *argv : NULL; err = gpgme_engine_check_version (GPGME_PROTOCOL_CMS); @@ -169,7 +174,7 @@ main (int argc, char **argv ) gpgme_set_keylist_mode (ctx, 1); /* no validity calculation */ do { fprintf (stderr, "** pattern=`%s'\n", pattern ); - doit ( ctx, pattern ); + doit ( ctx, pattern, secret ); } while ( loop ); gpgme_release (ctx);