diff options
author | tb <> | 2025-07-09 17:48:02 +0000 |
---|---|---|
committer | tb <> | 2025-07-09 17:48:02 +0000 |
commit | d25f32ed32ab5666e77ae5843fcd4f087baf139a (patch) | |
tree | 0c48b6ef031fc1c0c17d6d000d3d073d275a57db /src | |
parent | 38e9c2a327865da6134fd3ecc45f8cd025eca3c3 (diff) | |
download | openbsd-d25f32ed32ab5666e77ae5843fcd4f087baf139a.tar.gz openbsd-d25f32ed32ab5666e77ae5843fcd4f087baf139a.tar.bz2 openbsd-d25f32ed32ab5666e77ae5843fcd4f087baf139a.zip |
libcrypto regress: add interop harness for openssl/3.5
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 | 11 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/netcat/Makefile | 5 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/openssl35/Makefile | 44 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/session/Makefile | 5 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/version/Makefile | 6 |
8 files changed, 75 insertions, 10 deletions
diff --git a/src/regress/lib/libssl/interop/Makefile b/src/regress/lib/libssl/interop/Makefile index bdc67f627a..acb5d18205 100644 --- a/src/regress/lib/libssl/interop/Makefile +++ b/src/regress/lib/libssl/interop/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # $OpenBSD: Makefile,v 1.21 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.22 2025/07/09 17:48:02 tb Exp $ |
2 | 2 | ||
3 | SUBDIR = libressl openssl33 openssl34 | 3 | SUBDIR = libressl openssl33 openssl34 openssl35 |
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 85877d4290..1464cf84a8 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.10 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.11 2025/07/09 17:48:02 tb Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -26,6 +26,9 @@ LIBRARIES += openssl33 | |||
26 | .if exists(/usr/local/bin/eopenssl34) | 26 | .if exists(/usr/local/bin/eopenssl34) |
27 | LIBRARIES += openssl34 | 27 | LIBRARIES += openssl34 |
28 | .endif | 28 | .endif |
29 | .if exists(/usr/local/bin/eopenssl35) | ||
30 | LIBRARIES += openssl35 | ||
31 | .endif | ||
29 | 32 | ||
30 | PROGS = client | 33 | PROGS = client |
31 | SRCS_client = client.cpp | 34 | SRCS_client = client.cpp |
diff --git a/src/regress/lib/libssl/interop/cert/Makefile b/src/regress/lib/libssl/interop/cert/Makefile index 74c63c86a8..8f05e3f84d 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.14 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.15 2025/07/09 17:48:02 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 3.x. Create client and server certificates | 4 | # openssl 3.x. Create client and server certificates |
@@ -13,6 +13,9 @@ LIBRARIES += openssl33 | |||
13 | .if exists(/usr/local/bin/eopenssl34) | 13 | .if exists(/usr/local/bin/eopenssl34) |
14 | LIBRARIES += openssl34 | 14 | LIBRARIES += openssl34 |
15 | .endif | 15 | .endif |
16 | .if exists(/usr/local/bin/eopenssl35) | ||
17 | LIBRARIES += openssl35 | ||
18 | .endif | ||
16 | 19 | ||
17 | .for cca in noca ca fakeca | 20 | .for cca in noca ca fakeca |
18 | .for sca in noca ca fakeca | 21 | .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 fa7e25f9ee..6693b962d0 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.17 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.18 2025/07/09 17:48:02 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 |
@@ -13,6 +13,9 @@ LIBRARIES += openssl33 | |||
13 | .if exists(/usr/local/bin/eopenssl34) | 13 | .if exists(/usr/local/bin/eopenssl34) |
14 | LIBRARIES += openssl34 | 14 | LIBRARIES += openssl34 |
15 | .endif | 15 | .endif |
16 | .if exists(/usr/local/bin/eopenssl35) | ||
17 | LIBRARIES += openssl35 | ||
18 | .endif | ||
16 | 19 | ||
17 | CLEANFILES = *.tmp *.ciphers ciphers.mk | 20 | CLEANFILES = *.tmp *.ciphers ciphers.mk |
18 | 21 | ||
@@ -42,7 +45,8 @@ client-${clib}-server-${slib}.ciphers: \ | |||
42 | # we are only interested in ciphers supported by libressl | 45 | # we are only interested in ciphers supported by libressl |
43 | sort $@ client-libressl.ciphers >$@.tmp | 46 | sort $@ client-libressl.ciphers >$@.tmp |
44 | . if "${clib}" == "openssl33" || "${slib}" == "openssl33" || \ | 47 | . if "${clib}" == "openssl33" || "${slib}" == "openssl33" || \ |
45 | "${clib}" == "openssl34" || "${slib}" == "openssl34" | 48 | "${clib}" == "openssl34" || "${slib}" == "openssl34" || \ |
49 | "${clib}" == "openssl35" || "${slib}" == "openssl35" | ||
46 | # OpenSSL's SSL_CTX_set_cipher_list doesn't accept TLSv1.3 ciphers | 50 | # OpenSSL's SSL_CTX_set_cipher_list doesn't accept TLSv1.3 ciphers |
47 | sed -i '/^TLS_/d' $@.tmp | 51 | sed -i '/^TLS_/d' $@.tmp |
48 | . endif | 52 | . endif |
@@ -72,6 +76,7 @@ regress: ciphers.mk | |||
72 | LEVEL_libressl = | 76 | LEVEL_libressl = |
73 | LEVEL_openssl33 = ,@SECLEVEL=0 | 77 | LEVEL_openssl33 = ,@SECLEVEL=0 |
74 | LEVEL_openssl34 = ,@SECLEVEL=0 | 78 | LEVEL_openssl34 = ,@SECLEVEL=0 |
79 | LEVEL_openssl35 = ,@SECLEVEL=0 | ||
75 | 80 | ||
76 | .for clib in ${LIBRARIES} | 81 | .for clib in ${LIBRARIES} |
77 | .for slib in ${LIBRARIES} | 82 | .for slib in ${LIBRARIES} |
@@ -132,7 +137,7 @@ check-cipher-${cipher}-client-${clib}-server-${slib}: \ | |||
132 | . endif | 137 | . endif |
133 | . if "${clib}" == "libressl" | 138 | . if "${clib}" == "libressl" |
134 | # libressl client may prefer chacha-poly if aes-ni is not supported | 139 | # libressl client may prefer chacha-poly if aes-ni is not supported |
135 | . if "${slib}" == "openssl33" || "${slib}" == "openssl34" | 140 | . if "${slib}" == "openssl33" || "${slib}" == "openssl34" || "${slib}" == "openssl35" |
136 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out | 141 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out |
137 | . else | 142 | . else |
138 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out | 143 | 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 3b8e3f95be..0f2864ccca 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.10 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.11 2025/07/09 17:48:02 tb Exp $ |
2 | 2 | ||
3 | LIBRARIES = libressl | 3 | LIBRARIES = libressl |
4 | .if exists(/usr/local/bin/eopenssl33) | 4 | .if exists(/usr/local/bin/eopenssl33) |
@@ -7,6 +7,9 @@ LIBRARIES += openssl33 | |||
7 | .if exists(/usr/local/bin/eopenssl34) | 7 | .if exists(/usr/local/bin/eopenssl34) |
8 | LIBRARIES += openssl34 | 8 | LIBRARIES += openssl34 |
9 | .endif | 9 | .endif |
10 | .if exists(/usr/local/bin/eopenssl35) | ||
11 | LIBRARIES += openssl35 | ||
12 | .endif | ||
10 | 13 | ||
11 | # run netcat server and connect with test client | 14 | # run netcat server and connect with test client |
12 | 15 | ||
diff --git a/src/regress/lib/libssl/interop/openssl35/Makefile b/src/regress/lib/libssl/interop/openssl35/Makefile new file mode 100644 index 0000000000..e11ad5dd20 --- /dev/null +++ b/src/regress/lib/libssl/interop/openssl35/Makefile | |||
@@ -0,0 +1,44 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2025/07/09 17:48:02 tb Exp $ | ||
2 | |||
3 | .if ! exists(/usr/local/bin/eopenssl35) | ||
4 | regress: | ||
5 | # install openssl-3.5 from ports for interop tests | ||
6 | @echo 'Run "pkg_add openssl--%3.5" to run tests against OpenSSL 3.5' | ||
7 | @echo SKIPPED | ||
8 | .else | ||
9 | |||
10 | PROGS = client server | ||
11 | CFLAGS += -DOPENSSL_SUPPRESS_DEPRECATED | ||
12 | CPPFLAGS = -I /usr/local/include/eopenssl35 | ||
13 | LDFLAGS = -L /usr/local/lib/eopenssl35 | ||
14 | LDADD = -lssl -lcrypto | ||
15 | DPADD = /usr/local/lib/eopenssl35/libssl.a \ | ||
16 | /usr/local/lib/eopenssl35/libcrypto.a | ||
17 | LD_LIBRARY_PATH = /usr/local/lib/eopenssl35 | ||
18 | REGRESS_TARGETS = run-self-client-server | ||
19 | .for p in ${PROGS} | ||
20 | REGRESS_TARGETS += run-ldd-$p run-version-$p run-protocol-$p | ||
21 | .endfor | ||
22 | |||
23 | .for p in ${PROGS} | ||
24 | |||
25 | run-ldd-$p: ldd-$p.out | ||
26 | # check that $p is linked with OpenSSL 3.5 | ||
27 | grep -q /usr/local/lib/eopenssl35/libcrypto.so ldd-$p.out | ||
28 | grep -q /usr/local/lib/eopenssl35/libssl.so ldd-$p.out | ||
29 | # check that $p is not linked with LibreSSL | ||
30 | ! grep -v -e libc.so -e libpthread.so ldd-$p.out | grep /usr/lib/ | ||
31 | |||
32 | run-version-$p: $p-self.out | ||
33 | # check that runtime version is OpenSSL 3.5 | ||
34 | grep 'SSLEAY_VERSION: OpenSSL 3.5' $p-self.out | ||
35 | |||
36 | run-protocol-$p: $p-self.out | ||
37 | # check that OpenSSL 3.5 protocol version is TLS 1.3 | ||
38 | grep 'Protocol *: TLSv1.3' $p-self.out | ||
39 | |||
40 | .endfor | ||
41 | |||
42 | .endif # exists(/usr/local/bin/eopenssl35) | ||
43 | |||
44 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libssl/interop/session/Makefile b/src/regress/lib/libssl/interop/session/Makefile index e9a353f99e..4670240f9f 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.12 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.13 2025/07/09 17:48:02 tb Exp $ |
2 | 2 | ||
3 | LIBRARIES = libressl | 3 | LIBRARIES = libressl |
4 | .if exists(/usr/local/bin/eopenssl33) | 4 | .if exists(/usr/local/bin/eopenssl33) |
@@ -7,6 +7,9 @@ LIBRARIES = libressl | |||
7 | .if exists(/usr/local/bin/eopenssl34) | 7 | .if exists(/usr/local/bin/eopenssl34) |
8 | #LIBRARIES += openssl34 | 8 | #LIBRARIES += openssl34 |
9 | .endif | 9 | .endif |
10 | .if exists(/usr/local/bin/eopenssl35) | ||
11 | #LIBRARIES += openssl35 | ||
12 | .endif | ||
10 | 13 | ||
11 | run-session-client-libressl-server-libressl: | 14 | run-session-client-libressl-server-libressl: |
12 | # TLS 1.3 needs some extra setup for session reuse | 15 | # TLS 1.3 needs some extra setup for session reuse |
diff --git a/src/regress/lib/libssl/interop/version/Makefile b/src/regress/lib/libssl/interop/version/Makefile index 605fba252f..133fc29629 100644 --- a/src/regress/lib/libssl/interop/version/Makefile +++ b/src/regress/lib/libssl/interop/version/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.10 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.11 2025/07/09 17:48:02 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 openssl 3.0. Pin client or server to a fixed TLS | 4 | # openssl 1.1 or openssl 3.0. Pin client or server to a fixed TLS |
@@ -13,6 +13,9 @@ LIBRARIES += openssl33 | |||
13 | .if exists(/usr/local/bin/eopenssl34) | 13 | .if exists(/usr/local/bin/eopenssl34) |
14 | LIBRARIES += openssl34 | 14 | LIBRARIES += openssl34 |
15 | .endif | 15 | .endif |
16 | .if exists(/usr/local/bin/eopenssl35) | ||
17 | LIBRARIES += openssl35 | ||
18 | .endif | ||
16 | 19 | ||
17 | VERSIONS = any TLS1_2 TLS1_3 | 20 | VERSIONS = any TLS1_2 TLS1_3 |
18 | 21 | ||
@@ -31,6 +34,7 @@ FAIL_${cver}_${sver} = ! | |||
31 | .if ("${cver}" != TLS1_3 && "${sver}" != TLS1_3) && \ | 34 | .if ("${cver}" != TLS1_3 && "${sver}" != TLS1_3) && \ |
32 | ((("${clib}" != openssl33 && "${slib}" != openssl33)) || \ | 35 | ((("${clib}" != openssl33 && "${slib}" != openssl33)) || \ |
33 | (("${clib}" != openssl34 && "${slib}" != openssl34)) || \ | 36 | (("${clib}" != openssl34 && "${slib}" != openssl34)) || \ |
37 | (("${clib}" != openssl35 && "${slib}" != openssl35)) || \ | ||
34 | (("${cver}" != any && "${sver}" != any) && \ | 38 | (("${cver}" != any && "${sver}" != any) && \ |
35 | ("${cver}" != TLS1 && "${sver}" != TLS1) && \ | 39 | ("${cver}" != TLS1 && "${sver}" != TLS1) && \ |
36 | ("${cver}" != TLS1_1 && "${sver}" != TLS1_1))) | 40 | ("${cver}" != TLS1_1 && "${sver}" != TLS1_1))) |