Lines Matching refs:data
101 nblob->data = (char *)nblob + sizeof(struct curl_blob); in Curl_setblobopt()
102 memcpy(nblob->data, blob->data, blob->len); in Curl_setblobopt()
213 static CURLcode httpauth(struct Curl_easy *data, bool proxy, in httpauth() argument
223 data->state.authproxy.iestyle = iestyle; in httpauth()
225 data->state.authhost.iestyle = iestyle; in httpauth()
252 data->set.proxyauth = auth; in httpauth()
254 data->set.httpauth = auth; in httpauth()
258 static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, in setopt_long() argument
270 data->set.dns_cache_timeout = (int)arg; in setopt_long()
273 if(Curl_ssl_supports(data, SSLSUPP_CA_CACHE)) { in setopt_long()
279 data->set.general_ssl.ca_cache_timeout = (int)arg; in setopt_long()
291 data->set.maxconnects = (unsigned int)uarg; in setopt_long()
298 data->set.reuse_forbid = enabled; in setopt_long()
305 data->set.reuse_fresh = enabled; in setopt_long()
312 data->set.verbose = enabled; in setopt_long()
318 data->set.include_header = enabled; in setopt_long()
324 data->set.hide_progress = enabled; in setopt_long()
325 if(data->set.hide_progress) in setopt_long()
326 data->progress.flags |= PGRS_HIDE; in setopt_long()
328 data->progress.flags &= ~PGRS_HIDE; in setopt_long()
334 data->set.opt_no_body = enabled; in setopt_long()
336 if(data->set.opt_no_body) in setopt_long()
338 data->set.method = HTTPREQ_HEAD; in setopt_long()
339 else if(data->set.method == HTTPREQ_HEAD) in setopt_long()
340 data->set.method = HTTPREQ_GET; in setopt_long()
348 data->set.http_fail_on_error = enabled; in setopt_long()
351 data->set.http_keep_sending_on_error = enabled; in setopt_long()
361 data->set.method = HTTPREQ_PUT; in setopt_long()
362 data->set.opt_no_body = FALSE; /* this is implied */ in setopt_long()
367 data->set.method = HTTPREQ_GET; in setopt_long()
374 data->set.get_filetime = enabled; in setopt_long()
382 data->set.server_response_timeout = (unsigned int)arg * 1000; in setopt_long()
392 data->set.server_response_timeout = (unsigned int)arg; in setopt_long()
402 data->set.tftp_no_options = enabled; in setopt_long()
412 data->set.tftp_blksize = arg; in setopt_long()
422 data->set.use_netrc = (unsigned char)arg; in setopt_long()
432 data->set.prefer_ascii = enabled; in setopt_long()
441 data->set.timecondition = (unsigned char)(curl_TimeCond)arg; in setopt_long()
448 data->set.timevalue = (time_t)arg; in setopt_long()
461 struct ssl_primary_config *primary = &data->set.ssl.primary; in setopt_long()
464 primary = &data->set.proxy_ssl.primary; in setopt_long()
492 if(data->set.postfieldsize < arg && in setopt_long()
493 data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { in setopt_long()
495 Curl_safefree(data->set.str[STRING_COPYPOSTFIELDS]); in setopt_long()
496 data->set.postfields = NULL; in setopt_long()
499 data->set.postfieldsize = arg; in setopt_long()
510 data->set.cookiesession = enabled; in setopt_long()
517 data->set.http_auto_referer = enabled; in setopt_long()
521 data->set.http_transfer_encoding = enabled; in setopt_long()
528 data->set.http_follow_location = enabled; in setopt_long()
536 data->set.allow_auth_to_other_hosts = enabled; in setopt_long()
546 data->set.maxredirs = arg; in setopt_long()
563 data->set.keep_post = arg & CURL_REDIR_POST_ALL; in setopt_long()
571 data->set.method = HTTPREQ_POST; in setopt_long()
572 data->set.opt_no_body = FALSE; /* this is implied */ in setopt_long()
575 data->set.method = HTTPREQ_GET; in setopt_long()
581 data->set.sep_headers = !!(arg & CURLHEADER_SEPARATE); in setopt_long()
584 return httpauth(data, FALSE, uarg); in setopt_long()
591 data->set.method = HTTPREQ_GET; in setopt_long()
592 data->set.opt_no_body = FALSE; /* this is implied */ in setopt_long()
633 data->set.httpwant = (unsigned char)arg; in setopt_long()
643 data->set.expect_100_timeout = arg; in setopt_long()
652 data->set.http09_allowed = enabled; in setopt_long()
659 data->set.mime_formescape = !!(arg & CURLMIMEOPT_FORMESCAPE); in setopt_long()
667 data->set.tunnel_thru_httpproxy = enabled; in setopt_long()
676 data->set.proxyport = (unsigned short)arg; in setopt_long()
680 return httpauth(data, TRUE, uarg); in setopt_long()
688 data->set.proxytype = (unsigned char)(curl_proxytype)arg; in setopt_long()
698 data->set.proxy_transfer_mode = (bool)uarg; in setopt_long()
701 if(data->set.socks5auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI)) in setopt_long()
703 data->set.socks5auth = (unsigned char)uarg; in setopt_long()
709 data->set.haproxyprotocol = enabled; in setopt_long()
715 data->set.proxy_ssl.primary.verifypeer = enabled; in setopt_long()
718 Curl_ssl_conn_config_update(data, TRUE); in setopt_long()
724 data->set.proxy_ssl.primary.verifyhost = enabled; in setopt_long()
727 Curl_ssl_conn_config_update(data, TRUE); in setopt_long()
736 data->set.socks5_gssapi_nec = enabled; in setopt_long()
745 data->set.list_only = enabled; in setopt_long()
753 data->set.remote_append = enabled; in setopt_long()
763 data->set.ftp_filemethod = (unsigned char)arg; in setopt_long()
766 data->set.ftp_use_eprt = enabled; in setopt_long()
770 data->set.ftp_use_epsv = enabled; in setopt_long()
774 data->set.ftp_use_pret = enabled; in setopt_long()
780 data->set.ftp_ccc = (unsigned char)arg; in setopt_long()
788 data->set.ftp_skip_ip = enabled; in setopt_long()
797 data->set.ftpsslauth = (unsigned char)(curl_ftpauth)arg; in setopt_long()
805 data->set.accepttimeout = (unsigned int)uarg; in setopt_long()
808 data->set.wildcard_enabled = enabled; in setopt_long()
820 data->set.ftp_create_missing_dirs = (unsigned char)arg; in setopt_long()
830 data->set.filesize = arg; in setopt_long()
839 data->set.low_speed_limit = arg; in setopt_long()
848 data->set.low_speed_time = arg; in setopt_long()
856 data->set.use_port = (unsigned short)arg; in setopt_long()
864 data->set.timeout = (unsigned int)arg * 1000; in setopt_long()
872 data->set.timeout = (unsigned int)uarg; in setopt_long()
880 data->set.connecttimeout = (unsigned int)arg * 1000; in setopt_long()
888 data->set.connecttimeout = (unsigned int)uarg; in setopt_long()
897 data->set.set_resume_from = arg; in setopt_long()
904 data->set.crlf = enabled; in setopt_long()
914 data->set.localport = curlx_sltous(arg); in setopt_long()
922 data->set.localportrange = curlx_sltous(arg); in setopt_long()
930 data->set.gssapi_delegation = (unsigned char)uarg& in setopt_long()
937 data->set.ssl.primary.verifypeer = enabled; in setopt_long()
940 Curl_ssl_conn_config_update(data, FALSE); in setopt_long()
947 data->set.doh_verifypeer = enabled; in setopt_long()
953 data->set.doh_verifyhost = enabled; in setopt_long()
962 data->set.doh_verifystatus = enabled; in setopt_long()
973 data->set.ssl.primary.verifyhost = enabled; in setopt_long()
976 Curl_ssl_conn_config_update(data, FALSE); in setopt_long()
985 data->set.ssl.primary.verifystatus = enabled; in setopt_long()
988 Curl_ssl_conn_config_update(data, FALSE); in setopt_long()
994 if(!Curl_ssl_false_start(data)) in setopt_long()
997 data->set.ssl.falsestart = enabled; in setopt_long()
1001 if(Curl_ssl_supports(data, SSLSUPP_CERTINFO)) in setopt_long()
1002 data->set.ssl.certinfo = enabled; in setopt_long()
1019 data->set.buffer_size = (unsigned int)arg; in setopt_long()
1032 data->set.upload_buffer_size = (unsigned int)arg; in setopt_long()
1040 data->set.no_signal = enabled; in setopt_long()
1048 data->set.max_filesize = arg; in setopt_long()
1058 data->set.use_ssl = (unsigned char)arg; in setopt_long()
1061 data->set.ssl.primary.ssl_options = (unsigned char)(arg & 0xff); in setopt_long()
1062 data->set.ssl.enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST); in setopt_long()
1063 data->set.ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); in setopt_long()
1064 data->set.ssl.no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN); in setopt_long()
1065 data->set.ssl.revoke_best_effort = !!(arg & CURLSSLOPT_REVOKE_BEST_EFFORT); in setopt_long()
1066 data->set.ssl.native_ca_store = !!(arg & CURLSSLOPT_NATIVE_CA); in setopt_long()
1067 data->set.ssl.auto_client_cert = !!(arg & CURLSSLOPT_AUTO_CLIENT_CERT); in setopt_long()
1068 data->set.ssl.earlydata = !!(arg & CURLSSLOPT_EARLYDATA); in setopt_long()
1075 data->set.proxy_ssl.primary.ssl_options = (unsigned char)(arg & 0xff); in setopt_long()
1076 data->set.proxy_ssl.enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST); in setopt_long()
1077 data->set.proxy_ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); in setopt_long()
1078 data->set.proxy_ssl.no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN); in setopt_long()
1079 data->set.proxy_ssl.revoke_best_effort = in setopt_long()
1081 data->set.proxy_ssl.native_ca_store = !!(arg & CURLSSLOPT_NATIVE_CA); in setopt_long()
1082 data->set.proxy_ssl.auto_client_cert = in setopt_long()
1091 data->set.ipver = (unsigned char) arg; in setopt_long()
1098 data->set.tcp_nodelay = enabled; in setopt_long()
1102 data->set.ignorecl = enabled; in setopt_long()
1113 data->set.connect_only = (unsigned char)arg; in setopt_long()
1117 data->set.ssl.primary.cache_session = enabled; in setopt_long()
1119 data->set.proxy_ssl.primary.cache_session = in setopt_long()
1120 data->set.ssl.primary.cache_session; in setopt_long()
1127 data->set.ssh_auth_types = (int)arg; in setopt_long()
1130 data->set.ssh_compression = enabled; in setopt_long()
1139 data->set.http_te_skip = !enabled; /* reversed */ in setopt_long()
1149 data->set.http_ce_skip = !enabled; /* reversed */ in setopt_long()
1159 data->set.new_file_perms = (unsigned int)arg; in setopt_long()
1169 data->set.new_directory_perms = (unsigned int)arg; in setopt_long()
1183 data->set.scope_id = (unsigned int)uarg; in setopt_long()
1191 data->set.allowed_protocols = (curl_prot_t)arg; in setopt_long()
1198 data->set.redir_protocols = (curl_prot_t)arg; in setopt_long()
1204 data->set.mail_rcpt_allowfails = enabled; in setopt_long()
1209 data->set.sasl_ir = enabled; in setopt_long()
1267 data->set.rtspreq = rtspreq; in setopt_long()
1276 data->state.rtsp_next_client_CSeq = arg; in setopt_long()
1281 data->state.rtsp_next_server_CSeq = arg; in setopt_long()
1287 data->set.tcp_keepalive = enabled; in setopt_long()
1294 data->set.tcp_keepidle = (int)arg; in setopt_long()
1301 data->set.tcp_keepintvl = (int)arg; in setopt_long()
1308 data->set.tcp_keepcnt = (int)arg; in setopt_long()
1313 data->set.tcp_fastopen = enabled; in setopt_long()
1321 data->set.ssl_enable_alpn = enabled; in setopt_long()
1324 data->set.path_as_is = enabled; in setopt_long()
1327 data->set.pipewait = enabled; in setopt_long()
1332 data->set.priority.weight = (int)arg; in setopt_long()
1338 data->set.suppress_connect_headers = enabled; in setopt_long()
1343 data->set.happy_eyeballs_timeout = (unsigned int)uarg; in setopt_long()
1347 data->set.dns_shuffle_addresses = enabled; in setopt_long()
1351 data->set.disallow_username_in_url = enabled; in setopt_long()
1357 data->set.upkeep_interval_ms = arg; in setopt_long()
1362 data->set.maxage_conn = arg; in setopt_long()
1367 data->set.maxlifetime_conn = arg; in setopt_long()
1372 if(!data->hsts) { in setopt_long()
1373 data->hsts = Curl_hsts_init(); in setopt_long()
1374 if(!data->hsts) in setopt_long()
1379 Curl_hsts_cleanup(&data->hsts); in setopt_long()
1385 DEBUGF(infof(data, "bad CURLOPT_ALTSVC_CTRL input")); in setopt_long()
1388 if(!data->asi) { in setopt_long()
1389 data->asi = Curl_altsvc_init(); in setopt_long()
1390 if(!data->asi) in setopt_long()
1393 return Curl_altsvc_ctrl(data->asi, arg); in setopt_long()
1397 data->set.ws_raw_mode = (bool)(arg & CURLWS_RAW_MODE); in setopt_long()
1401 data->set.quick_exit = enabled; in setopt_long()
1410 Curl_safefree(data->set.str[STRING_SSL_ENGINE]); in setopt_long()
1411 return Curl_ssl_set_engine_default(data); in setopt_long()
1420 static CURLcode setopt_slist(struct Curl_easy *data, CURLoption option, in setopt_slist() argument
1437 data->set.proxyheaders = slist; in setopt_slist()
1445 data->set.http200aliases = slist; in setopt_slist()
1453 data->set.postquote = slist; in setopt_slist()
1459 data->set.prequote = slist; in setopt_slist()
1465 data->set.quote = slist; in setopt_slist()
1482 data->set.resolve = slist; in setopt_slist()
1483 data->state.resolve = data->set.resolve; in setopt_slist()
1490 data->set.headers = slist; in setopt_slist()
1498 data->set.telnet_options = slist; in setopt_slist()
1504 data->set.mail_rcpt = slist; in setopt_slist()
1508 data->set.connect_to = slist; in setopt_slist()
1517 static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option, in setopt_pointers() argument
1528 data->set.httppost = va_arg(param, struct curl_httppost *); in setopt_pointers()
1529 data->set.method = HTTPREQ_POST_FORM; in setopt_pointers()
1530 data->set.opt_no_body = FALSE; /* this is implied */ in setopt_pointers()
1531 Curl_mime_cleanpart(data->state.formp); in setopt_pointers()
1532 Curl_safefree(data->state.formp); in setopt_pointers()
1533 data->state.mimepost = NULL; in setopt_pointers()
1544 result = Curl_mime_set_subparts(&data->set.mimepost, in setopt_pointers()
1548 data->set.method = HTTPREQ_POST_MIME; in setopt_pointers()
1549 data->set.opt_no_body = FALSE; /* this is implied */ in setopt_pointers()
1551 Curl_mime_cleanpart(data->state.formp); in setopt_pointers()
1552 Curl_safefree(data->state.formp); in setopt_pointers()
1553 data->state.mimepost = NULL; in setopt_pointers()
1564 data->set.err = va_arg(param, FILE *); in setopt_pointers()
1565 if(!data->set.err) in setopt_pointers()
1566 data->set.err = stderr; in setopt_pointers()
1573 if(data->share) { in setopt_pointers()
1574 Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); in setopt_pointers()
1576 if(data->dns.hostcachetype == HCACHE_SHARED) { in setopt_pointers()
1577 data->dns.hostcache = NULL; in setopt_pointers()
1578 data->dns.hostcachetype = HCACHE_NONE; in setopt_pointers()
1582 if(data->share->cookies == data->cookies) in setopt_pointers()
1583 data->cookies = NULL; in setopt_pointers()
1587 if(data->share->hsts == data->hsts) in setopt_pointers()
1588 data->hsts = NULL; in setopt_pointers()
1591 if(data->share->sslsession == data->state.session) in setopt_pointers()
1592 data->state.session = NULL; in setopt_pointers()
1595 if(data->psl == &data->share->psl) in setopt_pointers()
1596 data->psl = data->multi ? &data->multi->psl : NULL; in setopt_pointers()
1599 data->share->dirty--; in setopt_pointers()
1601 Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); in setopt_pointers()
1602 data->share = NULL; in setopt_pointers()
1607 data->share = set; in setopt_pointers()
1608 if(data->share) { in setopt_pointers()
1610 Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); in setopt_pointers()
1612 data->share->dirty++; in setopt_pointers()
1614 if(data->share->specifier & (1 << CURL_LOCK_DATA_DNS)) { in setopt_pointers()
1616 data->dns.hostcache = &data->share->hostcache; in setopt_pointers()
1617 data->dns.hostcachetype = HCACHE_SHARED; in setopt_pointers()
1620 if(data->share->cookies) { in setopt_pointers()
1622 Curl_cookie_cleanup(data->cookies); in setopt_pointers()
1624 data->cookies = data->share->cookies; in setopt_pointers()
1628 if(data->share->hsts) { in setopt_pointers()
1630 Curl_hsts_cleanup(&data->hsts); in setopt_pointers()
1631 data->hsts = data->share->hsts; in setopt_pointers()
1635 if(data->share->sslsession) { in setopt_pointers()
1636 data->set.general_ssl.max_ssl_sessions = data->share->max_ssl_sessions; in setopt_pointers()
1637 data->state.session = data->share->sslsession; in setopt_pointers()
1641 if(data->share->specifier & (1 << CURL_LOCK_DATA_PSL)) in setopt_pointers()
1642 data->psl = &data->share->psl; in setopt_pointers()
1645 Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); in setopt_pointers()
1657 return Curl_data_priority_add_child(dep, data, in setopt_pointers()
1669 static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, in setopt_cptr() argument
1675 if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST)) in setopt_cptr()
1677 return Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST], ptr); in setopt_cptr()
1682 if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST)) { in setopt_cptr()
1684 return Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_PROXY], in setopt_cptr()
1692 if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES)) { in setopt_cptr()
1694 return Curl_setstropt(&data->set.str[STRING_SSL_CIPHER13_LIST], ptr); in setopt_cptr()
1701 if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES)) in setopt_cptr()
1703 return Curl_setstropt(&data->set.str[STRING_SSL_CIPHER13_LIST_PROXY], in setopt_cptr()
1714 return Curl_setstropt(&data->set.str[STRING_TARGET], ptr); in setopt_cptr()
1720 return Curl_setstropt(&data->set.str[STRING_NETRC_FILE], ptr); in setopt_cptr()
1730 if(!ptr || data->set.postfieldsize == -1) in setopt_cptr()
1731 result = Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], ptr); in setopt_cptr()
1733 if(data->set.postfieldsize < 0) in setopt_cptr()
1739 else if(data->set.postfieldsize > SIZE_T_MAX) in setopt_cptr()
1748 char *p = Curl_memdup0(ptr, (size_t)data->set.postfieldsize); in setopt_cptr()
1752 free(data->set.str[STRING_COPYPOSTFIELDS]); in setopt_cptr()
1753 data->set.str[STRING_COPYPOSTFIELDS] = p; in setopt_cptr()
1758 data->set.postfields = data->set.str[STRING_COPYPOSTFIELDS]; in setopt_cptr()
1759 data->set.method = HTTPREQ_POST; in setopt_cptr()
1766 data->set.postfields = ptr; in setopt_cptr()
1768 Curl_safefree(data->set.str[STRING_COPYPOSTFIELDS]); in setopt_cptr()
1769 data->set.method = HTTPREQ_POST; in setopt_cptr()
1786 return Curl_setstropt(&data->set.str[STRING_ENCODING], all); in setopt_cptr()
1788 return Curl_setstropt(&data->set.str[STRING_ENCODING], ptr); in setopt_cptr()
1796 result = Curl_setstropt(&data->set.str[STRING_AWS_SIGV4], ptr); in setopt_cptr()
1800 if(data->set.str[STRING_AWS_SIGV4]) in setopt_cptr()
1801 data->set.httpauth = CURLAUTH_AWS_SIGV4; in setopt_cptr()
1808 if(data->state.referer_alloc) { in setopt_cptr()
1809 Curl_safefree(data->state.referer); in setopt_cptr()
1810 data->state.referer_alloc = FALSE; in setopt_cptr()
1812 result = Curl_setstropt(&data->set.str[STRING_SET_REFERER], ptr); in setopt_cptr()
1813 data->state.referer = data->set.str[STRING_SET_REFERER]; in setopt_cptr()
1820 return Curl_setstropt(&data->set.str[STRING_USERAGENT], ptr); in setopt_cptr()
1827 return Curl_setstropt(&data->set.str[STRING_COOKIE], ptr); in setopt_cptr()
1840 cl = curl_slist_append(data->state.cookielist, ptr); in setopt_cptr()
1842 curl_slist_free_all(data->state.cookielist); in setopt_cptr()
1843 data->state.cookielist = NULL; in setopt_cptr()
1846 data->state.cookielist = cl; /* store the list for later use */ in setopt_cptr()
1850 curl_slist_free_all(data->state.cookielist); in setopt_cptr()
1851 data->state.cookielist = NULL; in setopt_cptr()
1853 if(!data->share || !data->share->cookies) { in setopt_cptr()
1856 Curl_cookie_clearall(data->cookies); in setopt_cptr()
1857 Curl_cookie_cleanup(data->cookies); in setopt_cptr()
1860 data->cookies = NULL; in setopt_cptr()
1868 result = Curl_setstropt(&data->set.str[STRING_COOKIEJAR], ptr); in setopt_cptr()
1875 Curl_cookie_init(data, NULL, data->cookies, data->set.cookiesession); in setopt_cptr()
1878 data->cookies = newcookies; in setopt_cptr()
1888 Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); in setopt_cptr()
1889 Curl_cookie_clearall(data->cookies); in setopt_cptr()
1890 Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); in setopt_cptr()
1894 Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); in setopt_cptr()
1895 Curl_cookie_clearsess(data->cookies); in setopt_cptr()
1896 Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); in setopt_cptr()
1900 Curl_flush_cookies(data, FALSE); in setopt_cptr()
1904 Curl_cookie_loadfiles(data); in setopt_cptr()
1908 if(!data->cookies) { in setopt_cptr()
1910 data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE); in setopt_cptr()
1911 if(!data->cookies) in setopt_cptr()
1919 Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); in setopt_cptr()
1922 Curl_cookie_add(data, data->cookies, TRUE, FALSE, ptr + 11, NULL, in setopt_cptr()
1926 Curl_cookie_add(data, data->cookies, FALSE, FALSE, ptr, NULL, in setopt_cptr()
1928 Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); in setopt_cptr()
1939 return Curl_setstropt(&data->set.str[STRING_CUSTOMREQUEST], ptr); in setopt_cptr()
1958 return Curl_setstropt(&data->set.str[STRING_PROXY], ptr); in setopt_cptr()
1968 return Curl_setstropt(&data->set.str[STRING_PRE_PROXY], ptr); in setopt_cptr()
1977 return Curl_setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME], ptr); in setopt_cptr()
1983 return Curl_setstropt(&data->set.str[STRING_SERVICE_NAME], ptr); in setopt_cptr()
1990 data->set.writeheader = (void *)ptr; in setopt_cptr()
1997 data->set.in_set = (void *)ptr; in setopt_cptr()
2004 data->set.out = (void *)ptr; in setopt_cptr()
2011 data->set.debugdata = (void *)ptr; in setopt_cptr()
2017 data->set.progress_client = (void *)ptr; in setopt_cptr()
2023 data->set.seek_client = (void *)ptr; in setopt_cptr()
2029 data->set.ioctl_client = (void *)ptr; in setopt_cptr()
2036 if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) in setopt_cptr()
2037 data->set.ssl.fsslctxp = (void *)ptr; in setopt_cptr()
2046 data->set.sockopt_client = (void *)ptr; in setopt_cptr()
2052 data->set.opensocket_client = (void *)ptr; in setopt_cptr()
2058 data->set.resolver_start_client = (void *)ptr; in setopt_cptr()
2064 data->set.closesocket_client = (void *)ptr; in setopt_cptr()
2068 data->set.trailer_data = (void *)ptr; in setopt_cptr()
2072 data->set.prereq_userp = (void *)ptr; in setopt_cptr()
2080 data->set.errorbuffer = ptr; in setopt_cptr()
2088 result = Curl_setstropt(&data->set.str[STRING_FTPPORT], ptr); in setopt_cptr()
2089 data->set.ftp_use_port = !!(data->set.str[STRING_FTPPORT]); in setopt_cptr()
2093 return Curl_setstropt(&data->set.str[STRING_FTP_ACCOUNT], ptr); in setopt_cptr()
2096 return Curl_setstropt(&data->set.str[STRING_FTP_ALTERNATIVE_TO_USER], ptr); in setopt_cptr()
2103 result = Curl_setstropt(&data->set.str[STRING_KRB_LEVEL], ptr); in setopt_cptr()
2104 data->set.krb = !!(data->set.str[STRING_KRB_LEVEL]); in setopt_cptr()
2112 if(data->state.url_alloc) { in setopt_cptr()
2114 Curl_safefree(data->state.url); in setopt_cptr()
2115 data->state.url_alloc = FALSE; in setopt_cptr()
2117 result = Curl_setstropt(&data->set.str[STRING_SET_URL], ptr); in setopt_cptr()
2118 data->state.url = data->set.str[STRING_SET_URL]; in setopt_cptr()
2125 return setstropt_userpwd(ptr, &data->set.str[STRING_USERNAME], in setopt_cptr()
2126 &data->set.str[STRING_PASSWORD]); in setopt_cptr()
2132 return Curl_setstropt(&data->set.str[STRING_USERNAME], ptr); in setopt_cptr()
2138 return Curl_setstropt(&data->set.str[STRING_PASSWORD], ptr); in setopt_cptr()
2144 return Curl_setstropt(&data->set.str[STRING_OPTIONS], ptr); in setopt_cptr()
2150 return Curl_setstropt(&data->set.str[STRING_BEARER], ptr); in setopt_cptr()
2163 result = Curl_urldecode(u, 0, &data->set.str[STRING_PROXYUSERNAME], NULL, in setopt_cptr()
2166 result = Curl_urldecode(p, 0, &data->set.str[STRING_PROXYPASSWORD], NULL, in setopt_cptr()
2176 return Curl_setstropt(&data->set.str[STRING_PROXYUSERNAME], ptr); in setopt_cptr()
2182 return Curl_setstropt(&data->set.str[STRING_PROXYPASSWORD], ptr); in setopt_cptr()
2188 return Curl_setstropt(&data->set.str[STRING_NOPROXY], ptr); in setopt_cptr()
2195 return Curl_setstropt(&data->set.str[STRING_SET_RANGE], ptr); in setopt_cptr()
2202 data->set.uh = (CURLU *)ptr; in setopt_cptr()
2208 return Curl_setstropt(&data->set.str[STRING_CERT], ptr); in setopt_cptr()
2215 return Curl_setstropt(&data->set.str[STRING_CERT_PROXY], ptr); in setopt_cptr()
2222 return Curl_setstropt(&data->set.str[STRING_CERT_TYPE], ptr); in setopt_cptr()
2229 return Curl_setstropt(&data->set.str[STRING_CERT_TYPE_PROXY], ptr); in setopt_cptr()
2235 return Curl_setstropt(&data->set.str[STRING_KEY], ptr); in setopt_cptr()
2242 return Curl_setstropt(&data->set.str[STRING_KEY_PROXY], ptr); in setopt_cptr()
2249 return Curl_setstropt(&data->set.str[STRING_KEY_TYPE], ptr); in setopt_cptr()
2256 return Curl_setstropt(&data->set.str[STRING_KEY_TYPE_PROXY], ptr); in setopt_cptr()
2263 return Curl_setstropt(&data->set.str[STRING_KEY_PASSWD], ptr); in setopt_cptr()
2270 return Curl_setstropt(&data->set.str[STRING_KEY_PASSWD_PROXY], ptr); in setopt_cptr()
2277 result = Curl_setstropt(&data->set.str[STRING_SSL_ENGINE], ptr); in setopt_cptr()
2279 result = Curl_ssl_set_engine(data, ptr); in setopt_cptr()
2289 result = Curl_setstropt(&data->set.str[STRING_HAPROXY_CLIENT_IP], ptr); in setopt_cptr()
2291 data->set.haproxyprotocol = TRUE; in setopt_cptr()
2300 &data->set.str[STRING_DEVICE], in setopt_cptr()
2301 &data->set.str[STRING_INTERFACE], in setopt_cptr()
2302 &data->set.str[STRING_BINDHOST]); in setopt_cptr()
2310 if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY)) in setopt_cptr()
2311 return Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY], ptr); in setopt_cptr()
2322 if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY)) in setopt_cptr()
2323 return Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY], in setopt_cptr()
2332 return Curl_setstropt(&data->set.str[STRING_SSL_CAFILE], ptr); in setopt_cptr()
2340 return Curl_setstropt(&data->set.str[STRING_SSL_CAFILE_PROXY], ptr); in setopt_cptr()
2349 if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) in setopt_cptr()
2351 return Curl_setstropt(&data->set.str[STRING_SSL_CAPATH], ptr); in setopt_cptr()
2361 if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) in setopt_cptr()
2363 return Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY], ptr); in setopt_cptr()
2372 return Curl_setstropt(&data->set.str[STRING_SSL_CRLFILE], ptr); in setopt_cptr()
2380 return Curl_setstropt(&data->set.str[STRING_SSL_CRLFILE_PROXY], ptr); in setopt_cptr()
2387 return Curl_setstropt(&data->set.str[STRING_SSL_ISSUERCERT], ptr); in setopt_cptr()
2395 return Curl_setstropt(&data->set.str[STRING_SSL_ISSUERCERT_PROXY], ptr); in setopt_cptr()
2403 data->set.private_data = (void *)ptr; in setopt_cptr()
2412 return Curl_setstropt(&data->set.str[STRING_SSL_EC_CURVES], ptr); in setopt_cptr()
2419 return Curl_setstropt(&data->set.str[STRING_SSH_PUBLIC_KEY], ptr); in setopt_cptr()
2425 return Curl_setstropt(&data->set.str[STRING_SSH_PRIVATE_KEY], ptr); in setopt_cptr()
2432 return Curl_setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5], ptr); in setopt_cptr()
2438 return Curl_setstropt(&data->set.str[STRING_SSH_KNOWNHOSTS], ptr); in setopt_cptr()
2444 data->set.ssh_keyfunc_userp = (void *)ptr; in setopt_cptr()
2452 return Curl_setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_SHA256], in setopt_cptr()
2459 data->set.ssh_hostkeyfunc_userp = (void *)ptr; in setopt_cptr()
2465 return protocol2num(ptr, &data->set.allowed_protocols); in setopt_cptr()
2467 data->set.allowed_protocols = (curl_prot_t) CURLPROTO_ALL; in setopt_cptr()
2472 return protocol2num(ptr, &data->set.redir_protocols); in setopt_cptr()
2474 data->set.redir_protocols = (curl_prot_t) CURLPROTO_REDIR; in setopt_cptr()
2479 return Curl_setstropt(&data->set.str[STRING_DEFAULT_PROTOCOL], ptr); in setopt_cptr()
2484 return Curl_setstropt(&data->set.str[STRING_MAIL_FROM], ptr); in setopt_cptr()
2488 return Curl_setstropt(&data->set.str[STRING_MAIL_AUTH], ptr); in setopt_cptr()
2493 return Curl_setstropt(&data->set.str[STRING_SASL_AUTHZID], ptr); in setopt_cptr()
2501 return Curl_setstropt(&data->set.str[STRING_RTSP_SESSION_ID], ptr); in setopt_cptr()
2508 return Curl_setstropt(&data->set.str[STRING_RTSP_STREAM_URI], ptr); in setopt_cptr()
2515 return Curl_setstropt(&data->set.str[STRING_RTSP_TRANSPORT], ptr); in setopt_cptr()
2518 data->set.rtp_out = (void *)ptr; in setopt_cptr()
2523 data->set.wildcardptr = (void *)ptr; in setopt_cptr()
2526 data->set.fnmatch_data = (void *)ptr; in setopt_cptr()
2531 return Curl_setstropt(&data->set.str[STRING_TLSAUTH_USERNAME], ptr); in setopt_cptr()
2535 return Curl_setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_PROXY], ptr); in setopt_cptr()
2539 return Curl_setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD], ptr); in setopt_cptr()
2543 return Curl_setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_PROXY], ptr); in setopt_cptr()
2558 result = Curl_setstropt(&data->set.str[STRING_DNS_SERVERS], ptr); in setopt_cptr()
2561 return Curl_set_dns_servers(data, data->set.str[STRING_DNS_SERVERS]); in setopt_cptr()
2564 result = Curl_setstropt(&data->set.str[STRING_DNS_INTERFACE], ptr); in setopt_cptr()
2567 return Curl_set_dns_interface(data, data->set.str[STRING_DNS_INTERFACE]); in setopt_cptr()
2570 result = Curl_setstropt(&data->set.str[STRING_DNS_LOCAL_IP4], ptr); in setopt_cptr()
2573 return Curl_set_dns_local_ip4(data, data->set.str[STRING_DNS_LOCAL_IP4]); in setopt_cptr()
2576 result = Curl_setstropt(&data->set.str[STRING_DNS_LOCAL_IP6], ptr); in setopt_cptr()
2579 return Curl_set_dns_local_ip6(data, data->set.str[STRING_DNS_LOCAL_IP6]); in setopt_cptr()
2584 data->set.abstract_unix_socket = FALSE; in setopt_cptr()
2585 return Curl_setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], ptr); in setopt_cptr()
2588 data->set.abstract_unix_socket = TRUE; in setopt_cptr()
2589 return Curl_setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], ptr); in setopt_cptr()
2595 result = Curl_setstropt(&data->set.str[STRING_DOH], ptr); in setopt_cptr()
2596 data->set.doh = !!(data->set.str[STRING_DOH]); in setopt_cptr()
2601 data->set.hsts_read_userp = (void *)ptr; in setopt_cptr()
2604 data->set.hsts_write_userp = (void *)ptr; in setopt_cptr()
2608 if(!data->hsts) { in setopt_cptr()
2609 data->hsts = Curl_hsts_init(); in setopt_cptr()
2610 if(!data->hsts) in setopt_cptr()
2614 result = Curl_setstropt(&data->set.str[STRING_HSTS], ptr); in setopt_cptr()
2620 h = curl_slist_append(data->state.hstslist, ptr); in setopt_cptr()
2622 curl_slist_free_all(data->state.hstslist); in setopt_cptr()
2623 data->state.hstslist = NULL; in setopt_cptr()
2626 data->state.hstslist = h; /* store the list for later use */ in setopt_cptr()
2630 curl_slist_free_all(data->state.hstslist); in setopt_cptr()
2631 data->state.hstslist = NULL; in setopt_cptr()
2632 if(!data->share || !data->share->hsts) in setopt_cptr()
2634 Curl_hsts_cleanup(&data->hsts); in setopt_cptr()
2641 if(!data->asi) { in setopt_cptr()
2642 data->asi = Curl_altsvc_init(); in setopt_cptr()
2643 if(!data->asi) in setopt_cptr()
2646 result = Curl_setstropt(&data->set.str[STRING_ALTSVC], ptr); in setopt_cptr()
2650 (void)Curl_altsvc_load(data->asi, ptr); in setopt_cptr()
2658 data->set.tls_ech = CURLECH_DISABLE; in setopt_cptr()
2663 data->set.tls_ech = CURLECH_DISABLE; in setopt_cptr()
2668 data->set.tls_ech = CURLECH_DISABLE | in setopt_cptr()
2669 (data->set.tls_ech & CURLECH_CLA_CFG); in setopt_cptr()
2671 data->set.tls_ech = CURLECH_GREASE | in setopt_cptr()
2672 (data->set.tls_ech & CURLECH_CLA_CFG); in setopt_cptr()
2674 data->set.tls_ech = CURLECH_ENABLE | in setopt_cptr()
2675 (data->set.tls_ech & CURLECH_CLA_CFG); in setopt_cptr()
2677 data->set.tls_ech = CURLECH_HARD | in setopt_cptr()
2678 (data->set.tls_ech & CURLECH_CLA_CFG); in setopt_cptr()
2680 result = Curl_setstropt(&data->set.str[STRING_ECH_CONFIG], ptr + 4); in setopt_cptr()
2683 data->set.tls_ech |= CURLECH_CLA_CFG; in setopt_cptr()
2686 result = Curl_setstropt(&data->set.str[STRING_ECH_PUBLIC], ptr + 3); in setopt_cptr()
2699 static CURLcode setopt_func(struct Curl_easy *data, CURLoption option, in setopt_func() argument
2707 data->set.fprogress = va_arg(param, curl_progress_callback); in setopt_func()
2708 if(data->set.fprogress) in setopt_func()
2709 data->progress.callback = TRUE; /* no longer internal */ in setopt_func()
2711 data->progress.callback = FALSE; /* NULL enforces internal */ in setopt_func()
2718 data->set.fxferinfo = va_arg(param, curl_xferinfo_callback); in setopt_func()
2719 if(data->set.fxferinfo) in setopt_func()
2720 data->progress.callback = TRUE; /* no longer internal */ in setopt_func()
2722 data->progress.callback = FALSE; /* NULL enforces internal */ in setopt_func()
2729 data->set.fdebug = va_arg(param, curl_debug_callback); in setopt_func()
2738 data->set.fwrite_header = va_arg(param, curl_write_callback); in setopt_func()
2744 data->set.fwrite_func = va_arg(param, curl_write_callback); in setopt_func()
2745 if(!data->set.fwrite_func) in setopt_func()
2747 data->set.fwrite_func = (curl_write_callback)fwrite; in setopt_func()
2753 data->set.fread_func_set = va_arg(param, curl_read_callback); in setopt_func()
2754 if(!data->set.fread_func_set) { in setopt_func()
2755 data->set.is_fread_set = 0; in setopt_func()
2757 data->set.fread_func_set = (curl_read_callback)fread; in setopt_func()
2760 data->set.is_fread_set = 1; in setopt_func()
2766 data->set.seek_func = va_arg(param, curl_seek_callback); in setopt_func()
2772 data->set.ioctl_func = va_arg(param, curl_ioctl_callback); in setopt_func()
2779 if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) in setopt_func()
2780 data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback); in setopt_func()
2790 data->set.fsockopt = va_arg(param, curl_sockopt_callback); in setopt_func()
2798 data->set.fopensocket = va_arg(param, curl_opensocket_callback); in setopt_func()
2806 data->set.fclosesocket = va_arg(param, curl_closesocket_callback); in setopt_func()
2814 data->set.resolver_start = va_arg(param, curl_resolver_start_callback); in setopt_func()
2822 data->set.ssh_hostkeyfunc = va_arg(param, curl_sshhostkeycallback); in setopt_func()
2829 data->set.ssh_keyfunc = va_arg(param, curl_sshkeycallback); in setopt_func()
2837 data->set.fwrite_rtp = va_arg(param, curl_write_callback); in setopt_func()
2842 data->set.chunk_bgn = va_arg(param, curl_chunk_bgn_callback); in setopt_func()
2845 data->set.chunk_end = va_arg(param, curl_chunk_end_callback); in setopt_func()
2848 data->set.fnmatch = va_arg(param, curl_fnmatch_callback); in setopt_func()
2853 data->set.trailer_callback = va_arg(param, curl_trailer_callback); in setopt_func()
2858 data->set.hsts_read = va_arg(param, curl_hstsread_callback); in setopt_func()
2861 data->set.hsts_write = va_arg(param, curl_hstswrite_callback); in setopt_func()
2865 data->set.fprereq = va_arg(param, curl_prereq_callback); in setopt_func()
2873 static CURLcode setopt_offt(struct Curl_easy *data, CURLoption option, in setopt_offt() argument
2882 data->set.timevalue = (time_t)offt; in setopt_offt()
2894 if(data->set.postfieldsize < offt && in setopt_offt()
2895 data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { in setopt_offt()
2897 Curl_safefree(data->set.str[STRING_COPYPOSTFIELDS]); in setopt_offt()
2898 data->set.postfields = NULL; in setopt_offt()
2900 data->set.postfieldsize = offt; in setopt_offt()
2909 data->set.filesize = offt; in setopt_offt()
2918 data->set.max_send_speed = offt; in setopt_offt()
2927 data->set.max_recv_speed = offt; in setopt_offt()
2935 data->set.set_resume_from = offt; in setopt_offt()
2943 data->set.max_filesize = offt; in setopt_offt()
2952 static CURLcode setopt_blob(struct Curl_easy *data, CURLoption option, in setopt_blob() argument
2960 return Curl_setblobopt(&data->set.blobs[BLOB_CERT], blob); in setopt_blob()
2966 return Curl_setblobopt(&data->set.blobs[BLOB_CERT_PROXY], blob); in setopt_blob()
2971 return Curl_setblobopt(&data->set.blobs[BLOB_KEY_PROXY], blob); in setopt_blob()
2978 if(Curl_ssl_supports(data, SSLSUPP_CAINFO_BLOB)) in setopt_blob()
2979 return Curl_setblobopt(&data->set.blobs[BLOB_CAINFO_PROXY], blob); in setopt_blob()
2986 return Curl_setblobopt(&data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY], in setopt_blob()
2993 return Curl_setblobopt(&data->set.blobs[BLOB_KEY], blob); in setopt_blob()
3000 if(Curl_ssl_supports(data, SSLSUPP_CAINFO_BLOB)) in setopt_blob()
3001 return Curl_setblobopt(&data->set.blobs[BLOB_CAINFO], blob); in setopt_blob()
3008 return Curl_setblobopt(&data->set.blobs[BLOB_SSL_ISSUERCERT], blob); in setopt_blob()
3020 CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) in Curl_vsetopt() argument
3023 return setopt_long(data, option, va_arg(param, long)); in Curl_vsetopt()
3038 return setopt_slist(data, option, va_arg(param, struct curl_slist *)); in Curl_vsetopt()
3045 return setopt_pointers(data, option, param); in Curl_vsetopt()
3050 return setopt_cptr(data, option, va_arg(param, char *)); in Curl_vsetopt()
3053 return setopt_func(data, option, param); in Curl_vsetopt()
3055 return setopt_offt(data, option, va_arg(param, curl_off_t)); in Curl_vsetopt()
3056 return setopt_blob(data, option, va_arg(param, struct curl_blob *)); in Curl_vsetopt()
3072 struct Curl_easy *data = d; in curl_easy_setopt() local
3074 if(!data) in curl_easy_setopt()
3079 result = Curl_vsetopt(data, tag, arg); in curl_easy_setopt()
3084 infof(data, "setopt arg 0x%x returned CURLE_BAD_FUNCTION_ARGUMENT", tag); in curl_easy_setopt()