X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_omac_acpkm.c;h=507ca53532d5684be92117679908bcfd6b9047b0;hb=2c54544b48de2998eb657c89bce74d28751adec9;hp=cec683fb34637a393fa09049f490cd3c78eafa89;hpb=da0c648be057d9d9277a5a17411d4acb5dfe710f;p=openssl-gost%2Fengine.git diff --git a/gost_omac_acpkm.c b/gost_omac_acpkm.c index cec683f..507ca53 100644 --- a/gost_omac_acpkm.c +++ b/gost_omac_acpkm.c @@ -372,7 +372,7 @@ static int omac_acpkm_imit_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from) } return 1; } - if (c_to->cmac_ctx == c_from->cmac_ctx) { + if ((c_to->cmac_ctx == c_from->cmac_ctx) || (c_to->cmac_ctx == NULL)) { c_to->cmac_ctx = CMAC_ACPKM_CTX_new(); } return CMAC_ACPKM_CTX_copy(c_to->cmac_ctx, c_from->cmac_ctx);