summaryrefslogtreecommitdiffstats
path: root/apps/include/opt.h
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-02-25 14:29:30 +1000
committerPauli <paul.dale@oracle.com>2020-03-07 11:46:48 +1000
commit6bd4e3f231d74578b97821d981d42583fec5c2f3 (patch)
treed255cb0db84ccb5bf71fed8e62f4bb310933b5a5 /apps/include/opt.h
parent5e98904c231f5a40c6ce291df85799cca7c8d125 (diff)
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 <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11167)
Diffstat (limited to 'apps/include/opt.h')
-rw-r--r--apps/include/opt.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/include/opt.h b/apps/include/opt.h
index ac2c236024..b4257cca7d 100644
--- a/apps/include/opt.h
+++ b/apps/include/opt.h
@@ -266,6 +266,24 @@
case OPT_R_RAND: case OPT_R_WRITERAND
/*
+ * Provider options.
+ */
+# define OPT_PROV_ENUM \
+ OPT_PROV__FIRST=1600, \
+ OPT_PROV_PROVIDER, OPT_PROV_PROVIDER_PATH, \
+ OPT_PROV__LAST
+
+# define OPT_PROV_OPTIONS \
+ OPT_SECTION("Provider"), \
+ { "provider", OPT_PROV_PROVIDER, 's', "Provder to load (can be specified multiple times)" }, \
+ { "provider_path", OPT_PROV_PROVIDER_PATH, 's', "Provider load path" }
+
+# define OPT_PROV_CASES \
+ OPT_PROV__FIRST: case OPT_PROV__LAST: break; \
+ case OPT_PROV_PROVIDER: \
+ case OPT_PROV_PROVIDER_PATH
+
+/*
* Option parsing.
*/
extern const char OPT_HELP_STR[];
@@ -348,6 +366,7 @@ char **opt_rest(void);
int opt_num_rest(void);
int opt_verify(int i, X509_VERIFY_PARAM *vpm);
int opt_rand(int i);
+int opt_provider(int i);
void opt_help(const OPTIONS * list);
void opt_print(const OPTIONS * opt, int doingparams, int width);
int opt_format_error(const char *s, unsigned long flags);