Use EASYRSA specific temp file for output to set_pass

Signed-off-by: Richard Bonhomme <25598447+TinCanTech@users.noreply.github.com>
This commit is contained in:
Richard Bonhomme 2019-01-01 18:07:17 +00:00
parent 1061fc25f6
commit 35b1f59e44
No known key found for this signature in database
GPG Key ID: 654BC9943CC8B5DB

View File

@ -1038,10 +1038,15 @@ $file"
If the key is currently encrypted you must supply the decryption passphrase.
${crypto:+You will then enter a new PEM passphrase for this key.$NL}"
"$EASYRSA_OPENSSL" "$key_type" -in "$file" -out "$file" $crypto || die "\
EASYRSA_TEMP_FILE_2="$file.temp"
"$EASYRSA_OPENSSL" "$key_type" -in "$file" -out "$EASYRSA_TEMP_FILE_2" $crypto || die "\
Failed to change the private key passphrase. See above for possible openssl
error messages."
mv "$EASYRSA_TEMP_FILE_2" "$file" || die "\
Failed to change the private key passphrase. See above for error messages."
notice "Key passphrase successfully changed"
} # => set_pass()