From 7f3f83e0e31ce3f8265329833f1bc24011a0acc0 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Thu, 31 Jul 2014 12:59:57 -0700 Subject: [PATCH] make_key: reduce raciness of password input Bug: 14595245 Change-Id: I8a9e4f2c46aa3c85763975c5cb7a47df197f7746 --- tools/make_key | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/make_key b/tools/make_key index a1018177a..6d1ed4717 100755 --- a/tools/make_key +++ b/tools/make_key @@ -68,8 +68,10 @@ if [ "${password}" == "" ]; then openssl pkcs8 -in ${one} -topk8 -outform DER -out $1.pk8 -nocrypt else echo "creating ${1}.pk8 with password [${password}]" - echo $password | openssl pkcs8 -in ${one} -topk8 -outform DER -out $1.pk8 \ - -passout stdin + export password + openssl pkcs8 -in ${one} -topk8 -outform DER -out $1.pk8 \ + -passout env:password + unset password fi wait