Lines Matching refs:backend
99 struct gtls_ssl_backend_data *backend = in gtls_push() local
100 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_push()
109 backend->gtls.io_result = result; in gtls_push()
111 gnutls_transport_set_errno(backend->gtls.session, in gtls_push()
122 struct gtls_ssl_backend_data *backend = in gtls_pull() local
123 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_pull()
129 if(!backend->gtls.shared_creds->trust_setup) { in gtls_pull()
130 result = Curl_gtls_client_trust_setup(cf, data, &backend->gtls); in gtls_pull()
132 gnutls_transport_set_errno(backend->gtls.session, EINVAL); in gtls_pull()
133 backend->gtls.io_result = result; in gtls_pull()
141 backend->gtls.io_result = result; in gtls_pull()
143 gnutls_transport_set_errno(backend->gtls.session, in gtls_pull()
248 struct gtls_ssl_backend_data *backend = in handshake() local
249 (struct gtls_ssl_backend_data *)connssl->backend; in handshake()
253 DEBUGASSERT(backend); in handshake()
254 session = backend->gtls.session; in handshake()
299 backend->gtls.io_result = CURLE_OK; in handshake()
302 if(!backend->gtls.shared_creds->trust_setup) { in handshake()
305 CURLcode result = Curl_gtls_client_trust_setup(cf, data, &backend->gtls); in handshake()
330 else if((rc < 0) && backend->gtls.io_result) { in handshake()
331 return backend->gtls.io_result; in handshake()
1177 struct gtls_ssl_backend_data *backend = in gtls_connect_step1() local
1178 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_connect_step1()
1182 DEBUGASSERT(backend); in gtls_connect_step1()
1199 result = Curl_gtls_ctx_init(&backend->gtls, cf, data, &connssl->peer, in gtls_connect_step1()
1209 gnutls_handshake_set_hook_function(backend->gtls.session, in gtls_connect_step1()
1214 gnutls_transport_set_ptr(backend->gtls.session, cf); in gtls_connect_step1()
1215 gnutls_transport_set_push_function(backend->gtls.session, gtls_push); in gtls_connect_step1()
1216 gnutls_transport_set_pull_function(backend->gtls.session, gtls_pull); in gtls_connect_step1()
1780 struct gtls_ssl_backend_data *backend = in gtls_send_earlydata() local
1781 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_send_earlydata()
1788 backend->gtls.io_result = CURLE_OK; in gtls_send_earlydata()
1790 n = gnutls_record_send_early_data(backend->gtls.session, buf, blen); in gtls_send_earlydata()
1797 result = backend->gtls.io_result ? in gtls_send_earlydata()
1798 backend->gtls.io_result : CURLE_SEND_ERROR; in gtls_send_earlydata()
1831 struct gtls_ssl_backend_data *backend = in gtls_connect_common() local
1832 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_connect_common()
1835 DEBUGASSERT(backend); in gtls_connect_common()
1870 result = gtls_verifyserver(cf, data, backend->gtls.session); in gtls_connect_common()
1877 rc = gnutls_alpn_get_selected_protocol(backend->gtls.session, &proto); in gtls_connect_common()
1889 if(gnutls_session_get_flags(backend->gtls.session) & in gtls_connect_common()
1967 struct gtls_ssl_backend_data *backend; in gtls_data_pending() local
1970 DEBUGASSERT(ctx && ctx->backend); in gtls_data_pending()
1971 backend = (struct gtls_ssl_backend_data *)ctx->backend; in gtls_data_pending()
1972 if(backend->gtls.session && in gtls_data_pending()
1973 0 != gnutls_record_check_pending(backend->gtls.session)) in gtls_data_pending()
1985 struct gtls_ssl_backend_data *backend = in gtls_send() local
1986 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_send()
1990 DEBUGASSERT(backend); in gtls_send()
2023 backend->gtls.io_result = CURLE_OK; in gtls_send()
2024 rc = gnutls_record_send(backend->gtls.session, buf, blen); in gtls_send()
2034 (backend->gtls.io_result ? backend->gtls.io_result : CURLE_SEND_ERROR); in gtls_send()
2060 struct gtls_ssl_backend_data *backend = in gtls_shutdown() local
2061 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_shutdown()
2067 DEBUGASSERT(backend); in gtls_shutdown()
2069 if(!backend->gtls.session || cf->shutdown || in gtls_shutdown()
2078 if(!backend->gtls.sent_shutdown) { in gtls_shutdown()
2080 backend->gtls.sent_shutdown = TRUE; in gtls_shutdown()
2082 int ret = gnutls_bye(backend->gtls.session, GNUTLS_SHUT_RDWR); in gtls_shutdown()
2085 connssl->io_need = gnutls_record_get_direction(backend->gtls.session) ? in gtls_shutdown()
2087 backend->gtls.sent_shutdown = FALSE; in gtls_shutdown()
2103 nread = gnutls_record_recv(backend->gtls.session, buf, sizeof(buf)); in gtls_shutdown()
2115 connssl->io_need = gnutls_record_get_direction(backend->gtls.session) ? in gtls_shutdown()
2133 struct gtls_ssl_backend_data *backend = in gtls_close() local
2134 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_close()
2137 DEBUGASSERT(backend); in gtls_close()
2139 if(backend->gtls.session) { in gtls_close()
2140 gnutls_deinit(backend->gtls.session); in gtls_close()
2141 backend->gtls.session = NULL; in gtls_close()
2143 if(backend->gtls.shared_creds) { in gtls_close()
2144 Curl_gtls_shared_creds_free(&backend->gtls.shared_creds); in gtls_close()
2147 if(backend->gtls.srp_client_cred) { in gtls_close()
2148 gnutls_srp_free_client_credentials(backend->gtls.srp_client_cred); in gtls_close()
2149 backend->gtls.srp_client_cred = NULL; in gtls_close()
2161 struct gtls_ssl_backend_data *backend = in gtls_recv() local
2162 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_recv()
2166 DEBUGASSERT(backend); in gtls_recv()
2183 ret = gnutls_record_recv(backend->gtls.session, buf, buffersize); in gtls_recv()
2206 *curlcode = backend->gtls.io_result ? in gtls_recv()
2207 backend->gtls.io_result : CURLE_RECV_ERROR; in gtls_recv()
2251 struct gtls_ssl_backend_data *backend = in gtls_get_internals() local
2252 (struct gtls_ssl_backend_data *)connssl->backend; in gtls_get_internals()
2254 DEBUGASSERT(backend); in gtls_get_internals()
2255 return backend->gtls.session; in gtls_get_internals()