diff options
| author | cvs2svn <admin@example.com> | 2019-11-19 19:57:05 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2019-11-19 19:57:05 +0000 |
| commit | e9f9eb6198f1757b7c0dfef043fadf1fa8243022 (patch) | |
| tree | b5a648f6ccaf6c1cd9915ddb45503d1fccfeba0e /src/regress/lib/libssl/interop/netcat | |
| parent | ab72e3a6f7e8d5c71bbba034410468781d5923b6 (diff) | |
| download | openbsd-bluhm_20191119.tar.gz openbsd-bluhm_20191119.tar.bz2 openbsd-bluhm_20191119.zip | |
This commit was manufactured by cvs2git to create tag 'bluhm_20191119'.bluhm_20191119
Diffstat (limited to 'src/regress/lib/libssl/interop/netcat')
| -rw-r--r-- | src/regress/lib/libssl/interop/netcat/Makefile | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/src/regress/lib/libssl/interop/netcat/Makefile b/src/regress/lib/libssl/interop/netcat/Makefile deleted file mode 100644 index 80f49c52f0..0000000000 --- a/src/regress/lib/libssl/interop/netcat/Makefile +++ /dev/null | |||
| @@ -1,90 +0,0 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.2 2018/11/11 07:39:35 bluhm Exp $ | ||
| 2 | |||
| 3 | LIBRARIES = libressl | ||
| 4 | .if exists(/usr/local/bin/eopenssl) | ||
| 5 | LIBRARIES += openssl | ||
| 6 | .endif | ||
| 7 | .if exists(/usr/local/bin/eopenssl11) | ||
| 8 | LIBRARIES += openssl11 | ||
| 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 '\n======== $@ ========' | ||
| 20 | echo "greeting" | \ | ||
| 21 | nc >${@:S/^run/server/}.out \ | ||
| 22 | -l -c -C 127.0.0.1.crt -K 127.0.0.1.key \ | ||
| 23 | 127.0.0.1 0 & \ | ||
| 24 | for i in `jot 1000`; do fstat -p $$! >netcat.fstat; \ | ||
| 25 | grep -q ' stream tcp .*:[1-9][0-9]*$$' netcat.fstat && \ | ||
| 26 | exit 0; done; exit 1 | ||
| 27 | LD_LIBRARY_PATH=/usr/local/lib/e${clib} \ | ||
| 28 | ../${clib}/client >${@:S/^run/client/}.out \ | ||
| 29 | `sed -n 's/.* stream tcp .*:/127.0.0.1 /p' netcat.fstat` | ||
| 30 | # check that the client run successfully to the end | ||
| 31 | grep -q '^success$$' ${@:S/^run/client/}.out | ||
| 32 | # client must have read server greeting | ||
| 33 | grep -q '^<<< greeting$$' ${@:S/^run/client/}.out | ||
| 34 | # netstat server must have read client hello | ||
| 35 | grep -q '^hello$$' ${@:S/^run/server/}.out | ||
| 36 | |||
| 37 | .endfor | ||
| 38 | |||
| 39 | # run test server and connect with netcat client | ||
| 40 | |||
| 41 | .for slib in ${LIBRARIES} | ||
| 42 | |||
| 43 | REGRESS_TARGETS += run-netcat-client-nc-server-${slib} | ||
| 44 | |||
| 45 | run-netcat-client-nc-server-${slib}: ../${slib}/server 127.0.0.1.crt | ||
| 46 | @echo '\n======== $@ ========' | ||
| 47 | LD_LIBRARY_PATH=/usr/local/lib/e${slib} \ | ||
| 48 | ../${slib}/server >${@:S/^run/server/}.out \ | ||
| 49 | 127.0.0.1 0 | ||
| 50 | echo "hello" | \ | ||
| 51 | nc >${@:S/^run/client/}.out \ | ||
| 52 | -c -R 127.0.0.1.crt \ | ||
| 53 | `sed -n 's/listen sock: //p' ${@:S/^run/server/}.out` | ||
| 54 | # check that the server child run successfully to the end | ||
| 55 | grep -q '^success$$' ${@:S/^run/server/}.out || \ | ||
| 56 | { sleep 1; grep -q '^success$$' ${@:S/^run/server/}.out; } | ||
| 57 | # server must have read client hello | ||
| 58 | grep -q '^<<< hello$$' ${@:S/^run/server/}.out | ||
| 59 | # client must have read server greeting | ||
| 60 | grep -q '^greeting$$' ${@:S/^run/client/}.out | ||
| 61 | |||
| 62 | .endfor | ||
| 63 | |||
| 64 | # check the TLS protocol version in client and server logs | ||
| 65 | |||
| 66 | .for clib in ${LIBRARIES} | ||
| 67 | |||
| 68 | REGRESS_TARGETS += run-protocol-client-${clib} | ||
| 69 | |||
| 70 | run-protocol-client-${clib}: client-netcat-client-${clib}-server-nc.out | ||
| 71 | @echo '\n======== $@ ========' | ||
| 72 | # check that LibTLS protocol version is TLS 1.2 | ||
| 73 | # XXX adapt when LibreSSL supports TLS 1.3 | ||
| 74 | grep 'Protocol *: TLSv1.2' client-netcat-client-${clib}-server-nc.out | ||
| 75 | |||
| 76 | .endfor | ||
| 77 | |||
| 78 | .for slib in ${LIBRARIES} | ||
| 79 | |||
| 80 | REGRESS_TARGETS += run-protocol-server-${slib} | ||
| 81 | |||
| 82 | run-protocol-server-${slib}: server-netcat-client-nc-server-${slib}.out | ||
| 83 | @echo '\n======== $@ ========' | ||
| 84 | # check that LibTLS protocol version is TLS 1.2 | ||
| 85 | # XXX adapt when LibreSSL supports TLS 1.3 | ||
| 86 | grep 'Protocol *: TLSv1.2' server-netcat-client-nc-server-${slib}.out | ||
| 87 | |||
| 88 | .endfor | ||
| 89 | |||
| 90 | .include <bsd.regress.mk> | ||
