Date: Sun, 27 May 2012 22:22:04 GMT From: Aragon Gouveia <aragon@phat.za.net> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/168396: [patch] src.conf tunables to enable zlib compression in openssl Message-ID: <201205272222.q4RMM4bj029600@red.freebsd.org> Resent-Message-ID: <201205272230.q4RMU1aT095934@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 168396
>Category: bin
>Synopsis: [patch] src.conf tunables to enable zlib compression in openssl
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun May 27 22:30:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Aragon Gouveia
>Release: 9.0-STABLE
>Organization:
>Environment:
FreeBSD igor.geek.sh 9.0-STABLE FreeBSD 9.0-STABLE #1: Sun May 27 11:38:17 SAST 2012 toor@igor.geek.sh:/usr/obj/usr/src/sys/IGOR amd64
>Description:
Attached patch adds two new src.conf tunables:
WITH_OPENSSL_ZLIB
WITH_OPENSSL_ZLIB_SHARED
The first enables zlib compression in the OpenSSL build, both combined makes zlib library load during runtime (dlopen()).
More testing/review appreciated. Please consider this for commit. :)
>How-To-Repeat:
Testing for working compression can be done by with s_client:
openssl s_client -no_ssl2 -no_ssl3 -connect issues.apache.org:443
>Fix:
Patch attached with submission follows:
--- secure/lib/libcrypto/Makefile.inc.orig 2012-05-28 00:12:13.000000000 +0200
+++ secure/lib/libcrypto/Makefile.inc 2012-05-28 00:12:16.000000000 +0200
@@ -21,6 +21,15 @@
CFLAGS+= -DL_ENDIAN
.endif
+.if ${MK_OPENSSL_ZLIB} == "yes"
+CFLAGS+= -DZLIB
+.if ${MK_OPENSSL_ZLIB_SHARED} == "yes"
+CFLAGS+= -DZLIB_SHARED
+.else
+LDADD?= -lz
+.endif
+.endif
+
MANDIR= ${SHAREDIR}/openssl/man/man
.if defined(LIB)
--- share/mk/bsd.own.mk.orig 2012-05-27 17:31:58.000000000 +0200
+++ share/mk/bsd.own.mk 2012-05-28 00:11:44.000000000 +0200
@@ -420,7 +420,9 @@
IDEA \
LIBCPLUSPLUS \
OFED \
- SHARED_TOOLCHAIN
+ SHARED_TOOLCHAIN \
+ OPENSSL_ZLIB \
+ OPENSSL_ZLIB_SHARED
#
# Default behaviour of some options depends on the architecture. Unfortunately
@@ -554,6 +556,10 @@
MK_KERBEROS:= no
.endif
+.if ${MK_OPENSSL_ZLIB} == "no"
+MK_OPENSSL_ZLIB_SHARED:= no
+.endif
+
.if ${MK_PF} == "no"
MK_AUTHPF:= no
.endif
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205272222.q4RMM4bj029600>
