summaryrefslogtreecommitdiffstats
path: root/apps/include/opt.h
diff options
context:
space:
mode:
authorPetr Gotthard <petr.gotthard@centrum.cz>2020-12-26 21:32:14 +0100
committerPauli <ppzgs1@gmail.com>2021-02-05 10:24:04 +1000
commit7dc67708c8ae6ec06c7fec34781225ed60b5e68d (patch)
treec48ecd0e6c3a24a5837a09a7e7497c458052d4c6 /apps/include/opt.h
parent88444854affe31ce08a5daaf4b6afc86e6972c63 (diff)
apps/openssl: add -propquery command line option
Fixes #13656. Right now all openssl commands use a NULL propq. This patch adds a possibility to specify a custom propq. The implementation follows the example of set_nameopt/get_nameopt. Various tools had to be modified to call app_get0_propq after it has been populated. Otherwise the -propquery has no effect. The tests then verify the -propquery affects the tool behaviour by requesting a non-existing property. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13707)
Diffstat (limited to 'apps/include/opt.h')
-rw-r--r--apps/include/opt.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/include/opt.h b/apps/include/opt.h
index 5f3efe5105..d23bf262fc 100644
--- a/apps/include/opt.h
+++ b/apps/include/opt.h
@@ -270,7 +270,7 @@
*/
# define OPT_PROV_ENUM \
OPT_PROV__FIRST=1600, \
- OPT_PROV_PROVIDER, OPT_PROV_PROVIDER_PATH, \
+ OPT_PROV_PROVIDER, OPT_PROV_PROVIDER_PATH, OPT_PROV_PROPQUERY, \
OPT_PROV__LAST
# define OPT_CONFIG_OPTION \
@@ -279,12 +279,14 @@
# define OPT_PROV_OPTIONS \
OPT_SECTION("Provider"), \
{ "provider-path", OPT_PROV_PROVIDER_PATH, 's', "Provider load path (must be before 'provider' argument if required)" }, \
- { "provider", OPT_PROV_PROVIDER, 's', "Provider to load (can be specified multiple times)" }
+ { "provider", OPT_PROV_PROVIDER, 's', "Provider to load (can be specified multiple times)" }, \
+ { "propquery", OPT_PROV_PROPQUERY, 's', "Property query used when fetching algorithms" }
# define OPT_PROV_CASES \
OPT_PROV__FIRST: case OPT_PROV__LAST: break; \
case OPT_PROV_PROVIDER: \
- case OPT_PROV_PROVIDER_PATH
+ case OPT_PROV_PROVIDER_PATH: \
+ case OPT_PROV_PROPQUERY
/*
* Option parsing.