summaryrefslogtreecommitdiffstats
path: root/engines/ccgost/gost_eng.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2007-05-18 15:55:55 +0000
committerDr. Stephen Henson <steve@openssl.org>2007-05-18 15:55:55 +0000
commitec06417d52e53cc66fbc2ffe3e45520514098cba (patch)
treea24a5e122adf2e21f7a61378b27019eb0f6c4444 /engines/ccgost/gost_eng.c
parenta4346646f12f83f8058abd9d013824fb90abfe73 (diff)
Updated GOST MAC support.
Submitted by: vitus@cryptocom.ru
Diffstat (limited to 'engines/ccgost/gost_eng.c')
-rw-r--r--engines/ccgost/gost_eng.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/ccgost/gost_eng.c b/engines/ccgost/gost_eng.c
index fd474dc1a5..daa397f6cc 100644
--- a/engines/ccgost/gost_eng.c
+++ b/engines/ccgost/gost_eng.c
@@ -34,7 +34,7 @@ static int gost_cipher_nids[] =
{NID_id_Gost28147_89, NID_gost89_cnt,0};
static int gost_digest_nids[] =
- {NID_id_GostR3411_94, 0};
+ {NID_id_GostR3411_94,NID_id_Gost28147_89_MAC, 0};
static int gost_pkey_meth_nids[] =
{NID_id_GostR3410_94_cc, NID_id_GostR3410_94, NID_id_GostR3410_2001_cc,
@@ -137,6 +137,7 @@ static int bind_gost (ENGINE *e,const char *id)
|| ! EVP_add_cipher(&cipher_gost)
|| ! EVP_add_cipher(&cipher_gost_cpacnt)
|| ! EVP_add_digest(&digest_gost)
+ || ! EVP_add_digest(&imit_gost_cpa)
)
{
goto end;
@@ -160,14 +161,18 @@ static int gost_digests(ENGINE *e, const EVP_MD **digest,
if (!digest)
{
*nids = gost_digest_nids;
- return 1;
+ return 2;
}
/*printf("Digest no %d requested\n",nid);*/
if(nid == NID_id_GostR3411_94)
{
*digest = &digest_gost;
}
- else
+ else if (nid == NID_id_Gost28147_89_MAC)
+ {
+ *digest = &imit_gost_cpa;
+ }
+ else
{
ok =0;
*digest = NULL;