diff options
Diffstat (limited to 'src/regress/lib/libssl/interop/netcat/Makefile')
-rw-r--r-- | src/regress/lib/libssl/interop/netcat/Makefile | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/regress/lib/libssl/interop/netcat/Makefile b/src/regress/lib/libssl/interop/netcat/Makefile deleted file mode 100644 index 3b8e3f95be..0000000000 --- a/src/regress/lib/libssl/interop/netcat/Makefile +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.10 2025/01/15 10:54:17 tb Exp $ | ||
2 | |||
3 | LIBRARIES = libressl | ||
4 | .if exists(/usr/local/bin/eopenssl33) | ||
5 | LIBRARIES += openssl33 | ||
6 | .endif | ||
7 | .if exists(/usr/local/bin/eopenssl34) | ||
8 | LIBRARIES += openssl34 | ||
9 | .endif | ||
10 | |||
11 | # run netcat server and connect with test client | ||
12 | |||
13 | .for clib in ${LIBRARIES} | ||
14 | |||
15 | REGRESS_TARGETS += run-netcat-client-${clib}-server-nc | ||
16 | REGRESS_TARGETS += run-protocol-client-${clib} | ||
17 | |||
18 | run-netcat-client-${clib}-server-nc: ../${clib}/client 127.0.0.1.crt | ||
19 | echo "greeting" | \ | ||
20 | nc >${@:S/^run/server/}.out \ | ||
21 | -l -c -C 127.0.0.1.crt -K 127.0.0.1.key \ | ||
22 | 127.0.0.1 0 & \ | ||
23 | for i in `jot 1000`; do fstat -p $$! >netcat.fstat; \ | ||
24 | grep -q ' stream tcp .*:[1-9][0-9]*$$' netcat.fstat && \ | ||
25 | exit 0; done; exit 1 | ||
26 | LD_LIBRARY_PATH=/usr/local/lib/e${clib} \ | ||
27 | ../${clib}/client >${@:S/^run/client/}.out \ | ||
28 | `sed -n 's/.* stream tcp .*:/127.0.0.1 /p' netcat.fstat` | ||
29 | # check that the client run successfully to the end | ||
30 | grep -q '^success$$' ${@:S/^run/client/}.out | ||
31 | # client must have read server greeting | ||
32 | grep -q '^<<< greeting$$' ${@:S/^run/client/}.out | ||
33 | # netstat server must have read client hello | ||
34 | grep -q '^hello$$' ${@:S/^run/server/}.out | ||
35 | |||
36 | .endfor | ||
37 | |||
38 | # run test server and connect with netcat client | ||
39 | |||
40 | .for slib in ${LIBRARIES} | ||
41 | |||
42 | REGRESS_TARGETS += run-netcat-client-nc-server-${slib} | ||
43 | |||
44 | run-netcat-client-nc-server-${slib}: ../${slib}/server 127.0.0.1.crt | ||
45 | LD_LIBRARY_PATH=/usr/local/lib/e${slib} \ | ||
46 | ../${slib}/server >${@:S/^run/server/}.out \ | ||
47 | 127.0.0.1 0 | ||
48 | echo "hello" | \ | ||
49 | nc >${@:S/^run/client/}.out \ | ||
50 | -c -R 127.0.0.1.crt \ | ||
51 | `sed -n 's/listen sock: //p' ${@:S/^run/server/}.out` | ||
52 | # check that the server child run successfully to the end | ||
53 | grep -q '^success$$' ${@:S/^run/server/}.out || \ | ||
54 | { sleep 1; grep -q '^success$$' ${@:S/^run/server/}.out; } | ||
55 | # server must have read client hello | ||
56 | grep -q '^<<< hello$$' ${@:S/^run/server/}.out | ||
57 | # client must have read server greeting | ||
58 | grep -q '^greeting$$' ${@:S/^run/client/}.out | ||
59 | |||
60 | .endfor | ||
61 | |||
62 | # check the TLS protocol version in client and server logs | ||
63 | |||
64 | .for clib in ${LIBRARIES} | ||
65 | |||
66 | REGRESS_TARGETS += run-protocol-client-${clib} | ||
67 | |||
68 | run-protocol-client-${clib}: client-netcat-client-${clib}-server-nc.out | ||
69 | # check that LibTLS protocol version is TLS 1.2 or TLS 1.3 | ||
70 | grep 'Protocol *: TLSv1.[23]' client-netcat-client-${clib}-server-nc.out | ||
71 | |||
72 | .endfor | ||
73 | |||
74 | .for slib in ${LIBRARIES} | ||
75 | |||
76 | REGRESS_TARGETS += run-protocol-server-${slib} | ||
77 | |||
78 | run-protocol-server-${slib}: server-netcat-client-nc-server-${slib}.out | ||
79 | # check that LibTLS protocol version is TLS 1.2 or TLS 1.3 | ||
80 | grep 'Protocol *: TLSv1.[23]' server-netcat-client-nc-server-${slib}.out | ||
81 | |||
82 | .endfor | ||
83 | |||
84 | .include <bsd.regress.mk> | ||