Home | History | Annotate | Download | only in src

Lines Matching refs:CURL

12  * are also available at https://curl.haxx.se/docs/copyright.html.
89 CURLcode curl_easy_perform_ev(CURL *easy);
101 "More details here: https://curl.haxx.se/docs/sslcerts.html\n\n" \
102 "curl performs SSL certificate verification by default, " \
113 "If you'd like to turn off curl's verification of the certificate, use\n" \
203 CURL *curl = config->easy;
235 /* On WIN32 we can't set the path to curl-ca-bundle.crt
289 result = FindWin32CACert(config, "curl-ca-bundle.crt");
632 this_url = add_file_name_to_url(curl, this_url, uploadfile);
796 my_setopt(curl, CURLOPT_TCP_NODELAY, 1L);
799 my_setopt(curl, CURLOPT_TCP_FASTOPEN, 1L);
802 my_setopt(curl, CURLOPT_WRITEDATA, &outs);
805 my_setopt(curl, CURLOPT_WRITEFUNCTION, tool_write_cb);
810 my_setopt(curl, CURLOPT_WRITEFUNCTION, metalink_write_cb);
823 my_setopt(curl, CURLOPT_READDATA, &input);
825 my_setopt(curl, CURLOPT_READFUNCTION, tool_read_cb);
829 my_setopt(curl, CURLOPT_SEEKDATA, &input);
830 my_setopt(curl, CURLOPT_SEEKFUNCTION, tool_seek_cb);
835 my_setopt(curl, CURLOPT_BUFFERSIZE, (long)config->recvpersecond);
839 my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
840 my_setopt_str(curl, CURLOPT_URL, this_url); /* what to fetch */
841 my_setopt(curl, CURLOPT_NOPROGRESS, global->noprogress?1L:0L);
843 my_setopt(curl, CURLOPT_NOBODY, 1L);
844 my_setopt(curl, CURLOPT_HEADER, 1L);
850 my_setopt(curl, CURLOPT_HEADER, config->include_headers?1L:0L);
853 my_setopt_str(curl, CURLOPT_XOAUTH2_BEARER, config->oauth_bearer);
859 my_setopt_str(curl, CURLOPT_PROXY, config->proxy);
860 my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd);
863 my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L);
867 my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver);
871 my_setopt_str(curl, CURLOPT_PROXY, config->socksproxy);
872 my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->socksver);
877 my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
880 my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
883 my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
886 my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
889 my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
893 my_setopt_str(curl, CURLOPT_NOPROXY, config->noproxy);
897 my_setopt(curl, CURLOPT_FAILONERROR, config->failonerror?1L:0L);
898 my_setopt(curl, CURLOPT_UPLOAD, uploadfile?1L:0L);
899 my_setopt(curl, CURLOPT_DIRLISTONLY, config->dirlistonly?1L:0L);
900 my_setopt(curl, CURLOPT_APPEND, config->ftp_append?1L:0L);
903 my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_OPTIONAL);
905 my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_REQUIRED);
907 my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_IGNORED);
910 my_setopt_str(curl, CURLOPT_NETRC_FILE, config->netrc_file);
912 my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii?1L:0L);
914 my_setopt_str(curl, CURLOPT_LOGIN_OPTIONS, config->login_options);
915 my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd);
916 my_setopt_str(curl, CURLOPT_RANGE, config->range);
917 my_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
918 my_setopt(curl, CURLOPT_TIMEOUT_MS, (long)(config->timeout * 1000));
924 my_setopt(curl, CURLOPT_FOLLOWLOCATION,
926 my_setopt(curl, CURLOPT_UNRESTRICTED_AUTH,
931 my_setopt_str(curl, CURLOPT_POSTFIELDS,
933 my_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE,
937 my_setopt_httppost(curl, CURLOPT_HTTPPOST, config->httppost);
943 my_setopt_str(curl, CURLOPT_REFERER, config->referer);
944 my_setopt(curl, CURLOPT_AUTOREFERER, config->autoreferer?1L:0L);
945 my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent);
946 my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers);
950 my_setopt_slist(curl, CURLOPT_PROXYHEADER, config->proxyheaders);
951 my_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
955 my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
958 my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion);
960 my_setopt_enum(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
965 my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, (long)config->authtype);
967 /* curl 7.19.1 (the 301 version existed in 7.18.2),
975 my_setopt(curl, CURLOPT_POSTREDIR, postRedir);
979 my_setopt_str(curl, CURLOPT_ACCEPT_ENCODING, "");
983 my_setopt(curl, CURLOPT_TRANSFER_ENCODING, 1L);
987 my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport);
988 my_setopt(curl, CURLOPT_LOW_SPEED_LIMIT,
990 my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time);
991 my_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE,
993 my_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE,
997 curl, CURLOPT_RESUME_FROM_LARGE, config->resume_from);
999 my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, CURL_OFF_T_C(0));
1001 my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd);
1007 my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key);
1009 my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey);
1013 my_setopt_str(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
1018 my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
1020 result = res_setopt_str(curl, CURLOPT_CAPATH, config->capath);
1030 my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile);
1033 my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, config->pinnedpubkey);
1036 my_setopt_str(curl, CURLOPT_SSLCERT, config->cert);
1037 my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
1038 my_setopt_str(curl, CURLOPT_SSLKEY, config->key);
1039 my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
1042 my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
1043 my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
1046 my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
1048 /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); */
1052 my_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
1055 my_setopt(curl, CURLOPT_SSL_FALSESTART, 1L);
1057 my_setopt_enum(curl, CURLOPT_SSLVERSION, config->ssl_version);
1060 my_setopt(curl, CURLOPT_PATH_AS_IS, 1L);
1071 /* new in curl 7.19.6 */
1072 result = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
1087 my_setopt(curl, CURLOPT_FILETIME, 1L);
1090 my_setopt(curl, CURLOPT_CRLF, config->crlf?1L:0L);
1091 my_setopt_slist(curl, CURLOPT_QUOTE, config->quote);
1092 my_setopt_slist(curl, CURLOPT_POSTQUOTE, config->postquote);
1093 my_setopt_slist(curl, CURLOPT_PREQUOTE, config->prequote);
1097 my_setopt_str(curl, CURLOPT_COOKIE, config->cookie);
1100 my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
1104 my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar);
1107 my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession?1L:0L);
1116 my_setopt_enum(curl, CURLOPT_TIMECONDITION, (long)config->timecond);
1117 my_setopt(curl, CURLOPT_TIMEVALUE, (long)config->condtime);
1118 my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest);
1120 my_setopt(curl, CURLOPT_STDERR, global->errors);
1123 my_setopt_str(curl, CURLOPT_INTERFACE, config->iface);
1124 my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel);
1131 my_setopt(curl, CURLOPT_XFERINFOFUNCTION, tool_progress_cb);
1132 my_setopt(curl, CURLOPT_XFERINFODATA, &progressbar);
1137 my_setopt_str(curl, CURLOPT_DNS_SERVERS, config->dns_servers);
1141 my_setopt_str(curl, CURLOPT_DNS_INTERFACE, config->dns_interface);
1143 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP4, config->dns_ipv4_addr);
1145 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr);
1148 my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options);
1151 my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file);
1152 my_setopt_str(curl, CURLOPT_EGDSOCKET, config->egd_file);
1153 my_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS,
1157 my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list);
1162 my_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
1167 my_setopt(curl, CURLOPT_FTP_USE_EPRT, 0L);
1170 my_setopt(curl, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
1171 my_setopt(curl, CURLOPT_DEBUGDATA, config);
1172 my_setopt(curl, CURLOPT_VERBOSE, 1L);
1175 /* new in curl 7.9.3 */
1177 result = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine);
1180 my_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
1183 /* new in curl 7.10.7, extended in 7.19.4. Modified to use
1185 my_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
1190 /* new in curl 7.10.8 */
1192 my_setopt(curl, CURLOPT_MAXFILESIZE_LARGE,
1196 my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
1198 my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
1200 my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);
1202 /* new in curl 7.15.5 */
1204 my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
1206 /* new in curl 7.11.0 */
1208 my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
1210 /* new in curl 7.16.0 */
1212 my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_CONTROL);
1214 /* new in curl 7.16.1 */
1216 my_setopt_enum(curl, CURLOPT_FTP_SSL_CCC,
1219 /* new in curl 7.19.4 */
1221 my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_NEC,
1224 /* new in curl 7.43.0 */
1226 my_setopt_str(curl, CURLOPT_PROXY_SERVICE_NAME,
1229 /* new in curl 7.43.0 */
1231 my_setopt_str(curl, CURLOPT_SERVICE_NAME,
1234 /* curl 7.13.0 */
1235 my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account);
1237 my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L);
1239 /* curl 7.14.2 */
1240 my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip?1L:0L);
1242 /* curl 7.15.1 */
1243 my_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long)config->ftp_filemethod);
1245 /* curl 7.15.2 */
1247 my_setopt(curl, CURLOPT_LOCALPORT, (long)config->localport);
1248 my_setopt_str(curl, CURLOPT_LOCALPORTRANGE,
1252 /* curl 7.15.5 */
1253 my_setopt_str(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER,
1256 /* curl 7.16.0 */
1259 my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
1261 /* curl 7.16.2 */
1263 my_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L);
1264 my_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
1267 /* curl 7.17.1 */
1269 my_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
1271 my_setopt(curl, CURLOPT_TCP_KEEPIDLE, config->alivetime);
1272 my_setopt(curl, CURLOPT_TCP_KEEPINTVL, config->alivetime);
1276 my_setopt(curl, CURLOPT_TCP_KEEPALIVE, 0L);
1278 /* curl 7.20.0 */
1280 my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize);
1283 my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from);
1286 my_setopt_slist(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt);
1288 /* curl 7.20.x */
1290 my_setopt(curl, CURLOPT_FTP_USE_PRET, 1L);
1293 my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto);
1295 my_setopt_flags(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir);
1306 my_setopt(curl, CURLOPT_HEADERFUNCTION, tool_header_cb);
1307 my_setopt(curl, CURLOPT_HEADERDATA, &hdrcbdata);
1311 my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
1315 my_setopt_slist(curl, CURLOPT_CONNECT_TO, config->connect_to);
1320 my_setopt_str(curl, CURLOPT_TLSAUTH_USERNAME,
1323 my_setopt_str(curl, CURLOPT_TLSAUTH_PASSWORD,
1326 my_setopt_str(curl, CURLOPT_TLSAUTH_TYPE,
1332 my_setopt_str(curl, CURLOPT_GSSAPI_DELEGATION,
1340 my_setopt_bitmask(curl, CURLOPT_SSL_OPTIONS, mask);
1344 my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth);
1348 my_setopt(curl, CURLOPT_SASL_IR, 1L);
1351 my_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 0L);
1355 my_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L);
1360 my_setopt_str(curl, CURLOPT_UNIX_SOCKET_PATH,
1365 my_setopt_str(curl, CURLOPT_DEFAULT_PROTOCOL, config->proto_default);
1369 my_setopt_str(curl, CURLOPT_EXPECT_100_TIMEOUT_MS,
1374 my_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, 1L);
1414 result = curl_easy_perform_ev(curl);
1417 result = curl_easy_perform(curl);
1426 curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &cond_unmet);
1433 printf("curl: Saved to filename '%s'\n", outs.filename);
1462 curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
1466 curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
1489 curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
1560 curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
1564 curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
1599 ourWriteOut(curl, &outs, config->writeout);
1602 ourWriteEnv(curl);
1622 fprintf(global->errors, "curl: (%d) %s\n", result, (errorbuffer[0]) ?
1646 int rc = fwrite_xattr(curl, fileno(outs.stream));
1685 curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);