+2002-09-30 Werner Koch <wk@gnupg.org>
+
+ * gpgsm/t-keylist.c (doit): Add arg SECRET.
+ (main): Add option --secret.
+
2002-09-28 Marcus Brinkmann <marcus@g10code.de>
* t-version.c: Include <string.h>. Reported by Stéphane Corthésy.
} 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 )) ) {
GpgmeCtx ctx;
GpgmeError err;
int loop = 0;
+ int secret = 0;
const char *pattern;
if( argc ) {
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);
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);