* gpgsm/t-keylist.c (doit): Add arg SECRET.
(main): Add option --secret.
This commit is contained in:
parent
57add1098d
commit
d256945205
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user