]> git.ipfire.org Git - thirdparty/openssl.git/commit
Split arguments taking quotes into account
authorViktor Dukhovni <openssl-users@dukhovni.org>
Sun, 1 Jun 2025 02:47:15 +0000 (12:47 +1000)
committerTomas Mraz <tomas@openssl.org>
Wed, 4 Jun 2025 15:33:48 +0000 (17:33 +0200)
commit287bbb28b09e930a8691efc92a5087bb951edb6b
tree72a70740ad51e2c7ed0f8aba6b7b5416a8219c23
parent0b1bdef38ef1e3369a7bcde1b9a6eabe44b10e54
Split arguments taking quotes into account

CA.pl supports interpolating multiple arguments into the executed
commands.  Previously these were evaluated by a shell, which supported
quoting of values that contain whitespace, backslashes, ...

With a shell no longer used (avoid command injection), backwards
compatibility requires some similar functionality.  The code now handles
double and single-quoted strings (shell-style word splitting), but not
parameter expansion ($foo remains unexpanded) or command substitution
(`cmd` and $(cmd) remain unexpanded).

On Windows system(@LIST) does not correctly preserve argv, do our
own quoting instead and use system(<$quoted_cmd>).

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27432)
apps/CA.pl.in
test/recipes/80-test_ca.t
util/wrap.pl.in