Blame


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