summary refs log tree commit diff
path: root/pkgs/tools/networking/curl
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-01-24 13:51:30 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-01-24 13:51:30 +0100
commit7bc801e282fbd8f1a7fc9f92395e738f95ddc731 (patch)
treea54e2b5b86004dd088b6daeff5d1613d1292b5bb /pkgs/tools/networking/curl
parentde9a4f5fb4ecc1045dd15f65b0ae371ad36b8365 (diff)
downloadnixlib-7bc801e282fbd8f1a7fc9f92395e738f95ddc731.tar
nixlib-7bc801e282fbd8f1a7fc9f92395e738f95ddc731.tar.gz
nixlib-7bc801e282fbd8f1a7fc9f92395e738f95ddc731.tar.bz2
nixlib-7bc801e282fbd8f1a7fc9f92395e738f95ddc731.tar.lz
nixlib-7bc801e282fbd8f1a7fc9f92395e738f95ddc731.tar.xz
nixlib-7bc801e282fbd8f1a7fc9f92395e738f95ddc731.tar.zst
nixlib-7bc801e282fbd8f1a7fc9f92395e738f95ddc731.zip
curl: Apply upstream patch to fix https hangs
https://github.com/curl/curl/issues/1174

Fixes https://github.com/NixOS/nix/issues/1181.
Diffstat (limited to 'pkgs/tools/networking/curl')
-rw-r--r--pkgs/tools/networking/curl/default.nix4
-rw-r--r--pkgs/tools/networking/curl/issue-1174.patch34
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index 9ed56ee1ec56..a80069974224 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -25,8 +25,12 @@ stdenv.mkDerivation rec {
     sha256 = "16rqhyzlpnivifin8n7l2fr9ihay9v2nw2drsniinb6bcykqaqfi";
   };
 
+  patches = [ ./issue-1174.patch ];
+
   outputs = [ "bin" "dev" "out" "man" "devdoc" ];
 
+  enableParallelBuilding = true;
+
   nativeBuildInputs = [ pkgconfig perl ];
 
   # Zlib and OpenSSL must be propagated because `libcurl.la' contains
diff --git a/pkgs/tools/networking/curl/issue-1174.patch b/pkgs/tools/networking/curl/issue-1174.patch
new file mode 100644
index 000000000000..eceeef8b001b
--- /dev/null
+++ b/pkgs/tools/networking/curl/issue-1174.patch
@@ -0,0 +1,34 @@
+commit a7b38c9dc98481e4a5fc37e51a8690337c674dfb
+Author: Daniel Stenberg <daniel@haxx.se>
+Date:   Mon Dec 26 00:06:33 2016 +0100
+
+    vtls: s/SSLEAY/OPENSSL
+    
+    Fixed an old leftover use of the USE_SSLEAY define which would make a
+    socket get removed from the applications sockets to monitor when the
+    multi_socket API was used, leading to timeouts.
+    
+    Bug: #1174
+
+diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
+index b808e1c..707f24b 100644
+--- a/lib/vtls/vtls.c
++++ b/lib/vtls/vtls.c
+@@ -484,7 +484,7 @@ void Curl_ssl_close_all(struct Curl_easy *data)
+   curlssl_close_all(data);
+ }
+ 
+-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
++#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+     defined(USE_DARWINSSL) || defined(USE_NSS)
+ /* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only. */
+ int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
+@@ -518,7 +518,7 @@ int Curl_ssl_getsock(struct connectdata *conn,
+   (void)numsocks;
+   return GETSOCK_BLANK;
+ }
+-/* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
++/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
+ #endif
+ 
+ void Curl_ssl_close(struct connectdata *conn, int sockindex)