test: allow to run init_ssl() multiple times

This commit is contained in:
Azat Khuzhin 2022-08-13 19:51:02 +02:00
parent 4ca417afa4
commit a4cdc3c5e8

View File

@ -150,6 +150,11 @@ get_ssl_ctx(void)
void
init_ssl(void)
{
static int initialized;
if (initialized)
return;
initialized = 1;
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
(defined(LIBRESSL_VERSION_NUMBER) && \
LIBRESSL_VERSION_NUMBER < 0x20700000L)