2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define

This commit is contained in:
Ondřej Surý
2018-04-04 21:50:16 +02:00
parent 8bf192b4d1
commit 8d648e7a8a
3 changed files with 15 additions and 22 deletions

View File

@@ -46,7 +46,7 @@
#include "dst_internal.h"
#include "dst_openssl.h"
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
#include <openssl/engine.h>
#endif
@@ -55,7 +55,7 @@ static isc_mutex_t *locks = NULL;
static int nlocks;
#endif
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
static ENGINE *e = NULL;
#endif
@@ -147,7 +147,7 @@ isc_result_t
dst__openssl_init(const char *engine) {
isc_result_t result;
#if !defined(USE_ENGINE)
#if defined(OPENSSL_NO_ENGINE)
UNUSED(engine);
#endif
@@ -175,7 +175,7 @@ dst__openssl_init(const char *engine) {
ERR_load_crypto_strings();
#endif
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
#if !defined(CONF_MFLAGS_DEFAULT_SECTION)
OPENSSL_config(NULL);
#else
@@ -207,7 +207,7 @@ dst__openssl_init(const char *engine) {
}
}
#endif /* USE_ENGINE */
#endif /* !defined(OPENSSL_NO_ENGINE) */
/* Protect ourselves against unseeded PRNG */
if (RAND_status() != 1) {
@@ -219,7 +219,7 @@ dst__openssl_init(const char *engine) {
return (ISC_R_SUCCESS);
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
cleanup_rm:
if (e != NULL)
ENGINE_free(e);
@@ -248,11 +248,11 @@ dst__openssl_destroy(void) {
#endif
OBJ_cleanup();
EVP_cleanup();
#if defined(USE_ENGINE)
#if !defined(OPENSSL_NO_ENGINE)
if (e != NULL)
ENGINE_free(e);
e = NULL;
#if defined(USE_ENGINE) && OPENSSL_VERSION_NUMBER >= 0x00907000L
#if !defined(OPENSSL_NO_ENGINE) && OPENSSL_VERSION_NUMBER >= 0x00907000L
ENGINE_cleanup();
#endif
#endif
@@ -364,7 +364,7 @@ dst__openssl_toresult3(isc_logcategory_t *category,
return (result);
}
#if defined(USE_ENGINE)
#if !defined(OPENSSL_NO_ENGINE)
ENGINE *
dst__openssl_getengine(const char *engine) {