From: "cron2 (Code Review)" Date: Mon, 22 Jan 2024 13:16:23 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="Q6EsP+mN5TY="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix ssl unit tests on OpenSSL 1.0.2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --Q6EsP+mN5TY= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/50= 3?usp=3Demail ) Change subject: Fix ssl unit tests on OpenSSL 1.0.2 ...................................................................... Fix ssl unit tests on OpenSSL 1.0.2 OpenSSL 1.1.1 will initialise itself using clever linker magic. For OpenSSL 1.0.2 we need to manually initialise the library. For other unit tests just doing the OpenSSL_add_all_algorithms is enough but this unit test needs a more complete initialisation. Change-Id: I378081f391ad755d0a6fd5613de5c2a8bacc389a Acked-by: Frank Lichtenheld Message-Id: <20240122130909.10706-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28= 112.html Signed-off-by: Gert Doering --- M tests/unit_tests/openvpn/test_ssl.c 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/openvpn/test_ssl.c b/tests/unit_tests/openvpn= /test_ssl.c index fd2049f..d0c3df7 100644 --- a/tests/unit_tests/openvpn/test_ssl.c +++ b/tests/unit_tests/openvpn/test_ssl.c @@ -127,13 +127,13 @@ }; #if defined(ENABLE_CRYPTO_OPENSSL) - OpenSSL_add_all_algorithms(); + tls_init_lib(); #endif int ret =3D cmocka_run_group_tests_name("crypto tests", tests, NULL, N= ULL); #if defined(ENABLE_CRYPTO_OPENSSL) - EVP_cleanup(); + tls_free_lib(); #endif return ret; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/503?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I378081f391ad755d0a6fd5613de5c2a8bacc389a Gerrit-Change-Number: 503 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-MessageType: merged --Q6EsP+mN5TY= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

Fix ssl unit tests on OpenSSL 1.0.2

Ope= nSSL 1.1.1 will initialise itself using clever linker magic. For
OpenSSL= 1.0.2 we need to manually initialise the library. For other
unit tests = just doing the OpenSSL_add_all_algorithms is enough but
this unit test n= eeds a more complete initialisation.

Change-Id: I378081f391ad755d0a6= fd5613de5c2a8bacc389a
Acked-by: Frank Lichtenheld <frank@...2641...&g= t;
Message-Id: <20240122130909.10706-1-gert@...1296...>
URL: ht= tps://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28112.htm= l
Signed-off-by: Gert Doering <gert@...1296...>
---
M tests/= unit_tests/openvpn/test_ssl.c
1 file changed, 2 insertions(+), 2 deletio= ns(-)

diff --git a/tests/unit_tests/openvpn/test_ssl.c b/tests/unit_tests/open=
vpn/test_ssl.c
index fd2049f..d0c3df7 100644
--- a/tests/unit_tests/openvpn/test_ssl.c
+++ b/tests/uni= t_tests/openvpn/test_ssl.c
@@ -127,13 +127,13 @@
= };

#if defined(ENABLE_CRYPTO_= OPENSSL)
- OpenSSL_a= dd_all_algorithms();
= + tls_init_lib();
#endif

int ret =3D cmocka_run_group_tests_name("crypto tests", = tests, NULL, NULL);

#if defined(ENABLE_C= RYPTO_OPENSSL)
- EVP= _cleanup();
+ tls_= free_lib();
#endif

= return ret;

To view, visit change 503. To un= subscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I378081f391ad755d0a6fd5613de= 5c2a8bacc389a
Gerrit-Change-Number: 503
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: merged
--Q6EsP+mN5TY=--