]> wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_pmeth.c
Merge branch 'master' of https://github.com/gost-engine/engine
[openssl-gost/engine.git] / gost_pmeth.c
index dd565a0f23e717fa04fb3c3808ce561d54e76782..2f3d7119b7b6e19c12a194021822ceed5039b691 100644 (file)
@@ -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;