Lines Matching refs:cf

272   struct Curl_cfilter *cf = wolfSSL_BIO_get_data(bio);  in wolfssl_bio_cf_ctrl()  local
275 (void)cf; in wolfssl_bio_cf_ctrl()
302 return (!cf->next || !cf->next->connected); in wolfssl_bio_cf_ctrl()
314 struct Curl_cfilter *cf = wolfSSL_BIO_get_data(bio); in wolfssl_bio_cf_out_write() local
315 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_bio_cf_out_write()
318 struct Curl_easy *data = CF_DATA_CURRENT(cf); in wolfssl_bio_cf_out_write()
328 CURL_TRC_CF(data, cf, "bio_write, shutdown restrict send of %d" in wolfssl_bio_cf_out_write()
333 nwritten = Curl_conn_cf_send(cf->next, data, buf, blen, FALSE, &result); in wolfssl_bio_cf_out_write()
335 CURL_TRC_CF(data, cf, "bio_write(len=%d) -> %zd, %d", in wolfssl_bio_cf_out_write()
352 struct Curl_cfilter *cf = wolfSSL_BIO_get_data(bio); in wolfssl_bio_cf_in_read() local
353 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_bio_cf_in_read()
356 struct Curl_easy *data = CF_DATA_CURRENT(cf); in wolfssl_bio_cf_in_read()
365 nread = Curl_conn_cf_recv(cf->next, data, buf, blen, &result); in wolfssl_bio_cf_in_read()
367 CURL_TRC_CF(data, cf, "bio_read(len=%d) -> %zd, %d", blen, nread, result); in wolfssl_bio_cf_in_read()
409 CURLcode wssl_cache_session(struct Curl_cfilter *cf, in wssl_cache_session() argument
423 CURL_TRC_CF(data, cf, "fail to assess session length: %u", slen); in wssl_cache_session()
435 CURL_TRC_CF(data, cf, "fail to serialize session: %u", slen); in wssl_cache_session()
441 result = Curl_ssl_set_sessionid(cf, data, peer, NULL, in wssl_cache_session()
447 CURL_TRC_CF(data, cf, "added new session to cache"); in wssl_cache_session()
458 struct Curl_cfilter *cf; in wssl_vtls_new_session_cb() local
460 cf = (struct Curl_cfilter*)wolfSSL_get_app_data(ssl); in wssl_vtls_new_session_cb()
461 DEBUGASSERT(cf != NULL); in wssl_vtls_new_session_cb()
462 if(cf && session) { in wssl_vtls_new_session_cb()
463 struct ssl_connect_data *connssl = cf->ctx; in wssl_vtls_new_session_cb()
464 struct Curl_easy *data = CF_DATA_CURRENT(cf); in wssl_vtls_new_session_cb()
468 (void)wssl_cache_session(cf, data, &connssl->peer, session); in wssl_vtls_new_session_cb()
474 CURLcode wssl_setup_session(struct Curl_cfilter *cf, in wssl_setup_session() argument
485 if(!Curl_ssl_getsessionid(cf, data, peer, &psdata, &slen, NULL)) { in wssl_setup_session()
508 static CURLcode populate_x509_store(struct Curl_cfilter *cf, in populate_x509_store() argument
513 struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); in populate_x509_store()
519 struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data); in populate_x509_store()
559 CURL_TRC_CF(data, cf, "populate_x509_store, path=%s, blob=%d", in populate_x509_store()
638 cached_x509_store_different(struct Curl_cfilter *cf, in cached_x509_store_different() argument
641 struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); in cached_x509_store_different()
648 static WOLFSSL_X509_STORE *get_cached_x509_store(struct Curl_cfilter *cf, in get_cached_x509_store() argument
661 !cached_x509_store_different(cf, share)) { in get_cached_x509_store()
668 static void set_cached_x509_store(struct Curl_cfilter *cf, in set_cached_x509_store() argument
672 struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); in set_cached_x509_store()
718 CURLcode Curl_wssl_setup_x509_store(struct Curl_cfilter *cf, in Curl_wssl_setup_x509_store() argument
722 struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); in Curl_wssl_setup_x509_store()
723 struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data); in Curl_wssl_setup_x509_store()
738 cached_store = cache_criteria_met ? get_cached_x509_store(cf, data) : NULL; in Curl_wssl_setup_x509_store()
755 result = populate_x509_store(cf, data, store, wssl); in Curl_wssl_setup_x509_store()
757 set_cached_x509_store(cf, data, store); in Curl_wssl_setup_x509_store()
763 result = populate_x509_store(cf, data, store, wssl); in Curl_wssl_setup_x509_store()
842 wolfssl_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data) in wolfssl_connect_step1() argument
846 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_connect_step1()
849 struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); in wolfssl_connect_step1()
850 const struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data); in wolfssl_connect_step1()
1119 result = Curl_wssl_setup_x509_store(cf, data, backend); in wolfssl_connect_step1()
1195 (void)wssl_setup_session(cf, data, backend, &connssl->peer); in wolfssl_connect_step1()
1197 wolfSSL_set_app_data(backend->handle, cf); in wolfssl_connect_step1()
1285 wolfSSL_BIO_set_data(bio, cf); in wolfssl_connect_step1()
1291 (int)Curl_conn_cf_get_socket(cf, data))) { in wolfssl_connect_step1()
1321 wolfssl_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data) in wolfssl_connect_step2() argument
1324 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_connect_step2()
1327 struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); in wolfssl_connect_step2()
1329 const char * const pinnedpubkey = Curl_ssl_cf_is_proxy(cf) ? in wolfssl_connect_step2()
1352 result = Curl_wssl_setup_x509_store(cf, data, backend); in wolfssl_connect_step2()
1536 Curl_alpn_set_negotiated(cf, data, connssl, in wolfssl_connect_step2()
1540 Curl_alpn_set_negotiated(cf, data, connssl, NULL, 0); in wolfssl_connect_step2()
1560 static ssize_t wolfssl_send(struct Curl_cfilter *cf, in wolfssl_send() argument
1566 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_send()
1584 CURL_TRC_CF(data, cf, "wolfssl_send(len=%zu) -> AGAIN", len); in wolfssl_send()
1589 CURL_TRC_CF(data, cf, "wolfssl_send(len=%zu) -> AGAIN", len); in wolfssl_send()
1593 CURL_TRC_CF(data, cf, "wolfssl_send(len=%zu) -> %d, %d", len, rc, err); in wolfssl_send()
1605 CURL_TRC_CF(data, cf, "wolfssl_send(len=%zu) -> %d", len, rc); in wolfssl_send()
1609 static CURLcode wolfssl_shutdown(struct Curl_cfilter *cf, in wolfssl_shutdown() argument
1613 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_shutdown()
1623 if(!wctx->handle || cf->shutdown) { in wolfssl_shutdown()
1637 CURL_TRC_CF(data, cf, "wolfSSL_read, nread=%d, err=%d", nread, err); in wolfssl_shutdown()
1642 CURL_TRC_CF(data, cf, "SSL shutdown received, not sending"); in wolfssl_shutdown()
1646 else if(!cf->next->cft->is_alive(cf->next, data, &input_pending)) { in wolfssl_shutdown()
1650 CURL_TRC_CF(data, cf, "peer closed connection"); in wolfssl_shutdown()
1663 CURL_TRC_CF(data, cf, "SSL shutdown finished"); in wolfssl_shutdown()
1668 CURL_TRC_CF(data, cf, "SSL shutdown still wants to send"); in wolfssl_shutdown()
1685 CURL_TRC_CF(data, cf, "SSL shutdown received"); in wolfssl_shutdown()
1692 CURL_TRC_CF(data, cf, "SSL shutdown sent, want receive"); in wolfssl_shutdown()
1696 CURL_TRC_CF(data, cf, "SSL shutdown send blocked"); in wolfssl_shutdown()
1701 CURL_TRC_CF(data, cf, "SSL shutdown, error: '%s'(%d)", in wolfssl_shutdown()
1710 cf->shutdown = (result || *done); in wolfssl_shutdown()
1714 static void wolfssl_close(struct Curl_cfilter *cf, struct Curl_easy *data) in wolfssl_close() argument
1716 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_close()
1734 static ssize_t wolfssl_recv(struct Curl_cfilter *cf, in wolfssl_recv() argument
1739 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_recv()
1757 CURL_TRC_CF(data, cf, "wolfssl_recv(len=%zu) -> CLOSED", blen); in wolfssl_recv()
1764 CURL_TRC_CF(data, cf, "wolfssl_recv(len=%zu) -> CLOSED", blen); in wolfssl_recv()
1769 CURL_TRC_CF(data, cf, "wolfssl_recv(len=%zu) -> AGAIN", blen); in wolfssl_recv()
1774 CURL_TRC_CF(data, cf, "wolfssl_recv(len=%zu) -> AGAIN", blen); in wolfssl_recv()
1779 CURL_TRC_CF(data, cf, "wolfssl_recv(len=%zu) -> CLOSED", blen); in wolfssl_recv()
1794 CURL_TRC_CF(data, cf, "wolfssl_recv(len=%zu) -> %d", blen, nread); in wolfssl_recv()
1832 static bool wolfssl_data_pending(struct Curl_cfilter *cf, in wolfssl_data_pending() argument
1835 struct ssl_connect_data *ctx = cf->ctx; in wolfssl_data_pending()
1849 wolfssl_connect_common(struct Curl_cfilter *cf, in wolfssl_connect_common() argument
1855 struct ssl_connect_data *connssl = cf->ctx; in wolfssl_connect_common()
1856 curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data); in wolfssl_connect_common()
1874 result = wolfssl_connect_step1(cf, data); in wolfssl_connect_common()
1924 result = wolfssl_connect_step2(cf, data); in wolfssl_connect_common()
1949 static CURLcode wolfssl_connect_nonblocking(struct Curl_cfilter *cf, in wolfssl_connect_nonblocking() argument
1953 return wolfssl_connect_common(cf, data, TRUE, done); in wolfssl_connect_nonblocking()
1957 static CURLcode wolfssl_connect(struct Curl_cfilter *cf, in wolfssl_connect() argument
1963 result = wolfssl_connect_common(cf, data, FALSE, &done); in wolfssl_connect()