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;
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[] = {
"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, '-',
case OPT_PK_ALGORITHMS:
list_pkey();
break;
+ case OPT_PK_METHOD:
+ list_pkey_meth();
+ break;
case OPT_DISABLED:
list_disabled();
break;
}
}
+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);
[B<-cipher-commands>]
[B<-cipher-algorithms>]
[B<-public-key-algorithms>]
+[B<-public-key-methods>]
[B<-disabled>]
=head1 DESCRIPTION
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