diff options
Diffstat (limited to '')
-rw-r--r-- | src/regress/lib/libssl/interop/botan/Makefile | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/regress/lib/libssl/interop/botan/Makefile b/src/regress/lib/libssl/interop/botan/Makefile deleted file mode 100644 index 85877d4290..0000000000 --- a/src/regress/lib/libssl/interop/botan/Makefile +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.10 2025/01/15 10:54:17 tb Exp $ | ||
2 | |||
3 | .include <bsd.own.mk> | ||
4 | |||
5 | .if ! exists(/usr/local/bin/botan) | ||
6 | regress: | ||
7 | # install botan2 from ports for interop tests | ||
8 | @echo 'Run "pkg_add botan2" to run tests against Botan 2' | ||
9 | @echo SKIPPED | ||
10 | .elif (${COMPILER_VERSION:L} != "clang" && ! exists(/usr/local/bin/eg++)) | ||
11 | regress: | ||
12 | # on gcc-archs install g++ from ports for botan2 interop tests | ||
13 | @echo 'Run "pkg_add g++" to run tests against Botan 2 on GCC architectures' | ||
14 | @echo SKIPPED | ||
15 | .else | ||
16 | |||
17 | # C++11 | ||
18 | .if ${COMPILER_VERSION:L} != "clang" && ${CXX} == "c++" | ||
19 | CXX = /usr/local/bin/eg++ | ||
20 | .endif | ||
21 | |||
22 | LIBRARIES = libressl | ||
23 | .if exists(/usr/local/bin/eopenssl33) | ||
24 | LIBRARIES += openssl33 | ||
25 | .endif | ||
26 | .if exists(/usr/local/bin/eopenssl34) | ||
27 | LIBRARIES += openssl34 | ||
28 | .endif | ||
29 | |||
30 | PROGS = client | ||
31 | SRCS_client = client.cpp | ||
32 | CXXFLAGS = -I/usr/local/include/botan-2 -Wall | ||
33 | LDFLAGS = -L/usr/local/lib | ||
34 | LDADD = -lbotan-2 | ||
35 | DPADD = /usr/local/lib/libbotan-2.a | ||
36 | |||
37 | .for lib in ${LIBRARIES} | ||
38 | |||
39 | REGRESS_TARGETS += run-client-botan-server-${lib} | ||
40 | |||
41 | run-client-botan-server-${lib}: client server.crt | ||
42 | LD_LIBRARY_PATH=/usr/local/lib/e${lib} \ | ||
43 | ../${lib}/server >server-${lib}.out \ | ||
44 | -c server.crt -k server.key \ | ||
45 | 127.0.0.1 0 | ||
46 | ./client >client-botan.out \ | ||
47 | -C ca.crt \ | ||
48 | 127.0.0.1 \ | ||
49 | `sed -n 's/listen sock: 127.0.0.1 //p' server-${lib}.out` | ||
50 | # check that the server child run successfully to the end | ||
51 | grep -q '^success$$' server-${lib}.out || \ | ||
52 | { sleep 1; grep -q '^success$$' server-${lib}.out; } | ||
53 | # server must have read client hello | ||
54 | grep -q '^<<< hello$$' server-${lib}.out | ||
55 | # check that the client run successfully to the end | ||
56 | grep -q '^success$$' client-botan.out | ||
57 | # client must have read server greeting | ||
58 | grep -q '^<<< greeting$$' client-botan.out | ||
59 | # currently botan supports TLS 1.2, adapt later | ||
60 | grep -q ' Protocol *: TLSv1.2$$' server-${lib}.out | ||
61 | |||
62 | .endfor | ||
63 | |||
64 | server.key ca.key: | ||
65 | /usr/local/bin/botan keygen >$@.tmp | ||
66 | mv $@.tmp $@ | ||
67 | |||
68 | ca.crt: ${@:R}.key | ||
69 | /usr/local/bin/botan gen_self_signed ${@:R}.key ${@:R} >$@.tmp \ | ||
70 | --organization=tls-regress --ca | ||
71 | mv $@.tmp $@ | ||
72 | |||
73 | server.req: ${@:R}.key | ||
74 | /usr/local/bin/botan gen_pkcs10 ${@:R}.key localhost >$@.tmp \ | ||
75 | --organization=tls-regress --dns=127.0.0.1 | ||
76 | mv $@.tmp $@ | ||
77 | |||
78 | server.crt: ca.crt ${@:R}.req | ||
79 | /usr/local/bin/botan sign_cert ca.crt ca.key ${@:R}.req >$@.tmp | ||
80 | mv $@.tmp $@ | ||
81 | |||
82 | .endif # exists(/usr/local/bin/botan) | ||
83 | |||
84 | .include <bsd.regress.mk> | ||