forked from circonus-labs/reconnoiter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
94 lines (70 loc) · 3.14 KB
/
Makefile.in
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
CC=@CC@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
AR=@AR@
RANLIB=@RANLIB@
LIBS=@LIBS@
PGLIBS=@PGLIBS@
INSTALL=@INSTALL@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
libdir=@libdir@
includedir=${prefix}/include
libexecdir=@libexecdir@
datarootdir = @datarootdir@
mandir=@mandir@
mansubdir=@mansubdir@
docdir=${prefix}/@docdir@
sysconfdir=@sysconfdir@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
all: testcerts testcrl
clean: clean-keys
# This stuff if all cert stuff to make testing the daemons easier
demoCA-dir:
@mkdir -p demoCA
@touch demoCA/index.txt
@test -f demoCA/serial || echo 00 > demoCA/serial
test-ca.key:
openssl genrsa -out test-ca.key
test-ca.csr: test-ca.key
openssl req -key test-ca.key -days 365 -new -out test-ca.csr -config demo-openssl.cnf -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=Reconnoiter Test CA"
test-ca.crt: test-ca.key test-ca.csr
openssl x509 -req -in test-ca.csr -signkey test-ca.key -out test-ca.crt
client.key:
openssl genrsa -out client.key
client.csr: client.key
openssl req -key client.key -days 365 -new -out client.csr -config demo-openssl.cnf -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=sampleclient"
client.crt: client.csr test-ca.key test-ca.crt
openssl ca -batch -config demo-openssl.cnf -in client.csr -out client.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
badclient.key:
openssl genrsa -out badclient.key
badclient.csr: badclient.key
openssl req -key badclient.key -days 365 -new -out badclient.csr -config demo-openssl.cnf -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=samplebadclient"
badclient.crt: badclient.csr test-ca.key test-ca.crt
openssl ca -batch -config demo-openssl.cnf -in badclient.csr -out badclient.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
test-noit.key:
openssl genrsa -out test-noit.key
test-noit.csr: test-noit.key
openssl req -key test-noit.key -days 365 -new -out test-noit.csr -config demo-openssl.cnf -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=noit-test"
test-noit.crt: test-noit.csr test-ca.key test-ca.crt
openssl ca -batch -config demo-openssl.cnf -in test-noit.csr -out test-noit.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
test-stratcon.key:
openssl genrsa -out test-stratcon.key
test-stratcon.csr: test-stratcon.key
openssl req -key test-stratcon.key -days 365 -new -out test-stratcon.csr -config demo-openssl.cnf -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=stratcon"
test-stratcon.crt: test-stratcon.csr test-ca.key
openssl ca -batch -config demo-openssl.cnf -in test-stratcon.csr -out test-stratcon.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
test-ca.crl: test-ca.key test-ca.crt badclient.key badclient.crt
openssl ca -config demo-openssl.cnf -keyfile test-ca.key -cert test-ca.crt -revoke badclient.crt
openssl ca -config demo-openssl.cnf -keyfile test-ca.key -cert test-ca.crt -gencrl -out test-ca.crl
testcrl: test-ca.crl
testcerts: demoCA-dir test-noit.key test-noit.crt test-stratcon.key test-stratcon.crt test-ca.key test-ca.crt client.key client.crt badclient.key badclient.crt
clean-keys:
rm -f *.key *.csr *.crt *.crl *.pem
rm -rf demoCA
distclean: clean
rm -f Makefile