- new upstream release
This commit is contained in:
parent
ff7d0c62dc
commit
972da7142b
@ -1 +1 @@
|
||||
curl-7.20.0.tar.lzma
|
||||
curl-7.20.1.tar.lzma
|
||||
|
@ -1,8 +1,11 @@
|
||||
curl-config.in | 18 ++----------------
|
||||
1 files changed, 2 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/curl-config.in b/curl-config.in
|
||||
index d336999..1c5873e 100644
|
||||
index ebda129..b404827 100644
|
||||
--- a/curl-config.in
|
||||
+++ b/curl-config.in
|
||||
@@ -43,7 +43,6 @@ Available values for OPTION include:
|
||||
@@ -42,7 +42,6 @@ Available values for OPTION include:
|
||||
--libs library linking information
|
||||
--prefix curl install prefix
|
||||
--protocols newline separated list of enabled protocols
|
||||
@ -10,7 +13,7 @@ index d336999..1c5873e 100644
|
||||
--version output version information
|
||||
--vernum output the version information as a number (hexadecimal)
|
||||
EOF
|
||||
@@ -70,7 +69,7 @@ while test $# -gt 0; do
|
||||
@@ -69,7 +68,7 @@ while test $# -gt 0; do
|
||||
;;
|
||||
|
||||
--cc)
|
||||
@ -19,7 +22,7 @@ index d336999..1c5873e 100644
|
||||
;;
|
||||
|
||||
--prefix)
|
||||
@@ -131,20 +130,7 @@ while test $# -gt 0; do
|
||||
@@ -130,20 +129,7 @@ while test $# -gt 0; do
|
||||
;;
|
||||
|
||||
--libs)
|
||||
|
@ -1,8 +1,11 @@
|
||||
configure.ac | 5 ++++-
|
||||
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7ca2145..0413332 100644
|
||||
index 2d394e1..39cc418 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -253,7 +253,10 @@ dnl **********************************************************************
|
||||
@@ -252,7 +252,10 @@ dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_COMPILER
|
||||
CURL_SET_COMPILER_BASIC_OPTS
|
||||
|
@ -1,8 +1,11 @@
|
||||
lib/hostares.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/lib/hostares.c b/lib/hostares.c
|
||||
index 7cc24de..46e0f8a 100644
|
||||
index 01b2142..ceda98e 100644
|
||||
--- a/lib/hostares.c
|
||||
+++ b/lib/hostares.c
|
||||
@@ -381,7 +381,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
||||
@@ -380,7 +380,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
||||
|
||||
switch(data->set.ip_version) {
|
||||
default:
|
||||
|
@ -1,8 +1,11 @@
|
||||
tests/runtests.pl | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/tests/runtests.pl b/tests/runtests.pl
|
||||
index d4e9072..fb32c78 100755
|
||||
index 6e3b5b9..75386b8 100755
|
||||
--- a/tests/runtests.pl
|
||||
+++ b/tests/runtests.pl
|
||||
@@ -222,7 +222,7 @@ my $sshdverstr; # for socks server, ssh daemon version string
|
||||
@@ -221,7 +221,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
|
||||
|
@ -1,116 +0,0 @@
|
||||
diff --git a/lib/nss.c b/lib/nss.c
|
||||
index 2366c57..2c029c4 100644
|
||||
--- a/lib/nss.c
|
||||
+++ b/lib/nss.c
|
||||
@@ -1337,6 +1337,29 @@ error:
|
||||
return curlerr;
|
||||
}
|
||||
|
||||
+/* handle certificate related errors during send/recv, return false otherwise */
|
||||
+static bool handle_cert_error(PRInt32 err, struct connectdata *conn, int num)
|
||||
+{
|
||||
+ switch(err) {
|
||||
+ case SSL_ERROR_BAD_CERT_ALERT:
|
||||
+ failf(conn->data, "SSL error: SSL_ERROR_BAD_CERT_ALERT");
|
||||
+ break;
|
||||
+ case SSL_ERROR_REVOKED_CERT_ALERT:
|
||||
+ failf(conn->data, "SSL error: SSL_ERROR_REVOKED_CERT_ALERT");
|
||||
+ break;
|
||||
+ case SSL_ERROR_EXPIRED_CERT_ALERT:
|
||||
+ failf(conn->data, "SSL error: SSL_ERROR_EXPIRED_CERT_ALERT");
|
||||
+ break;
|
||||
+ default:
|
||||
+ /* handle it as a ususal error during send/recv */
|
||||
+ conn->ssl[num].err = CURLE_OK;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ conn->ssl[num].err = CURLE_SSL_CERTPROBLEM;
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
/* return number of sent (non-SSL) bytes */
|
||||
int Curl_nss_send(struct connectdata *conn, /* connection data */
|
||||
int sockindex, /* socketindex */
|
||||
@@ -1348,7 +1371,9 @@ int Curl_nss_send(struct connectdata *conn, /* connection data */
|
||||
rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0, -1);
|
||||
|
||||
if(rc < 0) {
|
||||
- failf(conn->data, "SSL write: error %d", PR_GetError());
|
||||
+ PRInt32 err = PR_GetError();
|
||||
+ if(!handle_cert_error(err, conn, sockindex))
|
||||
+ failf(conn->data, "SSL write: error %d", err);
|
||||
return -1;
|
||||
}
|
||||
return rc; /* number of bytes */
|
||||
@@ -1377,7 +1402,8 @@ ssize_t Curl_nss_recv(struct connectdata * conn, /* connection data */
|
||||
*wouldblock = TRUE;
|
||||
return -1; /* basically EWOULDBLOCK */
|
||||
}
|
||||
- failf(conn->data, "SSL read: errno %d", err);
|
||||
+ if(!handle_cert_error(err, conn, num))
|
||||
+ failf(conn->data, "SSL read: errno %d", err);
|
||||
return -1;
|
||||
}
|
||||
return nread;
|
||||
diff --git a/lib/sendf.c b/lib/sendf.c
|
||||
index a366fd1..223fac2 100644
|
||||
--- a/lib/sendf.c
|
||||
+++ b/lib/sendf.c
|
||||
@@ -277,10 +277,10 @@ CURLcode Curl_write(struct connectdata *conn,
|
||||
ssize_t *written)
|
||||
{
|
||||
ssize_t bytes_written;
|
||||
- CURLcode retcode;
|
||||
int num = (sockfd == conn->sock[SECONDARYSOCKET]);
|
||||
+ const bool do_ssl = (conn->ssl[num].state == ssl_connection_complete);
|
||||
|
||||
- if(conn->ssl[num].state == ssl_connection_complete)
|
||||
+ if(do_ssl)
|
||||
bytes_written = Curl_ssl_send(conn, num, mem, len);
|
||||
else if(Curl_ssh_enabled(conn, PROT_SCP))
|
||||
bytes_written = Curl_scp_send(conn, num, mem, len);
|
||||
@@ -292,9 +292,13 @@ CURLcode Curl_write(struct connectdata *conn,
|
||||
bytes_written = send_plain(conn, num, mem, len);
|
||||
|
||||
*written = bytes_written;
|
||||
- retcode = (-1 != bytes_written)?CURLE_OK:CURLE_SEND_ERROR;
|
||||
+ if(-1 == bytes_written)
|
||||
+ /* send error */
|
||||
+ return (do_ssl && conn->ssl[num].err)
|
||||
+ ? (conn->ssl[num].err)
|
||||
+ : CURLE_SEND_ERROR;
|
||||
|
||||
- return retcode;
|
||||
+ return CURLE_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -540,9 +544,11 @@ int Curl_read(struct connectdata *conn, /* connection data */
|
||||
|
||||
if(nread == -1)
|
||||
return -1; /* -1 from Curl_ssl_recv() means EWOULDBLOCK */
|
||||
- else if(nread == -2)
|
||||
+ else if(nread == -2) {
|
||||
/* -2 from Curl_ssl_recv() means a true error, not EWOULDBLOCK */
|
||||
- return CURLE_RECV_ERROR;
|
||||
+ CURLcode ssl_err = conn->ssl[num].err;
|
||||
+ return ssl_err?ssl_err:CURLE_RECV_ERROR;
|
||||
+ }
|
||||
}
|
||||
else if(Curl_ssh_enabled(conn, (PROT_SCP|PROT_SFTP))) {
|
||||
if(conn->protocol & PROT_SCP)
|
||||
diff --git a/lib/urldata.h b/lib/urldata.h
|
||||
index d03146a..c24a450 100644
|
||||
--- a/lib/urldata.h
|
||||
+++ b/lib/urldata.h
|
||||
@@ -222,6 +222,9 @@ struct ssl_connect_data {
|
||||
current state of the connection. */
|
||||
bool use;
|
||||
ssl_connection_state state;
|
||||
+ /* If an error occurs in curlssl_recv() or Curl_ssl_send() and ERR is
|
||||
+ non-zero, it contains the error code. */
|
||||
+ CURLcode err;
|
||||
#ifdef USE_SSLEAY
|
||||
/* these ones requires specific SSL-types */
|
||||
SSL_CTX* ctx;
|
@ -1,5 +1,8 @@
|
||||
tests/data/Makefile.am | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
|
||||
index 0a9ac54..6d75468 100644
|
||||
index 6f2c090..e70fee6 100644
|
||||
--- a/tests/data/Makefile.am
|
||||
+++ b/tests/data/Makefile.am
|
||||
@@ -64,7 +64,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
||||
@ -7,7 +10,7 @@ index 0a9ac54..6d75468 100644
|
||||
test564 test1101 test1102 test1103 test1104 test299 test310 test311 \
|
||||
test312 test1105 test565 test800 test1106 test801 test566 test802 test803 \
|
||||
- test1107 test1108 test1109 test1110 test1111 test1112 test129 test567 \
|
||||
+ test1107 test1108 test1109 test1110 test1111 test129 test567 \
|
||||
test568 test569 test570 test571
|
||||
+ test1107 test1108 test1109 test1110 test1111 test129 test567 \
|
||||
test568 test569 test570 test571 test804 test572
|
||||
|
||||
filecheck:
|
||||
|
@ -1,8 +1,12 @@
|
||||
src/Makefile.am | 2 +-
|
||||
tests/libtest/Makefile.am | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index e993bc3..af9b315 100644
|
||||
index 3672458..890893d 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -47,7 +47,7 @@ bin_PROGRAMS = curl
|
||||
@@ -46,7 +46,7 @@ bin_PROGRAMS = curl
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
@ -12,10 +16,10 @@ index e993bc3..af9b315 100644
|
||||
BUILT_SOURCES = hugehelp.c
|
||||
CLEANFILES = hugehelp.c
|
||||
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
|
||||
index 1941cd8..8491b94 100644
|
||||
index 70b0f12..6512ce4 100644
|
||||
--- a/tests/libtest/Makefile.am
|
||||
+++ b/tests/libtest/Makefile.am
|
||||
@@ -55,7 +55,7 @@ EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
|
||||
@@ -54,7 +54,7 @@ EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
|
||||
test1022.pl Makefile.inc
|
||||
|
||||
# Dependencies (may need to be overriden)
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4
|
||||
index ce8e476..50dc20d 100644
|
||||
--- a/docs/libcurl/libcurl.m4
|
||||
+++ b/docs/libcurl/libcurl.m4
|
||||
@@ -198,7 +198,7 @@ x=CURLOPT_VERBOSE;
|
||||
|
||||
# We don't have --protocols, so just assume that all
|
||||
# protocols are available
|
||||
- _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP
|
||||
+ _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
|
||||
|
||||
if test x$libcurl_feature_SSL = xyes ; then
|
||||
_libcurl_protocols="$_libcurl_protocols HTTPS"
|
@ -1,70 +0,0 @@
|
||||
From 5ec0b463ea3e788e20d381ae97302f5965b1d4c5 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Thu, 18 Mar 2010 22:06:14 +0100
|
||||
Subject: [PATCH 1/2] Curl_read: do not silently ingore an error
|
||||
|
||||
thrown from Curl_ssl_recv()
|
||||
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
lib/sendf.c | 6 ++++--
|
||||
lib/sslgen.c | 10 +++++-----
|
||||
2 files changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/lib/sendf.c b/lib/sendf.c
|
||||
index 359f43d..a366fd1 100644
|
||||
--- a/lib/sendf.c
|
||||
+++ b/lib/sendf.c
|
||||
@@ -538,9 +538,11 @@ int Curl_read(struct connectdata *conn, /* connection data */
|
||||
if(conn->ssl[num].state == ssl_connection_complete) {
|
||||
nread = Curl_ssl_recv(conn, num, buffertofill, bytesfromsocket);
|
||||
|
||||
- if(nread == -1) {
|
||||
+ if(nread == -1)
|
||||
return -1; /* -1 from Curl_ssl_recv() means EWOULDBLOCK */
|
||||
- }
|
||||
+ else if(nread == -2)
|
||||
+ /* -2 from Curl_ssl_recv() means a true error, not EWOULDBLOCK */
|
||||
+ return CURLE_RECV_ERROR;
|
||||
}
|
||||
else if(Curl_ssh_enabled(conn, (PROT_SCP|PROT_SFTP))) {
|
||||
if(conn->protocol & PROT_SCP)
|
||||
diff --git a/lib/sslgen.c b/lib/sslgen.c
|
||||
index 9167bf7..78ff8a3 100644
|
||||
--- a/lib/sslgen.c
|
||||
+++ b/lib/sslgen.c
|
||||
@@ -399,7 +399,7 @@ struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
|
||||
return curlssl_engines_list(data);
|
||||
}
|
||||
|
||||
-/* return number of sent (non-SSL) bytes */
|
||||
+/* return number of sent (non-SSL) bytes; -1 on error */
|
||||
ssize_t Curl_ssl_send(struct connectdata *conn,
|
||||
int sockindex,
|
||||
const void *mem,
|
||||
@@ -411,8 +411,8 @@ ssize_t Curl_ssl_send(struct connectdata *conn,
|
||||
/* return number of received (decrypted) bytes */
|
||||
|
||||
/*
|
||||
- * If the read would block (EWOULDBLOCK) we return -1. Otherwise we return
|
||||
- * a regular CURLcode value.
|
||||
+ * If the read would block (EWOULDBLOCK) we return -1. If an error occurs during
|
||||
+ * the read, we return -2. Otherwise we return the count of bytes transfered.
|
||||
*/
|
||||
ssize_t Curl_ssl_recv(struct connectdata *conn, /* connection data */
|
||||
int sockindex, /* socketindex */
|
||||
@@ -425,9 +425,9 @@ ssize_t Curl_ssl_recv(struct connectdata *conn, /* connection data */
|
||||
nread = curlssl_recv(conn, sockindex, mem, len, &block);
|
||||
if(nread == -1) {
|
||||
if(!block)
|
||||
- return 0; /* this is a true error, not EWOULDBLOCK */
|
||||
+ return -2; /* this is a true error, not EWOULDBLOCK */
|
||||
else
|
||||
- return -1;
|
||||
+ return -1; /* EWOULDBLOCK */
|
||||
}
|
||||
|
||||
return nread;
|
||||
--
|
||||
1.7.0.2
|
||||
|
@ -1,7 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.10 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAktxNCEACgkQeOEcayedXJHZRACglh9Xu8QTsP27jfTMEJ3el5pZ
|
||||
lwQAniuNQgCKFlfm+VPbd1M6rZ9v/+Jo
|
||||
=V6xG
|
||||
-----END PGP SIGNATURE-----
|
7
curl-7.20.1.tar.lzma.asc
Normal file
7
curl-7.20.1.tar.lzma.asc
Normal file
@ -0,0 +1,7 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.10 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAkvF17MACgkQeOEcayedXJEKtQCeKTZtGZctAUWNyG+B6C1bRswl
|
||||
CcEAoIwS6+00QkBtzoYF3inHky24g5ai
|
||||
=wgCj
|
||||
-----END PGP SIGNATURE-----
|
23
curl.spec
23
curl.spec
@ -1,21 +1,12 @@
|
||||
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
||||
Name: curl
|
||||
Version: 7.20.0
|
||||
Release: 4%{?dist}
|
||||
Version: 7.20.1
|
||||
Release: 1%{?dist}
|
||||
License: MIT
|
||||
Group: Applications/Internet
|
||||
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
|
||||
Source2: curlbuild.h
|
||||
|
||||
# bz #576252
|
||||
Patch0: curl-7.20.0-m4-typo.patch
|
||||
|
||||
# http://permalink.gmane.org/gmane.comp.web.curl.library/27110
|
||||
Patch1: curl-7.20.0-read.patch
|
||||
|
||||
# http://permalink.gmane.org/gmane.comp.web.curl.library/27111
|
||||
Patch2: curl-7.20.0-cc-err.patch
|
||||
|
||||
# patch making libcurl multilib ready (by excluding static libraries)
|
||||
Patch101: curl-7.15.3-multilib.patch
|
||||
|
||||
@ -108,13 +99,6 @@ for f in CHANGES README; do
|
||||
mv -f ${f}.utf8 ${f}
|
||||
done
|
||||
|
||||
# upstream patches (already applied)
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
# upstream patches (not yet applied)
|
||||
%patch2 -p1
|
||||
|
||||
# Fedora patches
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
@ -226,6 +210,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/aclocal/libcurl.m4
|
||||
|
||||
%changelog
|
||||
* Mon Apr 19 2010 Kamil Dudka <kdudka@redhat.com> 7.20.1-1
|
||||
- new upstream release
|
||||
|
||||
* Tue Mar 23 2010 Kamil Dudka <kdudka@redhat.com> 7.20.0-4
|
||||
- add missing quote in libcurl.m4 (#576252)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user