openbsd-ports/net/bind9/patches/patch-openssl

43 lines
901 B
Plaintext

--- 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