From b61710bc7617505cf7d86fd300088c8fe84d2e54 Mon Sep 17 00:00:00 2001
From: Michael Hanson <hansonorders@verison.net>
Date: Fri, 12 Mar 2010 01:29:49 +0000
Subject: lighttpd: add patch for openssl that was commited in lighttpd
 upstream. See if it make a difference with FS#624, but I doubt it.

---
 abs/core-testing/lighttpd/PKGBUILD             | 20 +++++++++++++-------
 abs/core-testing/lighttpd/openssl-0.9.8m.patch | 11 +++++++++++
 2 files changed, 24 insertions(+), 7 deletions(-)
 create mode 100644 abs/core-testing/lighttpd/openssl-0.9.8m.patch

diff --git a/abs/core-testing/lighttpd/PKGBUILD b/abs/core-testing/lighttpd/PKGBUILD
index 1ad9d06..09ca0ed 100644
--- a/abs/core-testing/lighttpd/PKGBUILD
+++ b/abs/core-testing/lighttpd/PKGBUILD
@@ -3,7 +3,7 @@
 
 pkgname=lighttpd
 pkgver=1.4.26
-pkgrel=1
+pkgrel=2
 pkgdesc='a secure, fast, compliant and very flexible web-server'
 license=('custom')
 arch=('i686' 'x86_64')
@@ -19,15 +19,15 @@ optdepends=('libxml2: mod_webdav' \
 backup=('etc/lighttpd/lighttpd.conf' 'etc/logrotate.d/lighttpd' 'etc/lighttpd/auth-inc.conf')
 options=('!libtool' 'emptydirs')
 source=("http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${pkgver}.tar.bz2" \
-        'lighttpd.rc.d' 'lighttpd.logrotate.d' 'lighttpd.conf' auth-inc.conf)
-md5sums=('a682c8efce47a2f4263a247ba0813c9b'
-         'bd690eee0d9e51857448770a151023b0'
-         '857e174643fd7761a2f0d8431a679f6c'
-         'f12f37fb6a239b027c2bccf2ff51512b'
-         'c6e361131000ceec085f40b310ef4a2c')
+        'lighttpd.rc.d' 'lighttpd.logrotate.d' 'lighttpd.conf' 'auth-inc.conf' \
+        'openssl-0.9.8m.patch')
 
 build() {
 	cd $srcdir/$pkgname-$pkgver
+
+        # fixed in 1.4.27
+        patch -p2 -i ${srcdir}/openssl-0.9.8m.patch || return 1
+
 	./configure --prefix=/usr \
 		--libexecdir=/usr/lib/lighttpd/modules \
 		--sysconfdir=/etc/lighttpd \
@@ -68,3 +68,9 @@ build() {
 
 	install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
 }
+md5sums=('a682c8efce47a2f4263a247ba0813c9b'
+         'bd690eee0d9e51857448770a151023b0'
+         '857e174643fd7761a2f0d8431a679f6c'
+         'f12f37fb6a239b027c2bccf2ff51512b'
+         'c6e361131000ceec085f40b310ef4a2c'
+         '84c884b8dadd724afe2bc6529e9d4485')
diff --git a/abs/core-testing/lighttpd/openssl-0.9.8m.patch b/abs/core-testing/lighttpd/openssl-0.9.8m.patch
new file mode 100644
index 0000000..321e10b
--- /dev/null
+++ b/abs/core-testing/lighttpd/openssl-0.9.8m.patch
@@ -0,0 +1,11 @@
+--- src/lighttpd-1.4.26/src/network.c.orig	2010-03-12 01:19:34.000000000 +0000
++++ src/lighttpd-1.4.26/src/network.c	2010-03-12 01:20:45.000000000 +0000
+@@ -525,7 +525,7 @@
+ 
+ 		if (!s->ssl_use_sslv2) {
+ 			/* disable SSLv2 */
+-			if (SSL_OP_NO_SSLv2 != SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2)) {
++                        if (!(SSL_OP_NO_SSLv2 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2))) {
+ 				log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
+ 						ERR_error_string(ERR_get_error(), NULL));
+ 				return -1;
-- 
cgit v0.12

