X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fopenssl.c;h=8224ae3d0f5af1466e4359d57852603b8721554b;hp=dd7463edf3ec81bcf6171ea830ed96c347190c7c;hb=4bdc25b07f007d9c383fbad159f81543f2e95965;hpb=391e987e9cd837446d3d0bf5505bbc7aa44b627e diff --git a/apps/openssl.c b/apps/openssl.c index dd7463edf3..8224ae3d0f 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -1,5 +1,5 @@ /* - * 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 @@ -27,8 +27,9 @@ #ifdef OPENSSL_SYS_VMS # include #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. @@ -92,6 +93,7 @@ static int apps_startup() static void apps_shutdown() { destroy_ui_method(); + destroy_prefix_method(); } static char *make_config_name() @@ -442,6 +444,8 @@ typedef enum HELP_CHOICE { } 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} }; @@ -469,6 +473,14 @@ int help_main(int argc, char **argv) } } + 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; @@ -508,7 +520,7 @@ static void list_type(FUNC_TYPE ft, int one) { FUNCTION *fp; int i = 0; - DISPLAY_COLUMNS dc; + DISPLAY_COLUMNS dc = {0}; if (!one) calculate_columns(&dc); @@ -750,6 +762,9 @@ static void list_disabled(void) #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