-
-int ENGINE_set_name(ENGINE *e, const char *name)
- {
- if(name == NULL)
- {
- ENGINEerr(ENGINE_F_ENGINE_SET_NAME,
- ERR_R_PASSED_NULL_PARAMETER);
- return 0;
- }
- e->name = name;
- return 1;
- }
-
-int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth)
- {
-#ifndef OPENSSL_NO_RSA
- e->rsa_meth = rsa_meth;
- return 1;
-#else
- return 0;
-#endif
- }
-
-int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth)
- {
-#ifndef OPENSSL_NO_DSA
- e->dsa_meth = dsa_meth;
- return 1;
-#else
- return 0;
-#endif
- }
-
-int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth)
- {
-#ifndef OPENSSL_NO_DH
- e->dh_meth = dh_meth;
- return 1;
-#else
- return 0;
-#endif
- }
-
-int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth)
- {
- e->rand_meth = rand_meth;
- return 1;
- }
-
-int ENGINE_set_BN_mod_exp(ENGINE *e, BN_MOD_EXP bn_mod_exp)
- {
- e->bn_mod_exp = bn_mod_exp;
- return 1;
- }
-
-int ENGINE_set_BN_mod_exp_crt(ENGINE *e, BN_MOD_EXP_CRT bn_mod_exp_crt)
- {
- e->bn_mod_exp_crt = bn_mod_exp_crt;
- return 1;
- }
-
-int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f)
- {
- e->destroy = destroy_f;
- return 1;
- }
-
-int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f)
- {
- e->init = init_f;
- return 1;
- }
-
-int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f)
- {
- e->finish = finish_f;
- return 1;
- }
-
-int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f)
- {
- e->ctrl = ctrl_f;
- return 1;
- }
-
-int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f)
- {
- e->load_privkey = loadpriv_f;
- return 1;
- }
-
-int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f)
- {
- e->load_pubkey = loadpub_f;
- return 1;
- }
-
-int ENGINE_set_flags(ENGINE *e, int flags)
- {
- e->flags = flags;
- return 1;
- }
-
-int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns)
- {
- e->cmd_defns = defns;
- return 1;
- }
-
-int ENGINE_cpy(ENGINE *dest, const ENGINE *src)
- {
- if(ENGINE_set_id(dest, ENGINE_get_id(src)) &&
- ENGINE_set_name(dest, ENGINE_get_name(src)) &&
-#ifndef OPENSSL_NO_RSA
- ENGINE_set_RSA(dest, ENGINE_get_RSA(src)) &&
-#endif
-#ifndef OPENSSL_NO_DSA
- ENGINE_set_DSA(dest, ENGINE_get_DSA(src)) &&
-#endif
-#ifndef OPENSSL_NO_DH
- ENGINE_set_DH(dest, ENGINE_get_DH(src)) &&
-#endif
- ENGINE_set_RAND(dest, ENGINE_get_RAND(src)) &&
- ENGINE_set_BN_mod_exp(dest,
- ENGINE_get_BN_mod_exp(src)) &&
- ENGINE_set_BN_mod_exp_crt(dest,
- ENGINE_get_BN_mod_exp_crt(src)) &&
- ENGINE_set_init_function(dest,
- ENGINE_get_init_function(src)) &&
- ENGINE_set_finish_function(dest,
- ENGINE_get_finish_function(src)) &&
- ENGINE_set_ctrl_function(dest,
- ENGINE_get_ctrl_function(src)) &&
- ENGINE_set_load_privkey_function(dest,
- ENGINE_get_load_privkey_function(src)) &&
- ENGINE_set_load_pubkey_function(dest,
- ENGINE_get_load_pubkey_function(src)) &&
- ENGINE_set_flags(dest, ENGINE_get_flags(src)) &&
- ENGINE_set_cmd_defns(dest, ENGINE_get_cmd_defns(src)))
- return 1;
- return 0;
- }
-
-const char *ENGINE_get_id(const ENGINE *e)
- {
- return e->id;
- }
-
-const char *ENGINE_get_name(const ENGINE *e)
- {
- return e->name;
- }
-
-const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e)
- {
- return e->rsa_meth;
- }
-
-const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e)
- {
- return e->dsa_meth;
- }
-
-const DH_METHOD *ENGINE_get_DH(const ENGINE *e)
- {
- return e->dh_meth;
- }
-
-const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e)
- {
- return e->rand_meth;
- }
-
-BN_MOD_EXP ENGINE_get_BN_mod_exp(const ENGINE *e)
- {
- return e->bn_mod_exp;
- }
-
-BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(const ENGINE *e)
- {
- return e->bn_mod_exp_crt;
- }
-
-ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e)
- {
- return e->destroy;
- }
-
-ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e)
- {
- return e->init;
- }
-
-ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e)
- {
- return e->finish;
- }
-
-ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e)
- {
- return e->ctrl;
- }
-
-ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e)
- {
- return e->load_privkey;
- }
-
-ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e)
- {
- return e->load_pubkey;
- }
-
-int ENGINE_get_flags(const ENGINE *e)
- {
- return e->flags;
- }
-
-const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e)
- {
- return e->cmd_defns;
- }