From 17d595dc4e90d6b64ed75de11c04236a2444fa0c Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Tue, 31 Mar 2015 09:23:50 +0200 Subject: Remove generated key from disk, after printing it. --- scripts/mkreq | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts/mkreq') diff --git a/scripts/mkreq b/scripts/mkreq index 2b59f52..44aaddc 100755 --- a/scripts/mkreq +++ b/scripts/mkreq @@ -15,7 +15,7 @@ Usage: mkreq [-v] [-s*] [-c] [-C ] [-N ] [--] -c request client cert -C ca host (ca.sunet.se) -N ca name (infra) - + fully qualified name of host " 1>&2 @@ -110,6 +110,12 @@ git add "$reqs/$host.csr" && git commit -m "certification request for $host from if [ -d $host ]; then ssh root@$host mkdir -p /etc/ssl/private && scp "$key" "root@$host:/etc/ssl/private/${host}_${ca_name}.key" && rm -f "$key" && echo "** private key given to $host" || echo "** private key left in $key - should be in root@$host:/etc/ssl/private/${host}_${ca_name}.key" +else + echo "" + echo "** Generated the following RSA key, keep it safe:" + cat $key + rm -f $key + echo "" fi echo "** successfully generated key and certification request for $host from $ca_host:$ca_name" -- cgit v1.1