Lines Matching defs:mctx
622 EVP_MD_CTX mctx;
624 EVP_MD_CTX_init(&mctx);
633 if (!cms_DigestAlgorithm_find_ctx(&mctx, chain, si->digestAlgorithm))
644 if (!EVP_DigestFinal_ex(&mctx, md, &mdlen))
668 if (!EVP_SignFinal(&mctx, sig, &siglen, si->pkey))
681 EVP_MD_CTX_cleanup(&mctx);
704 EVP_MD_CTX mctx;
715 EVP_MD_CTX_init(&mctx);
723 if (EVP_DigestSignInit(&mctx, &pctx, md, NULL, si->pkey) <= 0)
737 if (EVP_DigestSignUpdate(&mctx, abuf, alen) <= 0)
739 if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0)
745 if (EVP_DigestSignFinal(&mctx, abuf, &siglen) <= 0)
755 EVP_MD_CTX_cleanup(&mctx);
764 EVP_MD_CTX_cleanup(&mctx);
771 EVP_MD_CTX mctx;
786 EVP_MD_CTX_init(&mctx);
787 if (EVP_DigestVerifyInit(&mctx, &pctx, md, NULL, si->pkey) <= 0)
794 r = EVP_DigestVerifyUpdate(&mctx, abuf, alen);
801 r = EVP_DigestVerifyFinal(&mctx,
806 EVP_MD_CTX_cleanup(&mctx);
845 EVP_MD_CTX mctx;
847 EVP_MD_CTX_init(&mctx);
862 if (!cms_DigestAlgorithm_find_ctx(&mctx, chain, si->digestAlgorithm))
871 if (EVP_DigestFinal_ex(&mctx, mval, &mlen) <= 0)
895 r = EVP_VerifyFinal(&mctx, si->signature->data,
906 EVP_MD_CTX_cleanup(&mctx);