summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-06-19 18:32:05 +0000
committertb <>2023-06-19 18:32:05 +0000
commit50c27b24fc17058ace76dba2b05ee0dde38cff2c (patch)
tree4627e7f24fff41829308326034db95f14b39902a
parent0c32882e3a5317945f39d8af150b8744696bb403 (diff)
downloadopenbsd-50c27b24fc17058ace76dba2b05ee0dde38cff2c.tar.gz
openbsd-50c27b24fc17058ace76dba2b05ee0dde38cff2c.tar.bz2
openbsd-50c27b24fc17058ace76dba2b05ee0dde38cff2c.zip
Properly guard ENGINE usage with !OPENSSL_NO_ENGINE
-rw-r--r--src/lib/libcrypto/crypto_init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/crypto_init.c b/src/lib/libcrypto/crypto_init.c
index ccf60223bc..347f9542f1 100644
--- a/src/lib/libcrypto/crypto_init.c
+++ b/src/lib/libcrypto/crypto_init.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto_init.c,v 1.8 2023/05/08 13:53:26 tb Exp $ */ 1/* $OpenBSD: crypto_init.c,v 1.9 2023/06/19 18:32:05 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2018 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -21,7 +21,9 @@
21#include <stdio.h> 21#include <stdio.h>
22 22
23#include <openssl/conf.h> 23#include <openssl/conf.h>
24#ifndef OPENSSL_NO_ENGINE
24#include <openssl/engine.h> 25#include <openssl/engine.h>
26#endif
25#include <openssl/err.h> 27#include <openssl/err.h>
26#include <openssl/evp.h> 28#include <openssl/evp.h>
27#include <openssl/objects.h> 29#include <openssl/objects.h>
@@ -79,7 +81,9 @@ OPENSSL_cleanup(void)
79 ERR_free_strings(); 81 ERR_free_strings();
80 82
81 CRYPTO_cleanup_all_ex_data(); 83 CRYPTO_cleanup_all_ex_data();
84#ifndef OPENSSL_NO_ENGINE
82 ENGINE_cleanup(); 85 ENGINE_cleanup();
86#endif
83 EVP_cleanup(); 87 EVP_cleanup();
84 x509_issuer_cache_free(); 88 x509_issuer_cache_free();
85 89