Lines Matching defs:data

68 cr_data_pending(struct Curl_cfilter *cf, const struct Curl_easy *data)
73 (void)data;
81 struct Curl_easy *data;
90 ssize_t nread = Curl_conn_cf_recv(io_ctx->cf->next, io_ctx->data,
109 ssize_t nwritten = Curl_conn_cf_send(io_ctx->cf->next, io_ctx->data,
120 CURL_TRC_CFX(io_ctx->data, io_ctx->cf, "cf->next send(len=%zu) -> %zd, %d",
127 struct Curl_easy *data, CURLcode *err)
138 io_ctx.data = data;
147 failf(data, "reading from socket: %s",
158 failf(data, "rustls_connection_process_new_packets: %.*s",
182 cr_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
200 if(tls_recv_more(cf, data, err) < 0) {
217 failf(data, "rustls: peer closed TCP connection "
228 failf(data, "rustls_connection_read: %.*s", (int)errorlen, errorbuf);
259 CURL_TRC_CF(data, cf, "cf_recv(len=%zu) -> %zd, %d",
275 cr_send(struct Curl_cfilter *cf, struct Curl_easy *data,
294 CURL_TRC_CF(data, cf, "cf_send: %ld plain bytes", plainlen);
297 io_ctx.data = data;
304 failf(data, "rustls_connection_write: %.*s", (int)errorlen, errorbuf);
309 failf(data, "rustls_connection_write: EOF");
319 CURL_TRC_CF(data, cf, "cf_send: EAGAIN after %zu bytes",
326 failf(data, "writing to socket: %s",
332 failf(data, "EOF in swrite");
336 CURL_TRC_CF(data, cf, "cf_send: wrote %zu TLS bytes", tlswritten);
369 cr_init_backend(struct Curl_cfilter *cf, struct Curl_easy *data,
397 alpn[i].data = (const uint8_t *)connssl->alpn->entries[i];
403 infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
421 result = rustls_root_cert_store_add_pem(roots, ca_info_blob->data,
424 failf(data, "rustls: failed to parse trusted certificates from blob");
434 failf(data, "rustls: failed to load trusted certificates");
444 failf(data, "rustls: failed to load trusted certificates");
462 failf(data, "rustls_client_connection_new: %.*s", (int)errorlen, errorbuf);
471 cr_set_negotiated_alpn(struct Curl_cfilter *cf, struct Curl_easy *data,
478 Curl_alpn_set_negotiated(cf, data, protocol, len);
492 struct Curl_easy *data,
497 curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
514 result = cr_init_backend(cf, data,
524 /* Read/write data until the handshake is done or the socket would block. */
531 infof(data, "Done handshaking");
532 /* Done with the handshake. Set up callbacks to send/receive data. */
535 cr_set_negotiated_alpn(cf, data, rconn);
548 timeout_ms = Curl_timeleft(data, NULL, TRUE);
552 failf(data, "rustls: operation timed out before socket check");
562 failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
566 failf(data, "rustls connection timeout after %"
571 infof(data, "Curl_socket_check: %s would block",
580 infof(data, "rustls_connection wants us to write_tls.");
581 cr_send(cf, data, NULL, 0, &tmperr);
583 infof(data, "writing would block");
592 infof(data, "rustls_connection wants us to read_tls.");
594 if(tls_recv_more(cf, data, &tmperr) < 0) {
596 infof(data, "reading would block");
616 struct Curl_easy *data, bool *done)
618 return cr_connect_common(cf, data, false, done);
623 struct Curl_easy *data UNUSED_PARAM)
626 return cr_connect_common(cf, data, true, &done);
630 struct Curl_easy *data,
634 curl_socket_t sock = Curl_conn_cf_get_socket(cf->next, data);
640 (void)data;
645 Curl_pollset_add_out(data, ps, sock);
648 Curl_pollset_add_in(data, ps, sock);
664 cr_close(struct Curl_cfilter *cf, struct Curl_easy *data)
676 n = cr_send(cf, data, NULL, 0, &tmperr);
678 failf(data, "rustls: error sending close_notify: %d", tmperr);
693 return msnprintf(buffer, size, "%.*s", (int)ver.len, ver.data);
726 cr_recv, /* recv decrypted data */
727 cr_send, /* send data to encrypt */