From 6bd4e3f231d74578b97821d981d42583fec5c2f3 Mon Sep 17 00:00:00 2001 From: Pauli Date: Tue, 25 Feb 2020 14:29:30 +1000 Subject: cmdline app: add provider commandline options. Add a -provider option to allow providers to be loaded. This option can be specified multiple times. Add a -provider_path option to allow the path to providers to be specified. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11167) --- apps/dsa.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apps/dsa.c') diff --git a/apps/dsa.c b/apps/dsa.c index 9704a34c39..082aa96476 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -35,7 +35,8 @@ typedef enum OPTION_choice { /* Do not change the order here; see case statements below */ OPT_PVK_NONE, OPT_PVK_WEAK, OPT_PVK_STRONG, OPT_NOOUT, OPT_TEXT, OPT_MODULUS, OPT_PUBIN, - OPT_PUBOUT, OPT_CIPHER, OPT_PASSIN, OPT_PASSOUT + OPT_PUBOUT, OPT_CIPHER, OPT_PASSIN, OPT_PASSOUT, + OPT_PROV_ENUM } OPTION_CHOICE; const OPTIONS dsa_options[] = { @@ -66,6 +67,7 @@ const OPTIONS dsa_options[] = { {"pubout", OPT_PUBOUT, '-', "Output public key, not private"}, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, + OPT_PROV_OPTIONS, {NULL} }; @@ -147,6 +149,10 @@ int dsa_main(int argc, char **argv) if (!opt_cipher(opt_unknown(), &enc)) goto end; break; + case OPT_PROV_CASES: + if (!opt_provider(o)) + goto end; + break; } } argc = opt_num_rest(); -- cgit v1.2.3