From 5a00a20d64ec8f167452c1478d28c43e1e8480d1 Mon Sep 17 00:00:00 2001
From: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Date: Tue, 21 Aug 2018 19:23:38 +0300
Subject: [PATCH] test_grasshopper: drop test_omac

grasshopper-omac is not implemented in this version of engine.
---
 test_grasshopper.c | 35 -----------------------------------
 1 file changed, 35 deletions(-)

diff --git a/test_grasshopper.c b/test_grasshopper.c
index fb6b967..19e18bf 100644
--- a/test_grasshopper.c
+++ b/test_grasshopper.c
@@ -248,39 +248,6 @@ static int test_stream(const EVP_CIPHER *type, const char *name,
     return ret;
 }
 
-static int test_omac()
-{
-    EVP_MD_CTX *ctx = EVP_MD_CTX_new();
-    unsigned char mac[] = { 0x33,0x6f,0x4d,0x29,0x60,0x59,0xfb,0xe3 };
-    unsigned char md_value[EVP_MAX_MD_SIZE];
-    unsigned int md_len;
-    int test;
-
-    OPENSSL_assert(ctx);
-    printf("OMAC test from GOST R 34.13-2015\n");
-    EVP_MD_CTX_init(ctx);
-    /* preload cbc cipher for omac set key */
-    EVP_add_cipher(cipher_gost_grasshopper_cbc());
-    T(EVP_DigestInit_ex(ctx, grasshopper_omac(), NULL));
-    if (EVP_MD_CTX_size(ctx) != sizeof(mac)) {
-	/* strip const out of EVP_MD_CTX_md() to
-	 * overwrite output size, as test vector is 8 bytes */
-	printf("Resize result size from %d to %zu\n", EVP_MD_CTX_size(ctx), sizeof(mac));
-	T(EVP_MD_meth_set_result_size((EVP_MD *)EVP_MD_CTX_md(ctx), sizeof(mac)));
-    }
-    T(EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(ctx))(ctx, EVP_MD_CTRL_SET_KEY, sizeof(K), (void *)K));
-    T(EVP_DigestUpdate(ctx, P, sizeof(P)));
-    T(EVP_DigestFinal_ex(ctx, md_value, &md_len));
-    EVP_MD_CTX_free(ctx);
-    printf("  MAC[%u] = ", md_len);
-    hexdump(md_value, md_len);
-
-    TEST_ASSERT(md_len != sizeof(mac) ||
-	memcmp(mac, md_value, md_len));
-
-    return test;
-}
-
 int main(int argc, char **argv)
 {
     int ret = 0;
@@ -296,8 +263,6 @@ int main(int argc, char **argv)
 		t->iv, t->iv_size, t->acpkm);
     }
 
-    ret |= test_omac();
-
     if (ret)
 	printf(cDRED "= Some tests FAILED!\n" cNORM);
     else
-- 
2.39.5