]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
demos/certs: properly handle "$@"
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 1 Sep 2025 14:45:25 +0000 (16:45 +0200)
committerNeil Horman <nhorman@openssl.org>
Mon, 8 Sep 2025 21:09:39 +0000 (17:09 -0400)
There is little reason $@ should be used unquoted;  also, "$@"
should be used instead of $* in order to pass the script arguments
to a function.

Fixes: bcd92754d56a "demos: fix cert scripts"
Fixes: 79b184fb4b65 "Extend certificate creation examples to include CRL generation and sample"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28407)

(cherry picked from commit cc8a49004b0ceb0aa02c603e767519b459fc9c20)

demos/certs/mkcerts.sh
demos/certs/ocspquery.sh
demos/certs/ocsprun.sh

index 1825607fa33c477af593fc167c2500d859571bda..89300a6c52c5d65e568a5e14bd82177dbb3bfb6f 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 opensslcmd() {
-    LD_LIBRARY_PATH=../.. ../../apps/openssl $@
+    LD_LIBRARY_PATH=../.. ../../apps/openssl "$@"
 }
 
 OPENSSL_CONF=../../apps/openssl.cnf
index 7cb8e76423bbc50efee5f9415e529102355ab91c..b38e10ce2ef53e3c7a62ce084a892f7d95b41a9c 100644 (file)
@@ -4,7 +4,7 @@
 # called.
 
 opensslcmd() {
-    LD_LIBRARY_PATH=../.. ../../apps/openssl $@
+    LD_LIBRARY_PATH=../.. ../../apps/openssl "$@"
 }
 
 OPENSSL_CONF=../../apps/openssl.cnf
index 77fd62fcf1bb6431e0e424fe37af0144ab948c5c..b2e927cd84dae9a7f42d437e0ebab810d32f055e 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 opensslcmd() {
-    LD_LIBRARY_PATH=../.. ../../apps/openssl $@
+    LD_LIBRARY_PATH=../.. ../../apps/openssl "$@"
 }
 
 # Example of running an querying OpenSSL test OCSP responder.
@@ -18,4 +18,4 @@ opensslcmd version
 PORT=8888
 
 opensslcmd ocsp -port $PORT -index index.txt -CA intca.pem \
-       -rsigner resp.pem -rkey respkey.pem -rother intca.pem $*
+       -rsigner resp.pem -rkey respkey.pem -rother intca.pem "$@"