Software /
code /
prosody
Comparison
certs/Makefile @ 7036:f26debcae34e
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 27 Dec 2015 12:29:28 +0100 |
parent | 7035:085a286e2873 |
child | 7194:1c55403d06c4 |
comparison
equal
deleted
inserted
replaced
7015:17e275e8bd79 | 7036:f26debcae34e |
---|---|
13 | 13 |
14 .PRECIOUS: %.cnf %.key | 14 .PRECIOUS: %.cnf %.key |
15 | 15 |
16 # To request a cert | 16 # To request a cert |
17 %.csr: %.cnf %.key | 17 %.csr: %.cnf %.key |
18 openssl req -new -key $(lastword $^) -out $@ -utf8 -config $(firstword $^) | 18 openssl req -new -key $(lastword $^) \ |
19 -sha256 -utf8 -config $(firstword $^) -out $@ | |
20 | |
21 %.csr: %.cnf | |
22 umask 0077 && touch $*.key | |
23 openssl req -new -newkey rsa:$(keysize) -nodes -keyout $*.key \ | |
24 -sha256 -utf8 -config $^ -out $@ | |
25 @chmod 400 $*.key -c | |
26 | |
27 %.csr: %.key | |
28 openssl req -new -key $^ -utf8 -subj /CN=$* -out $@ | |
29 | |
30 %.csr: | |
31 umask 0077 && touch $*.key | |
32 openssl req -new -newkey rsa:$(keysize) -nodes -keyout $*.key \ | |
33 -utf8 -subj /CN=$* -out $@ | |
34 @chmod 400 $*.key -c | |
19 | 35 |
20 # Self signed | 36 # Self signed |
21 %.crt: %.cnf %.key | 37 %.crt: %.cnf %.key |
22 openssl req -new -x509 -nodes -key $(lastword $^) -days 365 \ | 38 openssl req -new -x509 -key $(lastword $^) -days 365 -sha256 -utf8 \ |
23 -sha1 -out $@ -utf8 -config $(firstword $^) | 39 -config $(firstword $^) -out $@ |
24 | 40 |
41 %.crt: %.cnf | |
42 umask 0077 && touch $*.key | |
43 openssl req -new -x509 -newkey rsa:$(keysize) -nodes -keyout $*.key \ | |
44 -days 365 -sha256 -utf8 -config $(firstword $^) -out $@ | |
45 @chmod 400 $*.key -c | |
46 | |
47 %.crt: %.key | |
48 openssl req -new -x509 -key $^ -days 365 -sha256 -utf8 -subj /CN=$* -out $@ | |
49 | |
50 %.crt: | |
51 umask 0077 && touch $*.key | |
52 openssl req -new -x509 -newkey rsa:$(keysize) -nodes -keyout $*.key \ | |
53 -days 365 -sha256 -out $@ -utf8 -subj /CN=$* | |
54 @chmod 400 $*.key -c | |
55 | |
56 # Generate a config from the example | |
25 %.cnf: | 57 %.cnf: |
26 sed 's,example\.com,$*,g' openssl.cnf > $@ | 58 sed 's,example\.com,$*,g' openssl.cnf > $@ |
27 | 59 |
28 %.key: | 60 %.key: |
29 openssl genrsa $(keysize) > $@ | 61 umask 0077 && openssl genrsa -out $@ $(keysize) |
30 @chmod 400 $@ | 62 @chmod 400 $@ -c |