Lines Matching refs:ctx_ecdh
31 #define ECDHCTX(_c, _ins) _c->u.ctx_ecdh->MBEDTLS_PRIVATE(ctx).\
35 #define ECDHCTX(_c, _ins) _c->u.ctx_ecdh->_ins
118 if (mbedtls_ecdh_get_params(ctx->u.ctx_ecdh, &kp, in lws_genec_keypair_import()
164 ctx->u.ctx_ecdh = lws_zalloc(sizeof(*ctx->u.ctx_ecdh), "genecdh"); in lws_genecdh_create()
165 if (!ctx->u.ctx_ecdh) in lws_genecdh_create()
168 mbedtls_ecdh_init(ctx->u.ctx_ecdh); in lws_genecdh_create()
218 if (ctx->u.ctx_ecdh) { in lws_genec_destroy()
219 mbedtls_ecdh_free(ctx->u.ctx_ecdh); in lws_genec_destroy()
220 lws_free(ctx->u.ctx_ecdh); in lws_genec_destroy()
221 ctx->u.ctx_ecdh = NULL; in lws_genec_destroy()
269 n = mbedtls_ecdh_get_params(ctx->u.ctx_ecdh, kp, in lws_genecdh_new_keypair()
315 lws_free_set_NULL(ctx->u.ctx_ecdh); in lws_genecdh_new_keypair()
527 n = mbedtls_ecdh_calc_secret(ctx->u.ctx_ecdh, &st, ss, (size_t)*ss_len, in lws_genecdh_compute_shared_secret()