Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2013 03:35:18 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r324329 - in head/ftp/curl: . files
Message-ID:  <201308070335.r773ZI1F094058@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@leadbidinc.com>, Sergey Lobanov <wmn@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308070335.r773ZI1F094058>