X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=src%2Ftlsproxy-add;h=c3acf3e4a19740b632aced94a81b5f5dfaa379cc;hb=ef57fa373cf6dfbbbc5cf21c144de008681635f4;hp=1acd03d4505b9d5863c40759a455138e5176e53a;hpb=948878cf1d882adef61f9bd7c26473089f3032ad;p=tlsproxy%2Ftlsproxy.git diff --git a/src/tlsproxy-add b/src/tlsproxy-add index 1acd03d..c3acf3e 100755 --- a/src/tlsproxy-add +++ b/src/tlsproxy-add @@ -41,23 +41,23 @@ fi tempfile=`mktemp` || exit 1 die() { - rm -f $tempfile + rm -f "$tempfile" exit 1 } # Generate server certificate for given host. -echo 'organization = tlsproxy' > $tempfile -echo "cn = $1" >> $tempfile -echo tls_www_server >> $tempfile -echo encryption_key >> $tempfile -echo signing_key >> $tempfile +echo 'organization = tlsproxy' > "$tempfile" +echo "cn = $1" >> "$tempfile" +echo tls_www_server >> "$tempfile" +echo encryption_key >> "$tempfile" +echo signing_key >> "$tempfile" certtool --generate-certificate \ --load-privkey proxy-key.pem \ --load-ca-certificate proxy-ca.pem \ --load-ca-privkey proxy-ca-key.pem \ - --template $tempfile \ + --template "$tempfile" \ --outfile "certificate-$1-proxy.pem" || die -rm $tempfile +rm "$tempfile" if [ "x$2" = x ]; then echo please enter server certificate