Diff

certs/Makefile @ 7030:b5bc9f77f096

certs/Makefile: Run key generation with a stricter umask (fixes a race condition)
author Kim Alvefur <zash@zash.se>
date Wed, 23 Dec 2015 12:07:03 +0100
parent 5293:fe9215155453
child 7031:89221daefae9
child 7713:003ee2be2635
line wrap: on
line diff
--- a/certs/Makefile	Tue Dec 22 14:15:09 2015 +0000
+++ b/certs/Makefile	Wed Dec 23 12:07:03 2015 +0100
@@ -26,5 +26,5 @@
 	sed 's,example\.com,$*,g' openssl.cnf > $@
 
 %.key:
-	openssl genrsa $(keysize) > $@
-	@chmod 400 $@
+	umask 0077 && openssl genrsa -out $@ $(keysize)
+	@chmod 400 $@ -c