summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-06-24 16:38:08 -0400
committerRich Salz <rsalz@openssl.org>2016-06-24 16:39:05 -0400
commit3b5bea3604fdb0504381de601f0162e97de05582 (patch)
tree34d27e93470b24f6356127c93c9ea3cc19c48537 /apps
parent67b8bf4d849a7c40d0226de4ebe2590c4cc7c1f7 (diff)
Add -ciphers flag to enc command
Don't print the full list of ciphers as part of the -help output. Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/enc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/enc.c b/apps/enc.c
index b7e4a95f9c..403d14e800 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -34,6 +34,7 @@ static void show_ciphers(const OBJ_NAME *name, void *bio_);
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
+ OPT_LIST,
OPT_E, OPT_IN, OPT_OUT, OPT_PASS, OPT_ENGINE, OPT_D, OPT_P, OPT_V,
OPT_NOPAD, OPT_SALT, OPT_NOSALT, OPT_DEBUG, OPT_UPPER_P, OPT_UPPER_A,
OPT_A, OPT_Z, OPT_BUFSIZE, OPT_K, OPT_KFILE, OPT_UPPER_K, OPT_NONE,
@@ -42,6 +43,7 @@ typedef enum OPTION_choice {
OPTIONS enc_options[] = {
{"help", OPT_HELP, '-', "Display this summary"},
+ {"ciphers", OPT_LIST, '-', "List ciphers"},
{"in", OPT_IN, '<', "Input file"},
{"out", OPT_OUT, '>', "Output file"},
{"pass", OPT_PASS, 's', "Passphrase source"},
@@ -129,7 +131,9 @@ int enc_main(int argc, char **argv)
case OPT_HELP:
opt_help(enc_options);
ret = 0;
- BIO_printf(bio_err, "Cipher Types\n");
+ goto end;
+ case OPT_LIST:
+ BIO_printf(bio_err, "Supported ciphers:\n");
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
show_ciphers, bio_err);
BIO_printf(bio_err, "\n");