]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
include/: Remove ENGINEs
authorNorbert Pocs <norbertp@openssl.org>
Fri, 29 Aug 2025 10:47:00 +0000 (12:47 +0200)
committerNeil Horman <nhorman@openssl.org>
Fri, 3 Oct 2025 17:00:26 +0000 (13:00 -0400)
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

crypto/err/err_all.c
crypto/err/err_all_legacy.c
crypto/ts/ts_conf.c
include/openssl/cryptoerr_legacy.h
include/openssl/evp.h
include/openssl/rand.h
include/openssl/ssl.h.in
include/openssl/ts.h

index 86b609a555f02bb82f69b1300f05c35327dd433a..9463cf62ea7a367961b7231bcb90e67606963b79 100644 (file)
@@ -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
index 64dd61867d6d4b2054796961dcbac7e7733471fb..1a1443597fc39fba3a6922ac71201bb3bc23bd59 100644 (file)
@@ -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)
index 59737a5cec08756a06c6059c6b40cd2614671f1c..30ed883bda0dc5eb56da52720193832fdaf46477 100644 (file)
@@ -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)
 {
index ccab33a5d4f0710edb670a6e2242511bc017f52d..aabef8bcf2172f6df98a7f1a264ad81272c9fb99 100644 (file)
@@ -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
index 61e50b266d62dbd7c9d55ae2f4e458c78396832b..796bb5b3a76ae255a1afba8ffede1a7f4ff6f468 100644 (file)
@@ -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
index 4e59e50f7839e2e4e4e29597c5bd885df5395586..a1ddfe68b34554b7c4120851a543eed6cd345661 100644 (file)
@@ -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 */
index 1cc77189023c5acdd9c9039649f9e8261dd7935e..a91aacb1ee6ec2c9f484f952caa3ec50b4582353 100644 (file)
@@ -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
index 31c78b55a4024f8131e132cbffde9db32f654005..19938dfb5c8d1c71dae9439d349e61690e20bc66 100644 (file)
@@ -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,