@chmod 400 $*.key -c
%.crt: %.key
- openssl req -new -x509 -nodes -key $^ -days 365 \
- -sha256 -out $@ -utf8 -config $(firstword $^)
+ openssl req -new -x509 -key $^ -days 365 -sha256 -utf8 -subj /CN=$* -out $@
%.crt:
umask 0077 && touch $*.key
sed 's,example\.com,$*,g' openssl.cnf > $@
%.key:
- openssl genrsa $(keysize) > $@
- @chmod 400 $@
+ umask 0077 && openssl genrsa -out $@ $(keysize)
+ @chmod 400 $@ -c
+
+# Generate Diffie-Hellman parameters
+dh-%.pem:
+ openssl dhparam -out $@ $*