X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_pmeth.c;h=2f3d7119b7b6e19c12a194021822ceed5039b691;hb=ee7efcec44edd11e64b5c4ad76e72e2a7acbdf9d;hp=dd565a0f23e717fa04fb3c3808ce561d54e76782;hpb=a54af1d8031c66f55967fa9faf70b9c5ea96d9b8;p=openssl-gost%2Fengine.git diff --git a/gost_pmeth.c b/gost_pmeth.c index dd565a0..2f3d711 100644 --- a/gost_pmeth.c +++ b/gost_pmeth.c @@ -521,12 +521,12 @@ static int pkey_gost_omac_init(EVP_PKEY_CTX *ctx, size_t mac_size) static int pkey_gost_magma_mac_init(EVP_PKEY_CTX *ctx) { - return pkey_gost_omac_init(ctx, 4); + return pkey_gost_omac_init(ctx, 8); } static int pkey_gost_grasshopper_mac_init(EVP_PKEY_CTX *ctx) { - return pkey_gost_omac_init(ctx, 8); + return pkey_gost_omac_init(ctx, 16); } static void pkey_gost_mac_cleanup(EVP_PKEY_CTX *ctx) @@ -697,7 +697,9 @@ static int pkey_gost_omac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2, si case EVP_PKEY_CTRL_MD: { int nid = EVP_MD_type((const EVP_MD *)p2); - if (nid != NID_magma_mac && nid != NID_grasshopper_mac) { + if (nid != NID_magma_mac && nid != NID_grasshopper_mac + && nid != NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac /* FIXME beldmit */ + && nid != NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac) { GOSTerr(GOST_F_PKEY_GOST_OMAC_CTRL, GOST_R_INVALID_DIGEST_TYPE); return 0;