From c7031b2d5cfa6a67253282a69bb3b7f6550f9d5d Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sat, 11 Feb 2017 00:24:20 +0100 Subject: Be more careful with secret keys. --- tools/create-key.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/create-key.sh b/tools/create-key.sh index 9d29c86..e54b56b 100755 --- a/tools/create-key.sh +++ b/tools/create-key.sh @@ -1,4 +1,10 @@ #!/bin/sh +set -o errexit +set -o nounset + +[ -f $1-private.pem ] && { echo "$0: $1-private.pem exists, exiting"; exit 1; } +touch $1-private.pem +chmod 600 $1-private.pem openssl ecparam -name prime256v1 -genkey -noout -out $1-private.pem openssl ec -in $1-private.pem -pubout -out $1.pem -- cgit v1.1