From 37e242a6a246cbf51d0e7f16f11f122a8c2051eb Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Fri, 15 Jun 2018 12:39:47 +0300 Subject: [PATCH] Corrected MAC name Redundant values removed --- gost_eng.c | 4 ++-- gost_pmeth.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gost_eng.c b/gost_eng.c index 0cef2fa..ba67fda 100644 --- a/gost_eng.c +++ b/gost_eng.c @@ -214,10 +214,10 @@ static int bind_gost(ENGINE* e, const char* id) { "GOST 28147-89 MAC with 2012 params")) goto end; if (!register_ameth_gost(NID_magma_mac, &ameth_magma_mac, - "MAGMA-OMAC", "GOST R 34.13-2015 Magma MAC")) + "MAGMA-MAC", "GOST R 34.13-2015 Magma MAC")) goto end; if (!register_ameth_gost(NID_grasshopper_mac, &ameth_grasshopper_mac, - "GRASSHOPPER-OMAC", "GOST R 34.13-2015 Grasshopper MAC")) + "GRASSHOPPER-MAC", "GOST R 34.13-2015 Grasshopper MAC")) goto end; if (!register_pmeth_gost(NID_id_GostR3410_2001, &pmeth_GostR3410_2001, 0)) diff --git a/gost_pmeth.c b/gost_pmeth.c index e615d01..5c7352b 100644 --- a/gost_pmeth.c +++ b/gost_pmeth.c @@ -556,8 +556,7 @@ static int pkey_gost_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) case EVP_PKEY_CTRL_MD: { int nid = EVP_MD_type((const EVP_MD *)p2); - if (nid != NID_id_Gost28147_89_MAC && nid != NID_gost_mac_12 - && nid != NID_magma_mac && nid != NID_grasshopper_mac) { + if (nid != NID_id_Gost28147_89_MAC && nid != NID_gost_mac_12) { GOSTerr(GOST_F_PKEY_GOST_MAC_CTRL, GOST_R_INVALID_DIGEST_TYPE); return 0; -- 2.39.5