diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2013-08-07 11:35:18 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2013-08-07 11:35:18 +0800 |
commit | 2d63fb963e664e0a566e693cc9663716157a196d (patch) | |
tree | 8c8e860248df794ee14f4737b94cd696125ac742 /ftp/curl | |
parent | f527250c5ea6ac7f25ae9b13ed81c8794a4f5cfa (diff) | |
download | freebsd-ports-graphics-2d63fb963e664e0a566e693cc9663716157a196d.tar.gz freebsd-ports-graphics-2d63fb963e664e0a566e693cc9663716157a196d.tar.zst freebsd-ports-graphics-2d63fb963e664e0a566e693cc9663716157a196d.zip |
- Fix ossl_recv() to eliminate false positive OpenSSL errors
- Bump PORTREVISION for package change
Submitted by: Brett Gmoser <bgmoser@leadbidinc.com>, Sergey Lobanov <wmn@siberianet.ru>
Obtained from: https://github.com/bagder/curl/commit/8a7a277c086199b
Reference: http://sourceforge.net/p/curl/bugs/1249/
Diffstat (limited to 'ftp/curl')
-rw-r--r-- | ftp/curl/Makefile | 1 | ||||
-rw-r--r-- | ftp/curl/files/patch-lib-ssluse.c | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/ftp/curl/Makefile b/ftp/curl/Makefile index f19fe7b8fb8..ae265ae5e4e 100644 --- a/ftp/curl/Makefile +++ b/ftp/curl/Makefile @@ -3,6 +3,7 @@ PORTNAME= curl PORTVERSION= 7.31.0 +PORTREVISION= 1 CATEGORIES= ftp ipv6 www MASTER_SITES= http://curl.haxx.se/download/ \ LOCAL/sunpoet diff --git a/ftp/curl/files/patch-lib-ssluse.c b/ftp/curl/files/patch-lib-ssluse.c new file mode 100644 index 00000000000..7b6d6577286 --- /dev/null +++ b/ftp/curl/files/patch-lib-ssluse.c @@ -0,0 +1,28 @@ +--- lib/ssluse.c.orig ++++ lib/ssluse.c +@@ -2608,13 +2608,19 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */ + *curlcode = CURLE_AGAIN; + return -1; + default: +- /* openssl/ssl.h says "look at error stack/return value/errno" */ ++ /* openssl/ssl.h for SSL_ERROR_SYSCALL says "look at error stack/return ++ value/errno" */ ++ /* http://www.openssl.org/docs/crypto/ERR_get_error.html */ + sslerror = ERR_get_error(); +- failf(conn->data, "SSL read: %s, errno %d", +- ERR_error_string(sslerror, error_buffer), +- SOCKERRNO); +- *curlcode = CURLE_RECV_ERROR; +- return -1; ++ if((nread < 0) || sslerror) { ++ /* If the return code was negative or there actually is an error in the ++ queue */ ++ failf(conn->data, "SSL read: %s, errno %d", ++ ERR_error_string(sslerror, error_buffer), ++ SOCKERRNO); ++ *curlcode = CURLE_RECV_ERROR; ++ return -1; ++ } + } + } + return nread; |