Lines Matching refs:backend
536 struct bearssl_ssl_backend_data *backend = in bearssl_connect_step1() local
537 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_connect_step1()
550 DEBUGASSERT(backend); in bearssl_connect_step1()
561 ret = load_cafile(&source, &backend->anchors, &backend->anchors_len); in bearssl_connect_step1()
575 ret = load_cafile(&source, &backend->anchors, &backend->anchors_len); in bearssl_connect_step1()
585 br_ssl_client_init_full(&backend->ctx, &backend->x509.minimal, in bearssl_connect_step1()
586 backend->anchors, backend->anchors_len); in bearssl_connect_step1()
588 ret = bearssl_set_ssl_version_min_max(data, &backend->ctx.eng, conn_config); in bearssl_connect_step1()
592 br_ssl_engine_set_buffer(&backend->ctx.eng, backend->buf, in bearssl_connect_step1()
593 sizeof(backend->buf), 1); in bearssl_connect_step1()
599 ret = bearssl_set_selected_ciphers(data, &backend->ctx.eng, in bearssl_connect_step1()
606 backend->x509.vtable = &x509_vtable; in bearssl_connect_step1()
607 backend->x509.verifypeer = verifypeer; in bearssl_connect_step1()
608 backend->x509.verifyhost = verifyhost; in bearssl_connect_step1()
609 br_ssl_engine_set_x509(&backend->ctx.eng, &backend->x509.vtable); in bearssl_connect_step1()
621 br_ssl_engine_set_session_parameters(&backend->ctx.eng, session); in bearssl_connect_step1()
633 backend->protocols[i] = connssl->alpn->entries[i]; in bearssl_connect_step1()
635 br_ssl_engine_set_protocol_names(&backend->ctx.eng, backend->protocols, in bearssl_connect_step1()
661 ret = (*data->set.ssl.fsslctx)(data, &backend->ctx, in bearssl_connect_step1()
670 if(!br_ssl_client_reset(&backend->ctx, hostname, session_set)) in bearssl_connect_step1()
672 backend->active = TRUE; in bearssl_connect_step1()
684 struct bearssl_ssl_backend_data *backend = in bearssl_run_until() local
685 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_run_until()
693 DEBUGASSERT(backend); in bearssl_run_until()
697 state = br_ssl_engine_current_state(&backend->ctx.eng); in bearssl_run_until()
699 err = br_ssl_engine_last_error(&backend->ctx.eng); in bearssl_run_until()
731 buf = br_ssl_engine_sendrec_buf(&backend->ctx.eng, &len); in bearssl_run_until()
740 br_ssl_engine_sendrec_ack(&backend->ctx.eng, ret); in bearssl_run_until()
743 buf = br_ssl_engine_recvrec_buf(&backend->ctx.eng, &len); in bearssl_run_until()
755 br_ssl_engine_recvrec_ack(&backend->ctx.eng, ret); in bearssl_run_until()
764 struct bearssl_ssl_backend_data *backend = in bearssl_connect_step2() local
765 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_connect_step2()
770 DEBUGASSERT(backend); in bearssl_connect_step2()
780 if(br_ssl_engine_current_state(&backend->ctx.eng) == BR_SSL_CLOSED) { in bearssl_connect_step2()
786 tver = br_ssl_engine_get_version(&backend->ctx.eng); in bearssl_connect_step2()
798 br_ssl_engine_get_session_parameters(&backend->ctx.eng, &session); in bearssl_connect_step2()
817 struct bearssl_ssl_backend_data *backend = in bearssl_connect_step3() local
818 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_connect_step3()
823 DEBUGASSERT(backend); in bearssl_connect_step3()
829 proto = br_ssl_engine_get_selected_protocol(&backend->ctx.eng); in bearssl_connect_step3()
840 br_ssl_engine_get_session_parameters(&backend->ctx.eng, session); in bearssl_connect_step3()
859 struct bearssl_ssl_backend_data *backend = in bearssl_send() local
860 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_send()
864 DEBUGASSERT(backend); in bearssl_send()
870 app = br_ssl_engine_sendapp_buf(&backend->ctx.eng, &applen); in bearssl_send()
876 if(backend->pending_write) { in bearssl_send()
877 applen = backend->pending_write; in bearssl_send()
878 backend->pending_write = 0; in bearssl_send()
884 br_ssl_engine_sendapp_ack(&backend->ctx.eng, applen); in bearssl_send()
885 br_ssl_engine_flush(&backend->ctx.eng, 0); in bearssl_send()
886 backend->pending_write = applen; in bearssl_send()
894 struct bearssl_ssl_backend_data *backend = in bearssl_recv() local
895 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_recv()
899 DEBUGASSERT(backend); in bearssl_recv()
904 app = br_ssl_engine_recvapp_buf(&backend->ctx.eng, &applen); in bearssl_recv()
910 br_ssl_engine_recvapp_ack(&backend->ctx.eng, applen); in bearssl_recv()
1020 struct bearssl_ssl_backend_data *backend; in bearssl_data_pending() local
1023 DEBUGASSERT(ctx && ctx->backend); in bearssl_data_pending()
1024 backend = (struct bearssl_ssl_backend_data *)ctx->backend; in bearssl_data_pending()
1025 return br_ssl_engine_current_state(&backend->ctx.eng) & BR_SSL_RECVAPP; in bearssl_data_pending()
1073 struct bearssl_ssl_backend_data *backend = in bearssl_get_internals() local
1074 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_get_internals()
1075 DEBUGASSERT(backend); in bearssl_get_internals()
1076 return &backend->ctx; in bearssl_get_internals()
1084 struct bearssl_ssl_backend_data *backend = in bearssl_shutdown() local
1085 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_shutdown()
1088 DEBUGASSERT(backend); in bearssl_shutdown()
1089 if(!backend->active || cf->shutdown) { in bearssl_shutdown()
1095 if(!backend->sent_shutdown) { in bearssl_shutdown()
1097 br_ssl_engine_close(&backend->ctx.eng); in bearssl_shutdown()
1098 backend->sent_shutdown = TRUE; in bearssl_shutdown()
1119 struct bearssl_ssl_backend_data *backend = in bearssl_close() local
1120 (struct bearssl_ssl_backend_data *)connssl->backend; in bearssl_close()
1124 DEBUGASSERT(backend); in bearssl_close()
1126 backend->active = FALSE; in bearssl_close()
1127 if(backend->anchors) { in bearssl_close()
1128 for(i = 0; i < backend->anchors_len; ++i) in bearssl_close()
1129 free(backend->anchors[i].dn.data); in bearssl_close()
1130 Curl_safefree(backend->anchors); in bearssl_close()