aboutsummaryrefslogtreecommitdiffstats
path: root/src/pki/commands/verify.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-09-15 11:49:14 +0200
committerMartin Willi <martin@strongswan.org>2009-09-15 11:53:46 +0200
commitae7452e87ce98b1644157d57f4aed247c99050e1 (patch)
tree039d64cf1762c83e88c4c558ec333d7dd0b4e70b /src/pki/commands/verify.c
parent4fdb9f6f74435948143ae60397beb2eb2e02f804 (diff)
downloadstrongswan-ae7452e87ce98b1644157d57f4aed247c99050e1.tar.bz2
strongswan-ae7452e87ce98b1644157d57f4aed247c99050e1.tar.xz
Handle pki --debug and --options in a generic way for all command
Diffstat (limited to 'src/pki/commands/verify.c')
-rw-r--r--src/pki/commands/verify.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/pki/commands/verify.c b/src/pki/commands/verify.c
index 26a6dca5d..c0595e044 100644
--- a/src/pki/commands/verify.c
+++ b/src/pki/commands/verify.c
@@ -21,26 +21,24 @@
/**
* Verify a certificate signature
*/
-static int verify(int argc, char *argv[])
+static int verify()
{
certificate_t *cert, *ca;
char *file = NULL, *cafile = NULL;
bool good = FALSE;
+ char *arg;
while (TRUE)
{
- switch (getopt_long(argc, argv, command_optstring, command_opts, NULL))
+ switch (command_getopt(&arg))
{
case 'h':
return command_usage(NULL);
- case 'v':
- dbg_level = atoi(optarg);
- continue;
case 'i':
- file = optarg;
+ file = arg;
continue;
case 'c':
- cafile = optarg;
+ cafile = arg;
continue;
case EOF:
break;
@@ -132,7 +130,6 @@ static void __attribute__ ((constructor))reg()
{"help", 'h', 0, "show usage information"},
{"in", 'i', 1, "x509 certifcate to verify, default: stdin"},
{"cacert", 'c', 1, "CA certificate, default: verify self signed"},
- {"debug", 'v', 1, "set debug level, default: 1"},
}
});
}