Comparison

certs/Makefile @ 7717:9c8eb0239eef

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 05 Nov 2016 00:28:30 +0100
parent 7715:08989f8464b9
comparison
equal deleted inserted replaced
7707:7bb1cc7278b6 7717:9c8eb0239eef
20 20
21 %.csr: %.cnf 21 %.csr: %.cnf
22 umask 0077 && touch $*.key 22 umask 0077 && touch $*.key
23 openssl req -new -newkey rsa:$(keysize) -nodes -keyout $*.key \ 23 openssl req -new -newkey rsa:$(keysize) -nodes -keyout $*.key \
24 -sha256 -utf8 -config $^ -out $@ 24 -sha256 -utf8 -config $^ -out $@
25 @chmod 400 $*.key -c 25 @chmod 400 $*.key
26 26
27 %.csr: %.key 27 %.csr: %.key
28 openssl req -new -key $^ -utf8 -subj /CN=$* -out $@ 28 openssl req -new -key $^ -utf8 -subj /CN=$* -out $@
29 29
30 %.csr: 30 %.csr:
31 umask 0077 && touch $*.key 31 umask 0077 && touch $*.key
32 openssl req -new -newkey rsa:$(keysize) -nodes -keyout $*.key \ 32 openssl req -new -newkey rsa:$(keysize) -nodes -keyout $*.key \
33 -utf8 -subj /CN=$* -out $@ 33 -utf8 -subj /CN=$* -out $@
34 @chmod 400 $*.key -c 34 @chmod 400 $*.key
35 35
36 # Self signed 36 # Self signed
37 %.crt: %.cnf %.key 37 %.crt: %.cnf %.key
38 openssl req -new -x509 -key $(lastword $^) -days 365 -sha256 -utf8 \ 38 openssl req -new -x509 -key $(lastword $^) -days 365 -sha256 -utf8 \
39 -config $(firstword $^) -out $@ 39 -config $(firstword $^) -out $@
40 40
41 %.crt: %.cnf 41 %.crt: %.cnf
42 umask 0077 && touch $*.key 42 umask 0077 && touch $*.key
43 openssl req -new -x509 -newkey rsa:$(keysize) -nodes -keyout $*.key \ 43 openssl req -new -x509 -newkey rsa:$(keysize) -nodes -keyout $*.key \
44 -days 365 -sha256 -utf8 -config $(firstword $^) -out $@ 44 -days 365 -sha256 -utf8 -config $(firstword $^) -out $@
45 @chmod 400 $*.key -c 45 @chmod 400 $*.key
46 46
47 %.crt: %.key 47 %.crt: %.key
48 openssl req -new -x509 -key $^ -days 365 -sha256 -utf8 -subj /CN=$* -out $@ 48 openssl req -new -x509 -key $^ -days 365 -sha256 -utf8 -subj /CN=$* -out $@
49 49
50 %.crt: 50 %.crt:
51 umask 0077 && touch $*.key 51 umask 0077 && touch $*.key
52 openssl req -new -x509 -newkey rsa:$(keysize) -nodes -keyout $*.key \ 52 openssl req -new -x509 -newkey rsa:$(keysize) -nodes -keyout $*.key \
53 -days 365 -sha256 -out $@ -utf8 -subj /CN=$* 53 -days 365 -sha256 -out $@ -utf8 -subj /CN=$*
54 @chmod 400 $*.key -c 54 @chmod 400 $*.key
55 55
56 # Generate a config from the example 56 # Generate a config from the example
57 %.cnf: 57 %.cnf:
58 sed 's,example\.com,$*,g' openssl.cnf > $@ 58 sed 's,example\.com,$*,g' openssl.cnf > $@
59 59
60 %.key: 60 %.key:
61 umask 0077 && openssl genrsa -out $@ $(keysize) 61 umask 0077 && openssl genrsa -out $@ $(keysize)
62 @chmod 400 $@ -c 62 @chmod 400 $@
63 63
64 # Generate Diffie-Hellman parameters 64 # Generate Diffie-Hellman parameters
65 dh-%.pem: 65 dh-%.pem:
66 openssl dhparam -out $@ $* 66 openssl dhparam -out $@ $*