]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Bugfix - copy dgst context
authorDmitry Belyavskiy <beldmit@gmail.com>
Fri, 15 Jun 2018 10:53:27 +0000 (13:53 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Fri, 15 Jun 2018 10:53:27 +0000 (13:53 +0300)
gost_omac.c

index 23872bc8f72d21e52bd594998618c2f3597a2d17..fa7ab746ba5119a485003521324f17803f47ab33 100644 (file)
@@ -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);
 }