2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +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

@@ -47,7 +47,7 @@
#if OPENSSL_VERSION_NUMBER > 0x00908000L
#include <openssl/bn.h>
#endif
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
#include <openssl/engine.h>
#endif
@@ -1482,13 +1482,13 @@ opensslrsa_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
isc_result_t ret;
int i;
RSA *rsa = NULL, *pubrsa = NULL;
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
ENGINE *ep = NULL;
const BIGNUM *ex = NULL;
#endif
isc_mem_t *mctx = key->mctx;
const char *engine = NULL, *label = NULL;
#if defined(USE_ENGINE) || USE_EVP
#if !defined(OPENSSL_NO_ENGINE) || USE_EVP
EVP_PKEY *pkey = NULL;
#endif
BIGNUM *n = NULL, *e = NULL, *d = NULL;
@@ -1541,7 +1541,7 @@ opensslrsa_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
* See if we can fetch it.
*/
if (label != NULL) {
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
if (engine == NULL)
DST_RET(DST_R_NOENGINE);
ep = dst__openssl_getengine(engine);
@@ -1690,7 +1690,7 @@ static isc_result_t
opensslrsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
const char *pin)
{
#ifdef USE_ENGINE
#if !defined(OPENSSL_NO_ENGINE)
ENGINE *e = NULL;
isc_result_t ret;
EVP_PKEY *pkey = NULL;