From: Milan Broz Date: Tue, 25 Nov 2025 11:03:24 +0000 (+0100) Subject: Remove engine.h includes for internal code. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0f3ab3450d1ad428b2b86f33028def82114aa3c;p=thirdparty%2Fopenssl.git Remove engine.h includes for internal code. This should no be used anywhere, as typedef for ENGINE is in types.h. Only apps should include this header for compatibility stubs. Signed-off-by: Milan Broz Reviewed-by: Norbert Pocs Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/29232) --- diff --git a/apps/include/apps.h b/apps/include/apps.h index 236f3ea9980..db4df403823 100644 --- a/apps/include/apps.h +++ b/apps/include/apps.h @@ -27,7 +27,6 @@ # include # include # include -# include # include # include # include @@ -177,10 +176,6 @@ __owur int ctx_set_ctlog_list_file(SSL_CTX *ctx, const char *path); # endif -# ifndef OPENSSL_NO_DEPRECATED_3_6 -int get_legacy_pkey_id(OSSL_LIB_CTX *libctx, const char *algname, ENGINE *e); -# endif - # ifndef OPENSSL_NO_OCSP OCSP_RESPONSE *process_responder(OCSP_REQUEST *req, const char *host, const char *port, const char *path, diff --git a/crypto/asn1/a_digest.c b/crypto/asn1/a_digest.c index 6cdeb709200..f485a19213f 100644 --- a/crypto/asn1/a_digest.c +++ b/crypto/asn1/a_digest.c @@ -7,16 +7,12 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include #include #include #include "internal/cryptlib.h" -#include #include #include #include diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index 5f647b5dbfa..f97b6f96179 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -8,7 +8,7 @@ */ /* - * We need to use some engine deprecated APIs + * We need to use some EVP_PKEY_asn1 deprecated APIs */ #include "internal/deprecated.h" @@ -16,7 +16,6 @@ #include #include #include -#include #include "crypto/asn1.h" #include "crypto/evp.h" diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index c7dc93ad20b..7b9d55ec7ab 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -7,16 +7,12 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include #include "internal/cryptlib.h" #include #include #include #include -#include #include #include #include "crypto/asn1.h" diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c index f868f78a216..67ec97ec3c3 100644 --- a/crypto/conf/conf_mall.c +++ b/crypto/conf/conf_mall.c @@ -7,16 +7,12 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include #include #include "internal/cryptlib.h" #include #include #include -#include #include "internal/provider.h" #include "crypto/rand.h" #include "conf_local.h" diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 3436b03b319..b1010ee9c64 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -7,9 +7,6 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include "internal/cryptlib.h" #include "internal/rcu.h" #include @@ -22,7 +19,6 @@ #include "internal/thread_once.h" #include #include -#include #include "conf_local.h" DEFINE_STACK_OF(CONF_MODULE) diff --git a/crypto/conf/conf_sap.c b/crypto/conf/conf_sap.c index 106434dcbf3..8d65b393abd 100644 --- a/crypto/conf/conf_sap.c +++ b/crypto/conf/conf_sap.c @@ -14,7 +14,6 @@ #include "conf_local.h" #include #include -#include #if defined(_WIN32) && !defined(__BORLANDC__) # define strdup _strdup diff --git a/crypto/ec/ec_backend.c b/crypto/ec/ec_backend.c index 7abf37753e8..a5c0020dc92 100644 --- a/crypto/ec/ec_backend.c +++ b/crypto/ec/ec_backend.c @@ -18,7 +18,6 @@ #include #include #ifndef FIPS_MODULE -# include # include #endif #include "crypto/bn.h" diff --git a/crypto/ec/ec_kmeth.c b/crypto/ec/ec_kmeth.c index 89c4985f3e5..88323d69bad 100644 --- a/crypto/ec/ec_kmeth.c +++ b/crypto/ec/ec_kmeth.c @@ -15,13 +15,9 @@ #include #include -#ifndef FIPS_MODULE -# include -#endif #include #include "ec_local.h" - static const EC_KEY_METHOD openssl_ec_key_method = { "OpenSSL EC_KEY method", 0, diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index e1e04cb146c..8086f101cd9 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -7,16 +7,10 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include #include #include #include -#ifndef FIPS_MODULE -# include -#endif #include #include #include "internal/cryptlib.h" diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index a86f116090c..31ea539050b 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -7,18 +7,12 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include #include #include #include #include #include -#ifndef FIPS_MODULE -# include -#endif #include #include #include "internal/cryptlib.h" diff --git a/crypto/evp/evp_pkey_type.c b/crypto/evp/evp_pkey_type.c index 192069dee43..793a56f33ee 100644 --- a/crypto/evp/evp_pkey_type.c +++ b/crypto/evp/evp_pkey_type.c @@ -13,7 +13,6 @@ #include #include #ifndef OPENSSL_NO_DEPRECATED_3_6 -# include # include "crypto/asn1.h" #include #else diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index 9912bd515fc..5ae44e35f70 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -27,9 +27,6 @@ #include #include #include -#ifndef FIPS_MODULE -# include -#endif #include #include #include diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 4eef8dfd659..fe0bb142fd6 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -15,9 +15,6 @@ #include #include -#ifndef FIPS_MODULE -# include -#endif #include #include #include diff --git a/crypto/init.c b/crypto/init.c index 05101b4db3e..9c01f1065cb 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -7,9 +7,6 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include "internal/e_os.h" #include "crypto/cryptlib.h" #include @@ -19,7 +16,6 @@ #include "crypto/evp.h" #include "internal/conf.h" #include "crypto/async.h" -#include "crypto/engine.h" #include "internal/comp.h" #include "internal/err.h" #include "crypto/err.h" diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 86ec911320c..282522a0864 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -8,7 +8,7 @@ */ /* - * We need to use some engine deprecated APIs + * We need to use some EVP_PKEY_asn1 deprecated APIs */ #include "internal/deprecated.h" @@ -25,7 +25,6 @@ #include #include "crypto/asn1.h" #include -#include #define MIN_LENGTH 4 diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index b1001e2d4be..02ade5bfbc5 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 0477929c390..f43efc57523 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -7,7 +7,7 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ +/* We need to use some RAND deprecated APIs */ #define OPENSSL_SUPPRESS_DEPRECATED #include @@ -88,7 +88,6 @@ static RAND_GLOBAL *rand_get_global(OSSL_LIB_CTX *libctx) # include # include # include -# include # include "crypto/rand_pool.h" # include "prov/seeding.h" # include "internal/e_os.h" diff --git a/crypto/rand/rand_pool.c b/crypto/rand/rand_pool.c index 4f258b87ee4..1c4e49c1d08 100644 --- a/crypto/rand/rand_pool.c +++ b/crypto/rand/rand_pool.c @@ -12,7 +12,6 @@ #include "internal/cryptlib.h" #include #include "crypto/rand.h" -#include #include "internal/thread_once.h" #include "crypto/rand_pool.h" diff --git a/crypto/store/store_local.h b/crypto/store/store_local.h index 8c3ca54ebef..eff232332f8 100644 --- a/crypto/store/store_local.h +++ b/crypto/store/store_local.h @@ -11,7 +11,6 @@ #include "internal/thread_once.h" #include "internal/refcount.h" #include -#include #include #include #include diff --git a/crypto/ts/ts_conf.c b/crypto/ts/ts_conf.c index 30ed883bda0..9e3abb39cda 100644 --- a/crypto/ts/ts_conf.c +++ b/crypto/ts/ts_conf.c @@ -7,15 +7,11 @@ * https://www.openssl.org/source/license.html */ -/* We need to use some engine deprecated APIs */ -#define OPENSSL_SUPPRESS_DEPRECATED - #include #include #include "internal/cryptlib.h" #include -#include #include #include diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c index abc4ee0cdf6..d07b3752d31 100644 --- a/crypto/x509/x_pubkey.c +++ b/crypto/x509/x_pubkey.c @@ -17,7 +17,6 @@ #include "internal/cryptlib.h" #include #include -#include #include "crypto/asn1.h" #include "crypto/evp.h" #include "crypto/x509.h" diff --git a/include/crypto/engine.h b/include/crypto/engine.h deleted file mode 100644 index fac6ed0966a..00000000000 --- a/include/crypto/engine.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -void engine_load_openssl_int(void); -void engine_load_devcrypto_int(void); -void engine_load_rdrand_int(void); -void engine_load_dynamic_int(void); -void engine_load_padlock_int(void); -void engine_load_capi_int(void); -void engine_load_dasync_int(void); -void engine_load_afalg_int(void); -void engine_cleanup_int(void);