Skip to content

Commit b0d83cf

Browse files
committed
make_key: reduce raciness of password input
(cherry picked from commit 7f3f83e) Bug: 14595245 Change-Id: I8a9e4f2c46aa3c85763975c5cb7a47df197f7746
1 parent d256f60 commit b0d83cf

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)