]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1395. [port] OpenSSL 0.9.7 defines CRYPTO_LOCK_ENGINE but doesn't
authorMark Andrews <marka@isc.org>
Thu, 31 Oct 2002 04:35:02 +0000 (04:35 +0000)
committerMark Andrews <marka@isc.org>
Thu, 31 Oct 2002 04:35:02 +0000 (04:35 +0000)
                        have a working implementation.  [RT #4079]

CHANGES
lib/dns/sec/dst/openssl_link.c

diff --git a/CHANGES b/CHANGES
index 3e70a5b11e44b17df93629fcaf7dcda746da5f90..aa8e2bf692c01493dd246b679eb3618e0c402eff 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1395.  [port]          OpenSSL 0.9.7 defines CRYPTO_LOCK_ENGINE but doesn't
+                       have a working implementation.  [RT #4079]
+
 1394.  [func]          It is now possible to check if a particular element is
                        in a acl.  Remove duplicate entries from the localnets
                        acl.
index 13d4011bb362149692941ac9e986921f4a3131f9..f1760307f07109b8f3e01796508a426886400516 100644 (file)
@@ -19,7 +19,7 @@
 
 /*
  * Principal Author: Brian Wellington
- * $Id: openssl_link.c,v 1.50 2002/03/19 04:30:53 marka Exp $
+ * $Id: openssl_link.c,v 1.51 2002/10/31 04:35:02 marka Exp $
  */
 #ifdef OPENSSL
 
 #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 RAND_METHOD *rm = NULL;
 static isc_mutex_t *locks = NULL;
 static int nlocks;
 
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
 static ENGINE *e;
 #endif
 
@@ -150,7 +154,7 @@ dst__openssl_init() {
        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 @@ dst__openssl_init() {
 #endif
        return (ISC_R_SUCCESS);
 
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
  cleanup_rm:
        mem_free(rm);
 #endif
@@ -177,7 +181,7 @@ dst__openssl_init() {
 void
 dst__openssl_destroy() {
        ERR_clear_error();
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
        if (e != NULL)
                ENGINE_free(e);
 #endif