summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/interop/version/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libssl/interop/version/Makefile')
-rw-r--r--src/regress/lib/libssl/interop/version/Makefile109
1 files changed, 0 insertions, 109 deletions
diff --git a/src/regress/lib/libssl/interop/version/Makefile b/src/regress/lib/libssl/interop/version/Makefile
deleted file mode 100644
index c4f7705d63..0000000000
--- a/src/regress/lib/libssl/interop/version/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
1# $OpenBSD: Makefile,v 1.7 2023/07/02 17:21:32 beck Exp $
2
3# Connect a client to a server. Both can be current libressl, or
4# openssl 1.1 or openssl 3.0. Pin client or server to a fixed TLS
5# version number. Incompatible versions must fail. Check that client
6# and server have used correct version by grepping in their session
7# print out.
8
9LIBRARIES = libressl
10.if exists(/usr/local/bin/eopenssl11)
11LIBRARIES += openssl11
12.endif
13.if exists(/usr/local/bin/eopenssl30)
14LIBRARIES += openssl30
15.endif
16
17VERSIONS = any TLS1_2 TLS1_3
18
19.for cver in ${VERSIONS}
20.for sver in ${VERSIONS}
21
22.if "${cver}" == any || "${sver}" == any || "${cver}" == "${sver}"
23FAIL_${cver}_${sver} =
24.else
25FAIL_${cver}_${sver} = !
26.endif
27
28.for clib in ${LIBRARIES}
29.for slib in ${LIBRARIES}
30
31.if ("${cver}" != TLS1_3 && "${sver}" != TLS1_3) && \
32 (("${clib}" != openssl30 && "${slib}" != openssl30) || \
33 (("${cver}" != any && "${sver}" != any) && \
34 ("${cver}" != TLS1 && "${sver}" != TLS1) && \
35 ("${cver}" != TLS1_1 && "${sver}" != TLS1_1)))
36
37.if ("${clib}" == "libressl" || "${slib}" == "libressl")
38REGRESS_TARGETS += run-version-client-${clib}-${cver}-server-${slib}-${sver}
39.else
40# Don't use REGRESS_SLOW_TARGETS since its handling in bsd.regress.mk is slow.
41SLOW_TARGETS += run-version-client-${clib}-${cver}-server-${slib}-${sver}
42.endif
43
44run-version-client-${clib}-${cver}-server-${slib}-${sver} \
45client-version-client-${clib}-${cver}-server-${slib}-${sver}.out \
46server-version-client-${clib}-${cver}-server-${slib}-${sver}.out: \
47 127.0.0.1.crt ../${clib}/client ../${slib}/server
48 LD_LIBRARY_PATH=/usr/local/lib/e${slib} \
49 ../${slib}/server >${@:S/^run/server/}.out \
50 -c 127.0.0.1.crt -k 127.0.0.1.key \
51 ${sver:Nany:S/^/-V /} \
52 127.0.0.1 0
53 ${FAIL_${cver}_${sver}} \
54 LD_LIBRARY_PATH=/usr/local/lib/e${clib} \
55 ../${clib}/client >${@:S/^run/client/}.out \
56 ${cver:Nany:S/^/-V /} \
57 `sed -n 's/listen sock: //p' ${@:S/^run/server/}.out`
58.if empty(${FAIL_${cver}_${sver}})
59 grep -q '^success$$' ${@:S/^run/server/}.out || \
60 { sleep 1; grep -q '^success$$' ${@:S/^run/server/}.out; }
61 grep -q '^success$$' ${@:S/^run/client/}.out
62.endif
63
64.if empty(${FAIL_${cver}_${sver}})
65
66.if ("${clib}" == "libressl" || "${slib}" == "libressl")
67REGRESS_TARGETS += check-version-client-${clib}-${cver}-server-${slib}-${sver}
68.else
69# Don't use REGRESS_SLOW_TARGETS since its handling in bsd.regress.mk is slow.
70SLOW_TARGETS += check-version-client-${clib}-${cver}-server-${slib}-${sver}
71.endif
72
73check-version-client-${clib}-${cver}-server-${slib}-${sver}: \
74 client-version-client-${clib}-${cver}-server-${slib}-${sver}.out \
75 server-version-client-${clib}-${cver}-server-${slib}-${sver}.out
76 @grep ' Protocol *: ' ${@:S/^check/client/}.out
77 @grep ' Protocol *: ' ${@:S/^check/server/}.out
78.if "${cver}" == any
79.if "${sver}" == any
80 grep -q ' Protocol *: TLSv1.3$$' ${@:S/^check/client/}.out
81 grep -q ' Protocol *: TLSv1.3$$' ${@:S/^check/server/}.out
82.else
83 grep -q ' Protocol *: ${sver:S/TLS/TLSv/:S/_/./}$$' \
84 ${@:S/^check/client/}.out
85 grep -q ' Protocol *: ${sver:S/TLS/TLSv/:S/_/./}$$' \
86 ${@:S/^check/server/}.out
87.endif
88.else
89 grep -q ' Protocol *: ${cver:S/TLS/TLSv/:S/_/./}$$' \
90 ${@:S/^check/client/}.out
91 grep -q ' Protocol *: ${cver:S/TLS/TLSv/:S/_/./}$$' \
92 ${@:S/^check/server/}.out
93.endif
94.endif
95
96.endif
97
98.endfor
99.endfor
100.endfor
101.endfor
102
103.include <bsd.own.mk>
104REGRESS_SKIP_SLOW ?= no
105.if ${REGRESS_SKIP_SLOW:L} != "yes"
106REGRESS_TARGETS += ${SLOW_TARGETS}
107.endif
108
109.include <bsd.regress.mk>