Skip to content

Commit f2bbf8c

Browse files
levittebeldmit
authored andcommitted
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.
1 parent c8666fa commit f2bbf8c

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

gost_ctl.c

-16
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,6 @@ static char *gost_params[GOST_PARAM_MAX + 1] = { NULL };
1818
static const char *gost_envnames[] =
1919
{ "CRYPT_PARAMS", "GOST_PBE_HMAC", "GOST_PK_FORMAT" };
2020

21-
const ENGINE_CMD_DEFN gost_cmds[] = {
22-
{GOST_CTRL_CRYPT_PARAMS,
23-
"CRYPT_PARAMS",
24-
"OID of default GOST 28147-89 parameters",
25-
ENGINE_CMD_FLAG_STRING},
26-
{GOST_CTRL_PBE_PARAMS,
27-
"PBE_PARAMS",
28-
"Shortname of default digest alg for PBE",
29-
ENGINE_CMD_FLAG_STRING},
30-
{GOST_CTRL_PK_FORMAT,
31-
"GOST_PK_FORMAT",
32-
"Private key format params",
33-
ENGINE_CMD_FLAG_STRING},
34-
{0, NULL, NULL, 0}
35-
};
36-
3721
void gost_param_free()
3822
{
3923
int i;

gost_eng.c

+16
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ static const char* engine_gost_id = "gost";
2424
static const char* engine_gost_name =
2525
"Reference implementation of GOST engine";
2626

27+
const ENGINE_CMD_DEFN gost_cmds[] = {
28+
{GOST_CTRL_CRYPT_PARAMS,
29+
"CRYPT_PARAMS",
30+
"OID of default GOST 28147-89 parameters",
31+
ENGINE_CMD_FLAG_STRING},
32+
{GOST_CTRL_PBE_PARAMS,
33+
"PBE_PARAMS",
34+
"Shortname of default digest alg for PBE",
35+
ENGINE_CMD_FLAG_STRING},
36+
{GOST_CTRL_PK_FORMAT,
37+
"GOST_PK_FORMAT",
38+
"Private key format params",
39+
ENGINE_CMD_FLAG_STRING},
40+
{0, NULL, NULL, 0}
41+
};
42+
2743
/* Symmetric cipher and digest function registrar */
2844

2945
static int gost_ciphers(ENGINE* e, const EVP_CIPHER** cipher,

0 commit comments

Comments
 (0)