apps/openssl: add -propquery command line option
authorPetr Gotthard <petr.gotthard@centrum.cz>
Sat, 26 Dec 2020 20:32:14 +0000 (21:32 +0100)
committerPauli <ppzgs1@gmail.com>
Fri, 5 Feb 2021 00:24:04 +0000 (10:24 +1000)
commit7dc67708c8ae6ec06c7fec34781225ed60b5e68d
treec48ecd0e6c3a24a5837a09a7e7497c458052d4c6
parent88444854affe31ce08a5daaf4b6afc86e6972c63
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)
15 files changed:
apps/cms.c
apps/genpkey.c
apps/include/apps.h
apps/include/opt.h
apps/lib/app_provider.c
apps/lib/apps.c
apps/mac.c
apps/pkcs7.c
apps/pkeyutl.c
apps/smime.c
apps/storeutl.c
doc/man1/openssl.pod
doc/perlvars.pm
test/recipes/15-test_genrsa.t
test/recipes/20-test_mac.t