aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: f4170baf9f2a610c6528597acc60c348d6823a53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.POSIX:

ca.crl: crlnumber index.txt
	openssl ca \
		-verbose \
		-config ca.cnf \
		-gencrl \
		-out ca.crl

revoke:
	openssl ca \
		-verbose \
		-config ca.cnf \
		-revoke sub.crt

sub.crt: sub.csr
	mkdir -p newcerts
	touch index.txt
	openssl ca \
		-verbose \
		-config ca.cnf \
		-extensions extensions_sub \
		-notext \
		-rand_serial \
		-in sub.csr \
		-out sub.crt

ca.crt:
	openssl req \
		-verbose \
		-config ca.cnf \
		-new \
		-x509 \
		-key ca.key \
		-days 9132 \
		-out ca.crt

ca.key:
	openssl genrsa -aes256 -out ca.key 4096

crlnumber:
	echo 0000 > crlnumber

reset:
	echo "!!! THIS WILL RESET EVERYTHING, INCLUDING PRIVATE KEYS !!!"
	# sleep 5
	rm -rf newcerts serial index.txt* private certs sub.csr crlnumber* ca.crl ca.crt sub.crt