mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Restrict file permissions before writing key
This commit is contained in:
parent
bf54f27815
commit
13e998e87d
@ -20,8 +20,8 @@ tunnelPrivateKey=$(echo "$json" | jq -r '.tunnel_private_key')
|
||||
# TODO: It would be nice if we could avoid writing the private key to disk.
|
||||
# I tried process substition but it didn't work.
|
||||
keyFile=$(mktemp)
|
||||
printf -- "$tunnelPrivateKey" > $keyFile
|
||||
chmod 0600 $keyFile
|
||||
printf -- "$tunnelPrivateKey" > $keyFile
|
||||
|
||||
echo "Connecting to tunnel"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user