Lines Matching refs:mdctx

84     EVP_MD_CTX *mdctx;  member
202 EVP_MD_CTX_free(ctx->mdctx); in free_md()
204 ctx->mdctx = NULL; in free_md()
221 if (ctx->mdctx == NULL) { in sm2sig_digest_signverify_init()
222 ctx->mdctx = EVP_MD_CTX_new(); in sm2sig_digest_signverify_init()
223 if (ctx->mdctx == NULL) in sm2sig_digest_signverify_init()
247 if (!EVP_DigestInit_ex2(ctx->mdctx, ctx->md, params)) in sm2sig_digest_signverify_init()
271 || !EVP_DigestUpdate(ctx->mdctx, z, ctx->mdsize)) in sm2sig_compute_z_digest()
284 if (psm2ctx == NULL || psm2ctx->mdctx == NULL) in sm2sig_digest_signverify_update()
288 && EVP_DigestUpdate(psm2ctx->mdctx, data, datalen); in sm2sig_digest_signverify_update()
298 if (psm2ctx == NULL || psm2ctx->mdctx == NULL) in sm2sig_digest_sign_final()
307 && EVP_DigestFinal_ex(psm2ctx->mdctx, digest, &dlen))) in sm2sig_digest_sign_final()
323 if (psm2ctx == NULL || psm2ctx->mdctx == NULL) in sm2sig_digest_verify_final()
331 && EVP_DigestFinal_ex(psm2ctx->mdctx, digest, &dlen))) in sm2sig_digest_verify_final()
361 dstctx->mdctx = NULL; in sm2sig_dupctx()
378 if (srcctx->mdctx != NULL) { in sm2sig_dupctx()
379 dstctx->mdctx = EVP_MD_CTX_new(); in sm2sig_dupctx()
380 if (dstctx->mdctx == NULL in sm2sig_dupctx()
381 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)) in sm2sig_dupctx()
514 if (psm2ctx->mdctx == NULL) in sm2sig_get_ctx_md_params()
517 return EVP_MD_CTX_get_params(psm2ctx->mdctx, params); in sm2sig_get_ctx_md_params()
534 if (psm2ctx->mdctx == NULL) in sm2sig_set_ctx_md_params()
537 return EVP_MD_CTX_set_params(psm2ctx->mdctx, params); in sm2sig_set_ctx_md_params()