From owner-svn-ports-all@FreeBSD.ORG Wed Aug 7 03:35:19 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 055456F8; Wed, 7 Aug 2013 03:35:19 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB9012379; Wed, 7 Aug 2013 03:35:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r773ZIB2094060; Wed, 7 Aug 2013 03:35:18 GMT (envelope-from sunpoet@svn.freebsd.org) Received: (from sunpoet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r773ZI1F094058; Wed, 7 Aug 2013 03:35:18 GMT (envelope-from sunpoet@svn.freebsd.org) Message-Id: <201308070335.r773ZI1F094058@svn.freebsd.org> From: Sunpoet Po-Chuan Hsieh Date: Wed, 7 Aug 2013 03:35:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r324329 - in head/ftp/curl: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Aug 2013 03:35:19 -0000 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 , Sergey Lobanov 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;