Blame


1 3096da4e 2021-10-07 op # tests to run as a port of the regression suite. Leave empty to run
2 3096da4e 2021-10-07 op # all.
3 3096da4e 2021-10-07 op TESTS=
4 3096da4e 2021-10-07 op
5 5c2e310e 2021-01-22 op include ../Makefile.local
6 5c2e310e 2021-01-22 op
7 e5285d54 2021-12-09 op .PHONY: all data clean regres
8 5c2e310e 2021-01-22 op
9 5741561d 2021-12-09 op all: data gg puny-test iri_test fcgi-test
10 e5285d54 2021-12-09 op ./regress ${TESTS}
11 5c2e310e 2021-01-22 op
12 5741561d 2021-12-09 op data: testdata cert.pem testca.pem valid.crt invalid.cert.pem
13 0f2124e2 2021-06-12 op
14 f48e3b85 2021-05-24 op gg: gg.o ../iri.o ../utf8.o ${COMPAT}
15 f48e3b85 2021-05-24 op ${CC} gg.o ../iri.o ../utf8.o ${COMPAT} -o $@ ${LDFLAGS}
16 f48e3b85 2021-05-24 op
17 4ad0601d 2021-02-10 op puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT}
18 4ad0601d 2021-02-10 op ${CC} puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT} \
19 4ad0601d 2021-02-10 op -o puny-test ${LDFLAGS}
20 3300cbe0 2021-01-27 op
21 4ad0601d 2021-02-10 op iri_test: iri_test.o ../iri.o ../utf8.o ${COMPAT}
22 9797799a 2021-07-08 op ${CC} iri_test.o ../iri.o ../utf8.o ${COMPAT} -o $@ ${LDFLAGS}
23 5c2e310e 2021-01-22 op
24 609fc9f9 2021-01-22 op fill-file: fill-file.o
25 9797799a 2021-07-08 op ${CC} fill-file.o -o $@ ${LDFLAGS}
26 609fc9f9 2021-01-22 op
27 0f2124e2 2021-06-12 op fcgi-test: fcgi-test.o
28 0f2124e2 2021-06-12 op ${CC} fcgi-test.o ${COMPAT} -o fcgi-test ${LDFLAGS}
29 0f2124e2 2021-06-12 op
30 5c2e310e 2021-01-22 op key.pem: cert.pem
31 5c2e310e 2021-01-22 op
32 5c2e310e 2021-01-22 op # XXX: key size is NOT GOOD. This is only for testing. Smaller keys
33 5c2e310e 2021-01-22 op # are quicker to generate. DON'T DO THIS AT HOME.
34 5c2e310e 2021-01-22 op cert.pem:
35 7322a054 2021-07-03 op openssl req -x509 -newkey rsa:2048 \
36 7322a054 2021-07-03 op -keyout key.pem \
37 7322a054 2021-07-03 op -out cert.pem \
38 7322a054 2021-07-03 op -days 365 -nodes \
39 7322a054 2021-07-03 op -subj "/CN=localhost"
40 3e0164f4 2021-07-19 op ln -s cert.pem localhost.cert.pem
41 3e0164f4 2021-07-19 op ln -s key.pem localhost.key.pem
42 5c2e310e 2021-01-22 op @echo
43 5c2e310e 2021-01-22 op
44 02be96c6 2021-02-09 op testca.pem:
45 02be96c6 2021-02-09 op openssl genrsa -out testca.key 2048
46 7322a054 2021-07-03 op openssl req -x509 -new -sha256 \
47 7322a054 2021-07-03 op -key testca.key \
48 7322a054 2021-07-03 op -days 365 -nodes \
49 7322a054 2021-07-03 op -out testca.pem \
50 7322a054 2021-07-03 op -subj "/CN=testca"
51 02be96c6 2021-02-09 op @echo
52 02be96c6 2021-02-09 op
53 02be96c6 2021-02-09 op valid.crt: testca.pem
54 02be96c6 2021-02-09 op openssl genrsa -out valid.key 2048
55 7322a054 2021-07-03 op openssl req -new -key valid.key \
56 7322a054 2021-07-03 op -out valid.csr \
57 7322a054 2021-07-03 op -subj "/CN=valid"
58 02be96c6 2021-02-09 op @echo
59 02be96c6 2021-02-09 op openssl x509 -req -in valid.csr \
60 02be96c6 2021-02-09 op -CA testca.pem \
61 02be96c6 2021-02-09 op -CAkey testca.key \
62 02be96c6 2021-02-09 op -CAcreateserial \
63 02be96c6 2021-02-09 op -out valid.crt \
64 02be96c6 2021-02-09 op -days 365 \
65 02be96c6 2021-02-09 op -sha256 -extfile valid.ext
66 02be96c6 2021-02-09 op
67 02be96c6 2021-02-09 op invalid.cert.pem: cert.pem
68 02be96c6 2021-02-09 op cp cert.pem invalid.cert.pem
69 02be96c6 2021-02-09 op cp key.pem invalid.key.pem
70 02be96c6 2021-02-09 op
71 5c2e310e 2021-01-22 op clean:
72 5c2e310e 2021-01-22 op rm -f *.o iri_test cert.pem key.pem
73 3e0164f4 2021-07-19 op rm -f localhost.cert.pem localhost.key.pem
74 c2899486 2021-10-02 op rm -f testca.* valid.csr valid.key valid.crt invalid.*pem
75 c2899486 2021-10-02 op rm -rf testdata fill-file puny-test gg fcgi-test
76 176179b2 2021-10-04 op rm -f gmid.pid
77 5c2e310e 2021-01-22 op
78 609fc9f9 2021-01-22 op testdata: fill-file
79 5c2e310e 2021-01-22 op mkdir testdata
80 609fc9f9 2021-01-22 op ./fill-file testdata/bigfile
81 5c2e310e 2021-01-22 op ./sha testdata/bigfile testdata/bigfile.sha
82 5c2e310e 2021-01-22 op printf "# hello world\n" > testdata/index.gmi
83 5c2e310e 2021-01-22 op ./sha testdata/index.gmi testdata/index.gmi.sha
84 e3ddf390 2021-02-06 op cp hello slow err invalid serve-bigfile env testdata/
85 c836cdfa 2021-03-29 op cp max-length-reply testdata
86 5c2e310e 2021-01-22 op mkdir testdata/dir
87 c8b74339 2021-01-24 op cp hello testdata/dir
88 5c2e310e 2021-01-22 op cp testdata/index.gmi testdata/dir/foo.gmi