const char *get_gost_engine_param(int param)
{
    char *tmp;
    if (param < 0 || param > GOST_PARAM_MAX)
        return NULL;
    if (gost_params[param] != NULL) {
        return gost_params[param];
    }
    tmp = getenv(gost_envnames[param]);
    if (tmp) {
        OPENSSL_free(gost_params[param]);
        gost_params[param] = OPENSSL_strdup(tmp);
        return gost_params[param];
    }
    return NULL;
}