Lines Matching refs:srcctx
350 PROV_SM2_CTX *srcctx = (PROV_SM2_CTX *)vpsm2ctx; in sm2sig_dupctx() local
353 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in sm2sig_dupctx()
357 *dstctx = *srcctx; in sm2sig_dupctx()
364 if (srcctx->ec != NULL && !EC_KEY_up_ref(srcctx->ec)) in sm2sig_dupctx()
366 dstctx->ec = srcctx->ec; in sm2sig_dupctx()
368 if (srcctx->propq != NULL) { in sm2sig_dupctx()
369 dstctx->propq = OPENSSL_strdup(srcctx->propq); in sm2sig_dupctx()
374 if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md)) in sm2sig_dupctx()
376 dstctx->md = srcctx->md; in sm2sig_dupctx()
378 if (srcctx->mdctx != NULL) { in sm2sig_dupctx()
381 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)) in sm2sig_dupctx()
385 if (srcctx->id != NULL) { in sm2sig_dupctx()
386 dstctx->id = OPENSSL_malloc(srcctx->id_len); in sm2sig_dupctx()
389 dstctx->id_len = srcctx->id_len; in sm2sig_dupctx()
390 memcpy(dstctx->id, srcctx->id, srcctx->id_len); in sm2sig_dupctx()