From 896ea2f0183eec4278f5c37f6a9f82df1ca93674 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Wed, 13 Mar 2024 22:58:15 +0100 Subject: [PATCH] prevent globbing and word splitting. SC2086 I agree to license my contributions to each file under the terms given at the top of each file I changed. --- bench/data/rsa-generate.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bench/data/rsa-generate.sh b/bench/data/rsa-generate.sh index cf07722fc8..1e9e29d5a9 100755 --- a/bench/data/rsa-generate.sh +++ b/bench/data/rsa-generate.sh @@ -34,20 +34,20 @@ rm rsa-2048-65537.p8 m=(2048 3072 4096 8192) for i in "${m[@]}" do - echo $i + echo "$i" openssl genpkey -algorithm RSA \ -pkeyopt rsa_keygen_bits:2048 \ -pkeyopt rsa_keygen_pubexp:3 | \ - openssl pkcs8 -topk8 -nocrypt -outform der > rsa-$i-3.p8 + openssl pkcs8 -topk8 -nocrypt -outform der > "rsa-$i-3.p8" openssl pkey -pubout -inform der -outform der \ - -in rsa-$i-3.p8 | \ + -in "rsa-$i-3.p8" | \ openssl rsa -pubin -RSAPublicKey_out -inform DER -outform DER \ - -out rsa-$i-3-public-key.der + -out "rsa-$i-3-public-key.der" - openssl dgst -sha256 -sign rsa-$i-3.p8 -out rsa-$i-3-signature.bin empty_message + openssl dgst -sha256 -sign "rsa-$i-3.p8" -out "rsa-$i-3-signature.bin" empty_message - rm rsa-$i-3.p8 + rm "rsa-$i-3.p8" done rm empty_message