From 522e46c97380132b64a28616fe82ceaf42e6ec80 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Fri, 4 Mar 2022 18:34:06 -0500 Subject: [PATCH] unit1610: init SSL library before calling SHA256 functions The SSL library must be initialized (via global initialization) because libcurl's SHA256 functions may call SHA256 functions in the SSL library. Reported-by: Gisle Vanem Fixes https://github.com/curl/curl/issues/8538 Closes https://github.com/curl/curl/pull/8540 --- tests/unit/unit1610.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/unit1610.c b/tests/unit/unit1610.c index 2a18f5c5f4..667781a131 100644 --- a/tests/unit/unit1610.c +++ b/tests/unit/unit1610.c @@ -25,12 +25,14 @@ static CURLcode unit_setup(void) { - return CURLE_OK; + int res = CURLE_OK; + global_init(CURL_GLOBAL_ALL); + return res; } static void unit_stop(void) { - + curl_global_cleanup(); } UNITTEST_START -- 2.47.3