18 static const char *engine_gost_id =
"gost";
19 static const char *engine_gost_name =
"Reference implementation of GOST engine";
24 const int **nids,
int nid);
27 const int **nids,
int ind);
30 const int **nids,
int nid);
33 const int **nids,
int nid);
35 static int gost_cipher_nids[] =
38 static int gost_digest_nids[] =
41 static int gost_pkey_meth_nids[] =
46 *pmeth_GostR3410_2001 = NULL,
47 *pmeth_Gost28147_MAC = NULL;
50 *ameth_GostR3410_2001 = NULL,
51 *ameth_Gost28147_MAC = NULL;
54 static int gost_engine_init(
ENGINE *
e)
59 static int gost_engine_finish(
ENGINE *
e)
64 static int gost_engine_destroy(
ENGINE *
e)
70 static int bind_gost (
ENGINE *
e,
const char *
id)
73 if (
id && strcmp(
id, engine_gost_id))
return 0;
77 printf(
"ENGINE_set_id failed\n");
82 printf(
"ENGINE_set_name failed\n");
87 printf(
"ENGINE_set_digests failed\n");
92 printf(
"ENGINE_set_ciphers failed\n");
97 printf(
"ENGINE_set_pkey_meths failed\n");
102 printf(
"ENGINE_set_pkey_asn1_meths failed\n");
108 fprintf(stderr,
"ENGINE_set_cmd_defns failed\n");
113 fprintf(stderr,
"ENGINE_set_ctrl_func failed\n");
126 "GOST-MAC",
"GOST 28147-89 MAC"))
goto end;
151 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
156 static int gost_digests(
ENGINE *e,
const EVP_MD **digest,
157 const int **nids,
int nid)
162 *nids = gost_digest_nids;
183 const int **nids,
int nid)
188 *nids = gost_cipher_nids;
209 const int **nids,
int nid)
213 *nids = gost_pkey_meth_nids;
230 const int **nids,
int nid)
234 *nids = gost_pkey_meth_nids;
250 #ifdef OPENSSL_NO_DYNAMIC_ENGINE
251 static ENGINE *engine_gost(
void)
256 if (!bind_gost(ret,engine_gost_id))
266 ENGINE *toadd =engine_gost();