Lines Matching refs:backend

316   struct wolfssl_ctx *backend =  in wolfssl_bio_cf_out_write()  local
317 (struct wolfssl_ctx *)connssl->backend; in wolfssl_bio_cf_out_write()
323 if(backend->shutting_down && backend->io_send_blocked_len && in wolfssl_bio_cf_out_write()
324 (backend->io_send_blocked_len < blen)) { in wolfssl_bio_cf_out_write()
329 " to %d bytes", blen, backend->io_send_blocked_len); in wolfssl_bio_cf_out_write()
330 skiplen = (ssize_t)(blen - backend->io_send_blocked_len); in wolfssl_bio_cf_out_write()
331 blen = backend->io_send_blocked_len; in wolfssl_bio_cf_out_write()
334 backend->io_result = result; in wolfssl_bio_cf_out_write()
342 if(backend->shutting_down && !backend->io_send_blocked_len) in wolfssl_bio_cf_out_write()
343 backend->io_send_blocked_len = blen; in wolfssl_bio_cf_out_write()
354 struct wolfssl_ctx *backend = in wolfssl_bio_cf_in_read() local
355 (struct wolfssl_ctx *)connssl->backend; in wolfssl_bio_cf_in_read()
366 backend->io_result = result; in wolfssl_bio_cf_in_read()
847 struct wolfssl_ctx *backend = in wolfssl_connect_step1() local
848 (struct wolfssl_ctx *)connssl->backend; in wolfssl_connect_step1()
857 DEBUGASSERT(backend); in wolfssl_connect_step1()
872 if(backend->ctx) in wolfssl_connect_step1()
873 wolfSSL_CTX_free(backend->ctx); in wolfssl_connect_step1()
875 backend->ctx = wolfSSL_CTX_new(req_method); in wolfssl_connect_step1()
876 if(!backend->ctx) { in wolfssl_connect_step1()
885 res = wolfSSL_CTX_set_min_proto_version(backend->ctx, TLS1_VERSION); in wolfssl_connect_step1()
888 res = wolfSSL_CTX_set_min_proto_version(backend->ctx, TLS1_1_VERSION); in wolfssl_connect_step1()
891 res = wolfSSL_CTX_set_min_proto_version(backend->ctx, TLS1_2_VERSION); in wolfssl_connect_step1()
895 res = wolfSSL_CTX_set_min_proto_version(backend->ctx, TLS1_3_VERSION); in wolfssl_connect_step1()
910 res = wolfSSL_CTX_set_max_proto_version(backend->ctx, TLS1_3_VERSION); in wolfssl_connect_step1()
914 res = wolfSSL_CTX_set_max_proto_version(backend->ctx, TLS1_2_VERSION); in wolfssl_connect_step1()
917 res = wolfSSL_CTX_set_max_proto_version(backend->ctx, TLS1_1_VERSION); in wolfssl_connect_step1()
920 res = wolfSSL_CTX_set_max_proto_version(backend->ctx, TLS1_VERSION); in wolfssl_connect_step1()
939 if(!SSL_CTX_set_cipher_list(backend->ctx, ciphers)) { in wolfssl_connect_step1()
973 if(!wolfSSL_CTX_set_cipher_list(backend->ctx, Curl_dyn_ptr(&c))) { in wolfssl_connect_step1()
997 if(!wolfSSL_CTX_set1_curves_list(backend->ctx, curves)) { in wolfssl_connect_step1()
1017 wolfSSL_CTX_use_certificate_chain_buffer(backend->ctx, in wolfssl_connect_step1()
1020 wolfSSL_CTX_use_certificate_chain_file(backend->ctx, cert_file); in wolfssl_connect_step1()
1024 wolfSSL_CTX_use_certificate_buffer(backend->ctx, cert_blob->data, in wolfssl_connect_step1()
1026 wolfSSL_CTX_use_certificate_file(backend->ctx, cert_file, file_type); in wolfssl_connect_step1()
1045 wolfSSL_CTX_use_PrivateKey_buffer(backend->ctx, key_blob->data, in wolfssl_connect_step1()
1047 wolfSSL_CTX_use_PrivateKey_file(backend->ctx, key_file, file_type); in wolfssl_connect_step1()
1062 rc = wolfSSL_CTX_use_certificate_chain_buffer(backend->ctx, in wolfssl_connect_step1()
1067 rc = wolfSSL_CTX_use_certificate_buffer(backend->ctx, cert_blob->data, in wolfssl_connect_step1()
1084 if(wolfSSL_CTX_use_PrivateKey_buffer(backend->ctx, key_blob->data, in wolfssl_connect_step1()
1097 wolfSSL_CTX_set_verify(backend->ctx, in wolfssl_connect_step1()
1105 if(wolfSSL_CTX_UseSNI(backend->ctx, WOLFSSL_SNI_HOST_NAME, in wolfssl_connect_step1()
1118 if(!backend->x509_store_setup) { in wolfssl_connect_step1()
1119 result = Curl_wssl_setup_x509_store(cf, data, backend); in wolfssl_connect_step1()
1123 result = (*data->set.ssl.fsslctx)(data, backend->ctx, in wolfssl_connect_step1()
1141 if(backend->handle) in wolfssl_connect_step1()
1142 wolfSSL_free(backend->handle); in wolfssl_connect_step1()
1143 backend->handle = wolfSSL_new(backend->ctx); in wolfssl_connect_step1()
1144 if(!backend->handle) { in wolfssl_connect_step1()
1151 if(wolfSSL_UseKeyShare(backend->handle, pqkem) != WOLFSSL_SUCCESS) { in wolfssl_connect_step1()
1164 wolfSSL_UseALPN(backend->handle, in wolfssl_connect_step1()
1177 wolfSSL_KeepArrays(backend->handle); in wolfssl_connect_step1()
1179 wolfSSL_set_tls13_secret_cb(backend->handle, in wolfssl_connect_step1()
1186 if(wolfSSL_UseSecureRenegotiation(backend->handle) != SSL_SUCCESS) { 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()
1198 wolfSSL_CTX_sess_set_new_cb(backend->ctx, wssl_vtls_new_session_cb); in wolfssl_connect_step1()
1220 && wolfSSL_SetEchConfigsBase64(backend->handle, b64val, b64len) in wolfssl_connect_step1()
1248 if(wolfSSL_SetEchConfigs(backend->handle, ecl, (word32) elen) != in wolfssl_connect_step1()
1269 && SSL_set_min_proto_version(backend->handle, TLS1_3_VERSION) != 1) { in wolfssl_connect_step1()
1286 wolfSSL_set_bio(backend->handle, bio, bio); in wolfssl_connect_step1()
1290 if(!wolfSSL_set_fd(backend->handle, in wolfssl_connect_step1()
1325 struct wolfssl_ctx *backend = in wolfssl_connect_step2() local
1326 (struct wolfssl_ctx *)connssl->backend; in wolfssl_connect_step2()
1336 DEBUGASSERT(backend); in wolfssl_connect_step2()
1344 if(wolfSSL_check_domain_name(backend->handle, snihost) == WOLFSSL_FAILURE) in wolfssl_connect_step2()
1348 if(!backend->x509_store_setup) { in wolfssl_connect_step2()
1352 result = Curl_wssl_setup_x509_store(cf, data, backend); in wolfssl_connect_step2()
1358 ret = wolfSSL_connect(backend->handle); in wolfssl_connect_step2()
1374 (!wolfSSL_want_read(backend->handle) && in wolfssl_connect_step2()
1375 !wolfSSL_want_write(backend->handle))) { in wolfssl_connect_step2()
1376 wolfssl_log_tls12_secret(backend->handle); in wolfssl_connect_step2()
1379 wolfSSL_FreeArrays(backend->handle); in wolfssl_connect_step2()
1385 int detail = wolfSSL_get_error(backend->handle, ret); in wolfssl_connect_step2()
1452 rv = wolfSSL_GetEchConfigs(backend->handle, echConfigs, in wolfssl_connect_step2()
1469 else if(backend->io_result == CURLE_AGAIN) { in wolfssl_connect_step2()
1490 x509 = wolfSSL_get_peer_certificate(backend->handle); in wolfssl_connect_step2()
1533 rc = wolfSSL_ALPN_GetProtocol(backend->handle, &protocol, &protocol_len); in wolfssl_connect_step2()
1551 wolfSSL_get_version(backend->handle), in wolfssl_connect_step2()
1552 wolfSSL_get_cipher_name(backend->handle)); in wolfssl_connect_step2()
1567 struct wolfssl_ctx *backend = in wolfssl_send() local
1568 (struct wolfssl_ctx *)connssl->backend; in wolfssl_send()
1572 DEBUGASSERT(backend); in wolfssl_send()
1576 rc = wolfSSL_write(backend->handle, mem, memlen); in wolfssl_send()
1578 int err = wolfSSL_get_error(backend->handle, rc); in wolfssl_send()
1588 if(backend->io_result == CURLE_AGAIN) { in wolfssl_send()
1614 struct wolfssl_ctx *wctx = (struct wolfssl_ctx *)connssl->backend; in wolfssl_shutdown()
1717 struct wolfssl_ctx *backend = in wolfssl_close() local
1718 (struct wolfssl_ctx *)connssl->backend; in wolfssl_close()
1722 DEBUGASSERT(backend); in wolfssl_close()
1724 if(backend->handle) { in wolfssl_close()
1725 wolfSSL_free(backend->handle); in wolfssl_close()
1726 backend->handle = NULL; in wolfssl_close()
1728 if(backend->ctx) { in wolfssl_close()
1729 wolfSSL_CTX_free(backend->ctx); in wolfssl_close()
1730 backend->ctx = NULL; in wolfssl_close()
1740 struct wolfssl_ctx *backend = in wolfssl_recv() local
1741 (struct wolfssl_ctx *)connssl->backend; in wolfssl_recv()
1745 DEBUGASSERT(backend); in wolfssl_recv()
1750 nread = wolfSSL_read(backend->handle, buf, buffsize); in wolfssl_recv()
1753 int err = wolfSSL_get_error(backend->handle, nread); in wolfssl_recv()
1763 if(!backend->io_result && connssl->peer_closed) { in wolfssl_recv()
1773 if(backend->io_result == CURLE_AGAIN) { in wolfssl_recv()
1778 else if(!backend->io_result && connssl->peer_closed) { in wolfssl_recv()
1836 struct wolfssl_ctx *backend; in wolfssl_data_pending() local
1839 DEBUGASSERT(ctx && ctx->backend); in wolfssl_data_pending()
1841 backend = (struct wolfssl_ctx *)ctx->backend; in wolfssl_data_pending()
1842 if(backend->handle) /* SSL is in use */ in wolfssl_data_pending()
1843 return wolfSSL_pending(backend->handle); in wolfssl_data_pending()
2005 struct wolfssl_ctx *backend = in wolfssl_get_internals() local
2006 (struct wolfssl_ctx *)connssl->backend; in wolfssl_get_internals()
2008 DEBUGASSERT(backend); in wolfssl_get_internals()
2009 return backend->handle; in wolfssl_get_internals()