diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-09-15 15:29:02 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-09-19 05:57:19 +0100 |
commit | a760a3805b49736632f14297a1c489290d4c1a6b (patch) | |
tree | 9d3d726299a8872fa2de18ab62b490819b833b3f /apps | |
parent | 331bf00bed8c2839466b608e725c8aa5ef54622c (diff) | |
download | openssl-a760a3805b49736632f14297a1c489290d4c1a6b.zip openssl-a760a3805b49736632f14297a1c489290d4c1a6b.tar.gz openssl-a760a3805b49736632f14297a1c489290d4c1a6b.tar.bz2 |
Print out a list of disabled features.
New option "openssl list -disabled" this lists a set of disabled features
in a form which can be conveniently parsed by the test framework so it
knows which tests to skip.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/openssl.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index 58a2d0f..e96c211 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -158,6 +158,7 @@ static LHASH_OF(FUNCTION) *prog_init(void); static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[]); static void list_pkey(void); static void list_type(FUNC_TYPE ft); +static void list_disabled(void); char *default_config_file = NULL; static CONF *config = NULL; @@ -479,7 +480,7 @@ typedef enum HELPLIST_CHOICE { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_COMMANDS, OPT_DIGEST_COMMANDS, OPT_DIGEST_ALGORITHMS, OPT_CIPHER_COMMANDS, OPT_CIPHER_ALGORITHMS, - OPT_PK_ALGORITHMS + OPT_PK_ALGORITHMS, OPT_DISABLED } HELPLIST_CHOICE; OPTIONS list_options[] = { @@ -494,6 +495,8 @@ OPTIONS list_options[] = { "List of cipher algorithms"}, {"public-key-algorithms", OPT_PK_ALGORITHMS, '-', "List of public key algorithms"}, + {"disabled", OPT_DISABLED, '-', + "List of disabled features"}, {NULL} }; @@ -530,6 +533,9 @@ int list_main(int argc, char **argv) case OPT_PK_ALGORITHMS: list_pkey(); break; + case OPT_DISABLED: + list_disabled(); + break; } } @@ -714,6 +720,35 @@ static int SortFnByName(const void *_f1, const void *_f2) return strcmp(f1->name, f2->name); } +static void list_disabled(void) +{ +BIO_puts(bio_out, "Disabled algorithms:\n"); +#ifdef OPENSSL_NO_DH + BIO_puts(bio_out, "DH\n"); +#endif +#ifdef OPENSSL_NO_DSA + BIO_puts(bio_out, "DSA\n"); +#endif +#ifdef OPENSSL_NO_RSA + BIO_puts(bio_out, "RSA\n"); +#endif +#ifdef OPENSSL_NO_EC + BIO_puts(bio_out, "EC\n"); +#endif +#ifdef OPENSSL_NO_EC2M + BIO_puts(bio_out, "EC2M\n"); +#endif +#ifndef ZLIB + BIO_puts(bio_out, "ZLIB\n"); +#endif +#ifdef OPENSSL_NO_PSK + BIO_puts(bio_out, "PSK\n"); +#endif +#ifdef OPENSSL_NO_SRP + BIO_puts(bio_out, "SRP\n"); +#endif +} + static LHASH_OF(FUNCTION) *prog_init(void) { LHASH_OF(FUNCTION) *ret; |