]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Define stubs for other ENGINE-related legacy API and revert legacy errors definitions.
authorMilan Broz <gmazyland@gmail.com>
Thu, 6 Nov 2025 08:38:44 +0000 (09:38 +0100)
committerNeil Horman <nhorman@openssl.org>
Thu, 4 Dec 2025 12:32:18 +0000 (07:32 -0500)
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29305)

include/openssl/cryptoerr_legacy.h
include/openssl/engine.h
include/openssl/sslerr_legacy.h

index 585e464adb1410cbdb501c893734baf47ae30131..16076bf49cbd57fe148074a9dcac8c1995efc85f 100644 (file)
@@ -748,7 +748,7 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void);
 #   define EC_F_VALIDATE_ECX_DERIVE                         0
 #  endif
 
-#  if !defined(OPENSSL_NO_ENGINE) || defined(OPENSSL_ENGINE_STUBS)
+#  ifdef OPENSSL_ENGINE_STUBS
 /*
  * ENGINE reason codes.
  */
@@ -787,6 +787,50 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void);
 #   define ENGINE_R_UNIMPLEMENTED_DIGEST                   0
 #   define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD        0
 #   define ENGINE_R_VERSION_INCOMPATIBILITY                0
+
+/*
+ * 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
 
 /*
@@ -872,6 +916,7 @@ 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
@@ -1248,6 +1293,7 @@ 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 0b12393dd576ff84e62f7421dfcfa1ee4e83bf45..dee79ba56efbc0e024c7c1f893e369fe9695f836 100644 (file)
@@ -1174,6 +1174,40 @@ ENGINE_VOID_FUNC_NOARGS(ENGINE_setup_bsd_cryptodev)
 #   endif
 #  endif
 
+/*
+ * Stubs for ENGINE-related API functions that were removed
+ * from other headers.
+ */
+
+/* int ossl_err_load_ENGINE_strings(void); */
+ENGINE_FUNC_NOARGS(int, ossl_err_load_ENGINE_strings, 1)
+
+/* int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e); */
+ENGINE_FUNC(int, EVP_PKEY_set1_engine, (EVP_PKEY *pkey, ENGINE *e), (pkey, e), 0)
+
+/* ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey); */
+ENGINE_FUNC(ENGINE *, EVP_PKEY_get0_engine, (const EVP_PKEY *pkey), (pkey), NULL)
+
+/* int RAND_set_rand_engine(ENGINE *engine); */
+ENGINE_FUNC(int, RAND_set_rand_engine, (ENGINE *engine), (engine), 0)
+
+/*
+ * int TS_CONF_set_crypto_device(CONF *conf, const char *section,
+ *                              const char *device);
+ */
+ENGINE_FUNC(int, TS_CONF_set_crypto_device,
+            (CONF *conf, const char *section, const char *device),
+            (conf, section, device), 0)
+
+/* int TS_CONF_set_default_engine(const char *name); */
+ENGINE_FUNC(int, TS_CONF_set_default_engine, (const char *name), (name), 0)
+
+/* int ERR_load_ENGINE_strings(void); */
+ENGINE_FUNC_NOARGS(int, ERR_load_ENGINE_strings, 1)
+
+/* int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); */
+ENGINE_FUNC(int, SSL_CTX_set_client_cert_engine, (SSL_CTX *ctx, ENGINE *e),
+            (ctx, e), 0)
 
 #  ifdef  __cplusplus
 }
index 55d643df9384d20b341b2948632fe211ddab25dd..4c353671c7e88469b23a178fa86b44824a654105 100644 (file)
@@ -171,6 +171,7 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_SSL_strings(void);
 #  define SSL_F_SSL_CTX_NEW                                0
 #  define SSL_F_SSL_CTX_SET_ALPN_PROTOS                    0
 #  define SSL_F_SSL_CTX_SET_CIPHER_LIST                    0
+#  define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE             0
 #  define SSL_F_SSL_CTX_SET_CT_VALIDATION_CALLBACK         0
 #  define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT             0
 #  define SSL_F_SSL_CTX_SET_SSL_VERSION                    0