From f2bbf8ca2300e37cd1d1f10b7153e61419b2ccab Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 13 Feb 2021 13:53:46 +0100 Subject: [PATCH] Move gost_cmds[] from gost_ctl.c to gost_eng.c This make that array uniquely belonging to the engine proper, while leaving the more generic gost parameters functionality in the gost_core library. --- gost_ctl.c | 16 ---------------- gost_eng.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gost_ctl.c b/gost_ctl.c index 64b76ad..60280b1 100644 --- a/gost_ctl.c +++ b/gost_ctl.c @@ -18,22 +18,6 @@ static char *gost_params[GOST_PARAM_MAX + 1] = { NULL }; static const char *gost_envnames[] = { "CRYPT_PARAMS", "GOST_PBE_HMAC", "GOST_PK_FORMAT" }; -const ENGINE_CMD_DEFN gost_cmds[] = { - {GOST_CTRL_CRYPT_PARAMS, - "CRYPT_PARAMS", - "OID of default GOST 28147-89 parameters", - ENGINE_CMD_FLAG_STRING}, - {GOST_CTRL_PBE_PARAMS, - "PBE_PARAMS", - "Shortname of default digest alg for PBE", - ENGINE_CMD_FLAG_STRING}, - {GOST_CTRL_PK_FORMAT, - "GOST_PK_FORMAT", - "Private key format params", - ENGINE_CMD_FLAG_STRING}, - {0, NULL, NULL, 0} -}; - void gost_param_free() { int i; diff --git a/gost_eng.c b/gost_eng.c index 3fbe2e8..f930faa 100644 --- a/gost_eng.c +++ b/gost_eng.c @@ -24,6 +24,22 @@ static const char* engine_gost_id = "gost"; static const char* engine_gost_name = "Reference implementation of GOST engine"; +const ENGINE_CMD_DEFN gost_cmds[] = { + {GOST_CTRL_CRYPT_PARAMS, + "CRYPT_PARAMS", + "OID of default GOST 28147-89 parameters", + ENGINE_CMD_FLAG_STRING}, + {GOST_CTRL_PBE_PARAMS, + "PBE_PARAMS", + "Shortname of default digest alg for PBE", + ENGINE_CMD_FLAG_STRING}, + {GOST_CTRL_PK_FORMAT, + "GOST_PK_FORMAT", + "Private key format params", + ENGINE_CMD_FLAG_STRING}, + {0, NULL, NULL, 0} +}; + /* Symmetric cipher and digest function registrar */ static int gost_ciphers(ENGINE* e, const EVP_CIPHER** cipher, -- 2.39.2