From: Norbert Pocs Date: Fri, 29 Aug 2025 10:47:00 +0000 (+0200) Subject: include/: Remove ENGINEs X-Git-Tag: 4.0-PRE-CLANG-FORMAT-WEBKIT~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d591943816fdb28580f87acada61a781b98df2a;p=thirdparty%2Fopenssl.git include/: Remove ENGINEs Signed-off-by: Norbert Pocs Reviewed-by: Matt Caswell Reviewed-by: Saša Nedvědický Reviewed-by: Neil Horman Reviewed-by: Dmitry Belyavskiy Reviewed-by: Saša Nedvědický Reviewed-by: Eugene Syromiatnikov (Merged from https://github.com/openssl/openssl/pull/29305) --- diff --git a/crypto/err/err_all.c b/crypto/err/err_all.c index 86b609a555f..9463cf62ea7 100644 --- a/crypto/err/err_all.c +++ b/crypto/err/err_all.c @@ -30,7 +30,6 @@ #include "crypto/pkcs12err.h" #include "crypto/randerr.h" #include "internal/dsoerr.h" -#include "crypto/engineerr.h" #include "crypto/uierr.h" #include "crypto/httperr.h" #include "crypto/ocsperr.h" @@ -82,9 +81,6 @@ int ossl_err_load_crypto_strings(void) # ifndef OPENSSL_NO_TS || ossl_err_load_TS_strings() == 0 # endif -# ifndef OPENSSL_NO_ENGINE - || ossl_err_load_ENGINE_strings() == 0 -# endif # ifndef OPENSSL_NO_HTTP || ossl_err_load_HTTP_strings() == 0 # endif diff --git a/crypto/err/err_all_legacy.c b/crypto/err/err_all_legacy.c index 64dd61867d6..1a1443597fc 100644 --- a/crypto/err/err_all_legacy.c +++ b/crypto/err/err_all_legacy.c @@ -27,7 +27,6 @@ # include "crypto/dsaerr.h" # include "internal/dsoerr.h" # include "crypto/ecerr.h" -# include "crypto/engineerr.h" # include "crypto/evperr.h" # include "crypto/httperr.h" # include "crypto/objectserr.h" @@ -82,9 +81,6 @@ IMPLEMENT_LEGACY_ERR_LOAD(DSA) # ifndef OPENSSL_NO_EC IMPLEMENT_LEGACY_ERR_LOAD(EC) # endif -# ifndef OPENSSL_NO_ENGINE -IMPLEMENT_LEGACY_ERR_LOAD(ENGINE) -# endif IMPLEMENT_LEGACY_ERR_LOAD(ERR) IMPLEMENT_LEGACY_ERR_LOAD(EVP) IMPLEMENT_LEGACY_ERR_LOAD(OBJ) diff --git a/crypto/ts/ts_conf.c b/crypto/ts/ts_conf.c index 59737a5cec0..30ed883bda0 100644 --- a/crypto/ts/ts_conf.c +++ b/crypto/ts/ts_conf.c @@ -158,51 +158,6 @@ int TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb, return ret; } -#ifndef OPENSSL_NO_ENGINE - -int TS_CONF_set_crypto_device(CONF *conf, const char *section, - const char *device) -{ - int ret = 0; - - if (device == NULL) - device = NCONF_get_string(conf, section, ENV_CRYPTO_DEVICE); - - if (device && !TS_CONF_set_default_engine(device)) { - ts_CONF_invalid(section, ENV_CRYPTO_DEVICE); - goto err; - } - ret = 1; - err: - return ret; -} - -int TS_CONF_set_default_engine(const char *name) -{ - ENGINE *e = NULL; - int ret = 0; - - if (strcmp(name, "builtin") == 0) - return 1; - - if ((e = ENGINE_by_id(name)) == NULL) - goto err; - if (strcmp(name, "chil") == 0) - ENGINE_ctrl(e, ENGINE_CTRL_CHIL_SET_FORKCHECK, 1, 0, 0); - if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) - goto err; - ret = 1; - - err: - if (!ret) - ERR_raise_data(ERR_LIB_TS, TS_R_COULD_NOT_SET_ENGINE, - "engine:%s", name); - ENGINE_free(e); - return ret; -} - -#endif - int TS_CONF_set_signer_cert(CONF *conf, const char *section, const char *cert, TS_RESP_CTX *ctx) { diff --git a/include/openssl/cryptoerr_legacy.h b/include/openssl/cryptoerr_legacy.h index ccab33a5d4f..aabef8bcf21 100644 --- a/include/openssl/cryptoerr_legacy.h +++ b/include/openssl/cryptoerr_legacy.h @@ -51,9 +51,6 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_DSA_strings(void); # ifndef OPENSSL_NO_EC OSSL_DEPRECATEDIN_3_0 int ERR_load_EC_strings(void); # endif -# ifndef OPENSSL_NO_ENGINE -OSSL_DEPRECATEDIN_3_0 int ERR_load_ENGINE_strings(void); -# endif OSSL_DEPRECATEDIN_3_0 int ERR_load_ERR_strings(void); OSSL_DEPRECATEDIN_3_0 int ERR_load_EVP_strings(void); OSSL_DEPRECATEDIN_3_0 int ERR_load_KDF_strings(void); @@ -751,52 +748,6 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void); # define EC_F_VALIDATE_ECX_DERIVE 0 # endif -# ifndef OPENSSL_NO_ENGINE -/* - * ENGINE function codes. - */ -# define ENGINE_F_DIGEST_UPDATE 0 -# define ENGINE_F_DYNAMIC_CTRL 0 -# define ENGINE_F_DYNAMIC_GET_DATA_CTX 0 -# define ENGINE_F_DYNAMIC_LOAD 0 -# define ENGINE_F_DYNAMIC_SET_DATA_CTX 0 -# define ENGINE_F_ENGINE_ADD 0 -# define ENGINE_F_ENGINE_BY_ID 0 -# define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 0 -# define ENGINE_F_ENGINE_CTRL 0 -# define ENGINE_F_ENGINE_CTRL_CMD 0 -# define ENGINE_F_ENGINE_CTRL_CMD_STRING 0 -# define ENGINE_F_ENGINE_FINISH 0 -# define ENGINE_F_ENGINE_GET_CIPHER 0 -# define ENGINE_F_ENGINE_GET_DIGEST 0 -# define ENGINE_F_ENGINE_GET_FIRST 0 -# define ENGINE_F_ENGINE_GET_LAST 0 -# define ENGINE_F_ENGINE_GET_NEXT 0 -# define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 0 -# define ENGINE_F_ENGINE_GET_PKEY_METH 0 -# define ENGINE_F_ENGINE_GET_PREV 0 -# define ENGINE_F_ENGINE_INIT 0 -# define ENGINE_F_ENGINE_LIST_ADD 0 -# define ENGINE_F_ENGINE_LIST_REMOVE 0 -# define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 0 -# define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 0 -# define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 0 -# define ENGINE_F_ENGINE_NEW 0 -# define ENGINE_F_ENGINE_PKEY_ASN1_FIND_STR 0 -# define ENGINE_F_ENGINE_REMOVE 0 -# define ENGINE_F_ENGINE_SET_DEFAULT_STRING 0 -# define ENGINE_F_ENGINE_SET_ID 0 -# define ENGINE_F_ENGINE_SET_NAME 0 -# define ENGINE_F_ENGINE_TABLE_REGISTER 0 -# define ENGINE_F_ENGINE_UNLOCKED_FINISH 0 -# define ENGINE_F_ENGINE_UP_REF 0 -# define ENGINE_F_INT_CLEANUP_ITEM 0 -# define ENGINE_F_INT_CTRL_HELPER 0 -# define ENGINE_F_INT_ENGINE_CONFIGURE 0 -# define ENGINE_F_INT_ENGINE_MODULE_INIT 0 -# define ENGINE_F_OSSL_HMAC_INIT 0 -# endif - /* * EVP function codes. */ @@ -880,7 +831,6 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void); # define EVP_F_EVP_PKEY_PARAMGEN_INIT 0 # define EVP_F_EVP_PKEY_PARAM_CHECK 0 # define EVP_F_EVP_PKEY_PUBLIC_CHECK 0 -# define EVP_F_EVP_PKEY_SET1_ENGINE 0 # define EVP_F_EVP_PKEY_SET_ALIAS_TYPE 0 # define EVP_F_EVP_PKEY_SIGN 0 # define EVP_F_EVP_PKEY_SIGN_INIT 0 @@ -1257,7 +1207,6 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void); # define TS_F_TS_CONF_LOAD_CERTS 0 # define TS_F_TS_CONF_LOAD_KEY 0 # define TS_F_TS_CONF_LOOKUP_FAIL 0 -# define TS_F_TS_CONF_SET_DEFAULT_ENGINE 0 # define TS_F_TS_GET_STATUS_TEXT 0 # define TS_F_TS_MSG_IMPRINT_SET_ALGO 0 # define TS_F_TS_REQ_SET_MSG_IMPRINT 0 diff --git a/include/openssl/evp.h b/include/openssl/evp.h index ff82695c993..9c7d9785c2a 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1386,12 +1386,6 @@ int EVP_PKEY_set_type(EVP_PKEY *pkey, int type); int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len); int EVP_PKEY_set_type_by_keymgmt(EVP_PKEY *pkey, EVP_KEYMGMT *keymgmt); # ifndef OPENSSL_NO_DEPRECATED_3_0 -# ifndef OPENSSL_NO_ENGINE -OSSL_DEPRECATEDIN_3_0 -int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e); -OSSL_DEPRECATEDIN_3_0 -ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey); -# endif OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key); OSSL_DEPRECATEDIN_3_0 diff --git a/include/openssl/rand.h b/include/openssl/rand.h index 4e59e50f783..a1ddfe68b34 100644 --- a/include/openssl/rand.h +++ b/include/openssl/rand.h @@ -48,9 +48,6 @@ struct rand_meth_st { OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth); OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *RAND_get_rand_method(void); -# ifndef OPENSSL_NO_ENGINE -OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_engine(ENGINE *engine); -# endif OSSL_DEPRECATEDIN_3_0 RAND_METHOD *RAND_OpenSSL(void); # endif /* OPENSSL_NO_DEPRECATED_3_0 */ diff --git a/include/openssl/ssl.h.in b/include/openssl/ssl.h.in index 87bf1cc48b2..26dcd98e07f 100644 --- a/include/openssl/ssl.h.in +++ b/include/openssl/ssl.h.in @@ -750,9 +750,6 @@ void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, EVP_PKEY **pkey)); int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509, EVP_PKEY **pkey); -# ifndef OPENSSL_NO_ENGINE -__owur int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); -# endif void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb) (SSL *ssl, unsigned char diff --git a/include/openssl/ts.h b/include/openssl/ts.h index 31c78b55a40..19938dfb5c8 100644 --- a/include/openssl/ts.h +++ b/include/openssl/ts.h @@ -487,11 +487,6 @@ EVP_PKEY *TS_CONF_load_key(const char *file, const char *pass); const char *TS_CONF_get_tsa_section(CONF *conf, const char *section); int TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb, TS_RESP_CTX *ctx); -#ifndef OPENSSL_NO_ENGINE -int TS_CONF_set_crypto_device(CONF *conf, const char *section, - const char *device); -int TS_CONF_set_default_engine(const char *name); -#endif int TS_CONF_set_signer_cert(CONF *conf, const char *section, const char *cert, TS_RESP_CTX *ctx); int TS_CONF_set_certs(CONF *conf, const char *section, const char *certs,