aboutsummaryrefslogtreecommitdiff
path: root/gost_omac.c
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2018-08-31 13:02:52 +0300
committerDmitry Belyavskiy <beldmit@gmail.com>2018-08-31 13:02:52 +0300
commit6476d4d4966f6efcfd84c5d1c9c4e90d83aa9f14 (patch)
treef118a50390b6d12f686ace9b77b8760fb35623c2 /gost_omac.c
parentd8195bfd8d86c542d7505a4f6214f99a5edae220 (diff)
downloadgost-engine-6476d4d4966f6efcfd84c5d1c9c4e90d83aa9f14.zip
gost-engine-6476d4d4966f6efcfd84c5d1c9c4e90d83aa9f14.tar.gz
gost-engine-6476d4d4966f6efcfd84c5d1c9c4e90d83aa9f14.tar.bz2
Some fixes of OMAC processing
Diffstat (limited to 'gost_omac.c')
-rw-r--r--gost_omac.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gost_omac.c b/gost_omac.c
index 49113a5..daf5750 100644
--- a/gost_omac.c
+++ b/gost_omac.c
@@ -72,8 +72,7 @@ int omac_imit_final(EVP_MD_CTX *ctx, unsigned char *md)
CMAC_Final(c->cmac_ctx, mac, &mac_size);
- int md_size = EVP_MD_meth_get_result_size(EVP_MD_CTX_md(ctx));
- memcpy(md, mac, min(md_size, c->dgst_size));
+ memcpy(md, mac, c->dgst_size);
return 1;
}