chiark / gitweb /
bin/setup: Fix permissions on `ca.key' and `ca.cert'.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 1 Dec 2012 14:26:21 +0000 (14:26 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 1 Dec 2012 14:26:21 +0000 (14:26 +0000)
The previous thing was a mix of both, and didn't work properly.

bin/setup

index 845c2a4d2bcfe8df5cf19454ce9fce08b4096381..a87d5b48c2049b85d441876c035a82f2fa03d24d 100755 (executable)
--- a/bin/setup
+++ b/bin/setup
@@ -67,9 +67,12 @@ exec >@stdout 2>@stderr openssl req -config "etc/openssl.conf"  \
     -text -out "ca.cert" -keyout "private/ca.key" \
     -new -x509 -days $C(ca-period) \
     -subj $subject
-file attributes "ca.cert" \
+file attributes "private/ca.key" \
     -owner $C(ca-owner) -group $C(ca-group) \
     -permissions 0640
+file attributes "ca.cert" \
+    -owner $C(ca-owner) -group $C(ca-group) \
+    -permissions 0644
 
 ## Set up the directories for the actual certificates.  These are published
 ## by the web server.