pki tool supports single letter short options

This commit is contained in:
Martin Willi
2009-09-15 10:20:22 +02:00
parent 012f62a820
commit 4fdb9f6f74
8 changed files with 42 additions and 13 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ static int gen(int argc, char *argv[])
while (TRUE)
{
switch (getopt_long(argc, argv, "", command_opts, NULL))
switch (getopt_long(argc, argv, command_optstring, command_opts, NULL))
{
case 'h':
return command_usage(NULL);
+2 -2
View File
@@ -53,7 +53,7 @@ static int issue(int argc, char *argv[])
while (TRUE)
{
switch (getopt_long(argc, argv, "", command_opts, NULL))
switch (getopt_long(argc, argv, command_optstring, command_opts, NULL))
{
case 'h':
goto usage;
@@ -275,7 +275,7 @@ static int issue(int argc, char *argv[])
not_before = time(NULL);
not_after = not_before + lifetime * 24 * 60 * 60;
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
BUILD_SIGNING_KEY, private, BUILD_SIGNING_CERT, ca,
BUILD_PUBLIC_KEY, public, BUILD_SUBJECT, id,
+1 -1
View File
@@ -34,7 +34,7 @@ static int keyid(int argc, char *argv[])
while (TRUE)
{
switch (getopt_long(argc, argv, "", command_opts, NULL))
switch (getopt_long(argc, argv, command_optstring, command_opts, NULL))
{
case 'h':
return command_usage(NULL);
+1 -1
View File
@@ -35,7 +35,7 @@ static int pub(int argc, char *argv[])
while (TRUE)
{
switch (getopt_long(argc, argv, "", command_opts, NULL))
switch (getopt_long(argc, argv, command_optstring, command_opts, NULL))
{
case 'h':
return command_usage(NULL);
+1 -1
View File
@@ -48,7 +48,7 @@ static int self(int argc, char *argv[])
while (TRUE)
{
switch (getopt_long(argc, argv, "", command_opts, NULL))
switch (getopt_long(argc, argv, command_optstring, command_opts, NULL))
{
case 'h':
goto usage;
+1 -1
View File
@@ -29,7 +29,7 @@ static int verify(int argc, char *argv[])
while (TRUE)
{
switch (getopt_long(argc, argv, "", command_opts, NULL))
switch (getopt_long(argc, argv, command_optstring, command_opts, NULL))
{
case 'h':
return command_usage(NULL);