diff options
author | René Korthaus <[email protected]> | 2015-07-15 18:06:19 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2015-07-15 18:06:19 +0200 |
commit | 9640f239a63f7c38c9354a1cf2fff2161ae75473 (patch) | |
tree | fed9ae9be4632e41f562aee341092ad52d3efaed /src/cmd | |
parent | 35003d1b1dc53247f8c11284441e4dd398307ca8 (diff) |
Check minimum arguments and print help
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/pkcs8.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd/pkcs8.cpp b/src/cmd/pkcs8.cpp index 658c781b9..6ef9c35cf 100644 --- a/src/cmd/pkcs8.cpp +++ b/src/cmd/pkcs8.cpp @@ -27,7 +27,13 @@ int pkcs8(int argc, char* argv[]) const std::string passin = opts.value_or_else("passin", ""); const std::string passout = opts.value_or_else("passout", ""); const std::string pbe = opts.value_or_else("pbe", ""); - + + if(argc < 3) + { + opts.help( std::cout, "pkcs8" ); + return 1; + } + try { std::ofstream out_key(opts.value("out")); |