Lines Matching refs:dstctx
351 PROV_SM2_CTX *dstctx; in sm2sig_dupctx() local
353 dstctx = OPENSSL_zalloc(sizeof(*srcctx)); in sm2sig_dupctx()
354 if (dstctx == NULL) in sm2sig_dupctx()
357 *dstctx = *srcctx; in sm2sig_dupctx()
358 dstctx->ec = NULL; in sm2sig_dupctx()
359 dstctx->propq = NULL; in sm2sig_dupctx()
360 dstctx->md = NULL; in sm2sig_dupctx()
361 dstctx->mdctx = NULL; in sm2sig_dupctx()
362 dstctx->id = NULL; in sm2sig_dupctx()
366 dstctx->ec = srcctx->ec; in sm2sig_dupctx()
369 dstctx->propq = OPENSSL_strdup(srcctx->propq); in sm2sig_dupctx()
370 if (dstctx->propq == NULL) in sm2sig_dupctx()
376 dstctx->md = srcctx->md; 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()
386 dstctx->id = OPENSSL_malloc(srcctx->id_len); in sm2sig_dupctx()
387 if (dstctx->id == NULL) 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()
393 return dstctx; in sm2sig_dupctx()
395 sm2sig_freectx(dstctx); in sm2sig_dupctx()