diff options
author | Bodo Möller <bodo@openssl.org> | 1999-04-11 02:49:35 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-04-11 02:49:35 +0000 |
commit | fc8ee06b4db07666a840ff8eed32ac936953fe94 (patch) | |
tree | 23d634bc058e6ba72d835a1aa451501c4f1417bc /apps/openssl.c | |
parent | 7c7c88515fde4bd7b2e89974ebac8e627d987fba (diff) | |
download | openssl-fc8ee06b4db07666a840ff8eed32ac936953fe94.tar.gz |
Submitted by:
Reviewed by:
PR:
Diffstat (limited to 'apps/openssl.c')
-rw-r--r-- | apps/openssl.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index dfa23d674e..dd22aa78af 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -254,6 +254,10 @@ end: EXIT(ret); } +#define LIST_STANDARD_COMMANDS "list-standard-commands" +#define LIST_MESSAGE_DIGEST_COMMANDS "list-message-digest-commands" +#define LIST_CIPHER_COMMANDS "list-cipher-commands" + static int do_cmd(prog,argc,argv) LHASH *prog; int argc; @@ -278,6 +282,28 @@ char *argv[]; ret= -1; goto end; } + else if ((strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0) || + (strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0) || + (strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0)) + { + int list_type; + BIO *bio_stdout; + + if (strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0) + list_type = FUNC_TYPE_GENERAL; + else if (strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0) + list_type = FUNC_TYPE_MD; + else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */ + list_type = FUNC_TYPE_CIPHER; + bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE); + + for (fp=functions; fp->name != NULL; fp++) + if (fp->type == list_type) + BIO_printf(bio_stdout, "%s\n", fp->name); + BIO_free(bio_stdout); + ret=0; + goto end; + } else { BIO_printf(bio_err,"openssl:Error: '%s' is an invalid command.\n", |