aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2008-07-14 21:28:19 +0000
committerRob Austein <sra@hactrn.net>2008-07-14 21:28:19 +0000
commit4729eb2c8c7482d40a74d29c73860da03170a979 (patch)
treedb7157faf09e150e0e30fac0492c20babb009f16 /utils
parentf979ca098fb4791fc3594b2d35e32eb1695569cf (diff)
Fix usage messages
svn path=/utils/print_manifest/print_manifest.c; revision=1992
Diffstat (limited to 'utils')
-rw-r--r--utils/print_manifest/print_manifest.c4
-rw-r--r--utils/print_roa/print_roa.c4
-rw-r--r--utils/uri/uri.c7
3 files changed, 14 insertions, 1 deletions
diff --git a/utils/print_manifest/print_manifest.c b/utils/print_manifest/print_manifest.c
index be24a2f0..6084f07f 100644
--- a/utils/print_manifest/print_manifest.c
+++ b/utils/print_manifest/print_manifest.c
@@ -180,6 +180,10 @@ int main (int argc, char *argv[])
int result = 0;
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
+ if (argc < 2) {
+ fprintf(stderr, "usage: %s manifest [manifest...]\n", argv[0]);
+ return 1;
+ }
while (--argc > 0)
result |= read_manifest(*++argv, 0, 1, 1) == NULL;
return result;
diff --git a/utils/print_roa/print_roa.c b/utils/print_roa/print_roa.c
index 42f03c8f..efe76674 100644
--- a/utils/print_roa/print_roa.c
+++ b/utils/print_roa/print_roa.c
@@ -307,6 +307,10 @@ int main (int argc, char *argv[])
int result = 0;
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
+ if (argc < 2) {
+ fprintf(stderr, "usage: %s ROA [ROA...]\n", argv[0]);
+ return 1;
+ }
while (--argc > 0)
result |= read_roa(*++argv, 0, 1, 1) == NULL;
return result;
diff --git a/utils/uri/uri.c b/utils/uri/uri.c
index 3a8a9fbb..daef8da3 100644
--- a/utils/uri/uri.c
+++ b/utils/uri/uri.c
@@ -159,11 +159,16 @@ int main(int argc, char *argv[])
format = c;
break;
default:
- fprintf(stderr, "usage: %s [-p | -d] cert [cert...]\n", argv[0]);
ret = 1;
}
}
+ if (argc == optind)
+ ret = 1;
+
+ if (ret != 0)
+ fprintf(stderr, "usage: %s [-p | -d] cert [cert...]\n", argv[0]);
+
if (ret == 0) {
argc -= optind;
argv += optind;