aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2015-07-15 18:06:19 +0200
committerRenĂ© Korthaus <[email protected]>2015-07-15 18:06:19 +0200
commit9640f239a63f7c38c9354a1cf2fff2161ae75473 (patch)
treefed9ae9be4632e41f562aee341092ad52d3efaed /src/cmd
parent35003d1b1dc53247f8c11284441e4dd398307ca8 (diff)
Check minimum arguments and print help
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/pkcs8.cpp8
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"));