Blame


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