]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - src/tlsproxy-setup
log.c: Use one printf() instead of two in log_message().
[tlsproxy/tlsproxy.git] / src / tlsproxy-setup
index 48a034f63afd3e0b2c3a6c84ecdeac62f5c8cc28..1c653267a40486c9fe174a225d947d8d591bc449 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Requires certtool (from GnuTLS).
 #
-# Copyright (C) 2011-2012  Simon Ruderich
+# Copyright (C) 2011-2013  Simon Ruderich
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 tempfile=`mktemp` || exit 1
 
 die() {
-    rm -f $tempfile
+    rm -f "$tempfile"
     exit 1
 }
 
 # Generate proxy CA key file.
 certtool --generate-privkey > proxy-ca-key.pem || die
 # Generate proxy CA.
-echo 'cn = tlsproxy CA' > $tempfile
-echo ca                >> $tempfile
-echo cert_signing_key  >> $tempfile
+echo 'cn = tlsproxy CA' > "$tempfile"
+echo ca                >> "$tempfile"
+echo cert_signing_key  >> "$tempfile"
 certtool --generate-self-signed \
          --load-privkey proxy-ca-key.pem \
-         --template $tempfile \
+         --template "$tempfile" \
          --outfile proxy-ca.pem || die
 
 # Generate proxy key file.
@@ -43,16 +43,16 @@ certtool --generate-privkey > proxy-key.pem || die
 
 # Generate proxy "invalid" server certificate. It's used for problematic
 # connections.
-echo 'organization = tlsproxy' > $tempfile
-echo 'cn = invalid'           >> $tempfile
-echo tls_www_server           >> $tempfile
-echo encryption_key           >> $tempfile
-echo signing_key              >> $tempfile
+echo 'organization = tlsproxy' > "$tempfile"
+echo 'cn = invalid'           >> "$tempfile"
+echo tls_www_server           >> "$tempfile"
+echo encryption_key           >> "$tempfile"
+echo signing_key              >> "$tempfile"
 certtool --generate-self-signed \
          --load-privkey proxy-key.pem \
-         --template $tempfile \
+         --template "$tempfile" \
          --outfile proxy-invalid.pem || die
 
-rm $tempfile
+rm "$tempfile"
 
 echo done