Lines Matching refs:inf
91 lws_tls_jit_inflight_t *inf; in lws_tls_jit_trust_sort_kids() local
197 inf = lws_container_of(d, lws_tls_jit_inflight_t, list); in lws_tls_jit_trust_sort_kids()
199 if (!strcmp((const char *)&inf[1], host)) in lws_tls_jit_trust_sort_kids()
209 inf = lws_zalloc(sizeof(*inf) + hl + 1, __func__); in lws_tls_jit_trust_sort_kids()
210 if (!inf) in lws_tls_jit_trust_sort_kids()
213 memcpy(&inf[1], host, hl + 1); in lws_tls_jit_trust_sort_kids()
214 inf->refcount = (char)ch->count; in lws_tls_jit_trust_sort_kids()
215 lws_dll2_add_tail(&inf->list, &wsi->a.context->jit_inflight); in lws_tls_jit_trust_sort_kids()
227 (void *)inf); in lws_tls_jit_trust_sort_kids()
243 lws_tls_jit_inflight_t *inf; in lws_tls_jit_trust_vhost_bind() local
290 inf = lws_zalloc(sizeof(*inf) + size + 1, __func__); in lws_tls_jit_trust_vhost_bind()
291 if (!inf) in lws_tls_jit_trust_vhost_bind()
294 memcpy(&inf[1], address, size + 1); in lws_tls_jit_trust_vhost_bind()
295 inf->refcount = (char)jci.count_skids; in lws_tls_jit_trust_vhost_bind()
296 lws_dll2_add_tail(&inf->list, &cx->jit_inflight); in lws_tls_jit_trust_vhost_bind()
308 (void *)inf); in lws_tls_jit_trust_vhost_bind()
326 lws_tls_jit_trust_inflight_destroy(lws_tls_jit_inflight_t *inf) in lws_tls_jit_trust_inflight_destroy() argument
330 for (n = 0; n < inf->ders; n++) in lws_tls_jit_trust_inflight_destroy()
331 lws_free_set_NULL(inf->der[n]); in lws_tls_jit_trust_inflight_destroy()
332 lws_dll2_remove(&inf->list); in lws_tls_jit_trust_inflight_destroy()
334 lws_free(inf); in lws_tls_jit_trust_inflight_destroy()
340 lws_tls_jit_inflight_t *inf; in inflight_destroy() local
342 inf = lws_container_of(d, lws_tls_jit_inflight_t, list); in inflight_destroy()
344 lws_tls_jit_trust_inflight_destroy(inf); in inflight_destroy()
420 lws_tls_jit_inflight_t *inf = (lws_tls_jit_inflight_t *)got_opaque; in lws_tls_jit_trust_got_cert_cb() local
439 if (i == inf) { in lws_tls_jit_trust_got_cert_cb()
450 inf->refcount--; in lws_tls_jit_trust_got_cert_cb()
453 inf->tag ^= *((uint32_t *)skid); in lws_tls_jit_trust_got_cert_cb()
455 if (der && inf->ders < (int)LWS_ARRAY_SIZE(inf->der) && inf->refcount) { in lws_tls_jit_trust_got_cert_cb()
461 inf->kid[inf->ders].kid_len = (uint8_t)((skid_len > in lws_tls_jit_trust_got_cert_cb()
462 (uint8_t)sizeof(inf->kid[inf->ders].kid)) ? in lws_tls_jit_trust_got_cert_cb()
463 sizeof(inf->kid[inf->ders].kid) : skid_len); in lws_tls_jit_trust_got_cert_cb()
464 memcpy(inf->kid[inf->ders].kid, skid, in lws_tls_jit_trust_got_cert_cb()
465 inf->kid[inf->ders].kid_len); in lws_tls_jit_trust_got_cert_cb()
467 inf->der[inf->ders] = lws_malloc(der_len, __func__); in lws_tls_jit_trust_got_cert_cb()
468 if (!inf->der[inf->ders]) in lws_tls_jit_trust_got_cert_cb()
470 memcpy(inf->der[inf->ders], der, der_len); in lws_tls_jit_trust_got_cert_cb()
471 inf->der_len[inf->ders] = (short)der_len; in lws_tls_jit_trust_got_cert_cb()
472 inf->ders++; in lws_tls_jit_trust_got_cert_cb()
487 if (inf->refcount && inf->ders < (int)LWS_ARRAY_SIZE(inf->der)) in lws_tls_jit_trust_got_cert_cb()
490 if (!der && !inf->ders) { in lws_tls_jit_trust_got_cert_cb()
496 tag_to_vh_name(vhtag, sizeof(vhtag), inf->tag); in lws_tls_jit_trust_got_cert_cb()
517 jci.xor_tag = inf->tag; in lws_tls_jit_trust_got_cert_cb()
521 for (n = 0; n < (int)LWS_ARRAY_SIZE(inf->der); n++) in lws_tls_jit_trust_got_cert_cb()
522 if (inf->kid[n].kid_len) in lws_tls_jit_trust_got_cert_cb()
524 &inf->kid[n]); in lws_tls_jit_trust_got_cert_cb()
527 if (skid_len > sizeof(inf->kid[0].kid)) in lws_tls_jit_trust_got_cert_cb()
528 skid_len = sizeof(inf->kid[0].kid); in lws_tls_jit_trust_got_cert_cb()
534 (const char *)&inf[1], vhtag); in lws_tls_jit_trust_got_cert_cb()
536 if (lws_cache_write_through(cx->trust_cache, (const char *)&inf[1], in lws_tls_jit_trust_got_cert_cb()
577 info.client_ssl_ca_mem = inf->der[0]; in lws_tls_jit_trust_got_cert_cb()
578 info.client_ssl_ca_mem_len = (unsigned int)inf->der_len[0]; in lws_tls_jit_trust_got_cert_cb()
600 while (n < inf->ders) { in lws_tls_jit_trust_got_cert_cb()
603 lws_tls_jit_trust_cert_info(inf->der[n], in lws_tls_jit_trust_got_cert_cb()
604 (size_t)inf->der_len[n]); in lws_tls_jit_trust_got_cert_cb()
607 if (lws_tls_client_vhost_extra_cert_mem(v, inf->der[n], in lws_tls_jit_trust_got_cert_cb()
608 (size_t)inf->der_len[n])) in lws_tls_jit_trust_got_cert_cb()
614 (const char *)&inf[1], vhtag); in lws_tls_jit_trust_got_cert_cb()
617 lws_tls_jit_trust_inflight_destroy(inf); in lws_tls_jit_trust_got_cert_cb()