new option "openssl ciphers -V"
[openssl.git] / apps / engine.c
index b9512546122f311e454db61b3a6eba77c1e26f9f..25c86171079966bdfb7f23c67592f3e82b49d012 100644 (file)
@@ -72,7 +72,7 @@
 #undef PROG
 #define PROG   engine_main
 
-static char *engine_usage[]={
+static const char *engine_usage[]={
 "usage: engine opts [engine ...]\n",
 " -v[v[v[v]]] - verbose mode, for each engine, list its 'control commands'\n",
 "               -vv will additionally display each command's description\n",
@@ -344,7 +344,7 @@ int MAIN(int, char **);
 int MAIN(int argc, char **argv)
        {
        int ret=1,i;
-       char **pp;
+       const char **pp;
        int verbose=0, list_cap=0, test_avail=0, test_avail_noise = 0;
        ENGINE *e;
        STACK *engines = sk_new_null();
@@ -394,11 +394,15 @@ int MAIN(int argc, char **argv)
                else if (strcmp(*argv,"-pre") == 0)
                        {
                        argc--; argv++;
+                       if (argc == 0)
+                               goto skip_arg_loop;
                        sk_push(pre_cmds,*argv);
                        }
                else if (strcmp(*argv,"-post") == 0)
                        {
                        argc--; argv++;
+                       if (argc == 0)
+                               goto skip_arg_loop;
                        sk_push(post_cmds,*argv);
                        }
                else if ((strncmp(*argv,"-h",2) == 0) ||