/*
- * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
#ifdef OPENSSL_SYS_VMS
# include <unixio.h>
#endif
-#define INCLUDE_FUNCTION_TABLE
#include "apps.h"
+#define INCLUDE_FUNCTION_TABLE
+#include "progs.h"
/* Structure to hold the number of columns to be displayed and the
* field width used to display them.
dc->columns = (80 - 1) / dc->width;
}
-static int apps_startup()
+static int apps_startup(void)
{
#ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN);
return 1;
}
-static void apps_shutdown()
+static void apps_shutdown(void)
{
destroy_ui_method();
+ destroy_prefix_method();
}
-static char *make_config_name()
+static char *make_config_name(void)
{
const char *t;
size_t len;
} HELP_CHOICE;
const OPTIONS help_options[] = {
+ {OPT_HELP_STR, 1, '-', "Usage: help [options]\n"},
+ {OPT_HELP_STR, 1, '-', " help [command]\n"},
{"help", OPT_hHELP, '-', "Display this summary"},
{NULL}
};
}
}
+ if (opt_num_rest() == 1) {
+ char *new_argv[3];
+
+ new_argv[0] = opt_rest()[0];
+ new_argv[1] = "--help";
+ new_argv[2] = NULL;
+ return do_cmd(prog_init(), 2, new_argv);
+ }
if (opt_num_rest() != 0) {
BIO_printf(bio_err, "Usage: %s\n", prog);
return 1;
{
FUNCTION *fp;
int i = 0;
- DISPLAY_COLUMNS dc;
+ DISPLAY_COLUMNS dc = {0};
if (!one)
calculate_columns(&dc);
#ifdef OPENSSL_NO_SEED
BIO_puts(bio_out, "SEED\n");
#endif
+#ifdef OPENSSL_NO_SM2
+ BIO_puts(bio_out, "SM2\n");
+#endif
#ifdef OPENSSL_NO_SM3
BIO_puts(bio_out, "SM3\n");
#endif