fix broken openssl function (markus@) and change default random device to /dev/arandom

This commit is contained in:
jakob 2002-10-26 12:44:07 +00:00
parent 2c271144f1
commit 2f5ac6b784
2 changed files with 46 additions and 2 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.33 2002/08/05 20:48:59 jakob Exp $
# $OpenBSD: Makefile,v 1.34 2002/10/26 12:44:07 jakob Exp $
COMMENT= Berkeley Internet Name Daemon
COMMENT-libbind= BIND 8 compatible stub resolver library
VERSION= 9.2.1
DISTNAME= bind-${VERSION}
PKGNAME= bind-${VERSION}p1
CATEGORIES= net
MULTI_PACKAGES= -libbind
@ -36,7 +37,8 @@ CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --with-libtool ${CONFIGURE_SHARED} \
--localstatedir=/var \
--enable-libbind \
--with-openssl="/usr"
--with-openssl="/usr" \
--with-randomdev=/dev/arandom
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}

View File

@ -0,0 +1,42 @@
--- lib/dns/sec/dst/openssl_link.c.orig Tue Mar 19 05:30:53 2002
+++ lib/dns/sec/dst/openssl_link.c Fri Oct 25 21:35:29 2002
@@ -40,7 +40,11 @@
#include <openssl/rand.h>
#include <openssl/crypto.h>
-#ifdef CRYPTO_LOCK_ENGINE
+#if defined(CRYPTO_LOCK_ENGINE) && (OPENSSL_VERSION_NUMBER < 0x00907000L)
+#define USE_ENGINE 1
+#endif
+
+#ifdef USE_ENGINE
#include <openssl/engine.h>
#endif
@@ -48,7 +52,7 @@
static isc_mutex_t *locks = NULL;
static int nlocks;
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
static ENGINE *e;
#endif
@@ -150,7 +154,7 @@
rm->add = entropy_add;
rm->pseudorand = entropy_getpseudo;
rm->status = NULL;
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
e = ENGINE_new();
if (e == NULL) {
result = ISC_R_NOMEMORY;
@@ -163,7 +167,7 @@
#endif
return (ISC_R_SUCCESS);
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
cleanup_rm:
mem_free(rm);
#endif