summaryrefslogtreecommitdiffstats
path: root/patches/02_fix-undefined-references-with-NO_OLD_TLS-and-NO_SESSION_CACHE.patch
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-01-03 03:25:04 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-01-03 03:39:06 (EST)
commit5d994298d977257b352645537a4a88199c0f32f1 (patch)
tree5578e64838043b9b171bdc8991ac1dde0d91c6f9 /patches/02_fix-undefined-references-with-NO_OLD_TLS-and-NO_SESSION_CACHE.patch
parent43ef90ae038229515964498083955db987d213a0 (diff)
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
Diffstat (limited to 'patches/02_fix-undefined-references-with-NO_OLD_TLS-and-NO_SESSION_CACHE.patch')
-rw-r--r--patches/02_fix-undefined-references-with-NO_OLD_TLS-and-NO_SESSION_CACHE.patch51
1 files changed, 51 insertions, 0 deletions
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 <patrick.mcdermott@libiquity.com>
+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;
+