* Fix build against OpenSSL 0.9.8; from Daniel Roethlisberger via FreeBSD.

* Remove former maintainer per his request.
* tab-ify
This commit is contained in:
naddy 2008-09-12 13:56:32 +00:00
parent cd5b9938bb
commit 2e23d6274f
3 changed files with 70 additions and 24 deletions

View File

@ -1,15 +1,13 @@
# $OpenBSD: Makefile,v 1.10 2008/07/27 21:44:59 sthen Exp $
# $OpenBSD: Makefile,v 1.11 2008/09/12 13:56:32 naddy Exp $
COMMENT= Qt Cryptographic Architecture, TLS plugin
DISTNAME= qca-tls-1.0
PKGNAME= ${DISTNAME}p6
PKGNAME= ${DISTNAME}p7
CATEGORIES= security
HOMEPAGE= http://delta.affinix.com/qca/
MAINTAINER= Gerardo Santana Gomez Garrido <gerardo.santana@gmail.com>
RUN_DEPENDS= ::security/qca
PERMIT_PACKAGE_CDROM= Yes
@ -35,4 +33,5 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/libqca-tls.so ${PREFIX}/${MODQT_PLUGINS}/crypto
SUBST_VARS+= MODQT_PLUGINS
.include <bsd.port.mk>

View File

@ -1,7 +1,27 @@
$OpenBSD: patch-configure,v 1.1.1.1 2005/05/19 20:28:27 niallo Exp $
--- configure.orig Wed May 4 17:06:03 2005
+++ configure Wed May 4 17:06:31 2005
@@ -375,7 +375,7 @@ public:
$OpenBSD: patch-configure,v 1.2 2008/09/12 13:56:32 naddy Exp $
--- configure.orig Wed Dec 17 23:54:50 2003
+++ configure Thu Sep 11 22:40:51 2008
@@ -175,6 +175,19 @@ class qc_openssl : public ConfObj (public)
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)
@@ -375,7 +388,7 @@ class Conf (public)
QString extra;
if(!path.isEmpty())
extra += QString("-L") + path + ' ';

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-qca-tls_cpp,v 1.1 2008/09/12 13:56:32 naddy Exp $
--- qca-tls.cpp.orig Thu Sep 11 22:42:05 2008
+++ qca-tls.cpp Thu Sep 11 22:43:46 2008
@@ -454,7 +454,11 @@ class RSAKeyContext : public QCA_RSAKeyContext (public
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 @@ class CertContext : public QCA_CertContext (public)
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);