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/cms.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/cms.c') diff --git a/apps/cms.c b/apps/cms.c index 9c92e79658..c8c303ea37 100644 --- a/apps/cms.c +++ b/apps/cms.c @@ -83,6 +83,7 @@ typedef enum OPTION_choice { OPT_RR_TO, OPT_AES128_WRAP, OPT_AES192_WRAP, OPT_AES256_WRAP, OPT_3DES_WRAP, OPT_WRAP, OPT_ENGINE, OPT_R_ENUM, + OPT_PROV_ENUM, OPT_V_ENUM, OPT_CIPHER, OPT_ORIGINATOR @@ -220,6 +221,7 @@ const OPTIONS cms_options[] = { OPT_R_OPTIONS, OPT_V_OPTIONS, + OPT_PROV_OPTIONS, OPT_PARAMETERS(), {"cert", 0, 0, "Recipient certs (optional; used only when encrypting)"}, @@ -621,6 +623,10 @@ int cms_main(int argc, char **argv) if (!opt_rand(o)) goto end; break; + case OPT_PROV_CASES: + if (!opt_provider(o)) + goto end; + break; case OPT_3DES_WRAP: # ifndef OPENSSL_NO_DES wrap_cipher = EVP_des_ede3_wrap(); -- cgit v1.2.3