diff options
author | tb <> | 2024-08-18 09:14:17 +0000 |
---|---|---|
committer | tb <> | 2024-08-18 09:14:17 +0000 |
commit | 9bf6dcf903a69a1bdcb775ae3133c6e4a34714d9 (patch) | |
tree | 1cde2f0e848ef602837dec9224c3ad7a15990c30 /src | |
parent | e7c2883bfd13e329ef5acff5caddef46e0b02708 (diff) | |
download | openbsd-9bf6dcf903a69a1bdcb775ae3133c6e4a34714d9.tar.gz openbsd-9bf6dcf903a69a1bdcb775ae3133c6e4a34714d9.tar.bz2 openbsd-9bf6dcf903a69a1bdcb775ae3133c6e4a34714d9.zip |
Add support for openssl32 in interop test
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/interop/Makefile | 4 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/botan/Makefile | 5 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/cert/Makefile | 5 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/cipher/Makefile | 12 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/netcat/Makefile | 5 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/openssl32/Makefile | 43 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/session/Makefile | 5 |
7 files changed, 70 insertions, 9 deletions
diff --git a/src/regress/lib/libssl/interop/Makefile b/src/regress/lib/libssl/interop/Makefile index 82bef2314d..0a545aded7 100644 --- a/src/regress/lib/libssl/interop/Makefile +++ b/src/regress/lib/libssl/interop/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # $OpenBSD: Makefile,v 1.18 2023/10/30 17:15:21 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.19 2024/08/18 09:14:17 tb Exp $ |
2 | 2 | ||
3 | SUBDIR = libressl openssl11 openssl30 openssl31 | 3 | SUBDIR = libressl openssl11 openssl30 openssl31 openssl32 |
4 | 4 | ||
5 | # the above binaries must have been built before we can continue | 5 | # the above binaries must have been built before we can continue |
6 | SUBDIR += netcat | 6 | SUBDIR += netcat |
diff --git a/src/regress/lib/libssl/interop/botan/Makefile b/src/regress/lib/libssl/interop/botan/Makefile index b9570b815a..acc350a936 100644 --- a/src/regress/lib/libssl/interop/botan/Makefile +++ b/src/regress/lib/libssl/interop/botan/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.7 2023/10/30 17:15:21 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.8 2024/08/18 09:14:17 tb Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -29,6 +29,9 @@ LIBRARIES += openssl30 | |||
29 | .if exists(/usr/local/bin/eopenssl31) | 29 | .if exists(/usr/local/bin/eopenssl31) |
30 | LIBRARIES += openssl31 | 30 | LIBRARIES += openssl31 |
31 | .endif | 31 | .endif |
32 | .if exists(/usr/local/bin/eopenssl32) | ||
33 | LIBRARIES += openssl32 | ||
34 | .endif | ||
32 | 35 | ||
33 | PROGS = client | 36 | PROGS = client |
34 | SRCS_client = client.cpp | 37 | SRCS_client = client.cpp |
diff --git a/src/regress/lib/libssl/interop/cert/Makefile b/src/regress/lib/libssl/interop/cert/Makefile index ae755be223..8c37d8a4f8 100644 --- a/src/regress/lib/libssl/interop/cert/Makefile +++ b/src/regress/lib/libssl/interop/cert/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.11 2023/10/30 17:15:21 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.12 2024/08/18 09:14:17 tb Exp $ |
2 | 2 | ||
3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
4 | # openssl 1.1 or 3.0. Create client and server certificates | 4 | # openssl 1.1 or 3.0. Create client and server certificates |
@@ -16,6 +16,9 @@ LIBRARIES += openssl30 | |||
16 | .if exists(/usr/local/bin/eopenssl31) | 16 | .if exists(/usr/local/bin/eopenssl31) |
17 | LIBRARIES += openssl31 | 17 | LIBRARIES += openssl31 |
18 | .endif | 18 | .endif |
19 | .if exists(/usr/local/bin/eopenssl32) | ||
20 | LIBRARIES += openssl32 | ||
21 | .endif | ||
19 | 22 | ||
20 | .for cca in noca ca fakeca | 23 | .for cca in noca ca fakeca |
21 | .for sca in noca ca fakeca | 24 | .for sca in noca ca fakeca |
diff --git a/src/regress/lib/libssl/interop/cipher/Makefile b/src/regress/lib/libssl/interop/cipher/Makefile index 3a116d5ed5..70eaeec44c 100644 --- a/src/regress/lib/libssl/interop/cipher/Makefile +++ b/src/regress/lib/libssl/interop/cipher/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.14 2024/02/03 15:58:34 beck Exp $ | 1 | # $OpenBSD: Makefile,v 1.15 2024/08/18 09:14:17 tb Exp $ |
2 | 2 | ||
3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
4 | # openssl 1.1 or 3.0. Create lists of supported ciphers | 4 | # openssl 1.1 or 3.0. Create lists of supported ciphers |
@@ -16,6 +16,9 @@ LIBRARIES += openssl30 | |||
16 | .if exists(/usr/local/bin/eopenssl31) | 16 | .if exists(/usr/local/bin/eopenssl31) |
17 | LIBRARIES += openssl31 | 17 | LIBRARIES += openssl31 |
18 | .endif | 18 | .endif |
19 | .if exists(/usr/local/bin/eopenssl32) | ||
20 | LIBRARIES += openssl32 | ||
21 | .endif | ||
19 | 22 | ||
20 | CLEANFILES = *.tmp *.ciphers ciphers.mk | 23 | CLEANFILES = *.tmp *.ciphers ciphers.mk |
21 | 24 | ||
@@ -46,7 +49,8 @@ client-${clib}-server-${slib}.ciphers: \ | |||
46 | sort $@ client-libressl.ciphers >$@.tmp | 49 | sort $@ client-libressl.ciphers >$@.tmp |
47 | . if "${clib}" == "openssl11" || "${slib}" == "openssl11" || \ | 50 | . if "${clib}" == "openssl11" || "${slib}" == "openssl11" || \ |
48 | "${clib}" == "openssl30" || "${slib}" == "openssl30" || \ | 51 | "${clib}" == "openssl30" || "${slib}" == "openssl30" || \ |
49 | "${clib}" == "openssl31" || "${slib}" == "openssl31" | 52 | "${clib}" == "openssl31" || "${slib}" == "openssl31" || \ |
53 | "${clib}" == "openssl32" || "${slib}" == "openssl32" | ||
50 | # OpenSSL's SSL_CTX_set_cipher_list doesn't accept TLSv1.3 ciphers | 54 | # OpenSSL's SSL_CTX_set_cipher_list doesn't accept TLSv1.3 ciphers |
51 | sed -i '/^TLS_/d' $@.tmp | 55 | sed -i '/^TLS_/d' $@.tmp |
52 | . endif | 56 | . endif |
@@ -76,6 +80,8 @@ regress: ciphers.mk | |||
76 | LEVEL_libressl = | 80 | LEVEL_libressl = |
77 | LEVEL_openssl11 = ,@SECLEVEL=0 | 81 | LEVEL_openssl11 = ,@SECLEVEL=0 |
78 | LEVEL_openssl30 = ,@SECLEVEL=0 | 82 | LEVEL_openssl30 = ,@SECLEVEL=0 |
83 | LEVEL_openssl31 = ,@SECLEVEL=0 | ||
84 | LEVEL_openssl32 = ,@SECLEVEL=0 | ||
79 | 85 | ||
80 | .for clib in ${LIBRARIES} | 86 | .for clib in ${LIBRARIES} |
81 | .for slib in ${LIBRARIES} | 87 | .for slib in ${LIBRARIES} |
@@ -136,7 +142,7 @@ check-cipher-${cipher}-client-${clib}-server-${slib}: \ | |||
136 | . endif | 142 | . endif |
137 | . if "${clib}" == "libressl" | 143 | . if "${clib}" == "libressl" |
138 | # libressl client may prefer chacha-poly if aes-ni is not supported | 144 | # libressl client may prefer chacha-poly if aes-ni is not supported |
139 | . if "${slib}" == "openssl11" || "${slib}" == "openssl30" || "${slib}" == "openssl31" | 145 | . if "${slib}" == "openssl11" || "${slib}" == "openssl30" || "${slib}" == "openssl31" || "${slib}" == "openssl32" |
140 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out | 146 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out |
141 | . else | 147 | . else |
142 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out | 148 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out |
diff --git a/src/regress/lib/libssl/interop/netcat/Makefile b/src/regress/lib/libssl/interop/netcat/Makefile index 568c4d255a..3e3e4efd1e 100644 --- a/src/regress/lib/libssl/interop/netcat/Makefile +++ b/src/regress/lib/libssl/interop/netcat/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.7 2023/10/30 17:15:21 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.8 2024/08/18 09:14:17 tb Exp $ |
2 | 2 | ||
3 | LIBRARIES = libressl | 3 | LIBRARIES = libressl |
4 | .if exists(/usr/local/bin/eopenssl11) | 4 | .if exists(/usr/local/bin/eopenssl11) |
@@ -10,6 +10,9 @@ LIBRARIES += openssl30 | |||
10 | .if exists(/usr/local/bin/eopenssl31) | 10 | .if exists(/usr/local/bin/eopenssl31) |
11 | LIBRARIES += openssl31 | 11 | LIBRARIES += openssl31 |
12 | .endif | 12 | .endif |
13 | .if exists(/usr/local/bin/eopenssl32) | ||
14 | LIBRARIES += openssl32 | ||
15 | .endif | ||
13 | 16 | ||
14 | # run netcat server and connect with test client | 17 | # run netcat server and connect with test client |
15 | 18 | ||
diff --git a/src/regress/lib/libssl/interop/openssl32/Makefile b/src/regress/lib/libssl/interop/openssl32/Makefile new file mode 100644 index 0000000000..12536d0c89 --- /dev/null +++ b/src/regress/lib/libssl/interop/openssl32/Makefile | |||
@@ -0,0 +1,43 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2024/08/18 09:14:17 tb Exp $ | ||
2 | |||
3 | .if ! exists(/usr/local/bin/eopenssl32) | ||
4 | regress: | ||
5 | # install openssl-3.2 ports for interop tests | ||
6 | @echo 'Run "pkg_add openssl--%3.2" to run tests against OpenSSL 3.2' | ||
7 | @echo SKIPPED | ||
8 | .else | ||
9 | |||
10 | PROGS = client server | ||
11 | CPPFLAGS = -I /usr/local/include/eopenssl32 | ||
12 | LDFLAGS = -L /usr/local/lib/eopenssl32 | ||
13 | LDADD = -lssl -lcrypto | ||
14 | DPADD = /usr/local/lib/eopenssl32/libssl.a \ | ||
15 | /usr/local/lib/eopenssl32/libcrypto.a | ||
16 | LD_LIBRARY_PATH = /usr/local/lib/eopenssl32 | ||
17 | REGRESS_TARGETS = run-self-client-server | ||
18 | .for p in ${PROGS} | ||
19 | REGRESS_TARGETS += run-ldd-$p run-version-$p run-protocol-$p | ||
20 | .endfor | ||
21 | |||
22 | .for p in ${PROGS} | ||
23 | |||
24 | run-ldd-$p: ldd-$p.out | ||
25 | # check that $p is linked with OpenSSL 3.2 | ||
26 | grep -q /usr/local/lib/eopenssl32/libcrypto.so ldd-$p.out | ||
27 | grep -q /usr/local/lib/eopenssl32/libssl.so ldd-$p.out | ||
28 | # check that $p is not linked with LibreSSL | ||
29 | ! grep -v libc.so ldd-$p.out | grep /usr/lib/ | ||
30 | |||
31 | run-version-$p: $p-self.out | ||
32 | # check that runtime version is OpenSSL 3.2 | ||
33 | grep 'SSLEAY_VERSION: OpenSSL 3.2' $p-self.out | ||
34 | |||
35 | run-protocol-$p: $p-self.out | ||
36 | # check that OpenSSL 3.2 protocol version is TLS 1.3 | ||
37 | grep 'Protocol *: TLSv1.3' $p-self.out | ||
38 | |||
39 | .endfor | ||
40 | |||
41 | .endif # exists(/usr/local/bin/eopenssl32) | ||
42 | |||
43 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libssl/interop/session/Makefile b/src/regress/lib/libssl/interop/session/Makefile index 99daa4ba4f..d1644de3f3 100644 --- a/src/regress/lib/libssl/interop/session/Makefile +++ b/src/regress/lib/libssl/interop/session/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.9 2023/10/30 17:15:21 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.10 2024/08/18 09:14:17 tb Exp $ |
2 | 2 | ||
3 | LIBRARIES = libressl | 3 | LIBRARIES = libressl |
4 | .if exists(/usr/local/bin/eopenssl11) | 4 | .if exists(/usr/local/bin/eopenssl11) |
@@ -10,6 +10,9 @@ LIBRARIES += openssl11 | |||
10 | .if exists(/usr/local/bin/eopenssl31) | 10 | .if exists(/usr/local/bin/eopenssl31) |
11 | #LIBRARIES += openssl31 | 11 | #LIBRARIES += openssl31 |
12 | .endif | 12 | .endif |
13 | .if exists(/usr/local/bin/eopenssl32) | ||
14 | #LIBRARIES += openssl32 | ||
15 | .endif | ||
13 | 16 | ||
14 | run-session-client-libressl-server-libressl \ | 17 | run-session-client-libressl-server-libressl \ |
15 | run-session-client-libressl-server-openssl11 \ | 18 | run-session-client-libressl-server-openssl11 \ |