From 37defd3ba2f2f5182b698d2aad44092b093217b8 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 16 May 2024 14:09:36 +0100 Subject: [PATCH] fixup! Further extend the SSL_free_buffers testing --- test/sslbuffertest.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/sslbuffertest.c b/test/sslbuffertest.c index c3bed93ac718a..7079d04e152a3 100644 --- a/test/sslbuffertest.c +++ b/test/sslbuffertest.c @@ -8,10 +8,19 @@ * or in the file LICENSE in the source distribution. */ +/* + * We need access to the deprecated low level Engine APIs for legacy purposes + * when the deprecated calls are not hidden + */ +#ifndef OPENSSL_NO_DEPRECATED_3_0 +# define OPENSSL_SUPPRESS_DEPRECATED +#endif + #include #include #include #include +#include #include "internal/packet.h" @@ -300,7 +309,13 @@ static int test_free_buffers(int test) end: SSL_free(clientssl); SSL_free(serverssl); - +#ifndef OPENSSL_NO_DYNAMIC_ENGINE + if (e != NULL) { + ENGINE_unregister_ciphers(e); + ENGINE_finish(e); + ENGINE_free(e); + } +#endif return result; }