root/test/Makefile.in

Revision d487fa91e70710091d4fe67e697a93ffb51bc251, 3.4 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 months ago)

Incorporate C tests (for histograms)

  • Property mode set to 100644
Line 
1 .NOTPARALLEL:
2
3 CC=@CC@
4 CPPFLAGS=@CPPFLAGS@
5 CFLAGS=@CFLAGS@
6 LDFLAGS=@LDFLAGS@
7 AR=@AR@
8 RANLIB=@RANLIB@
9 LIBS=@LIBS@
10 PGLIBS=@PGLIBS@
11 INSTALL=@INSTALL@
12
13 prefix=@prefix@
14 exec_prefix=@exec_prefix@
15 bindir=@bindir@
16 sbindir=@sbindir@
17 libdir=@libdir@
18 includedir=${prefix}/include
19 libexecdir=@libexecdir@
20 datarootdir = @datarootdir@
21 mandir=@mandir@
22 mansubdir=@mansubdir@
23 docdir=${prefix}/@docdir@
24 sysconfdir=@sysconfdir@
25 srcdir=@srcdir@
26 top_srcdir=@top_srcdir@
27
28 all:    testcerts testcrl others
29 clean:  clean-keys clean-tests
30 # This stuff if all cert stuff to make testing the daemons easier
31
32 others:
33         $(MAKE) -C ../src tests
34
35 demoCA-dir:
36         @mkdir -p demoCA
37         @touch demoCA/index.txt
38         @test -f demoCA/serial || echo 00 > demoCA/serial
39
40 test-ca.key:
41         openssl genrsa -out test-ca.key 4096
42
43 test-ca.csr:    test-ca.key
44         openssl req -sha256 -key test-ca.key -days 365 -new -out test-ca.csr -config demo-openssl.cnf -extensions v3_ca -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=Reconnoiter Test CA"
45
46 test-ca.crt:    test-ca.key test-ca.csr
47         openssl x509 -sha256 -req -in test-ca.csr -signkey test-ca.key -out test-ca.crt -extfile demo-openssl.cnf -extensions v3_ca -days 365
48
49 client.key:
50         openssl genrsa -out client.key 2048
51
52 client.csr:     client.key
53         openssl req -sha256 -key client.key -days 365 -new -out client.csr -config demo-openssl.cnf -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=sampleclient"
54
55 client.crt:     client.csr test-ca.key test-ca.crt
56         openssl ca -batch -config demo-openssl.cnf -in client.csr -out client.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
57
58 badclient.key:
59         openssl genrsa -out badclient.key 2048
60
61 badclient.csr:  badclient.key
62         openssl req -sha256 -key badclient.key -days 365 -new -out badclient.csr -config demo-openssl.cnf -subj "/C=US/ST=Maryland/O=OmniTI Labs/CN=samplebadclient"
63
64 badclient.crt:  badclient.csr test-ca.key test-ca.crt
65         openssl ca -batch -config demo-openssl.cnf -in badclient.csr -out badclient.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
66
67 test-noit.key:
68         openssl genrsa -out test-noit.key 2048
69
70 test-noit.csr:  test-noit.key
71         openssl req -sha256 -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"
72
73 test-noit.crt:  test-noit.csr test-ca.key test-ca.crt
74         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
75
76 test-stratcon.key:
77         openssl genrsa -out test-stratcon.key 2048
78
79 test-stratcon.csr:      test-stratcon.key
80         openssl req -sha256 -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"
81
82 test-stratcon.crt:      test-stratcon.csr test-ca.key
83         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
84
85 test-ca.crl:    test-ca.key test-ca.crt badclient.key badclient.crt
86         openssl ca -config demo-openssl.cnf  -keyfile test-ca.key -cert test-ca.crt -revoke badclient.crt
87         openssl ca -config demo-openssl.cnf  -keyfile test-ca.key -cert test-ca.crt -gencrl -out  test-ca.crl
88
89 testcrl:        test-ca.crl
90
91 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
92
93 clean-keys:
94         rm -f *.key *.csr *.crt *.crl *.pem
95         rm -rf demoCA
96
97 clean-tests:
98         rm -rf t/logs
99
100 distclean:      clean
101         rm -f Makefile
102
Note: See TracBrowser for help on using the browser.