From 5d994298d977257b352645537a4a88199c0f32f1 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 03 Jan 2021 03:25:04 -0500 Subject: patches: Fix undefined references Fixes: CCLD curl /usr/bin/ld: ../lib/.libs/libcurl.so: undefined reference to `wolfSSL_set_session' /usr/bin/ld: ../lib/.libs/libcurl.so: undefined reference to `wolfSSL_get_session' /usr/bin/ld: ../lib/.libs/libcurl.so: undefined reference to `wolfTLSv1_1_client_method' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:996: curl] Error 1 make[3]: Leaving directory '/prokit/sessions/705511104/wd/tmp/src/src' make[2]: *** [Makefile:2155: all-recursive] Error 1 make[2]: Leaving directory '/prokit/sessions/705511104/wd/tmp/src/src' make[1]: *** [Makefile:996: all-recursive] Error 1 make[1]: Leaving directory '/prokit/sessions/705511104/wd/tmp/src' make: *** [../build:12: build] Error 2 --- diff --git a/changelog b/changelog index 4e21387..67a4198 100644 --- a/changelog +++ b/changelog @@ -7,6 +7,8 @@ curl (7.74.0-1) trunk certificates. - Add patch to fix undeclared symbol errors when compiling against wolfSSL built without OPENSSL_EXTRA. + - Add patch to fix undefined references when linking against wolfSSL + built with NO_OLD_TLS and NO_SESSION_CACHE. * Organize packages into sections. * Reword package descriptions. * curl-doc: Rename to curl.4-doc. diff --git a/patches/02_fix-undefined-references-with-NO_OLD_TLS-and-NO_SESSION_CACHE.patch b/patches/02_fix-undefined-references-with-NO_OLD_TLS-and-NO_SESSION_CACHE.patch new file mode 100644 index 0000000..3ceeadd --- /dev/null +++ b/patches/02_fix-undefined-references-with-NO_OLD_TLS-and-NO_SESSION_CACHE.patch @@ -0,0 +1,51 @@ +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; + -- cgit v0.9.1