svn commit: r324329 - in head/ftp/curl: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Wed Aug 7 03:35:19 UTC 2013
Author: sunpoet
Date: Wed Aug 7 03:35:18 2013
New Revision: 324329
URL: http://svnweb.freebsd.org/changeset/ports/324329
Log:
- Fix ossl_recv() to eliminate false positive OpenSSL errors
- Bump PORTREVISION for package change
Submitted by: Brett Gmoser <bgmoser at leadbidinc.com>, Sergey Lobanov <wmn at siberianet.ru>
Obtained from: https://github.com/bagder/curl/commit/8a7a277c086199b
Reference: http://sourceforge.net/p/curl/bugs/1249/
Added:
head/ftp/curl/files/patch-lib-ssluse.c (contents, props changed)
Modified:
head/ftp/curl/Makefile
Modified: head/ftp/curl/Makefile
==============================================================================
--- head/ftp/curl/Makefile Wed Aug 7 02:30:44 2013 (r324328)
+++ head/ftp/curl/Makefile Wed Aug 7 03:35:18 2013 (r324329)
@@ -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
Added: head/ftp/curl/files/patch-lib-ssluse.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ftp/curl/files/patch-lib-ssluse.c Wed Aug 7 03:35:18 2013 (r324329)
@@ -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;
More information about the svn-ports-head
mailing list