X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_omac_acpkm.c;h=8e2c4df384343d73ce9fde474e5e83b0fb13d039;hb=97b3db1ebf985b73718faaae6c425782d526d44f;hp=507ca53532d5684be92117679908bcfd6b9047b0;hpb=2c54544b48de2998eb657c89bce74d28751adec9;p=openssl-gost%2Fengine.git diff --git a/gost_omac_acpkm.c b/gost_omac_acpkm.c index 507ca53..8e2c4df 100644 --- a/gost_omac_acpkm.c +++ b/gost_omac_acpkm.c @@ -98,7 +98,7 @@ static void CMAC_ACPKM_CTX_free(CMAC_ACPKM_CTX *ctx) OPENSSL_free(ctx); } -int CMAC_ACPKM_CTX_copy(CMAC_ACPKM_CTX *out, const CMAC_ACPKM_CTX *in) +static int CMAC_ACPKM_CTX_copy(CMAC_ACPKM_CTX *out, const CMAC_ACPKM_CTX *in) { int bl; if (in->nlast_block == -1) @@ -375,7 +375,8 @@ static int omac_acpkm_imit_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from) 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); + + return (c_to->cmac_ctx) ? CMAC_ACPKM_CTX_copy(c_to->cmac_ctx, c_from->cmac_ctx) : 0; } /* Clean up imit ctx */