Skip to content

Commit 9ce4e44

Browse files
krutonGerrit Code Review
authored andcommitted
Merge "make_key: reduce raciness of password input"
2 parents 0efeb2c + 7f3f83e commit 9ce4e44

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/make_key

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ if [ "${password}" == "" ]; then
6868
openssl pkcs8 -in ${one} -topk8 -outform DER -out $1.pk8 -nocrypt
6969
else
7070
echo "creating ${1}.pk8 with password [${password}]"
71-
echo $password | openssl pkcs8 -in ${one} -topk8 -outform DER -out $1.pk8 \
72-
-passout stdin
71+
export password
72+
openssl pkcs8 -in ${one} -topk8 -outform DER -out $1.pk8 \
73+
-passout env:password
74+
unset password
7375
fi
7476

7577
wait

0 commit comments

Comments
 (0)