Lines Matching refs:ec
66 EC_KEY *ec; member
137 static int sm2sig_signature_init(void *vpsm2ctx, void *ec, in sm2sig_signature_init() argument
146 if (ec == NULL && psm2ctx->ec == NULL) { in sm2sig_signature_init()
151 if (ec != NULL) { in sm2sig_signature_init()
152 if (!EC_KEY_up_ref(ec)) in sm2sig_signature_init()
154 EC_KEY_free(psm2ctx->ec); in sm2sig_signature_init()
155 psm2ctx->ec = ec; in sm2sig_signature_init()
168 size_t ecsize = ECDSA_size(ctx->ec); in sm2sig_sign()
181 ret = ossl_sm2_internal_sign(tbs, tbslen, sig, &sltmp, ctx->ec); in sm2sig_sign()
197 return ossl_sm2_internal_verify(tbs, tbslen, sig, siglen, ctx->ec); in sm2sig_verify()
209 void *ec, const OSSL_PARAM params[]) in sm2sig_digest_signverify_init() argument
217 if (!sm2sig_signature_init(vpsm2ctx, ec, params) in sm2sig_digest_signverify_init()
238 && ossl_DER_w_algorithmIdentifier_SM2_with_MD(&pkt, -1, ctx->ec, md_nid) in sm2sig_digest_signverify_init()
270 ctx->ec) in sm2sig_compute_z_digest()
342 EC_KEY_free(ctx->ec); in sm2sig_freectx()
358 dstctx->ec = NULL; 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()