X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_omac_acpkm.c;h=0b74687b6798970c81573370019b6e6d5c78d3b0;hb=38ce652a600ca43db4996f3c2945aff39a323e36;hp=9bdb05f0e510ae2be0957531bfa777e329e79788;hpb=6b41c2e3f9335af1437a05e6f48bfec7e1841a75;p=openssl-gost%2Fengine.git diff --git a/gost_omac_acpkm.c b/gost_omac_acpkm.c index 9bdb05f..0b74687 100644 --- a/gost_omac_acpkm.c +++ b/gost_omac_acpkm.c @@ -425,6 +425,7 @@ int omac_acpkm_imit_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) if (c->cipher_nid == NID_undef) { switch (EVP_MD_nid(md)) { case NID_grasshopper_mac: + case NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac: c->cipher_nid = NID_grasshopper_cbc; break; } @@ -475,6 +476,13 @@ int omac_acpkm_imit_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) } c->dgst_size = arg; break; + case NID_magma_cbc: + if (arg < 1 || arg > 8) { + GOSTerr(GOST_F_OMAC_ACPKM_IMIT_CTRL, GOST_R_INVALID_MAC_SIZE); + return 0; + } + c->dgst_size = arg; + break; default: return 0; }