Skip to content

Commit

Permalink
prevent globbing and word splitting. SC2086
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Mar 13, 2024
1 parent e629ff4 commit 28e0c9e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bench/data/rsa-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 28e0c9e

Please sign in to comment.