Loading apps/openssl.c +23 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,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_pkey_meth(void); static void list_type(FUNC_TYPE ft); static void list_disabled(void); char *default_config_file = NULL; Loading Loading @@ -308,7 +309,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_DISABLED, OPT_MISSING_HELP OPT_PK_ALGORITHMS, OPT_PK_METHOD, OPT_DISABLED, OPT_MISSING_HELP } HELPLIST_CHOICE; const OPTIONS list_options[] = { Loading @@ -323,6 +324,8 @@ const OPTIONS list_options[] = { "List of cipher algorithms"}, {"public-key-algorithms", OPT_PK_ALGORITHMS, '-', "List of public key algorithms"}, {"public-key-methods", OPT_PK_METHOD, '-', "List of public key methods"}, {"disabled", OPT_DISABLED, '-', "List of disabled features"}, {"missing-help", OPT_MISSING_HELP, '-', Loading Loading @@ -364,6 +367,9 @@ int list_main(int argc, char **argv) case OPT_PK_ALGORITHMS: list_pkey(); break; case OPT_PK_METHOD: list_pkey_meth(); break; case OPT_DISABLED: list_disabled(); break; Loading Loading @@ -540,6 +546,22 @@ static void list_pkey(void) } } static void list_pkey_meth(void) { size_t i; size_t meth_count = EVP_PKEY_meth_get_count(); for (i = 0; i < meth_count; i++) { const EVP_PKEY_METHOD *pmeth = EVP_PKEY_meth_get0(i); int pkey_id, pkey_flags; EVP_PKEY_meth_get0_info(&pkey_id, &pkey_flags, pmeth); BIO_printf(bio_out, "%s\n", OBJ_nid2ln(pkey_id)); BIO_printf(bio_out, "\tType: %s Algorithm\n", pkey_flags & ASN1_PKEY_DYNAMIC ? "External" : "Builtin"); } } static int function_cmp(const FUNCTION * a, const FUNCTION * b) { return strncmp(a->name, b->name, 8); Loading doc/man1/list.pod +6 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ B<openssl list> [B<-cipher-commands>] [B<-cipher-algorithms>] [B<-public-key-algorithms>] [B<-public-key-methods>] [B<-disabled>] =head1 DESCRIPTION Loading Loading @@ -62,6 +63,11 @@ then B<foo> is an alias for the official algorithm name, B<bar>. Display a list of public key algorithms, with each algorithm as a block of multiple lines, all but the first are indented. =item B<-public-key-methods> Display a list of public key method OIDs: this also includes public key methods without an associated ASN.1 method, for example, KDF algorithms. =item B<-disabled> Display a list of disabled features, those that were compiled out Loading Loading
apps/openssl.c +23 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,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_pkey_meth(void); static void list_type(FUNC_TYPE ft); static void list_disabled(void); char *default_config_file = NULL; Loading Loading @@ -308,7 +309,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_DISABLED, OPT_MISSING_HELP OPT_PK_ALGORITHMS, OPT_PK_METHOD, OPT_DISABLED, OPT_MISSING_HELP } HELPLIST_CHOICE; const OPTIONS list_options[] = { Loading @@ -323,6 +324,8 @@ const OPTIONS list_options[] = { "List of cipher algorithms"}, {"public-key-algorithms", OPT_PK_ALGORITHMS, '-', "List of public key algorithms"}, {"public-key-methods", OPT_PK_METHOD, '-', "List of public key methods"}, {"disabled", OPT_DISABLED, '-', "List of disabled features"}, {"missing-help", OPT_MISSING_HELP, '-', Loading Loading @@ -364,6 +367,9 @@ int list_main(int argc, char **argv) case OPT_PK_ALGORITHMS: list_pkey(); break; case OPT_PK_METHOD: list_pkey_meth(); break; case OPT_DISABLED: list_disabled(); break; Loading Loading @@ -540,6 +546,22 @@ static void list_pkey(void) } } static void list_pkey_meth(void) { size_t i; size_t meth_count = EVP_PKEY_meth_get_count(); for (i = 0; i < meth_count; i++) { const EVP_PKEY_METHOD *pmeth = EVP_PKEY_meth_get0(i); int pkey_id, pkey_flags; EVP_PKEY_meth_get0_info(&pkey_id, &pkey_flags, pmeth); BIO_printf(bio_out, "%s\n", OBJ_nid2ln(pkey_id)); BIO_printf(bio_out, "\tType: %s Algorithm\n", pkey_flags & ASN1_PKEY_DYNAMIC ? "External" : "Builtin"); } } static int function_cmp(const FUNCTION * a, const FUNCTION * b) { return strncmp(a->name, b->name, 8); Loading
doc/man1/list.pod +6 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ B<openssl list> [B<-cipher-commands>] [B<-cipher-algorithms>] [B<-public-key-algorithms>] [B<-public-key-methods>] [B<-disabled>] =head1 DESCRIPTION Loading Loading @@ -62,6 +63,11 @@ then B<foo> is an alias for the official algorithm name, B<bar>. Display a list of public key algorithms, with each algorithm as a block of multiple lines, all but the first are indented. =item B<-public-key-methods> Display a list of public key method OIDs: this also includes public key methods without an associated ASN.1 method, for example, KDF algorithms. =item B<-disabled> Display a list of disabled features, those that were compiled out Loading