From 586ebd520657eaed361968c55c1ef3e268cf5053 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Fri, 15 Jun 2018 13:53:27 +0300 Subject: [PATCH] Bugfix - copy dgst context --- gost_omac.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gost_omac.c b/gost_omac.c index 23872bc..fa7ab74 100644 --- a/gost_omac.c +++ b/gost_omac.c @@ -89,6 +89,10 @@ int omac_imit_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from) { return 0; } + if (c_to->cmac_ctx == c_from->cmac_ctx) + { + return 1; + } return CMAC_CTX_copy(c_to->cmac_ctx, c_from->cmac_ctx); } -- 2.39.5