diff --git a/curl-7.19.7-s390-sleep.patch b/curl-7.19.7-s390-sleep.patch deleted file mode 100644 index 89d3860..0000000 --- a/curl-7.19.7-s390-sleep.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/tests/runtests.pl b/tests/runtests.pl -index d4e9072..fb32c78 100755 ---- a/tests/runtests.pl -+++ b/tests/runtests.pl -@@ -222,7 +222,7 @@ my $sshdverstr; # for socks server, ssh daemon version string - my $sshderror; # for socks server, ssh daemon version error - - my $defserverlogslocktimeout = 20; # timeout to await server logs lock removal --my $defpostcommanddelay = 0; # delay between command and postcheck sections -+my $defpostcommanddelay = 1; # delay between command and postcheck sections - - my $timestats; # time stamping and stats generation - my $fullstats; # show time stats for every single test diff --git a/curl-7.20.1-82e9b78.patch b/curl-7.20.1-82e9b78.patch new file mode 100644 index 0000000..679a547 --- /dev/null +++ b/curl-7.20.1-82e9b78.patch @@ -0,0 +1,53 @@ +From 82e9b78a388ab539c8784cd853adf6e4a97d52c5 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Sat, 24 Apr 2010 23:21:13 +0200 +Subject: [PATCH] nss: fix SSL handshake timeout underflow + + CHANGES | 4 ++++ + lib/nss.c | 10 +++++++++- + 2 files changed, 13 insertions(+), 1 deletions(-) + +diff --git a/CHANGES b/CHANGES +index ed1bc29..d1fbd9b 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -6,6 +6,10 @@ + + Changelog + ++Kamil Dudka (24 Apr 2010) ++- Fixed SSL handshake timeout underflow in libcurl-NSS, which caused test405 ++ to hang on a slow machine. ++ + Kamil Dudka (4 Apr 2010) + - Refactorized interface of Curl_ssl_recv()/Curl_ssl_send(). + +diff --git a/lib/nss.c b/lib/nss.c +index cc6d920..fdbc9dc 100644 +--- a/lib/nss.c ++++ b/lib/nss.c +@@ -1022,6 +1022,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) + int curlerr; + const int *cipher_to_enable; + PRSocketOptionData sock_opt; ++ long time_left; + PRUint32 timeout; + + curlerr = CURLE_SSL_CONNECT_ERROR; +@@ -1299,8 +1300,15 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) + + SSL_SetURL(connssl->handle, conn->host.name); + ++ /* check timeout situation */ ++ time_left = Curl_timeleft(conn, NULL, TRUE); ++ if(time_left < 0L) { ++ failf(data, "timed out before SSL handshake"); ++ goto error; ++ } ++ timeout = PR_MillisecondsToInterval((PRUint32) time_left); ++ + /* Force the handshake now */ +- timeout = PR_MillisecondsToInterval(Curl_timeleft(conn, NULL, TRUE)); + if(SSL_ForceHandshakeWithTimeout(connssl->handle, timeout) != SECSuccess) { + if(conn->data->set.ssl.certverifyresult == SSL_ERROR_BAD_CERT_DOMAIN) + curlerr = CURLE_PEER_FAILED_VERIFICATION; diff --git a/curl-7.20.1-test-delay.patch b/curl-7.20.1-test-delay.patch new file mode 100644 index 0000000..dd75596 --- /dev/null +++ b/curl-7.20.1-test-delay.patch @@ -0,0 +1,24 @@ +diff -up curl-7.20.1/tests/data/test513.delay curl-7.20.1/tests/data/test513 +--- curl-7.20.1/tests/data/test513.delay 2010-04-22 10:00:08.326108258 +0100 ++++ curl-7.20.1/tests/data/test513 2010-04-22 11:09:08.342100834 +0100 +@@ -17,7 +17,7 @@ lib513 + + send HTTP POST using read callback that returns CURL_READFUNC_ABORT + +- ++ + http://%HOSTIP:%HTTPPORT/513 + + +diff -up curl-7.20.1/tests/data/test514.delay curl-7.20.1/tests/data/test514 +--- curl-7.20.1/tests/data/test514.delay 2010-04-22 10:00:08.326108258 +0100 ++++ curl-7.20.1/tests/data/test514 2010-04-22 11:09:40.192203636 +0100 +@@ -29,7 +29,7 @@ lib514 + + First set options to POST and then to make HEAD + +- ++ + http://%HOSTIP:%HTTPPORT/514 + + diff --git a/curl.spec b/curl.spec index 40da0e7..531b880 100644 --- a/curl.spec +++ b/curl.spec @@ -19,6 +19,9 @@ Patch2: curl-7.20.0-ff87111.patch # bz #565972 Patch3: curl-7.20.0-ef1ac36.patch +# upstream commit 82e9b78a388ab539c8784cd853adf6e4a97d52c5 +Patch4: curl-7.20.1-82e9b78.patch + # patch making libcurl multilib ready Patch101: curl-7.20.0-multilib.patch @@ -31,7 +34,7 @@ Patch103: curl-7.19.4-debug.patch # suppress occasional failure of curl test-suite on s390; caused more likely # by the test-suite infrastructure than (lib)curl itself # http://curl.haxx.se/mail/lib-2009-12/0031.html -Patch104: curl-7.19.7-s390-sleep.patch +Patch104: curl-7.20.1-test-delay.patch # use localhost6 instead of ip6-localhost in the curl test-suite Patch105: curl-7.19.7-localhost6.patch @@ -120,6 +123,7 @@ done %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Fedora patches %patch101 -p1 @@ -226,8 +230,11 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/aclocal/libcurl.m4 %changelog -* Wed Apr 21 2010 Kamil Dudka 7.20.0-4 +* Sun Apr 25 2010 Kamil Dudka 7.20.0-4 - make curl-config multilib ready again (#584107) +- upstream patch preventing SSL handshake timeout underflow +- eliminated 1s delay in vast mojority of test-cases, patch contributed + by Paul Howarth * Wed Apr 07 2010 Kamil Dudka 7.20.0-3 - add missing quote in libcurl.m4 (#576252)