From: Patrick McDermott Subject: Fix undefined references with NO_OLD_TLS and NO_SESSION_CACHE diff -Naur src.orig/lib/vtls/wolfssl.c src/lib/vtls/wolfssl.c --- src.orig/lib/vtls/wolfssl.c 2021-01-03 03:05:41.990032879 -0500 +++ src/lib/vtls/wolfssl.c 2021-01-03 03:19:00.108983191 -0500 @@ -265,8 +265,12 @@ #endif break; case CURL_SSLVERSION_TLSv1_1: +#ifndef NO_OLD_TLS req_method = wolfTLSv1_1_client_method(); use_sni(TRUE); +#else + failf(data, "wolfSSL does not support TLS 1.1"); +#endif break; case CURL_SSLVERSION_TLSv1_2: req_method = wolfTLSv1_2_client_method(); @@ -500,6 +504,7 @@ } #endif /* OPENSSL_EXTRA */ +#ifndef NO_SESSION_CACHE /* Check if there's a cached ID we can/should use here! */ if(SSL_SET_OPTION(primary.sessionid)) { void *ssl_sessionid = NULL; @@ -520,6 +525,7 @@ } Curl_ssl_sessionid_unlock(conn); } +#endif /* pass the raw socket into the SSL layer */ if(!wolfSSL_set_fd(backend->handle, (int)sockfd)) { @@ -759,6 +765,7 @@ DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); +#ifndef NO_SESSION_CACHE if(SSL_SET_OPTION(primary.sessionid)) { bool incache; WOLFSSL_SESSION *our_ssl_sessionid; @@ -788,6 +795,7 @@ } Curl_ssl_sessionid_unlock(conn); } +#endif connssl->connecting_state = ssl_connect_done;