tls: fix compilation issue with openssl-1.1 62/43362/2
authorVarun Rapelly <[email protected]>
Mon, 30 Jun 2025 15:35:59 +0000 (15:35 +0000)
committerVarun Rapelly <[email protected]>
Mon, 30 Jun 2025 15:43:08 +0000 (15:43 +0000)
This patch fixes compilation issue observed with openssl-1.1
with 'SSL_CTX_set_async_callback'.

Type: fix

Change-Id: I3d65f69056034b4afcebd7813c34f9ecebd299e0
Signed-off-by: Varun Rapelly <[email protected]>
src/plugins/tlsopenssl/tls_openssl.c

index 651053b..8d3f5f3 100644 (file)
@@ -795,12 +795,14 @@ openssl_ctx_init_client (tls_ctx_t * ctx)
 
   SSL_CTX_set_ecdh_auto (oc->client_ssl_ctx, 1);
   SSL_CTX_set_mode (oc->client_ssl_ctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
+#ifdef HAVE_OPENSSL_ASYNC
   if (om->async)
     {
       SSL_CTX_set_mode (oc->client_ssl_ctx, SSL_MODE_ASYNC);
       SSL_CTX_set_async_callback (oc->client_ssl_ctx,
                                  tls_async_openssl_callback);
     }
+#endif
 
   rv =
     SSL_CTX_set_cipher_list (oc->client_ssl_ctx, (const char *) om->ciphers);