Date: Fri, 26 Aug 2005 13:00:08 +0200 (CEST) From: Daniel Roethlisberger <daniel@roe.ch> To: FreeBSD-gnats-submit@FreeBSD.org Cc: demon@FreeBSD.org, Daniel Roethlisberger <daniel@roe.ch> Subject: ports/85309: [PATCH] security/qca-tls: fix build with openssl-0.9.8 Message-ID: <200508261100.j7QB08nU098194@aphrodite.roe> Resent-Message-ID: <200508261100.j7QB0bjg070368@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 85309 >Category: ports >Synopsis: [PATCH] security/qca-tls: fix build with openssl-0.9.8 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Aug 26 11:00:36 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Daniel Roethlisberger >Release: FreeBSD 5.4-RELEASE-p6 i386 >Organization: >Environment: System: FreeBSD aphrodite.roe 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #2: Thu Aug 25 14:52:17 CEST 2005 root@aphrodite.roe:/usr/obj/usr/src/sys/APHRODITE i386 >Description: This patch fixes build of qca-tls with openssl-0.9.8 (WITH_OPENSSL_BETA=yes). It also fixes the Makefile to use USE_OPENSSL in order to get dependencies right and let the user choose which openssl to use. Add: files/patch-qca-tls.cpp >How-To-Repeat: >Fix: --- qca-tls-openssl-0.9.8.diff begins here --- diff -ruN qca-tls.orig/Makefile qca-tls/Makefile --- qca-tls.orig/Makefile Mon Feb 28 22:22:01 2005 +++ qca-tls/Makefile Fri Aug 26 12:39:40 2005 @@ -19,10 +19,12 @@ HAS_CONFIGURE= yes USE_X_PREFIX= yes USE_BZIP2= yes +USE_OPENSSL= yes USE_QT_VER= 3 QT_NONSTANDARD= yes CONFIGURE_ENV= QMAKESPEC=${LOCALBASE}/share/qt/mkspecs/freebsd-g++ -CONFIGURE_ARGS= --qtdir=${X11BASE} +CONFIGURE_ARGS= --qtdir=${X11BASE} \ + --with-openssl-inc=${OPENSSLINC} --with-openssl-lib=${OPENSSLLIB} MAKE_ARGS+= QTDIR=${X11BASE} \ QMAKESPEC=${LOCALBASE}/share/qt/mkspecs/freebsd-g++ diff -ruN qca-tls.orig/files/patch-configure qca-tls/files/patch-configure --- qca-tls.orig/files/patch-configure Thu Nov 18 10:08:41 2004 +++ qca-tls/files/patch-configure Fri Aug 26 12:40:17 2005 @@ -1,5 +1,5 @@ --- configure.orig Wed Dec 17 23:54:50 2003 -+++ configure Tue Nov 16 12:33:52 2004 ++++ configure Fri Aug 26 11:59:28 2005 @@ -20,17 +20,17 @@ while [ $# -gt 0 ]; do case "$1" in @@ -21,15 +21,6 @@ shift ;; -@@ -43,6 +43,8 @@ - esac - done - -+QC_WITH_OPENSSL_INC=/usr/include -+QC_WITH_OPENSSL_LIB=/usr/lib - - echo "Configuring qca-tls ..." - @@ -84,7 +86,7 @@ echo Warning: qmake not in \$QTDIR/bin/qmake echo trying to find it in \$PATH @@ -48,7 +39,27 @@ lib = s; } else { -@@ -570,13 +570,6 @@ +@@ -175,6 +175,19 @@ + if(ret == 0) + conf->addDefine("OSSL_097"); + ++ // is it at least openssl 0.9.8? ++ str = ++ "#include<openssl/opensslv.h>\n" ++ "int main()\n" ++ "{\n" ++ " unsigned long x = OPENSSL_VERSION_NUMBER;\n" ++ " if(x >= 0x00908000) return 0; else return 1;\n" ++ "}\n"; ++ if(!conf->doCompileAndLink(str, ext, &ret)) ++ return false; ++ if(ret == 0) ++ conf->addDefine("OSSL_098"); ++ + if(!inc.isEmpty()) + conf->addIncludePath(inc); + if(kb) +@@ -570,13 +583,6 @@ echo exit 1; fi diff -ruN qca-tls.orig/files/patch-qca-tls.cpp qca-tls/files/patch-qca-tls.cpp --- qca-tls.orig/files/patch-qca-tls.cpp Thu Jan 1 01:00:00 1970 +++ qca-tls/files/patch-qca-tls.cpp Fri Aug 26 11:56:18 2005 @@ -0,0 +1,26 @@ +--- qca-tls.cpp.orig Fri Aug 26 10:47:35 2005 ++++ qca-tls.cpp Fri Aug 26 10:51:07 2005 +@@ -454,7 +454,11 @@ + if(!r) { + // try this other public function, for whatever reason + p = (void *)in; ++#ifdef OSSL_098 ++ r = d2i_RSA_PUBKEY(NULL, (const unsigned char **)&p, len); ++#else + r = d2i_RSA_PUBKEY(NULL, (unsigned char **)&p, len); ++#endif + } + if(r) { + if(pub) { +@@ -799,7 +803,11 @@ + bool createFromDER(const char *in, unsigned int len) + { + unsigned char *p = (unsigned char *)in; ++#ifdef OSSL_098 ++ X509 *t = d2i_X509(NULL, (const unsigned char**)&p, len); ++#else + X509 *t = d2i_X509(NULL, &p, len); ++#endif + if(!t) + return false; + fromX509(t); --- qca-tls-openssl-0.9.8.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508261100.j7QB08nU098194>