]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_omac.c
Some fixes of OMAC processing
[openssl-gost/engine.git] / gost_omac.c
index 49113a5cf24da75be3bbe01202d8cf6889c1a1a6..daf5750354beaddafd20e6ae68922d68adc94c90 100644 (file)
@@ -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;
 }