From: Werner Koch Date: Mon, 30 Sep 2002 08:03:56 +0000 (+0000) Subject: * gpgsm/t-keylist.c (doit): Add arg SECRET. X-Git-Tag: gpgme-0-3-13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70c7865aeea19dc5b629e0f2bd7daafdc838f56a;p=gpgme.git * gpgsm/t-keylist.c (doit): Add arg SECRET. (main): Add option --secret. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index ab1454c..770b4b5 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 bb14ee8..2307ad6 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);