X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_ctl.c;h=64b76ad66e802a5896547f53465f679622a93cf3;hb=refs%2Fheads%2Fgost_provider;hp=1387f7680b8a83d91c4f5a2bd6ebc2e6410889db;hpb=f8a4b31268d06d4deea274a7d3e644cf4f84e386;p=openssl-gost%2Fengine.git diff --git a/gost_ctl.c b/gost_ctl.c index 1387f76..64b76ad 100644 --- a/gost_ctl.c +++ b/gost_ctl.c @@ -15,7 +15,8 @@ #include "gost_lcl.h" static char *gost_params[GOST_PARAM_MAX + 1] = { NULL }; -static const char *gost_envnames[] = { "CRYPT_PARAMS", "GOST_PBE_HMAC", "PK_PARAMS" }; +static const char *gost_envnames[] = + { "CRYPT_PARAMS", "GOST_PBE_HMAC", "GOST_PK_FORMAT" }; const ENGINE_CMD_DEFN gost_cmds[] = { {GOST_CTRL_CRYPT_PARAMS, @@ -26,8 +27,8 @@ const ENGINE_CMD_DEFN gost_cmds[] = { "PBE_PARAMS", "Shortname of default digest alg for PBE", ENGINE_CMD_FLAG_STRING}, - {GOST_CTRL_PK_PARAMS, - "PK_PARAMS", + {GOST_CTRL_PK_FORMAT, + "GOST_PK_FORMAT", "Private key format params", ENGINE_CMD_FLAG_STRING}, {0, NULL, NULL, 0} @@ -58,7 +59,7 @@ int gost_control_func(ENGINE *e, int cmd, long i, void *p, void (*f) (void)) const char *get_gost_engine_param(int param) { char *tmp; - if (param < 0 || param > GOST_PARAM_MAX) + if (param < 0 || param >= GOST_PARAM_MAX) return NULL; if (gost_params[param] != NULL) { return gost_params[param]; @@ -75,7 +76,7 @@ const char *get_gost_engine_param(int param) int gost_set_default_param(int param, const char *value) { const char *tmp; - if (param < 0 || param > GOST_PARAM_MAX) + if (param < 0 || param >= GOST_PARAM_MAX) return 0; tmp = getenv(gost_envnames[param]);