diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-07-10 16:31:02 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-07-10 16:31:04 +0200 |
commit | e867aae1be191433186aad9d799c5de297b219a0 (patch) | |
tree | efcde5fd89f3b529a24721f2b1de733479ec7f56 /src | |
parent | 08fc29d30ade5ded03fe7defa65519f95a7ebbd9 (diff) | |
download | gnutls-e867aae1be191433186aad9d799c5de297b219a0.tar.gz |
p11tool: keep backwards compatibility by introducing --list-token-urls
That is, the output of --list-tokens remains the same.
Diffstat (limited to 'src')
-rw-r--r-- | src/p11tool-args.def | 7 | ||||
-rw-r--r-- | src/p11tool.c | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/p11tool-args.def b/src/p11tool-args.def index 0fd7e18ac2..dec967129e 100644 --- a/src/p11tool-args.def +++ b/src/p11tool-args.def @@ -20,7 +20,6 @@ reorder-args; argument = "[url]"; #define OUTFILE_OPT 1 -#define VERBOSE_OPT 1 #include args-std.def flag = { @@ -30,6 +29,12 @@ flag = { }; flag = { + name = list-token-urls; + descrip = "List the URLs available tokens"; + doc = "This is a more compact version of --list-tokens."; +}; + +flag = { name = export; descrip = "Export the object specified by the URL"; doc = ""; diff --git a/src/p11tool.c b/src/p11tool.c index 397b4c09fa..b647cbbcd9 100644 --- a/src/p11tool.c +++ b/src/p11tool.c @@ -178,9 +178,6 @@ static void cmd_parser(int argc, char **argv) flags = opt_to_flags(&key_usage); cinfo.key_usage = key_usage; - if (HAVE_OPT(VERBOSE)) - cinfo.verbose = 1; - if (HAVE_OPT(SECRET_KEY)) cinfo.secret_key = OPT_ARG(SECRET_KEY); @@ -243,7 +240,9 @@ static void cmd_parser(int argc, char **argv) /* handle actions */ if (HAVE_OPT(LIST_TOKENS)) { - pkcs11_token_list(outfile, detailed_url, &cinfo, !cinfo.verbose); + pkcs11_token_list(outfile, detailed_url, &cinfo, 0); + } else if (HAVE_OPT(LIST_TOKEN_URLS)) { + pkcs11_token_list(outfile, detailed_url, &cinfo, 1); } else if (HAVE_OPT(LIST_MECHANISMS)) { pkcs11_mechanism_list(outfile, url, flags, &cinfo); } else if (HAVE_OPT(GENERATE_RANDOM)) { |