diff options
Diffstat (limited to '')
-rw-r--r-- | src/regress/lib/libssl/interop/Makefile.inc | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/regress/lib/libssl/interop/Makefile.inc b/src/regress/lib/libssl/interop/Makefile.inc deleted file mode 100644 index fa22fb8514..0000000000 --- a/src/regress/lib/libssl/interop/Makefile.inc +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.10 2024/02/03 15:58:34 beck Exp $ | ||
2 | |||
3 | .PATH: ${.CURDIR}/.. | ||
4 | |||
5 | SRCS_client ?= client.c util.c | ||
6 | SRCS_server ?= server.c util.c | ||
7 | WARNINGS = yes | ||
8 | CLEANFILES += *.out *.fstat | ||
9 | |||
10 | .for p in ${PROGS} | ||
11 | ldd-$p.out: $p | ||
12 | # programs must be linked with correct libraries | ||
13 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ldd $p >$@ | ||
14 | .endfor | ||
15 | |||
16 | client-self.out server-self.out: run-self-client-server | ||
17 | |||
18 | run-self-client-server: client server 127.0.0.1.crt | ||
19 | # check that tls client and server work together | ||
20 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH} \ | ||
21 | ./server >server-self.out \ | ||
22 | 127.0.0.1 0 | ||
23 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH} \ | ||
24 | ./client >client-self.out \ | ||
25 | `sed -n 's/listen sock: //p' server-self.out` | ||
26 | # wait for server to terminate | ||
27 | -sed -n 's/listen sock: //p' server-self.out | xargs nc 2>/dev/null | ||
28 | # check that the client run successfully to the end | ||
29 | grep -q '^success$$' client-self.out | ||
30 | # client must have read server greeting | ||
31 | grep -q '^<<< greeting$$' client-self.out | ||
32 | # check that the server child run successfully to the end | ||
33 | grep -q '^success$$' server-self.out | ||
34 | # server must have read client hello | ||
35 | grep -q '^<<< hello$$' server-self.out | ||
36 | |||
37 | # create certificates for TLS | ||
38 | |||
39 | CLEANFILES += 127.0.0.1.{crt,key} \ | ||
40 | ca.{crt,key,srl} fake-ca.{crt,key} \ | ||
41 | {client,server}.{req,crt,key} \ | ||
42 | {dsa,ec,rsa}.{key,req,crt} \ | ||
43 | dh.param | ||
44 | |||
45 | 127.0.0.1.crt: | ||
46 | openssl req -batch -new \ | ||
47 | -subj /L=OpenBSD/O=tls-regress/OU=server/CN=${@:R}/ \ | ||
48 | -nodes -newkey rsa -keyout ${@:R}.key -x509 -out $@ | ||
49 | |||
50 | ca.crt fake-ca.crt: | ||
51 | openssl req -batch -new \ | ||
52 | -subj /L=OpenBSD/O=tls-regress/OU=ca/CN=root/ \ | ||
53 | -nodes -newkey rsa -keyout ${@:R}.key -x509 -out $@ | ||
54 | |||
55 | client.req server.req: | ||
56 | openssl req -batch -new \ | ||
57 | -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \ | ||
58 | -nodes -newkey rsa -keyout ${@:R}.key -out $@ | ||
59 | |||
60 | client.crt server.crt: ca.crt ${@:R}.req | ||
61 | openssl x509 -CAcreateserial -CAkey ca.key -CA ca.crt \ | ||
62 | -req -in ${@:R}.req -out $@ | ||
63 | |||
64 | dh.param: | ||
65 | openssl dhparam -out $@ 1024 | ||
66 | |||
67 | dsa.key: | ||
68 | openssl dsaparam -genkey -out $@ 2048 | ||
69 | |||
70 | ec.key: | ||
71 | openssl ecparam -genkey -name secp256r1 -out $@ | ||
72 | |||
73 | rsa.key: | ||
74 | openssl genrsa -out $@ 2048 | ||
75 | |||
76 | dsa.req ec.req rsa.req: ${@:R}.key | ||
77 | openssl req -batch -new \ | ||
78 | -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \ | ||
79 | -nodes -key ${@:R}.key -out $@ | ||
80 | |||
81 | dsa.crt ec.crt rsa.crt: ca.crt ${@:R}.req | ||
82 | openssl x509 -CAcreateserial -CAkey ca.key -CA ca.crt \ | ||
83 | -req -in ${@:R}.req -out $@ | ||