diff options
author | Martin Willi <martin@strongswan.org> | 2009-09-10 12:44:06 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-09-10 16:18:30 +0200 |
commit | 3ce9438b6010e6fd5f61531ae25473ea60a83cd9 (patch) | |
tree | fcd733fb577ce734edf8f3f9eacae37e498dc954 /src/pki/commands/pub.c | |
parent | 6be68cc1c72ab076fbdfd05f24662519e62cfca8 (diff) | |
download | strongswan-3ce9438b6010e6fd5f61531ae25473ea60a83cd9.tar.bz2 strongswan-3ce9438b6010e6fd5f61531ae25473ea60a83cd9.tar.xz |
Use dynamic registration/usage invocation of command types
Diffstat (limited to 'src/pki/commands/pub.c')
-rw-r--r-- | src/pki/commands/pub.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pki/commands/pub.c b/src/pki/commands/pub.c index 5e7839fd6..16bd0b049 100644 --- a/src/pki/commands/pub.c +++ b/src/pki/commands/pub.c @@ -38,7 +38,7 @@ static int pub(int argc, char *argv[]) switch (getopt_long(argc, argv, "", command_opts, NULL)) { case 'h': - return command_usage(CMD_PUB, NULL); + return command_usage(NULL); case 't': if (streq(optarg, "rsa")) { @@ -57,13 +57,13 @@ static int pub(int argc, char *argv[]) } else { - return command_usage(CMD_PUB, "invalid input type"); + return command_usage("invalid input type"); } continue; case 'f': if (!get_form(optarg, &form, TRUE)) { - return command_usage(CMD_PUB, "invalid output format"); + return command_usage("invalid output format"); } continue; case 'i': @@ -72,7 +72,7 @@ static int pub(int argc, char *argv[]) case EOF: break; default: - return command_usage(CMD_PUB, "invalid --pub option"); + return command_usage("invalid --pub option"); } break; } @@ -136,7 +136,7 @@ static int pub(int argc, char *argv[]) */ static void __attribute__ ((constructor))reg() { - command_register(CMD_PUB, (command_t) { + command_register((command_t) { pub, 'p', "pub", "extract the public key from a private key/certificate", {"[--in file] [--type rsa|ecdsa|x509] [--outform der|pem|pgp]"}, |