From cfd75dcdb18d0a4291f48020211c65507a97d9eb Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Thu, 12 Apr 2018 16:25:13 +0900 Subject: [PATCH] Imported Upstream version 7.59.0 Change-Id: I06221d49da39082f95030ab57617a1e23fbda58b --- CHANGES | 8981 ++++++++------- CMake/FindGSS.cmake | 2 +- CMake/FindMbedTLS.cmake | 13 + CMake/Macros.cmake | 29 + CMake/OtherTests.cmake | 12 +- CMake/Utilities.cmake | 15 +- CMake/cmake_uninstall.cmake.in | 26 + CMake/curl-config.cmake | 59 + CMakeLists.txt | 465 +- COPYING | 2 +- MacOSX-Framework | 9 - Makefile.am | 86 +- Makefile.in | 146 +- RELEASE-NOTES | 183 +- acinclude.m4 | 369 +- aclocal.m4 | 47 +- buildconf | 5 +- buildconf.bat | 35 +- config.guess | 113 +- config.sub | 69 +- configure | 3382 +++--- configure.ac | 658 +- curl-config.in | 6 +- depcomp | 6 +- docs/BINDINGS.md | 28 +- docs/BUGS | 84 +- docs/CIPHERS.md | 426 + docs/CMakeLists.txt | 3 + docs/CODE_OF_CONDUCT.md | 4 +- docs/CONTRIBUTE.md | 40 +- docs/FAQ | 72 +- docs/FEATURES | 2 +- docs/HELP-US.md | 70 + docs/HISTORY.md | 18 + docs/INSTALL.cmake | 91 + docs/INSTALL.md | 9 +- docs/INTERNALS.md | 72 +- docs/KNOWN_BUGS | 58 +- docs/MAIL-ETIQUETTE | 31 +- docs/MANUAL | 28 +- docs/Makefile.am | 51 +- docs/Makefile.in | 91 +- docs/README.cmake | 16 + docs/README.md | 12 + docs/RELEASE-PROCEDURE | 16 +- docs/RESOURCES | 20 +- docs/ROADMAP.md | 94 +- docs/{SECURITY.md => SECURITY-PROCESS.md} | 10 +- docs/SSLCERTS.md | 10 + docs/THANKS | 200 +- docs/TODO | 285 +- docs/cmdline-opts/CMakeLists.txt | 12 + docs/cmdline-opts/MANPAGE.md | 6 +- docs/cmdline-opts/Makefile.am | 48 +- docs/cmdline-opts/Makefile.in | 121 +- docs/cmdline-opts/Makefile.inc | 51 + docs/cmdline-opts/abstract-unix-socket.d | 2 +- docs/cmdline-opts/cacert.d | 2 +- docs/cmdline-opts/compressed-ssh.d | 7 + docs/cmdline-opts/config.d | 15 +- docs/cmdline-opts/connect-to.d | 21 +- docs/cmdline-opts/environment.d | 7 - docs/cmdline-opts/fail-early.d | 15 +- docs/cmdline-opts/form-string.d | 4 +- docs/cmdline-opts/form.d | 118 +- docs/cmdline-opts/gen.pl | 8 +- docs/cmdline-opts/happy-eyeballs-timeout-ms.d | 17 + docs/cmdline-opts/header.d | 9 +- docs/cmdline-opts/include.d | 9 +- docs/cmdline-opts/insecure.d | 14 +- docs/cmdline-opts/interface.d | 4 + docs/cmdline-opts/limit-rate.d | 2 +- docs/cmdline-opts/mail-rcpt.d | 2 +- docs/cmdline-opts/max-filesize.d | 4 + docs/cmdline-opts/netrc-file.d | 2 +- docs/cmdline-opts/no-keepalive.d | 2 +- docs/cmdline-opts/oauth2-bearer.d | 1 + docs/cmdline-opts/page-footer | 17 +- docs/cmdline-opts/progress-bar.d | 5 +- docs/cmdline-opts/proxy-header.d | 8 +- docs/cmdline-opts/proxy-pinnedpubkey.d | 16 + docs/cmdline-opts/proxytunnel.d | 3 + docs/cmdline-opts/referer.d | 2 +- docs/cmdline-opts/request-target.d | 9 + docs/cmdline-opts/resolve.d | 6 +- docs/cmdline-opts/socks5-basic.d | 7 + docs/cmdline-opts/socks5-gssapi.d | 8 + docs/cmdline-opts/suppress-connect-headers.d | 8 + docs/cmdline-opts/tcp-nodelay.d | 2 +- docs/cmdline-opts/tls-max.d | 24 + docs/cmdline-opts/tlsauthtype.d | 4 +- docs/cmdline-opts/tlsv1.3.d | 3 +- docs/cmdline-opts/write-out.d | 7 +- docs/curl-config.1 | 9 +- docs/curl.1 | 353 +- docs/examples/10-at-a-time.c | 8 +- docs/examples/Makefile.am | 11 +- docs/examples/Makefile.in | 214 +- docs/examples/Makefile.inc | 21 +- docs/examples/Makefile.m32 | 2 +- docs/examples/Makefile.netware | 6 +- docs/examples/anyauthput.c | 28 +- docs/examples/asiohiper.cpp | 24 +- docs/examples/cacertinmem.c | 191 +- docs/examples/certinfo.c | 19 +- docs/examples/chkspeed.c | 4 +- docs/examples/cookie_interface.c | 11 +- docs/examples/curlx.c | 76 +- docs/examples/debug.c | 25 +- docs/examples/evhiperfifo.c | 28 +- docs/examples/externalsocket.c | 15 +- docs/examples/fopen.c | 93 +- docs/examples/ftpget.c | 8 +- docs/examples/ftpsget.c | 8 +- docs/examples/ftpupload.c | 6 +- docs/examples/ftpuploadfrommem.c | 124 + docs/examples/ftpuploadresume.c | 36 +- docs/examples/ghiper.c | 55 +- docs/examples/hiperfifo.c | 36 +- docs/examples/htmltidy.c | 6 +- docs/examples/http2-download.c | 39 +- docs/examples/http2-serverpush.c | 33 +- docs/examples/http2-upload.c | 41 +- docs/examples/httpput.c | 4 +- docs/examples/imap-copy.c | 4 +- docs/examples/imap-create.c | 4 +- docs/examples/imap-delete.c | 4 +- docs/examples/imap-examine.c | 4 +- docs/examples/imap-multi.c | 4 +- docs/examples/imap-search.c | 4 +- docs/examples/multi-app.c | 12 +- docs/examples/multi-debugcallback.c | 27 +- docs/examples/multi-double.c | 4 +- docs/examples/multi-formadd.c | 171 + docs/examples/multi-post.c | 62 +- docs/examples/multi-uv.c | 2 +- docs/examples/multithread.c | 4 +- docs/examples/opensslthreadlock.c | 4 +- docs/examples/pop3-multi.c | 4 +- docs/examples/pop3-top.c | 4 +- docs/examples/post-callback.c | 55 +- docs/examples/postinmemory.c | 4 +- docs/examples/postit2-formadd.c | 107 + docs/examples/postit2.c | 56 +- docs/examples/rtsp.c | 7 +- docs/examples/sampleconv.c | 74 +- docs/examples/sendrecv.c | 6 +- docs/examples/sftpget.c | 8 +- docs/examples/sftpuploadresume.c | 130 + docs/examples/shared-connection-cache.c | 85 + docs/examples/simplepost.c | 4 +- docs/examples/simplessl.c | 4 +- docs/examples/smooth-gtk-thread.c | 6 +- docs/examples/smtp-mail.c | 36 +- docs/examples/smtp-mime.c | 162 + docs/examples/smtp-multi.c | 8 +- docs/examples/smtp-ssl.c | 4 +- docs/examples/smtp-tls.c | 4 +- docs/examples/sslbackend.c | 77 + docs/examples/synctime.c | 10 +- docs/examples/threaded-shared-conn.c | 156 + docs/examples/threaded-ssl.c | 18 +- docs/examples/url2file.c | 4 +- docs/examples/usercertinmem.c | 4 +- docs/examples/xmlstream.c | 4 +- docs/libcurl/CMakeLists.txt | 55 + docs/libcurl/Makefile.am | 78 +- docs/libcurl/Makefile.in | 132 +- docs/libcurl/Makefile.inc | 25 + docs/libcurl/curl_easy_cleanup.3 | 3 +- docs/libcurl/curl_easy_duphandle.3 | 3 +- docs/libcurl/curl_easy_escape.3 | 14 +- docs/libcurl/curl_easy_getinfo.3 | 40 +- docs/libcurl/curl_easy_init.3 | 3 +- docs/libcurl/curl_easy_pause.3 | 3 +- docs/libcurl/curl_easy_perform.3 | 3 +- docs/libcurl/curl_easy_recv.3 | 3 +- docs/libcurl/curl_easy_reset.3 | 3 +- docs/libcurl/curl_easy_send.3 | 3 +- docs/libcurl/curl_easy_setopt.3 | 23 +- docs/libcurl/curl_easy_strerror.3 | 3 +- docs/libcurl/curl_easy_unescape.3 | 3 +- docs/libcurl/curl_escape.3 | 3 +- docs/libcurl/curl_formadd.3 | 29 +- docs/libcurl/curl_formfree.3 | 11 +- docs/libcurl/curl_formget.3 | 10 +- docs/libcurl/curl_free.3 | 3 +- docs/libcurl/curl_getdate.3 | 19 +- docs/libcurl/curl_getenv.3 | 3 +- docs/libcurl/curl_global_cleanup.3 | 3 +- docs/libcurl/curl_global_init.3 | 9 +- docs/libcurl/curl_global_init_mem.3 | 3 +- docs/libcurl/curl_global_sslset.3 | 98 + docs/libcurl/curl_mime_addpart.3 | 67 + docs/libcurl/curl_mime_data.3 | 70 + docs/libcurl/curl_mime_data_cb.3 | 168 + docs/libcurl/curl_mime_encoder.3 | 98 + docs/libcurl/curl_mime_filedata.3 | 85 + docs/libcurl/curl_mime_filename.3 | 73 + docs/libcurl/curl_mime_free.3 | 49 + docs/libcurl/curl_mime_headers.3 | 66 + docs/libcurl/curl_mime_init.3 | 70 + docs/libcurl/curl_mime_name.3 | 64 + docs/libcurl/curl_mime_subparts.3 | 54 + docs/libcurl/curl_mime_type.3 | 84 + docs/libcurl/curl_mprintf.3 | 3 +- docs/libcurl/curl_multi_add_handle.3 | 3 +- docs/libcurl/curl_multi_assign.3 | 3 +- docs/libcurl/curl_multi_cleanup.3 | 3 +- docs/libcurl/curl_multi_fdset.3 | 12 +- docs/libcurl/curl_multi_info_read.3 | 3 +- docs/libcurl/curl_multi_init.3 | 3 +- docs/libcurl/curl_multi_perform.3 | 3 +- docs/libcurl/curl_multi_remove_handle.3 | 3 +- docs/libcurl/curl_multi_setopt.3 | 3 +- docs/libcurl/curl_multi_socket.3 | 3 +- docs/libcurl/curl_multi_socket_action.3 | 3 +- docs/libcurl/curl_multi_strerror.3 | 3 +- docs/libcurl/curl_multi_timeout.3 | 3 +- docs/libcurl/curl_multi_wait.3 | 3 +- docs/libcurl/curl_share_cleanup.3 | 3 +- docs/libcurl/curl_share_init.3 | 3 +- docs/libcurl/curl_share_setopt.3 | 26 +- docs/libcurl/curl_share_strerror.3 | 3 +- docs/libcurl/curl_slist_append.3 | 31 +- docs/libcurl/curl_slist_free_all.3 | 21 +- docs/libcurl/curl_strequal.3 | 7 +- docs/libcurl/curl_strnequal.3 | 1 + docs/libcurl/curl_unescape.3 | 3 +- docs/libcurl/curl_version.3 | 3 +- docs/libcurl/curl_version_info.3 | 21 +- docs/libcurl/libcurl-easy.3 | 3 +- docs/libcurl/libcurl-env.3 | 90 + docs/libcurl/libcurl-errors.3 | 7 +- docs/libcurl/libcurl-multi.3 | 6 +- docs/libcurl/libcurl-security.3 | 339 + docs/libcurl/libcurl-share.3 | 12 +- docs/libcurl/libcurl-symbols.3 | 130 +- docs/libcurl/libcurl-thread.3 | 14 +- docs/libcurl/libcurl-tutorial.3 | 500 +- docs/libcurl/libcurl.3 | 7 +- docs/libcurl/mksymbolsmanpage.pl | 2 +- docs/libcurl/opts/CMakeLists.txt | 12 + docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 | 25 +- docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 | 22 +- docs/libcurl/opts/CURLINFO_CERTINFO.3 | 37 +- docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 | 32 +- docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 | 22 +- .../opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 | 27 +- .../opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 | 63 + docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 | 28 +- .../opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 | 62 + docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 | 24 +- docs/libcurl/opts/CURLINFO_COOKIELIST.3 | 33 +- docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 | 22 +- docs/libcurl/opts/CURLINFO_FILETIME.3 | 33 +- docs/libcurl/opts/CURLINFO_FILETIME_T.3 | 72 + docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 | 24 +- docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 | 24 +- docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 | 35 +- docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 | 24 +- docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 | 3 +- docs/libcurl/opts/CURLINFO_LASTSOCKET.3 | 25 +- docs/libcurl/opts/CURLINFO_LOCAL_IP.3 | 24 +- docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 | 29 +- docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 | 22 +- docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 | 22 +- docs/libcurl/opts/CURLINFO_OS_ERRNO.3 | 22 +- docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 | 22 +- docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 | 25 +- docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 | 21 +- docs/libcurl/opts/CURLINFO_PRIVATE.3 | 22 +- docs/libcurl/opts/CURLINFO_PROTOCOL.3 | 3 +- docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 | 36 +- .../libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 | 23 +- docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 | 20 +- docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 | 22 +- docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 | 24 +- docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 | 21 +- docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 | 3 +- docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 | 19 +- docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 | 19 +- docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 | 19 +- docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 | 19 +- docs/libcurl/opts/CURLINFO_SCHEME.3 | 18 +- docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 | 29 +- docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 | 65 + docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 | 27 +- docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 | 60 + docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 | 27 +- docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 | 60 + docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 | 26 +- docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 | 59 + docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 | 20 +- docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 | 19 +- docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 | 22 +- docs/libcurl/opts/CURLINFO_TLS_SESSION.3 | 17 +- docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 | 17 +- docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 | 22 +- .../opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 | 11 +- .../opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 | 11 +- docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 | 11 +- docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 | 11 +- docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 | 11 +- docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 | 11 +- docs/libcurl/opts/CURLMOPT_PIPELINING.3 | 12 +- docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 | 3 +- docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 | 3 +- docs/libcurl/opts/CURLMOPT_PUSHDATA.3 | 37 +- docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 | 3 +- docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 | 34 +- docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 | 34 +- docs/libcurl/opts/CURLMOPT_TIMERDATA.3 | 41 +- docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 | 54 +- docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 | 3 +- docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 | 3 +- docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 | 3 +- docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 | 20 +- docs/libcurl/opts/CURLOPT_APPEND.3 | 3 +- docs/libcurl/opts/CURLOPT_AUTOREFERER.3 | 22 +- docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 | 20 +- docs/libcurl/opts/CURLOPT_CAINFO.3 | 20 +- docs/libcurl/opts/CURLOPT_CAPATH.3 | 20 +- docs/libcurl/opts/CURLOPT_CERTINFO.3 | 37 +- docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 | 52 +- docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 | 52 +- docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 | 24 +- docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 | 17 +- docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 | 17 +- docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 | 12 +- docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 | 7 +- docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 | 18 +- docs/libcurl/opts/CURLOPT_CONNECT_TO.3 | 3 +- .../opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 | 26 +- .../libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 | 25 +- .../opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 | 25 +- docs/libcurl/opts/CURLOPT_COOKIE.3 | 3 +- docs/libcurl/opts/CURLOPT_COOKIEFILE.3 | 22 +- docs/libcurl/opts/CURLOPT_COOKIEJAR.3 | 20 +- docs/libcurl/opts/CURLOPT_COOKIELIST.3 | 3 +- docs/libcurl/opts/CURLOPT_COOKIESESSION.3 | 22 +- docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 | 3 +- docs/libcurl/opts/CURLOPT_CRLF.3 | 16 +- docs/libcurl/opts/CURLOPT_CRLFILE.3 | 16 +- docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 | 20 +- docs/libcurl/opts/CURLOPT_DEBUGDATA.3 | 3 +- docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 | 3 +- docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 | 3 +- docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 | 19 +- docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 | 24 +- docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 | 15 +- docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 | 17 +- docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 | 15 +- docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 | 15 +- docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 | 17 +- docs/libcurl/opts/CURLOPT_EGDSOCKET.3 | 15 +- docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 | 3 +- docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 | 17 +- docs/libcurl/opts/CURLOPT_FAILONERROR.3 | 22 +- docs/libcurl/opts/CURLOPT_FILETIME.3 | 24 +- docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 | 25 +- docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 | 25 +- docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 | 3 +- docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 | 16 +- docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 | 14 +- docs/libcurl/opts/CURLOPT_FTPPORT.3 | 15 +- docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 | 17 +- docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 | 18 +- .../libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 | 18 +- .../libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 | 18 +- docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 | 18 +- docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 | 21 +- docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 | 18 +- docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 | 17 +- docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 | 3 +- docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 | 19 +- docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 | 19 +- docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 | 31 +- .../opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 | 60 + docs/libcurl/opts/CURLOPT_HEADER.3 | 21 +- docs/libcurl/opts/CURLOPT_HEADERDATA.3 | 35 +- docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 | 10 +- docs/libcurl/opts/CURLOPT_HEADEROPT.3 | 24 +- docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 | 20 +- docs/libcurl/opts/CURLOPT_HTTPAUTH.3 | 17 +- docs/libcurl/opts/CURLOPT_HTTPGET.3 | 3 +- docs/libcurl/opts/CURLOPT_HTTPHEADER.3 | 15 +- docs/libcurl/opts/CURLOPT_HTTPPOST.3 | 14 +- docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 | 39 +- docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 | 15 +- docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 | 15 +- docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 | 18 +- docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 | 3 +- docs/libcurl/opts/CURLOPT_INFILESIZE.3 | 3 +- docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 | 3 +- docs/libcurl/opts/CURLOPT_INTERFACE.3 | 18 +- docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 | 26 +- docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 | 27 +- docs/libcurl/opts/CURLOPT_IOCTLDATA.3 | 23 +- docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 | 23 +- docs/libcurl/opts/CURLOPT_IPRESOLVE.3 | 20 +- docs/libcurl/opts/CURLOPT_ISSUERCERT.3 | 15 +- docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 | 16 +- docs/libcurl/opts/CURLOPT_KEYPASSWD.3 | 17 +- docs/libcurl/opts/CURLOPT_KRBLEVEL.3 | 15 +- docs/libcurl/opts/CURLOPT_LOCALPORT.3 | 17 +- docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 | 17 +- docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 | 15 +- docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 | 21 +- docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 | 21 +- docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 | 15 +- docs/libcurl/opts/CURLOPT_MAIL_FROM.3 | 15 +- docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 | 19 +- docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 | 16 +- docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 | 16 +- docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 | 17 +- docs/libcurl/opts/CURLOPT_MAXREDIRS.3 | 3 +- docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 | 15 +- docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 | 17 +- docs/libcurl/opts/CURLOPT_MIMEPOST.3 | 53 + docs/libcurl/opts/CURLOPT_NETRC.3 | 21 +- docs/libcurl/opts/CURLOPT_NETRC_FILE.3 | 16 +- docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 | 16 +- docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 | 15 +- docs/libcurl/opts/CURLOPT_NOBODY.3 | 10 +- docs/libcurl/opts/CURLOPT_NOPROGRESS.3 | 13 +- docs/libcurl/opts/CURLOPT_NOPROXY.3 | 32 +- docs/libcurl/opts/CURLOPT_NOSIGNAL.3 | 3 +- docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 | 44 +- docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 | 43 +- docs/libcurl/opts/CURLOPT_PASSWORD.3 | 18 +- docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 | 3 +- docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 | 17 +- docs/libcurl/opts/CURLOPT_PIPEWAIT.3 | 3 +- docs/libcurl/opts/CURLOPT_PORT.3 | 15 +- docs/libcurl/opts/CURLOPT_POST.3 | 19 +- docs/libcurl/opts/CURLOPT_POSTFIELDS.3 | 11 +- docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 | 3 +- docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 | 3 +- docs/libcurl/opts/CURLOPT_POSTQUOTE.3 | 23 +- docs/libcurl/opts/CURLOPT_POSTREDIR.3 | 3 +- docs/libcurl/opts/CURLOPT_PREQUOTE.3 | 35 +- docs/libcurl/opts/CURLOPT_PRE_PROXY.3 | 15 +- docs/libcurl/opts/CURLOPT_PRIVATE.3 | 5 +- docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 | 3 +- docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 | 3 +- docs/libcurl/opts/CURLOPT_PROTOCOLS.3 | 3 +- docs/libcurl/opts/CURLOPT_PROXY.3 | 31 +- docs/libcurl/opts/CURLOPT_PROXYAUTH.3 | 21 +- docs/libcurl/opts/CURLOPT_PROXYHEADER.3 | 25 +- docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 | 17 +- docs/libcurl/opts/CURLOPT_PROXYPORT.3 | 16 +- docs/libcurl/opts/CURLOPT_PROXYTYPE.3 | 18 +- docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 | 17 +- docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 | 16 +- docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 | 17 +- docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 | 29 +- docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 | 16 +- docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 | 16 +- docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 | 16 +- docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 | 15 +- docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 | 18 +- docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 | 19 +- docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 | 18 +- docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 | 19 +- docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 | 27 +- docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 | 16 +- docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 | 18 +- docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 | 3 +- docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 | 3 +- docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 | 18 +- docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 | 18 +- docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 | 18 +- docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 | 17 +- docs/libcurl/opts/CURLOPT_PUT.3 | 7 +- docs/libcurl/opts/CURLOPT_QUOTE.3 | 23 +- docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 | 17 +- docs/libcurl/opts/CURLOPT_RANGE.3 | 3 +- docs/libcurl/opts/CURLOPT_READDATA.3 | 3 +- docs/libcurl/opts/CURLOPT_READFUNCTION.3 | 7 +- docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 | 3 +- docs/libcurl/opts/CURLOPT_REFERER.3 | 3 +- docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 | 57 + docs/libcurl/opts/CURLOPT_RESOLVE.3 | 19 +- docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 | 64 + .../libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 | 84 + docs/libcurl/opts/CURLOPT_RESUME_FROM.3 | 3 +- docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 | 3 +- docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 | 15 +- docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 | 17 +- docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 | 15 +- docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 | 16 +- docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 | 17 +- docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 | 17 +- docs/libcurl/opts/CURLOPT_SASL_IR.3 | 15 +- docs/libcurl/opts/CURLOPT_SEEKDATA.3 | 19 +- docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 | 20 +- docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 | 15 +- docs/libcurl/opts/CURLOPT_SHARE.3 | 29 +- docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 | 30 +- docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 | 43 +- docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 | 64 + docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 | 16 +- docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 | 16 +- docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 | 16 +- docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 | 59 + .../libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 | 16 +- docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 | 26 +- docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 | 26 +- docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 | 16 +- docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 | 17 +- docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 | 16 +- docs/libcurl/opts/CURLOPT_SSLCERT.3 | 17 +- docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 | 18 +- docs/libcurl/opts/CURLOPT_SSLENGINE.3 | 15 +- docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 | 16 +- docs/libcurl/opts/CURLOPT_SSLKEY.3 | 17 +- docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 | 18 +- docs/libcurl/opts/CURLOPT_SSLVERSION.3 | 25 +- docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 | 15 +- docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 | 87 +- docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 | 106 +- docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 | 15 +- docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 | 15 +- docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 | 16 +- docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 | 19 +- docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 | 16 +- docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 | 16 +- docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 | 3 +- docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 | 16 +- docs/libcurl/opts/CURLOPT_STDERR.3 | 3 +- docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 | 21 +- docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 | 19 +- docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 | 20 +- .../opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 | 96 + docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 | 16 +- docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 | 3 +- docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 | 3 +- docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 | 3 +- docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 | 25 +- docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 | 19 +- docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 | 16 +- docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 | 3 +- docs/libcurl/opts/CURLOPT_TIMECONDITION.3 | 3 +- docs/libcurl/opts/CURLOPT_TIMEOUT.3 | 10 +- docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 | 3 +- docs/libcurl/opts/CURLOPT_TIMEVALUE.3 | 8 +- docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 | 65 + docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 | 17 +- docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 | 17 +- docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 | 17 +- docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 | 15 +- docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 | 16 +- docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 | 3 +- docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 | 25 +- docs/libcurl/opts/CURLOPT_UPLOAD.3 | 3 +- docs/libcurl/opts/CURLOPT_URL.3 | 3 +- docs/libcurl/opts/CURLOPT_USERAGENT.3 | 3 +- docs/libcurl/opts/CURLOPT_USERNAME.3 | 18 +- docs/libcurl/opts/CURLOPT_USERPWD.3 | 19 +- docs/libcurl/opts/CURLOPT_USE_SSL.3 | 3 +- docs/libcurl/opts/CURLOPT_VERBOSE.3 | 3 +- docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 | 3 +- docs/libcurl/opts/CURLOPT_WRITEDATA.3 | 3 +- docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 | 3 +- docs/libcurl/opts/CURLOPT_XFERINFODATA.3 | 7 +- docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 | 3 +- docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 | 15 +- docs/libcurl/opts/Makefile.am | 941 +- docs/libcurl/opts/Makefile.in | 1298 +-- docs/libcurl/opts/Makefile.inc | 328 + docs/libcurl/symbols-in-versions | 105 +- docs/libcurl/symbols.pl | 2 +- docs/mk-ca-bundle.1 | 119 + include/Makefile.in | 24 +- include/README | 28 +- include/curl/Makefile.am | 25 +- include/curl/Makefile.in | 82 +- include/curl/curl.h | 322 +- include/curl/curlbuild.h.cmake | 197 - include/curl/curlbuild.h.in | 197 - include/curl/curlrules.h | 262 - include/curl/curlver.h | 18 +- include/curl/multi.h | 10 +- include/curl/{curlbuild.h => system.h} | 397 +- include/curl/typecheck-gcc.h | 190 +- lib/CMakeLists.txt | 30 +- lib/Makefile.Watcom | 10 +- lib/Makefile.am | 28 +- lib/Makefile.b32 | 2 +- lib/Makefile.in | 204 +- lib/Makefile.inc | 10 +- lib/Makefile.m32 | 94 +- lib/Makefile.netware | 47 +- lib/Makefile.vc10 | 691 -- lib/Makefile.vc11 | 691 -- lib/Makefile.vc12 | 691 -- lib/Makefile.vc14 | 691 -- lib/Makefile.vc7 | 691 -- lib/Makefile.vc8 | 691 -- lib/Makefile.vc9 | 691 -- lib/asyn-ares.c | 71 +- lib/asyn-thread.c | 72 +- lib/checksrc.pl | 89 +- lib/config-dos.h | 7 +- lib/config-os400.h | 10 +- lib/config-symbian.h | 3 - lib/config-tpf.h | 6 +- lib/config-vxworks.h | 3 - lib/config-win32.h | 22 +- lib/config-win32ce.h | 10 +- lib/conncache.c | 392 +- lib/conncache.h | 38 +- lib/connect.c | 233 +- lib/connect.h | 22 +- lib/content_encoding.c | 851 +- lib/content_encoding.h | 45 +- lib/cookie.c | 148 +- lib/cookie.h | 11 +- lib/curl_addrinfo.c | 17 +- lib/curl_config.h.cmake | 28 +- lib/curl_config.h.in | 71 +- lib/curl_ctype.c | 122 + lib/curl_ctype.h | 48 + lib/curl_endian.c | 114 +- lib/curl_endian.h | 26 +- lib/curl_fnmatch.c | 345 +- lib/curl_gssapi.c | 7 +- lib/curl_md4.h | 8 +- lib/curl_memory.h | 4 +- lib/curl_ntlm_core.c | 121 +- lib/curl_ntlm_core.h | 41 +- lib/curl_ntlm_wb.c | 28 +- lib/curl_path.c | 195 + lib/curl_path.h | 44 + lib/curl_range.c | 95 + src/tool_writeenv.h => lib/curl_range.h | 19 +- lib/curl_rtmp.c | 9 +- lib/curl_sasl.c | 33 +- lib/curl_setup.h | 110 +- lib/curl_setup_once.h | 39 +- lib/curl_sha256.h | 32 + lib/curl_threads.c | 15 +- lib/curlx.h | 12 +- lib/dict.c | 17 +- lib/dotdot.c | 31 +- lib/easy.c | 213 +- lib/escape.c | 30 +- lib/file.c | 102 +- lib/fileinfo.c | 14 +- lib/fileinfo.h | 12 +- lib/formdata.c | 1068 +- lib/formdata.h | 54 +- lib/ftp.c | 522 +- lib/ftp.h | 4 +- lib/ftplistparser.c | 271 +- lib/getinfo.c | 97 +- lib/gopher.c | 17 +- lib/hash.c | 86 +- lib/hash.h | 7 +- lib/hostasyn.c | 10 +- lib/hostcheck.c | 19 +- lib/hostip.c | 153 +- lib/hostip.h | 4 +- lib/hostip4.c | 13 +- lib/hostip6.c | 14 +- lib/hostsyn.c | 10 +- lib/http.c | 839 +- lib/http.h | 20 +- lib/http2.c | 309 +- lib/http2.h | 7 +- lib/http_chunks.c | 81 +- lib/http_ntlm.c | 13 +- lib/http_proxy.c | 401 +- lib/http_proxy.h | 17 +- lib/if2ip.c | 18 +- lib/if2ip.h | 5 +- lib/imap.c | 259 +- lib/imap.h | 3 +- lib/inet_ntop.c | 14 +- lib/inet_pton.c | 6 +- lib/inet_pton.h | 5 +- lib/krb5.c | 23 +- lib/ldap.c | 108 +- lib/libcurl.plist | 6 +- lib/llist.c | 63 +- lib/llist.h | 19 +- lib/makefile.dj | 9 +- lib/md4.c | 12 +- lib/md5.c | 2 +- lib/memdebug.c | 85 +- lib/memdebug.h | 15 +- lib/mime.c | 1982 ++++ lib/mime.h | 143 + lib/mk-ca-bundle.pl | 9 +- lib/mk-ca-bundle.vbs | 862 +- lib/mprintf.c | 56 +- lib/multi.c | 677 +- lib/multihandle.h | 24 +- lib/multiif.h | 9 +- lib/netrc.c | 44 +- lib/non-ascii.c | 120 +- lib/non-ascii.h | 4 +- lib/nonblock.c | 3 +- lib/objnames.inc | 6 +- lib/openldap.c | 87 +- lib/parsedate.c | 174 +- lib/pingpong.c | 70 +- lib/pingpong.h | 10 +- lib/pipeline.c | 146 +- lib/pipeline.h | 6 +- lib/pop3.c | 116 +- lib/progress.c | 217 +- lib/progress.h | 14 +- lib/rand.c | 75 +- lib/rand.h | 12 +- lib/rtsp.c | 141 +- lib/rtsp.h | 2 - lib/security.c | 6 +- lib/select.c | 30 +- lib/select.h | 11 +- lib/sendf.c | 285 +- lib/sendf.h | 4 +- lib/setopt.c | 2589 +++++ lib/setopt.h | 29 + lib/sha256.c | 270 + lib/share.c | 6 +- lib/share.h | 5 +- lib/smb.c | 53 +- lib/smb.h | 33 +- lib/smtp.c | 170 +- lib/socks.c | 104 +- lib/socks_gssapi.c | 59 +- lib/socks_sspi.c | 24 +- lib/speedcheck.c | 65 +- lib/speedcheck.h | 4 +- lib/splay.c | 126 +- lib/splay.h | 20 +- lib/ssh-libssh.c | 2737 +++++ lib/ssh.c | 603 +- lib/ssh.h | 69 +- lib/strcase.c | 17 +- lib/strdup.c | 6 +- lib/strerror.c | 63 +- lib/strtoofft.c | 70 +- lib/strtoofft.h | 39 +- lib/system_win32.c | 4 +- lib/telnet.c | 181 +- lib/tftp.c | 85 +- lib/timeval.c | 126 +- lib/timeval.h | 38 +- lib/transfer.c | 447 +- lib/transfer.h | 6 +- lib/url.c | 3722 ++---- lib/url.h | 16 +- lib/urldata.h | 432 +- lib/vauth/digest.c | 221 +- lib/vauth/digest.h | 6 +- lib/vauth/digest_sspi.c | 55 +- lib/vauth/krb5_gssapi.c | 4 +- lib/vauth/krb5_sspi.c | 4 +- lib/vauth/ntlm.c | 51 +- lib/vauth/ntlm_sspi.c | 9 +- lib/vauth/spnego_gssapi.c | 4 + lib/vauth/spnego_sspi.c | 3 + lib/vauth/vauth.h | 5 +- lib/version.c | 73 +- lib/vtls/axtls.c | 200 +- lib/vtls/axtls.h | 39 +- lib/vtls/cyassl.c | 302 +- lib/vtls/cyassl.h | 63 +- lib/vtls/darwinssl.c | 906 +- lib/vtls/darwinssl.h | 46 +- lib/vtls/gskit.c | 247 +- lib/vtls/gskit.h | 38 +- lib/vtls/gtls.c | 394 +- lib/vtls/gtls.h | 64 +- lib/vtls/mbedtls.c | 348 +- lib/vtls/mbedtls.h | 49 +- lib/vtls/nss.c | 547 +- lib/vtls/nssg.h | 71 +- lib/vtls/openssl.c | 1048 +- lib/vtls/openssl.h | 91 +- lib/vtls/polarssl.c | 288 +- lib/vtls/polarssl.h | 52 +- lib/vtls/polarssl_threadlock.c | 4 +- lib/vtls/schannel.c | 739 +- lib/vtls/schannel.h | 89 +- lib/vtls/vtls.c | 542 +- lib/vtls/vtls.h | 82 +- lib/warnless.c | 37 +- lib/warnless.h | 5 + lib/wildcard.c | 18 +- lib/wildcard.h | 9 +- lib/x509asn1.c | 1 + m4/ax_code_coverage.m4 | 264 + m4/curl-compilers.m4 | 65 +- m4/curl-confopts.m4 | 18 +- m4/curl-openssl.m4 | 13 +- m4/curl-override.m4 | 2 +- m4/xc-lt-iface.m4 | 10 +- m4/zz40-xc-ovr.m4 | 12 +- m4/zz50-xc-ovr.m4 | 2 +- maketgz | 34 +- packages/AIX/Makefile.in | 28 +- packages/AIX/RPM/Makefile.in | 28 +- packages/AIX/RPM/curl.spec.in | 2 +- packages/Android/Android.mk | 3 +- packages/EPM/Makefile.in | 24 +- packages/EPM/curl.list.in | 2 +- packages/Linux/Makefile.in | 28 +- packages/Linux/RPM/Makefile.in | 28 +- packages/Makefile.in | 28 +- packages/OS400/README.OS400 | 10 +- packages/OS400/ccsidcurl.c | 10 +- packages/OS400/curl.inc.in | 35 +- packages/OS400/make-include.sh | 9 - packages/OS400/makefile.sh | 5 +- packages/OS400/os400sys.c | 4 +- packages/Solaris/Makefile.in | 28 +- packages/Symbian/group/libcurl.mmp | 4 +- packages/Symbian/readme.txt | 2 +- packages/Win32/Makefile.in | 28 +- packages/Win32/README | 2 +- packages/Win32/cygwin/Makefile.in | 28 +- packages/Win32/cygwin/README | 2 +- packages/vms/Makefile.in | 28 +- packages/vms/clean_gnv_curl.com | 8 +- packages/vms/config_h.com | 2 +- packages/vms/curl_gnv_build_steps.txt | 2 +- packages/vms/generate_vax_transfer.com | 2 +- packages/vms/gnv_link_curl.com | 2 +- packages/vms/pcsi_gnv_curl_file_list.txt | 3 +- packages/vms/readme | 2 +- packages/vms/stage_curl_install.com | 8 +- projects/README | 13 +- projects/Windows/VC10/lib/libcurl.vcxproj | 5163 ++++----- projects/Windows/VC10/src/curl.vcxproj | 5460 ++++----- projects/Windows/VC11/lib/libcurl.vcxproj | 5275 ++++----- projects/Windows/VC11/src/curl.vcxproj | 5572 ++++----- projects/Windows/VC12/lib/libcurl.vcxproj | 5275 ++++----- projects/Windows/VC12/src/curl.vcxproj | 5572 ++++----- projects/Windows/VC14/lib/libcurl.vcxproj | 5275 ++++----- projects/Windows/VC14/src/curl.vcxproj | 5572 ++++----- projects/Windows/VC15/curl-all.sln | 298 + projects/Windows/VC15/lib/libcurl.sln | 181 + projects/Windows/VC15/lib/libcurl.vcxproj | 2644 +++++ projects/Windows/VC15/lib/libcurl.vcxproj.filters | 17 + projects/Windows/VC15/src/curl.sln | 181 + projects/Windows/VC15/src/curl.vcxproj | 2786 +++++ projects/Windows/VC15/src/curl.vcxproj.filters | 17 + projects/Windows/VC6/curl-all.dsw | 88 +- projects/Windows/VC6/lib/libcurl.dsp | 3462 +++--- projects/Windows/VC6/lib/libcurl.dsw | 58 +- projects/Windows/VC6/src/curl.dsp | 2116 ++-- projects/Windows/VC6/src/curl.dsw | 58 +- projects/Windows/VC7.1/lib/libcurl.vcproj | 4073 +++---- projects/Windows/VC7.1/src/curl.vcproj | 3304 +++--- projects/Windows/VC7/lib/libcurl.vcproj | 3781 +++--- projects/Windows/VC7/src/curl.vcproj | 3012 ++--- projects/Windows/VC8/lib/libcurl.vcproj | 9290 +++++++-------- projects/Windows/VC8/src/curl.vcproj | 8926 +++++++------- projects/Windows/VC9/lib/libcurl.vcproj | 9172 +++++++-------- projects/Windows/VC9/src/curl.vcproj | 8640 +++++++------- projects/build-openssl.bat | 137 +- projects/build-wolfssl.bat | 53 +- projects/checksrc.bat | 2 +- projects/generate.bat | 460 + projects/wolfssl_options.h | 224 + projects/wolfssl_override.props | 40 + scripts/Makefile.in | 28 +- scripts/coverage.sh | 16 + scripts/updatemanpages.pl | 355 + scripts/zsh.pl | 7 +- src/CMakeLists.txt | 29 +- src/Makefile.am | 25 +- src/Makefile.in | 435 +- src/Makefile.inc | 12 +- src/Makefile.m32 | 67 +- src/Makefile.netware | 6 +- src/Makefile.vc10 | 550 - src/Makefile.vc11 | 550 - src/Makefile.vc12 | 550 - src/Makefile.vc14 | 550 - src/Makefile.vc7 | 550 - src/Makefile.vc8 | 550 - src/Makefile.vc9 | 550 - src/macos/MACINSTALL.TXT | 2 +- src/makefile.dj | 2 - src/mkhelp.pl | 76 +- src/tool_cb_dbg.c | 39 +- src/tool_cb_dbg.h | 2 +- src/tool_cb_hdr.c | 28 +- src/tool_cb_hdr.h | 2 +- src/tool_cb_prg.c | 178 +- src/tool_cb_prg.h | 5 +- src/tool_cb_wrt.c | 38 +- src/tool_cb_wrt.h | 2 +- src/tool_cfgable.c | 14 +- src/tool_cfgable.h | 28 +- src/tool_dirhie.c | 10 +- src/tool_doswin.c | 10 +- src/tool_easysrc.c | 20 +- src/tool_easysrc.h | 4 +- src/tool_filetime.c | 154 + src/{tool_mfiles.h => tool_filetime.h} | 34 +- src/tool_formparse.c | 835 +- src/tool_formparse.h | 6 +- src/tool_getparam.c | 775 +- src/tool_getparam.h | 6 +- src/tool_getpass.c | 14 +- src/tool_help.c | 707 +- src/tool_helpers.c | 6 +- src/tool_homedir.c | 4 +- src/tool_hugehelp.c | 11540 ++++++++++--------- src/tool_main.c | 11 +- src/tool_metalink.c | 52 +- src/tool_mfiles.c | 127 - src/tool_msgs.c | 14 +- src/tool_operate.c | 207 +- src/tool_paramhlp.c | 100 +- src/tool_paramhlp.h | 7 +- src/tool_parsecfg.c | 12 +- src/tool_sdecls.h | 4 +- src/tool_setopt.c | 304 +- src/tool_setopt.h | 13 +- src/tool_sleep.c | 10 +- src/tool_strdup.c | 6 +- src/tool_urlglob.c | 43 +- src/tool_util.c | 37 +- src/tool_util.h | 25 +- src/tool_version.h | 2 +- src/tool_writeenv.c | 113 - src/tool_writeout.c | 6 +- src/tool_xattr.c | 2 +- tests/FILEFORMAT | 18 +- tests/Makefile.am | 36 +- tests/Makefile.in | 65 +- tests/README | 35 +- tests/certs/Makefile.in | 24 +- tests/certs/Server-localhost-sv.pem | 2 +- tests/certs/Server-localhost-sv.prm | 2 +- tests/certs/Server-localhost.nn-sv.pem | 2 +- tests/certs/Server-localhost.nn-sv.prm | 2 +- tests/certs/scripts/Makefile.in | 24 +- tests/certs/scripts/genserv.sh | 2 +- tests/curl_test_data.py | 61 + tests/data/DISABLED | 6 +- tests/data/Makefile.in | 102 +- tests/data/Makefile.inc | 74 +- tests/data/test1 | 8 +- tests/data/test10 | 12 +- tests/data/test100 | 16 +- tests/data/test1000 | 10 +- tests/data/test1001 | 98 +- tests/data/test1002 | 118 +- tests/data/test1003 | 18 +- tests/data/test1004 | 8 +- tests/data/test1005 | 18 +- tests/data/test1006 | 18 +- tests/data/test1007 | 2 +- tests/data/test1008 | 79 +- tests/data/test101 | 14 +- tests/data/test1010 | 18 +- tests/data/test1011 | 62 +- tests/data/test1012 | 66 +- tests/data/test1015 | 22 +- tests/data/test102 | 18 +- tests/data/test1021 | 90 +- tests/data/test1024 | 102 +- tests/data/test1025 | 106 +- tests/data/test1028 | 60 +- tests/data/test1029 | 28 +- tests/data/test103 | 20 +- tests/data/test1030 | 84 +- tests/data/test1031 | 16 +- tests/data/test1032 | 10 +- tests/data/test1033 | 8 +- tests/data/test1034 | 37 +- tests/data/test1035 | 30 +- tests/data/test1036 | 20 +- tests/data/test1037 | 18 +- tests/data/test1038 | 16 +- tests/data/test1039 | 16 +- tests/data/test104 | 20 +- tests/data/test1040 | 26 +- tests/data/test1041 | 30 +- tests/data/test1042 | 30 +- tests/data/test1043 | 38 +- tests/data/test1044 | 24 +- tests/data/test1045 | 22 +- tests/data/test1046 | 22 +- tests/data/test1047 | 14 +- tests/data/test1048 | 14 +- tests/data/test1049 | 2 +- tests/data/test105 | 18 +- tests/data/test1050 | 12 +- tests/data/test1051 | 80 +- tests/data/test1052 | 68 +- tests/data/test1053 | 138 +- tests/data/test1054 | 60 +- tests/data/test1055 | 42 +- tests/data/test1056 | 52 +- tests/data/test1057 | 20 +- tests/data/test1058 | 26 +- tests/data/test1059 | 18 +- tests/data/test106 | 22 +- tests/data/test1060 | 54 +- tests/data/test1061 | 62 +- tests/data/test1062 | 18 +- tests/data/test1063 | 2 - tests/data/test1064 | 60 +- tests/data/test1065 | 58 +- tests/data/test1066 | 76 +- tests/data/test1067 | 20 +- tests/data/test1068 | 29 +- tests/data/test107 | 14 +- tests/data/test1070 | 26 +- tests/data/test1071 | 84 +- tests/data/test1072 | 38 +- tests/data/test1073 | 34 +- tests/data/test1074 | 52 +- tests/data/test1075 | 74 +- tests/data/test1076 | 26 +- tests/data/test1077 | 52 +- tests/data/test1078 | 84 +- tests/data/test1079 | 42 +- tests/data/test108 | 20 +- tests/data/test1080 | 46 +- tests/data/test1081 | 56 +- tests/data/test1082 | 22 +- tests/data/test1083 | 22 +- tests/data/test1086 | 14 +- tests/data/test1087 | 116 +- tests/data/test1088 | 118 +- tests/data/test1089 | 68 +- tests/data/test109 | 14 +- tests/data/test1090 | 80 +- tests/data/test1091 | 20 +- tests/data/test1092 | 10 +- tests/data/test1093 | 2 +- tests/data/test1094 | 10 +- tests/data/test1095 | 64 +- tests/data/test1096 | 24 +- tests/data/test1097 | 54 +- tests/data/test1098 | 44 +- tests/data/test1099 | 2 +- tests/data/test11 | 16 +- tests/data/test110 | 20 +- tests/data/test1100 | 102 +- tests/data/test1101 | 22 +- tests/data/test1102 | 22 +- tests/data/test1103 | 18 +- tests/data/test1104 | 24 +- tests/data/test1105 | 14 +- tests/data/test1106 | 22 +- tests/data/test1107 | 18 +- tests/data/test1108 | 8 +- tests/data/test1109 | 8 +- tests/data/test111 | 14 +- tests/data/test1110 | 8 +- tests/data/test1111 | 8 +- tests/data/test1112 | 18 +- tests/data/test1113 | 82 +- tests/data/test1115 | 28 +- tests/data/test1116 | 62 +- tests/data/test1117 | 68 +- tests/data/test1118 | 8 +- tests/data/test112 | 14 +- tests/data/test1120 | 8 +- tests/data/test1121 | 18 +- tests/data/test1122 | 28 +- tests/data/test1123 | 46 +- tests/data/test1124 | 26 +- tests/data/test1125 | 28 +- tests/data/test1126 | 10 +- tests/data/test1127 | 10 +- tests/data/test1128 | 20 +- tests/data/test1129 | 28 +- tests/data/test113 | 2 +- tests/data/test1130 | 28 +- tests/data/test1131 | 24 +- tests/data/test1133 | 84 +- tests/data/test1134 | 20 +- tests/data/test1135 | 17 +- tests/data/test1137 | 16 +- tests/data/test1138 | 58 +- tests/data/test114 | 4 +- tests/data/test1141 | 20 +- tests/data/test1142 | 10 +- tests/data/test1143 | 8 +- tests/data/test1144 | 8 +- tests/data/test1147 | 64 + tests/data/test1148 | 57 + tests/data/test1149 | 64 + tests/data/test115 | 12 +- tests/data/test1150 | 55 + tests/data/test1151 | 66 + tests/data/test1152 | 61 + tests/data/test1153 | 61 + tests/data/test1154 | 57 + tests/data/test116 | 12 +- tests/data/test1160 | 49 + tests/data/test1161 | 54 + tests/data/test1162 | 52 + tests/data/test1163 | 52 + tests/data/test117 | 14 +- tests/data/test1170 | 70 + tests/data/test1171 | 70 + tests/data/test118 | 18 +- tests/data/test119 | 14 +- tests/data/test12 | 32 +- tests/data/test120 | 20 +- tests/data/test1200 | 8 +- tests/data/test1201 | 8 +- tests/data/test1202 | 10 +- tests/data/test1203 | 8 +- tests/data/test1204 | 62 +- tests/data/test1205 | 8 +- tests/data/test1206 | 14 +- tests/data/test1207 | 14 +- tests/data/test1208 | 12 +- tests/data/test1209 | 12 +- tests/data/test121 | 20 +- tests/data/test1210 | 8 +- tests/data/test1211 | 12 +- tests/data/test1212 | 10 +- tests/data/test1213 | 24 +- tests/data/test1214 | 24 +- tests/data/test1215 | 28 +- tests/data/test1216 | 24 +- tests/data/test1217 | 28 +- tests/data/test1218 | 34 +- tests/data/test1219 | 12 +- tests/data/test122 | 16 +- tests/data/test1223 | 8 +- tests/data/test1224 | 18 +- tests/data/test1225 | 34 +- tests/data/test1226 | 18 +- tests/data/test1227 | 16 +- tests/data/test1228 | 22 +- tests/data/test1229 | 62 +- tests/data/test123 | 12 +- tests/data/test1230 | 40 +- tests/data/test1231 | 16 +- tests/data/test1232 | 20 +- tests/data/test1233 | 18 +- tests/data/test1235 | 88 +- tests/data/test1237 | 10 +- tests/data/test1238 | 2 +- tests/data/test1239 | 10 +- tests/data/test124 | 18 +- tests/data/test1240 | 16 +- tests/data/test1241 | 20 +- tests/data/test1242 | 2 +- tests/data/test1243 | 2 +- tests/data/test1244 | 10 +- tests/data/test1245 | 24 +- tests/data/test1246 | 20 +- tests/data/test1248 | 10 +- tests/data/test1249 | 10 +- tests/data/test125 | 10 +- tests/data/test1250 | 10 +- tests/data/test1251 | 10 +- tests/data/test1252 | 8 +- tests/data/test1253 | 10 +- tests/data/test1254 | 10 +- tests/data/test1255 | 8 +- tests/data/test1256 | 10 +- tests/data/test1257 | 10 +- tests/data/test1258 | 26 +- tests/data/test1259 | 18 +- tests/data/test126 | 20 +- tests/data/test1260 | 36 + tests/data/test1261 | 61 + tests/data/test1262 | 40 + tests/data/test1263 | 37 + tests/data/test1264 | 36 + tests/data/test1265 | 53 + tests/data/test127 | 22 +- tests/data/test128 | 28 +- tests/data/test1280 | 32 +- tests/data/test1282 | 4 +- tests/data/test1283 | 28 +- tests/data/test1284 | 70 +- tests/data/test1285 | 68 +- tests/data/test1286 | 96 +- tests/data/test1287 | 91 + tests/data/test1288 | 96 + tests/data/test1289 | 35 + tests/data/test129 | 16 +- tests/data/test1290 | 48 + tests/data/test1291 | 51 + tests/data/test1292 | 50 + tests/data/test1298 | 56 + tests/data/test1299 | 55 + tests/data/test13 | 16 +- tests/data/test130 | 15 +- tests/data/test1309 | 111 + tests/data/test131 | 14 +- tests/data/test1310 | 24 +- tests/data/test1311 | 8 +- tests/data/test1312 | 8 +- tests/data/test1313 | 8 +- tests/data/test1314 | 20 +- tests/data/test1315 | 64 +- tests/data/test1316 | 32 +- tests/data/test1317 | 8 +- tests/data/test1318 | 16 +- tests/data/test1319 | 36 +- tests/data/test132 | 14 +- tests/data/test1320 | 44 +- tests/data/test1321 | 60 +- tests/data/test1322 | 8 +- tests/data/test1323 | 32 + tests/data/test1324 | 56 + tests/data/test1325 | 64 +- tests/data/test1326 | 8 +- tests/data/test1327 | 12 +- tests/data/test1328 | 16 +- tests/data/test133 | 14 +- tests/data/test1331 | 72 +- tests/data/test1332 | 26 +- tests/data/test1333 | 17 +- tests/data/test1334 | 36 +- tests/data/test1335 | 36 +- tests/data/test1336 | 40 +- tests/data/test1337 | 40 +- tests/data/test1338 | 36 +- tests/data/test1339 | 36 +- tests/data/test134 | 14 +- tests/data/test1340 | 40 +- tests/data/test1341 | 40 +- tests/data/test1342 | 50 +- tests/data/test1343 | 50 +- tests/data/test1344 | 56 +- tests/data/test1345 | 56 +- tests/data/test1346 | 36 +- tests/data/test1347 | 40 +- tests/data/test1348 | 18 +- tests/data/test1349 | 44 +- tests/data/test135 | 20 +- tests/data/test1350 | 44 +- tests/data/test1351 | 44 +- tests/data/test1352 | 44 +- tests/data/test1353 | 44 +- tests/data/test1354 | 44 +- tests/data/test1355 | 18 +- tests/data/test1356 | 50 +- tests/data/test1357 | 44 +- tests/data/test1358 | 44 +- tests/data/test1359 | 44 +- tests/data/test136 | 16 +- tests/data/test1360 | 44 +- tests/data/test1361 | 44 +- tests/data/test1362 | 44 +- tests/data/test1363 | 50 +- tests/data/test1364 | 36 +- tests/data/test1365 | 36 +- tests/data/test1366 | 40 +- tests/data/test1367 | 40 +- tests/data/test1368 | 36 +- tests/data/test1369 | 36 +- tests/data/test137 | 20 +- tests/data/test1370 | 40 +- tests/data/test1371 | 40 +- tests/data/test1372 | 50 +- tests/data/test1373 | 50 +- tests/data/test1374 | 56 +- tests/data/test1375 | 56 +- tests/data/test1376 | 36 +- tests/data/test1377 | 40 +- tests/data/test1378 | 18 +- tests/data/test1379 | 44 +- tests/data/test138 | 20 +- tests/data/test1380 | 44 +- tests/data/test1381 | 44 +- tests/data/test1382 | 44 +- tests/data/test1383 | 44 +- tests/data/test1384 | 44 +- tests/data/test1385 | 18 +- tests/data/test1386 | 50 +- tests/data/test1387 | 76 +- tests/data/test1388 | 76 +- tests/data/test1389 | 76 +- tests/data/test139 | 20 +- tests/data/test1390 | 76 +- tests/data/test1391 | 76 +- tests/data/test1392 | 76 +- tests/data/test1393 | 50 +- tests/data/test1399 | 26 + tests/data/test14 | 10 +- tests/data/test140 | 12 +- tests/data/test1400 | 14 +- tests/data/test1401 | 28 +- tests/data/test1402 | 20 +- tests/data/test1403 | 16 +- tests/data/test1404 | 133 +- tests/data/test1405 | 32 +- tests/data/test1406 | 49 +- tests/data/test1407 | 27 +- tests/data/test1408 | 18 +- tests/data/test141 | 24 +- tests/data/test1411 | 10 +- tests/data/test1412 | 100 +- tests/data/test1413 | 56 +- tests/data/test1414 | 14 +- tests/data/test1415 | 10 +- tests/data/test1416 | 24 +- tests/data/test1417 | 46 +- tests/data/test1418 | 82 +- tests/data/test1419 | 36 +- tests/data/test142 | 316 +- tests/data/test1420 | 41 +- tests/data/test1421 | 20 +- tests/data/test1422 | 24 +- tests/data/test1423 | 22 +- tests/data/test1424 | 10 +- tests/data/test1425 | Bin 0 -> 1726 bytes tests/data/test1426 | Bin 0 -> 1663 bytes tests/data/test1427 | 29 + tests/data/test1428 | 34 +- tests/data/test1429 | 12 +- tests/data/test143 | 20 +- tests/data/test1430 | 10 +- tests/data/test1431 | 10 +- tests/data/test1432 | 10 +- tests/data/test1433 | 28 +- tests/data/test1434 | 30 +- tests/data/test1435 | 8 +- tests/data/test1436 | 24 +- tests/data/test1437 | 64 +- tests/data/test1438 | 8 +- tests/data/test1439 | 8 +- tests/data/test144 | 14 +- tests/data/test1440 | 35 + tests/data/test1441 | 35 + tests/data/test1442 | 35 + tests/data/test1443 | 68 + tests/data/test1444 | 52 + tests/data/test1445 | 35 + tests/data/test1446 | 42 + tests/data/test1447 | 38 + tests/data/test1448 | 92 + tests/data/test1449 | 38 + tests/data/test145 | 14 +- tests/data/test1450 | 34 + tests/data/test1451 | 36 + tests/data/test1452 | 41 + tests/data/test1453 | 38 + tests/data/test1454 | 38 + tests/data/test146 | 30 +- tests/data/test147 | 26 +- tests/data/test148 | 14 +- tests/data/test149 | 24 +- tests/data/test15 | 32 +- tests/data/test150 | 68 +- tests/data/test1500 | 14 +- tests/data/test1501 | 16 +- tests/data/test1502 | 30 +- tests/data/test1503 | 30 +- tests/data/test1504 | 30 +- tests/data/test1505 | 30 +- tests/data/test1506 | 72 +- tests/data/test1507 | 8 +- tests/data/test1509 | 52 +- tests/data/test151 | 10 +- tests/data/test1510 | 72 +- tests/data/test1511 | 48 +- tests/data/test1512 | 56 +- tests/data/test1513 | 4 +- tests/data/test1514 | 20 +- tests/data/test1517 | 12 +- tests/data/test152 | 10 +- tests/data/test1520 | 52 +- tests/data/test1521 | 30 + tests/data/test1525 | 32 +- tests/data/test1526 | 56 +- tests/data/test1527 | 58 +- tests/data/test1528 | 32 +- tests/data/test1529 | 6 +- tests/data/test153 | 132 +- tests/data/test1532 | 14 +- tests/data/test1533 | 56 +- tests/data/test1534 | 16 +- tests/data/test1535 | 8 +- tests/data/test1536 | 8 +- tests/data/test1537 | 45 + tests/data/test1538 | 151 + tests/data/test154 | 84 +- tests/data/test1540 | 64 + tests/data/test155 | 116 +- tests/data/test1550 | 29 + tests/data/test1551 | 72 + tests/data/test1552 | 52 + tests/data/test1553 | 52 + tests/data/test1554 | 85 + tests/data/test1555 | 50 + tests/data/test1556 | 63 + tests/data/test156 | 24 +- tests/data/test157 | 18 +- tests/data/test158 | 31 +- tests/data/test159 | 40 +- tests/data/test16 | 26 +- tests/data/test160 | 48 +- tests/data/test1606 | 26 + tests/data/test1607 | 26 + tests/data/test161 | 14 +- tests/data/test162 | 14 +- tests/data/test163 | 37 +- tests/data/test164 | 50 +- tests/data/test165 | 39 +- tests/data/test166 | 27 +- tests/data/test167 | 50 +- tests/data/test168 | 74 +- tests/data/test169 | 108 +- tests/data/test17 | 12 +- tests/data/test170 | 16 +- tests/data/test171 | 24 +- tests/data/test172 | 18 +- tests/data/test173 | 35 +- tests/data/test174 | 26 +- tests/data/test175 | 68 +- tests/data/test176 | 70 +- tests/data/test177 | 24 +- tests/data/test178 | 17 +- tests/data/test179 | 14 +- tests/data/test18 | 78 +- tests/data/test180 | 10 +- tests/data/test1800 | 14 +- tests/data/test1801 | 14 +- tests/data/test181 | 12 +- tests/data/test182 | 16 +- tests/data/test183 | 30 +- tests/data/test184 | 54 +- tests/data/test185 | 58 +- tests/data/test186 | 37 +- tests/data/test187 | 16 +- tests/data/test188 | 24 +- tests/data/test189 | 24 +- tests/data/test190 | 8 +- tests/data/test1900 | 4 +- tests/data/test1901 | 4 +- tests/data/test1902 | 4 +- tests/data/test1903 | 4 +- tests/data/test1904 | 79 + tests/data/test191 | 16 +- tests/data/test192 | 8 +- tests/data/test193 | 16 +- tests/data/test194 | 52 +- tests/data/test195 | 4 +- tests/data/test196 | 8 +- tests/data/test197 | 16 +- tests/data/test198 | 16 +- tests/data/test199 | 16 +- tests/data/test2 | 10 +- tests/data/test2000 | 16 +- tests/data/test2001 | 68 +- tests/data/test2002 | 68 +- tests/data/test2003 | 104 +- tests/data/test2005 | 8 +- tests/data/test2006 | 8 +- tests/data/test2007 | 8 +- tests/data/test2008 | 8 +- tests/data/test2009 | 8 +- tests/data/test2010 | 8 +- tests/data/test2011 | 8 +- tests/data/test2012 | 8 +- tests/data/test2023 | 162 +- tests/data/test2024 | 174 +- tests/data/test2025 | 318 +- tests/data/test2026 | 246 +- tests/data/test2027 | 272 +- tests/data/test2028 | 390 +- tests/data/test2029 | 270 +- tests/data/test2030 | 336 +- tests/data/test2031 | 394 +- tests/data/test2032 | 123 +- tests/data/test2033 | 124 +- tests/data/test2034 | 8 +- tests/data/test2037 | 8 +- tests/data/test2039 | 14 +- tests/data/test2040 | 18 +- tests/data/test2041 | 8 +- tests/data/test2046 | 23 +- tests/data/test2047 | 27 +- tests/data/test2049 | 32 +- tests/data/test2050 | 16 +- tests/data/test2051 | 24 +- tests/data/test2052 | 16 +- tests/data/test2053 | 16 +- tests/data/test2054 | 32 +- tests/data/test2055 | 16 +- tests/data/test2056 | 87 + tests/data/test2057 | 108 + tests/data/test2058 | 107 + tests/data/test2059 | 107 + tests/data/test206 | 52 +- tests/data/test2060 | 107 + tests/data/test2061 | 84 + tests/data/test2062 | 84 + tests/data/test2063 | 84 + tests/data/test2064 | 84 + tests/data/test2065 | 84 + tests/data/test2066 | 84 + tests/data/test2067 | 89 + tests/data/test2068 | 89 + tests/data/test2069 | 89 + tests/data/test207 | 15 +- tests/data/test2070 | 41 + tests/data/test2071 | 41 + tests/data/test2072 | 38 + tests/data/test2073 | 68 + tests/data/test208 | 16 +- tests/data/test209 | 66 +- tests/data/test210 | 26 +- tests/data/test211 | 28 +- tests/data/test212 | 28 +- tests/data/test213 | 70 +- tests/data/test214 | 8 +- tests/data/test215 | 24 +- tests/data/test216 | 26 +- tests/data/test217 | 16 +- tests/data/test218 | 31 +- tests/data/test22 | 18 +- tests/data/test220 | 29 +- tests/data/test221 | 29 +- tests/data/test222 | 47 +- tests/data/test223 | 29 +- tests/data/test224 | 29 +- tests/data/test227 | 28 +- tests/data/test228 | 18 +- tests/data/test229 | 6 +- tests/data/test230 | 203 + tests/data/test232 | 202 + tests/data/test233 | 26 +- tests/data/test234 | 28 +- tests/data/test235 | 16 +- tests/data/test236 | 16 +- tests/data/test237 | 16 +- tests/data/test238 | 10 +- tests/data/test239 | 72 +- tests/data/test24 | 10 +- tests/data/test240 | 8 +- tests/data/test241 | 8 +- tests/data/test242 | 10 +- tests/data/test243 | 120 +- tests/data/test244 | 54 + tests/data/test245 | 74 +- tests/data/test246 | 94 +- tests/data/test247 | 10 +- tests/data/test248 | 16 +- tests/data/test249 | 10 +- tests/data/test25 | 60 +- tests/data/test250 | 14 +- tests/data/test251 | 14 +- tests/data/test252 | 14 +- tests/data/test253 | 12 +- tests/data/test254 | 14 +- tests/data/test255 | 12 +- tests/data/test256 | 20 +- tests/data/test257 | 36 +- tests/data/test258 | 110 +- tests/data/test259 | 116 +- tests/data/test26 | 10 +- tests/data/test260 | 8 +- tests/data/test261 | 16 +- tests/data/test263 | 10 +- tests/data/test264 | 22 +- tests/data/test265 | 70 +- tests/data/test266 | 64 +- tests/data/test267 | 84 +- tests/data/test268 | 32 +- tests/data/test269 | 8 +- tests/data/test27 | 28 +- tests/data/test270 | 16 +- tests/data/test271 | 2 +- tests/data/test272 | 10 +- tests/data/test273 | 64 +- tests/data/test274 | 10 +- tests/data/test275 | 44 +- tests/data/test276 | 16 +- tests/data/test277 | 25 +- tests/data/test278 | 24 +- tests/data/test279 | 24 +- tests/data/test28 | 16 +- tests/data/test280 | 18 +- tests/data/test281 | 12 +- tests/data/test282 | 8 +- tests/data/test283 | 2 +- tests/data/test284 | 2 +- tests/data/test285 | 2 +- tests/data/test286 | 2 +- tests/data/test287 | 18 +- tests/data/test29 | 16 +- tests/data/test290 | 14 +- tests/data/test291 | 16 +- tests/data/test292 | 8 +- tests/data/test293 | 8 +- tests/data/test294 | 18 +- tests/data/test295 | 4 +- tests/data/test296 | 22 +- tests/data/test297 | 18 +- tests/data/test298 | 18 +- tests/data/test299 | 12 +- tests/data/test3 | 34 +- tests/data/test30 | 8 +- tests/data/test300 | 8 +- tests/data/test301 | 10 +- tests/data/test302 | 4 +- tests/data/test303 | 16 +- tests/data/test304 | 46 +- tests/data/test306 | 8 +- tests/data/test307 | 8 +- tests/data/test308 | 1 + tests/data/test309 | 60 +- tests/data/test31 | 106 +- tests/data/test310 | 8 +- tests/data/test314 | 198 + tests/data/test315 | 91 + tests/data/test316 | 198 + tests/data/test317 | 94 + tests/data/test318 | 95 + tests/data/test319 | 57 + tests/data/test32 | 10 +- tests/data/test320 | 28 +- tests/data/test325 | 8 +- tests/data/test326 | 66 + tests/data/test33 | 16 +- tests/data/test34 | 24 +- tests/data/test340 | 40 + tests/data/test350 | 16 +- tests/data/test351 | 14 +- tests/data/test352 | 16 +- tests/data/test353 | 14 +- tests/data/test354 | 14 +- tests/data/test36 | 16 +- tests/data/test37 | 8 +- tests/data/test38 | 16 +- tests/data/test39 | 100 +- tests/data/test393 | 60 + tests/data/test394 | 59 + tests/data/test395 | 55 + tests/data/test4 | 26 +- tests/data/test40 | 58 +- tests/data/test400 | 18 +- tests/data/test401 | 18 +- tests/data/test402 | 4 +- tests/data/test403 | 20 +- tests/data/test406 | 18 +- tests/data/test407 | 30 +- tests/data/test408 | 24 +- tests/data/test409 | 18 +- tests/data/test42 | 58 +- tests/data/test43 | 20 +- tests/data/test44 | 42 +- tests/data/test45 | 16 +- tests/data/test46 | 36 +- tests/data/test47 | 8 +- tests/data/test48 | 16 +- tests/data/test49 | 18 +- tests/data/test5 | 10 +- tests/data/test50 | 18 +- tests/data/test500 | 30 +- tests/data/test503 | 28 +- tests/data/test505 | 18 +- tests/data/test506 | 103 +- tests/data/test508 | 24 +- tests/data/test51 | 18 +- tests/data/test510 | 47 +- tests/data/test511 | 10 +- tests/data/test512 | 18 +- tests/data/test513 | 12 +- tests/data/test514 | 30 +- tests/data/test515 | 22 +- tests/data/test516 | 20 +- tests/data/test517 | 90 - tests/data/test518 | 30 +- tests/data/test519 | 60 +- tests/data/test52 | 18 +- tests/data/test520 | 18 +- tests/data/test521 | 16 +- tests/data/test522 | 26 +- tests/data/test523 | 28 +- tests/data/test524 | 6 +- tests/data/test525 | 16 +- tests/data/test526 | 36 +- tests/data/test527 | 36 +- tests/data/test528 | 42 +- tests/data/test529 | 16 +- tests/data/test53 | 24 +- tests/data/test530 | 72 +- tests/data/test531 | 16 +- tests/data/test532 | 36 +- tests/data/test533 | 24 +- tests/data/test534 | 18 +- tests/data/test535 | 42 +- tests/data/test536 | 42 +- tests/data/test537 | 30 +- tests/data/test538 | 4 +- tests/data/test539 | 28 +- tests/data/test54 | 8 +- tests/data/test540 | 87 +- tests/data/test541 | 18 +- tests/data/test542 | 18 +- tests/data/test544 | 22 +- tests/data/test546 | 24 +- tests/data/test547 | 120 +- tests/data/test548 | 120 +- tests/data/test549 | 26 +- tests/data/test55 | 18 +- tests/data/test550 | 26 +- tests/data/test551 | 74 +- tests/data/test553 | 36 +- tests/data/test554 | 154 +- tests/data/test555 | 126 +- tests/data/test556 | 18 +- tests/data/test558 | 1 + tests/data/test559 | 50 + tests/data/test56 | 22 +- tests/data/test560 | 18 +- tests/data/test561 | 26 +- tests/data/test562 | 16 +- tests/data/test563 | 24 +- tests/data/test564 | 20 +- tests/data/test565 | 117 +- tests/data/test566 | 30 +- tests/data/test567 | 20 +- tests/data/test568 | 74 +- tests/data/test569 | 52 +- tests/data/test57 | 8 +- tests/data/test570 | 58 +- tests/data/test571 | 46 +- tests/data/test572 | 108 +- tests/data/test573 | 30 +- tests/data/test574 | 82 +- tests/data/test575 | 126 +- tests/data/test577 | 55 + tests/data/test578 | 22 +- tests/data/test579 | 64 +- tests/data/test58 | 12 +- tests/data/test580 | 24 +- tests/data/test581 | 24 +- tests/data/test584 | 96 +- tests/data/test585 | 36 +- tests/data/test586 | 16 +- tests/data/test587 | 20 +- tests/data/test588 | 14 +- tests/data/test589 | 55 + tests/data/test59 | 8 +- tests/data/test590 | 104 +- tests/data/test591 | 14 +- tests/data/test592 | 14 +- tests/data/test593 | 14 +- tests/data/test594 | 14 +- tests/data/test595 | 16 +- tests/data/test596 | 14 +- tests/data/test597 | 8 +- tests/data/test598 | 58 +- tests/data/test599 | 69 +- tests/data/test6 | 10 +- tests/data/test60 | 31 +- tests/data/test605 | 2 +- tests/data/test61 | 34 +- tests/data/test62 | 28 +- tests/data/test623 | 2 +- tests/data/test63 | 20 +- tests/data/test64 | 64 +- tests/data/test642 | 42 + tests/data/test643 | 131 + tests/data/test644 | 59 + tests/data/test645 | 141 + tests/data/test646 | 98 + tests/data/test647 | 79 + tests/data/test648 | 75 + tests/data/test649 | 72 + tests/data/test65 | 68 +- tests/data/test650 | 123 + tests/data/test651 | 73 + tests/data/test652 | 358 + tests/data/test653 | 93 + tests/data/test654 | 109 + tests/data/test655 | 50 + tests/data/test66 | 8 +- tests/data/test67 | 68 +- tests/data/test68 | 72 +- tests/data/test69 | 110 +- tests/data/test7 | 8 +- tests/data/test70 | 70 +- tests/data/test700 | 8 +- tests/data/test701 | 8 +- tests/data/test706 | 14 +- tests/data/test707 | 14 +- tests/data/test708 | 8 +- tests/data/test709 | 8 +- tests/data/test71 | 41 +- tests/data/test710 | 8 +- tests/data/test711 | 16 +- tests/data/test712 | 16 +- tests/data/test713 | 16 +- tests/data/test714 | 19 +- tests/data/test715 | 19 +- tests/data/test72 | 70 +- tests/data/test73 | 20 +- tests/data/test74 | 16 +- tests/data/test77 | 10 +- tests/data/test78 | 10 +- tests/data/test79 | 10 +- tests/data/test8 | 10 +- tests/data/test80 | 32 +- tests/data/test800 | 26 +- tests/data/test801 | 18 +- tests/data/test802 | 18 +- tests/data/test803 | 8 +- tests/data/test804 | 20 +- tests/data/test805 | 44 +- tests/data/test806 | 14 +- tests/data/test807 | 14 +- tests/data/test808 | 22 +- tests/data/test809 | 10 +- tests/data/test81 | 72 +- tests/data/test810 | 12 +- tests/data/test811 | 8 +- tests/data/test812 | 8 +- tests/data/test813 | 8 +- tests/data/test814 | 10 +- tests/data/test815 | 14 +- tests/data/test816 | 20 +- tests/data/test817 | 8 +- tests/data/test818 | 16 +- tests/data/test819 | 26 +- tests/data/test82 | 24 +- tests/data/test820 | 28 +- tests/data/test821 | 26 +- tests/data/test822 | 30 +- tests/data/test823 | 30 +- tests/data/test824 | 26 +- tests/data/test825 | 24 +- tests/data/test826 | 26 +- tests/data/test827 | 28 +- tests/data/test828 | 24 +- tests/data/test83 | 30 +- tests/data/test830 | 6 +- tests/data/test831 | 8 +- tests/data/test832 | 6 +- tests/data/test833 | 30 +- tests/data/test834 | 32 +- tests/data/test835 | 30 +- tests/data/test836 | 38 +- tests/data/test837 | 26 +- tests/data/test838 | 26 +- tests/data/test839 | 24 +- tests/data/test84 | 14 +- tests/data/test840 | 24 +- tests/data/test841 | 22 +- tests/data/test842 | 28 +- tests/data/test843 | 26 +- tests/data/test844 | 10 +- tests/data/test845 | 8 +- tests/data/test846 | 50 + tests/data/test85 | 16 +- tests/data/test850 | 24 +- tests/data/test851 | 10 +- tests/data/test852 | 10 +- tests/data/test853 | 16 +- tests/data/test854 | 10 +- tests/data/test855 | 10 +- tests/data/test856 | 9 +- tests/data/test857 | 42 +- tests/data/test858 | 10 +- tests/data/test859 | 10 +- tests/data/test86 | 30 +- tests/data/test860 | 10 +- tests/data/test861 | 30 +- tests/data/test862 | 26 +- tests/data/test863 | 10 +- tests/data/test864 | 22 +- tests/data/test865 | 24 +- tests/data/test866 | 26 +- tests/data/test867 | 24 +- tests/data/test868 | 30 +- tests/data/test869 | 28 +- tests/data/test87 | 28 +- tests/data/test870 | 24 +- tests/data/test871 | 22 +- tests/data/test872 | 24 +- tests/data/test873 | 26 +- tests/data/test874 | 22 +- tests/data/test876 | 6 +- tests/data/test877 | 8 +- tests/data/test878 | 6 +- tests/data/test879 | 28 +- tests/data/test88 | 70 +- tests/data/test880 | 30 +- tests/data/test881 | 28 +- tests/data/test882 | 36 +- tests/data/test883 | 24 +- tests/data/test884 | 24 +- tests/data/test885 | 22 +- tests/data/test886 | 22 +- tests/data/test887 | 26 +- tests/data/test888 | 24 +- tests/data/test889 | 10 +- tests/data/test89 | 136 +- tests/data/test890 | 8 +- tests/data/test891 | 47 + tests/data/test9 | 43 +- tests/data/test90 | 216 +- tests/data/test900 | 28 +- tests/data/test901 | 52 +- tests/data/test902 | 30 +- tests/data/test903 | 20 +- tests/data/test904 | 22 +- tests/data/test905 | 20 +- tests/data/test906 | 26 +- tests/data/test907 | 24 +- tests/data/test908 | 20 +- tests/data/test909 | 28 +- tests/data/test91 | 114 +- tests/data/test910 | 26 +- tests/data/test911 | 13 +- tests/data/test912 | 28 +- tests/data/test913 | 14 +- tests/data/test914 | 14 +- tests/data/test915 | 28 +- tests/data/test916 | 16 +- tests/data/test917 | 36 +- tests/data/test918 | 18 +- tests/data/test919 | 18 +- tests/data/test92 | 30 +- tests/data/test920 | 20 +- tests/data/test921 | 26 +- tests/data/test922 | 18 +- tests/data/test923 | 8 +- tests/data/test924 | 14 +- tests/data/test925 | 8 +- tests/data/test926 | 8 +- tests/data/test927 | 12 +- tests/data/test928 | 10 +- tests/data/test929 | 6 +- tests/data/test93 | 10 +- tests/data/test930 | 6 +- tests/data/test932 | 6 +- tests/data/test933 | 8 +- tests/data/test934 | 6 +- tests/data/test935 | 24 +- tests/data/test936 | 26 +- tests/data/test937 | 24 +- tests/data/test938 | 36 +- tests/data/test939 | 18 +- tests/data/test94 | 10 +- tests/data/test940 | 16 +- tests/data/test941 | 34 +- tests/data/test942 | 20 +- tests/data/test943 | 20 +- tests/data/test944 | 18 +- tests/data/test945 | 18 +- tests/data/test946 | 22 +- tests/data/test947 | 20 +- tests/data/test948 | 12 +- tests/data/test949 | 10 +- tests/data/test95 | 32 +- tests/data/test950 | 43 + tests/data/test951 | 45 + tests/data/test952 | 45 + tests/data/test97 | 22 +- tests/data/test98 | 22 +- tests/data/test99 | 10 +- tests/dictserver.py | 159 + tests/extern-scan.pl | 4 +- tests/ftpserver.pl | 41 +- tests/http2-server.pl | 10 +- tests/httpserver.pl | 2 +- tests/libtest/CMakeLists.txt | 13 +- tests/libtest/Makefile.am | 40 +- tests/libtest/Makefile.in | 1963 +++- tests/libtest/Makefile.inc | 84 +- tests/libtest/first.c | 16 +- tests/libtest/lib1501.c | 29 +- tests/libtest/lib1502.c | 6 +- tests/libtest/lib1506.c | 12 +- tests/libtest/lib1507.c | 25 +- tests/libtest/lib1509.c | 2 +- tests/libtest/lib1510.c | 6 +- tests/libtest/lib1512.c | 6 +- tests/libtest/lib1513.c | 4 +- tests/libtest/lib1515.c | 12 +- tests/libtest/lib1517.c | 4 +- tests/libtest/lib1521.c | 2571 +++++ tests/libtest/lib1525.c | 2 +- tests/libtest/lib1526.c | 2 +- tests/libtest/lib1527.c | 2 +- tests/libtest/lib1531.c | 19 +- tests/libtest/lib1537.c | 94 + tests/libtest/lib1538.c | 52 + tests/libtest/lib1540.c | 121 + tests/libtest/lib1550.c | 46 + tests/libtest/lib1551.c | 47 + tests/libtest/lib1552.c | 93 + tests/libtest/lib1553.c | 109 + tests/libtest/lib1554.c | 91 + tests/libtest/lib1555.c | 77 + tests/libtest/lib1556.c | 78 + tests/libtest/lib1900.c | 44 +- tests/libtest/lib500.c | 4 +- tests/libtest/lib501.c | 5 +- tests/libtest/lib502.c | 4 +- tests/libtest/lib503.c | 4 +- tests/libtest/lib504.c | 4 +- tests/libtest/lib505.c | 11 +- tests/libtest/lib506.c | 12 +- tests/libtest/lib507.c | 4 +- tests/libtest/lib508.c | 4 +- tests/libtest/lib509.c | 14 +- tests/libtest/lib510.c | 8 +- tests/libtest/lib513.c | 4 +- tests/libtest/lib514.c | 4 +- tests/libtest/lib515.c | 4 +- tests/libtest/lib516.c | 4 +- tests/libtest/lib517.c | 228 +- tests/libtest/lib518.c | 18 +- tests/libtest/lib525.c | 11 +- tests/libtest/lib526.c | 16 +- tests/libtest/lib530.c | 10 +- tests/libtest/lib533.c | 6 +- tests/libtest/lib536.c | 4 +- tests/libtest/lib537.c | 22 +- tests/libtest/lib540.c | 14 +- tests/libtest/lib541.c | 7 +- tests/libtest/lib543.c | 12 +- tests/libtest/lib544.c | 13 +- tests/libtest/lib547.c | 4 +- tests/libtest/lib552.c | 37 +- tests/libtest/lib553.c | 8 +- tests/libtest/lib554.c | 17 +- tests/libtest/lib555.c | 30 +- tests/libtest/lib556.c | 4 +- tests/libtest/lib557.c | 113 +- tests/libtest/lib559.c | 56 + tests/libtest/lib560.c | 6 +- tests/libtest/lib564.c | 4 +- tests/libtest/lib567.c | 4 +- tests/libtest/lib568.c | 6 +- tests/libtest/lib569.c | 4 +- tests/libtest/lib570.c | 4 +- tests/libtest/lib571.c | 8 +- tests/libtest/lib572.c | 6 +- tests/libtest/lib573.c | 4 +- tests/libtest/lib574.c | 6 +- tests/libtest/lib575.c | 4 +- tests/libtest/lib578.c | 6 +- tests/libtest/lib579.c | 4 +- tests/libtest/lib582.c | 14 +- tests/libtest/lib583.c | 8 +- tests/libtest/lib586.c | 14 +- tests/libtest/lib589.c | 59 + tests/libtest/lib591.c | 10 +- tests/libtest/lib597.c | 13 +- tests/libtest/lib599.c | 4 +- tests/libtest/lib643.c | 297 + tests/libtest/lib650.c | 211 + tests/libtest/lib651.c | 94 + tests/libtest/lib652.c | 128 + tests/libtest/lib653.c | 63 + tests/libtest/lib654.c | 174 + tests/libtest/lib655.c | 112 + tests/libtest/libauthretry.c | 5 - tests/libtest/libntlmconnect.c | 72 +- tests/libtest/mk-lib1521.pl | 310 + tests/libtest/stub_gssapi.c | 397 + tests/libtest/stub_gssapi.h | 183 + tests/libtest/test.h | 2 +- tests/libtest/test613.pl | 4 + tests/libtest/testtrace.c | 23 +- tests/libtest/testutil.c | 15 +- tests/libtest/testutil.h | 2 - tests/manpage-scan.pl | 7 +- tests/mem-include-scan.pl | 0 tests/memanalyze.pl | 30 +- tests/negtelnetserver.py | 349 + tests/nroff-scan.pl | 4 +- tests/pathhelp.pm | 2 +- tests/python_dependencies/impacket/__init__.py | 25 + tests/python_dependencies/impacket/nmb.py | 980 ++ tests/python_dependencies/impacket/nt_errors.py | 3586 ++++++ tests/python_dependencies/impacket/ntlm.py | 971 ++ tests/python_dependencies/impacket/smb.py | 4099 +++++++ tests/python_dependencies/impacket/smb3.py | 1629 +++ tests/python_dependencies/impacket/smb3structs.py | 1363 +++ tests/python_dependencies/impacket/smbserver.py | 4168 +++++++ tests/python_dependencies/impacket/spnego.py | 372 + tests/python_dependencies/impacket/structure.py | 743 ++ tests/python_dependencies/impacket/uuid.py | 68 + tests/python_dependencies/impacket/version.py | 12 + tests/rtspserver.pl | 4 +- tests/runtests.1 | 7 +- tests/runtests.html | 98 - tests/runtests.pdf | Bin 7639 -> 0 bytes tests/runtests.pl | 675 +- tests/secureserver.pl | 8 +- tests/server/CMakeLists.txt | 8 +- tests/server/Makefile.am | 17 +- tests/server/Makefile.in | 322 +- tests/server/Makefile.inc | 8 +- tests/server/base64.pl | 2 +- tests/server/fake_ntlm.c | 43 +- tests/server/getpart.c | 46 +- tests/server/resolve.c | 60 +- tests/server/rtspd.c | 49 +- tests/server/sockfilt.c | 28 +- tests/server/sws.c | 115 +- tests/server/testpart.c | 3 +- tests/server/tftpd.c | 24 +- tests/server/util.c | 133 +- tests/server/util.h | 3 +- tests/serverhelp.pm | 2 +- tests/smbserver.py | 377 + tests/sshserver.pl | 2 +- tests/symbol-scan.pl | 0 tests/testcurl.1 | 3 +- tests/testcurl.html | 122 - tests/testcurl.pdf | Bin 7238 -> 0 bytes tests/testcurl.pl | 17 +- tests/tftpserver.pl | 4 +- tests/unit/CMakeLists.txt | 2 +- tests/unit/Makefile.am | 17 +- tests/unit/Makefile.in | 302 +- tests/unit/Makefile.inc | 18 +- tests/unit/curlcheck.h | 7 +- tests/unit/unit1300.c | 214 +- tests/unit/unit1301.c | 4 +- tests/unit/unit1302.c | 6 +- tests/unit/unit1303.c | 16 +- tests/unit/unit1305.c | 11 +- tests/unit/unit1307.c | 45 +- tests/unit/unit1308.c | 6 +- tests/unit/unit1309.c | 63 +- tests/unit/unit1323.c | 66 + tests/unit/unit1395.c | 15 +- tests/unit/unit1396.c | 14 +- tests/unit/unit1398.c | 4 +- tests/unit/unit1399.c | 117 + tests/unit/unit1600.c | 10 +- tests/unit/unit1604.c | 35 +- tests/unit/unit1605.c | 16 +- tests/unit/unit1606.c | 89 + tests/unit/unit1607.c | 213 + tests/valgrind.pm | 4 +- tests/valgrind.supp | 21 + winbuild/BUILD.WINDOWS.txt | 206 +- winbuild/Makefile.vc | 52 +- winbuild/MakefileBuild.vc | 1098 +- 2152 files changed, 162071 insertions(+), 107665 deletions(-) create mode 100644 CMake/FindMbedTLS.cmake create mode 100644 CMake/cmake_uninstall.cmake.in create mode 100644 CMake/curl-config.cmake mode change 100644 => 100755 acinclude.m4 mode change 100644 => 100755 configure.ac create mode 100644 docs/CIPHERS.md create mode 100644 docs/CMakeLists.txt create mode 100644 docs/HELP-US.md create mode 100644 docs/INSTALL.cmake create mode 100644 docs/README.cmake create mode 100644 docs/README.md rename docs/{SECURITY.md => SECURITY-PROCESS.md} (95%) create mode 100644 docs/cmdline-opts/CMakeLists.txt create mode 100644 docs/cmdline-opts/Makefile.inc create mode 100644 docs/cmdline-opts/compressed-ssh.d delete mode 100644 docs/cmdline-opts/environment.d create mode 100644 docs/cmdline-opts/happy-eyeballs-timeout-ms.d create mode 100644 docs/cmdline-opts/proxy-pinnedpubkey.d create mode 100644 docs/cmdline-opts/request-target.d create mode 100644 docs/cmdline-opts/socks5-basic.d create mode 100644 docs/cmdline-opts/socks5-gssapi.d create mode 100644 docs/cmdline-opts/suppress-connect-headers.d create mode 100644 docs/cmdline-opts/tls-max.d create mode 100644 docs/examples/ftpuploadfrommem.c create mode 100644 docs/examples/multi-formadd.c create mode 100644 docs/examples/postit2-formadd.c create mode 100644 docs/examples/sftpuploadresume.c create mode 100644 docs/examples/shared-connection-cache.c create mode 100644 docs/examples/smtp-mime.c create mode 100644 docs/examples/sslbackend.c create mode 100644 docs/examples/threaded-shared-conn.c create mode 100644 docs/libcurl/CMakeLists.txt create mode 100644 docs/libcurl/Makefile.inc create mode 100644 docs/libcurl/curl_global_sslset.3 create mode 100644 docs/libcurl/curl_mime_addpart.3 create mode 100644 docs/libcurl/curl_mime_data.3 create mode 100644 docs/libcurl/curl_mime_data_cb.3 create mode 100644 docs/libcurl/curl_mime_encoder.3 create mode 100644 docs/libcurl/curl_mime_filedata.3 create mode 100644 docs/libcurl/curl_mime_filename.3 create mode 100644 docs/libcurl/curl_mime_free.3 create mode 100644 docs/libcurl/curl_mime_headers.3 create mode 100644 docs/libcurl/curl_mime_init.3 create mode 100644 docs/libcurl/curl_mime_name.3 create mode 100644 docs/libcurl/curl_mime_subparts.3 create mode 100644 docs/libcurl/curl_mime_type.3 create mode 100644 docs/libcurl/curl_strnequal.3 create mode 100644 docs/libcurl/libcurl-env.3 create mode 100644 docs/libcurl/libcurl-security.3 mode change 100644 => 100755 docs/libcurl/mksymbolsmanpage.pl create mode 100644 docs/libcurl/opts/CMakeLists.txt create mode 100644 docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 create mode 100644 docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 create mode 100644 docs/libcurl/opts/CURLINFO_FILETIME_T.3 create mode 100644 docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 create mode 100644 docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 create mode 100644 docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 create mode 100644 docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 create mode 100644 docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 create mode 100644 docs/libcurl/opts/CURLOPT_MIMEPOST.3 create mode 100644 docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 create mode 100644 docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 create mode 100644 docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 create mode 100644 docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 create mode 100644 docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 create mode 100644 docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 create mode 100644 docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 create mode 100644 docs/libcurl/opts/Makefile.inc create mode 100644 docs/mk-ca-bundle.1 delete mode 100644 include/curl/curlbuild.h.cmake delete mode 100644 include/curl/curlbuild.h.in delete mode 100644 include/curl/curlrules.h rename include/curl/{curlbuild.h => system.h} (53%) delete mode 100644 lib/Makefile.vc10 delete mode 100644 lib/Makefile.vc11 delete mode 100644 lib/Makefile.vc12 delete mode 100644 lib/Makefile.vc14 delete mode 100644 lib/Makefile.vc7 delete mode 100644 lib/Makefile.vc8 delete mode 100644 lib/Makefile.vc9 create mode 100644 lib/curl_ctype.c create mode 100644 lib/curl_ctype.h create mode 100644 lib/curl_path.c create mode 100644 lib/curl_path.h create mode 100644 lib/curl_range.c rename src/tool_writeenv.h => lib/curl_range.h (75%) create mode 100644 lib/curl_sha256.h create mode 100644 lib/mime.c create mode 100644 lib/mime.h create mode 100644 lib/setopt.c create mode 100644 lib/setopt.h create mode 100644 lib/sha256.c create mode 100644 lib/ssh-libssh.c create mode 100644 m4/ax_code_coverage.m4 create mode 100644 projects/Windows/VC15/curl-all.sln create mode 100644 projects/Windows/VC15/lib/libcurl.sln create mode 100644 projects/Windows/VC15/lib/libcurl.vcxproj create mode 100644 projects/Windows/VC15/lib/libcurl.vcxproj.filters create mode 100644 projects/Windows/VC15/src/curl.sln create mode 100644 projects/Windows/VC15/src/curl.vcxproj create mode 100644 projects/Windows/VC15/src/curl.vcxproj.filters create mode 100644 projects/generate.bat create mode 100644 projects/wolfssl_options.h create mode 100644 projects/wolfssl_override.props create mode 100755 scripts/coverage.sh create mode 100755 scripts/updatemanpages.pl delete mode 100644 src/Makefile.vc10 delete mode 100644 src/Makefile.vc11 delete mode 100644 src/Makefile.vc12 delete mode 100644 src/Makefile.vc14 delete mode 100644 src/Makefile.vc7 delete mode 100644 src/Makefile.vc8 delete mode 100644 src/Makefile.vc9 mode change 100644 => 100755 src/mkhelp.pl create mode 100644 src/tool_filetime.c rename src/{tool_mfiles.h => tool_filetime.h} (56%) delete mode 100644 src/tool_mfiles.c delete mode 100644 src/tool_writeenv.c create mode 100755 tests/curl_test_data.py create mode 100644 tests/data/test1147 create mode 100644 tests/data/test1148 create mode 100644 tests/data/test1149 create mode 100644 tests/data/test1150 create mode 100644 tests/data/test1151 create mode 100644 tests/data/test1152 create mode 100644 tests/data/test1153 create mode 100644 tests/data/test1154 create mode 100644 tests/data/test1160 create mode 100644 tests/data/test1161 create mode 100644 tests/data/test1162 create mode 100644 tests/data/test1163 create mode 100644 tests/data/test1170 create mode 100644 tests/data/test1171 create mode 100644 tests/data/test1260 create mode 100644 tests/data/test1261 create mode 100644 tests/data/test1262 create mode 100644 tests/data/test1263 create mode 100644 tests/data/test1264 create mode 100644 tests/data/test1265 create mode 100644 tests/data/test1287 create mode 100644 tests/data/test1288 create mode 100644 tests/data/test1289 create mode 100644 tests/data/test1290 create mode 100644 tests/data/test1291 create mode 100644 tests/data/test1292 create mode 100644 tests/data/test1298 create mode 100644 tests/data/test1299 create mode 100644 tests/data/test1323 create mode 100644 tests/data/test1324 create mode 100644 tests/data/test1399 create mode 100644 tests/data/test1425 create mode 100644 tests/data/test1426 create mode 100644 tests/data/test1427 create mode 100644 tests/data/test1440 create mode 100644 tests/data/test1441 create mode 100644 tests/data/test1442 create mode 100644 tests/data/test1443 create mode 100644 tests/data/test1444 create mode 100644 tests/data/test1445 create mode 100644 tests/data/test1446 create mode 100644 tests/data/test1447 create mode 100644 tests/data/test1448 create mode 100644 tests/data/test1449 create mode 100644 tests/data/test1450 create mode 100644 tests/data/test1451 create mode 100644 tests/data/test1452 create mode 100644 tests/data/test1453 create mode 100644 tests/data/test1454 create mode 100644 tests/data/test1521 create mode 100644 tests/data/test1537 create mode 100644 tests/data/test1538 create mode 100644 tests/data/test1540 create mode 100644 tests/data/test1550 create mode 100644 tests/data/test1551 create mode 100644 tests/data/test1552 create mode 100644 tests/data/test1553 create mode 100644 tests/data/test1554 create mode 100644 tests/data/test1555 create mode 100644 tests/data/test1556 create mode 100644 tests/data/test1606 create mode 100644 tests/data/test1607 create mode 100644 tests/data/test1904 mode change 100755 => 100644 tests/data/test2055 create mode 100644 tests/data/test2056 create mode 100644 tests/data/test2057 create mode 100644 tests/data/test2058 create mode 100644 tests/data/test2059 create mode 100644 tests/data/test2060 create mode 100644 tests/data/test2061 create mode 100644 tests/data/test2062 create mode 100644 tests/data/test2063 create mode 100644 tests/data/test2064 create mode 100644 tests/data/test2065 create mode 100644 tests/data/test2066 create mode 100644 tests/data/test2067 create mode 100644 tests/data/test2068 create mode 100644 tests/data/test2069 create mode 100644 tests/data/test2070 create mode 100644 tests/data/test2071 create mode 100644 tests/data/test2072 create mode 100644 tests/data/test2073 create mode 100644 tests/data/test230 create mode 100644 tests/data/test232 create mode 100644 tests/data/test244 create mode 100644 tests/data/test314 create mode 100644 tests/data/test315 create mode 100644 tests/data/test316 create mode 100644 tests/data/test317 create mode 100644 tests/data/test318 create mode 100644 tests/data/test319 create mode 100644 tests/data/test326 create mode 100644 tests/data/test340 create mode 100644 tests/data/test393 create mode 100644 tests/data/test394 create mode 100644 tests/data/test395 create mode 100644 tests/data/test559 create mode 100644 tests/data/test577 create mode 100644 tests/data/test589 create mode 100644 tests/data/test642 create mode 100644 tests/data/test643 create mode 100644 tests/data/test644 create mode 100644 tests/data/test645 create mode 100644 tests/data/test646 create mode 100644 tests/data/test647 create mode 100644 tests/data/test648 create mode 100644 tests/data/test649 create mode 100644 tests/data/test650 create mode 100644 tests/data/test651 create mode 100644 tests/data/test652 create mode 100644 tests/data/test653 create mode 100644 tests/data/test654 create mode 100644 tests/data/test655 mode change 100755 => 100644 tests/data/test713 mode change 100755 => 100644 tests/data/test714 mode change 100755 => 100644 tests/data/test715 create mode 100644 tests/data/test846 create mode 100644 tests/data/test891 create mode 100644 tests/data/test950 create mode 100644 tests/data/test951 create mode 100644 tests/data/test952 create mode 100755 tests/dictserver.py create mode 100644 tests/libtest/lib1521.c create mode 100644 tests/libtest/lib1537.c create mode 100644 tests/libtest/lib1538.c create mode 100644 tests/libtest/lib1540.c create mode 100644 tests/libtest/lib1550.c create mode 100644 tests/libtest/lib1551.c create mode 100644 tests/libtest/lib1552.c create mode 100644 tests/libtest/lib1553.c create mode 100644 tests/libtest/lib1554.c create mode 100644 tests/libtest/lib1555.c create mode 100644 tests/libtest/lib1556.c create mode 100644 tests/libtest/lib559.c create mode 100644 tests/libtest/lib589.c create mode 100644 tests/libtest/lib643.c create mode 100644 tests/libtest/lib650.c create mode 100644 tests/libtest/lib651.c create mode 100644 tests/libtest/lib652.c create mode 100644 tests/libtest/lib653.c create mode 100644 tests/libtest/lib654.c create mode 100644 tests/libtest/lib655.c create mode 100755 tests/libtest/mk-lib1521.pl create mode 100644 tests/libtest/stub_gssapi.c create mode 100644 tests/libtest/stub_gssapi.h mode change 100644 => 100755 tests/manpage-scan.pl mode change 100644 => 100755 tests/mem-include-scan.pl create mode 100755 tests/negtelnetserver.py mode change 100644 => 100755 tests/nroff-scan.pl create mode 100644 tests/python_dependencies/impacket/__init__.py create mode 100644 tests/python_dependencies/impacket/nmb.py create mode 100644 tests/python_dependencies/impacket/nt_errors.py create mode 100644 tests/python_dependencies/impacket/ntlm.py create mode 100644 tests/python_dependencies/impacket/smb.py create mode 100644 tests/python_dependencies/impacket/smb3.py create mode 100644 tests/python_dependencies/impacket/smb3structs.py create mode 100644 tests/python_dependencies/impacket/smbserver.py create mode 100644 tests/python_dependencies/impacket/spnego.py create mode 100644 tests/python_dependencies/impacket/structure.py create mode 100644 tests/python_dependencies/impacket/uuid.py create mode 100644 tests/python_dependencies/impacket/version.py delete mode 100644 tests/runtests.html delete mode 100644 tests/runtests.pdf mode change 100644 => 100755 tests/server/base64.pl create mode 100755 tests/smbserver.py mode change 100644 => 100755 tests/symbol-scan.pl delete mode 100644 tests/testcurl.html delete mode 100644 tests/testcurl.pdf create mode 100644 tests/unit/unit1323.c create mode 100644 tests/unit/unit1399.c create mode 100644 tests/unit/unit1606.c create mode 100644 tests/unit/unit1607.c diff --git a/CHANGES b/CHANGES index 45b9588..dce9c17 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6052 +6,6965 @@ Changelog -Version 7.53.1 (24 Feb 2017) +Version 7.59.0 (13 Mar 2018) -Daniel Stenberg (24 Feb 2017) -- release: 7.53.1 +Daniel Stenberg (13 Mar 2018) +- release: 7.59.0 -- Revert "tests: use consistent environment variables for setting charset" +Kamil Dudka (13 Mar 2018) +- tests/.../spnego.py: fix identifier typo - This reverts commit ecd1d020abdae3c3ce3643ddab3106501e62e7c0. + Detected by Coverity Analysis: - That commit caused test failures on my Debian Linux machine for all - changed test cases. We need to reconsider how that should get done. - -Dan Fandrich (23 Feb 2017) -- tests: use consistent environment variables for setting charset + Error: IDENTIFIER_TYPO: + curl-7.58.0/tests/python_dependencies/impacket/spnego.py:229: identifier_typo: Using "SuportedMech" appears to be a typo: + * Identifier "SuportedMech" is only known to be referenced here, or in copies of this code. + * Identifier "SupportedMech" is referenced elsewhere at least 4 times. + curl-7.58.0/tests/python_dependencies/impacket/smbserver.py:2651: identifier_use: Example 1: Using identifier "SupportedMech". + curl-7.58.0/tests/python_dependencies/impacket/smbserver.py:2308: identifier_use: Example 2: Using identifier "SupportedMech". + curl-7.58.0/tests/python_dependencies/impacket/spnego.py:252: identifier_use: Example 3: Using identifier "SupportedMech" (2 total uses in this function). + curl-7.58.0/tests/python_dependencies/impacket/spnego.py:229: remediation: Should identifier "SuportedMech" be replaced by "SupportedMech"? - Character set in POSIX is set by the locale defined (in decreasing order - of precedence) by the LC_ALL, LC_CTYPE and LANG environment variables (I - believe CHARSET is only historic). LC_ALL is cleared to ensure that - LC_CTYPE takes effect, but LC_ALL is not used to set the locale to - ensure that other parts of the locale aren't overriden, if set. Since - there doesn't seem to be a cross-platform way of specifying a UTF-8 - locale, and not all systems may support UTF-8, a is used - (where relevant) to skip the test if UTF-8 isn't in use. Test 1035 was - also converted to UTF-8 for consistency, as the actual character set - used there is irrelevant to the test. + Closes #2379 -Jay Satiro (23 Feb 2017) -- url: Default the CA proxy bundle location to CURL_CA_BUNDLE +Daniel Stenberg (13 Mar 2018) +- CURLOPT_COOKIEFILE.3: "-" as file name means stdin - If the compile-time CURL_CA_BUNDLE location is defined use it as the - default value for the proxy CA bundle location, which is the same as - what we already do for the regular CA bundle location. + Reported-by: Aron Bergman + Bug: https://curl.haxx.se/mail/lib-2018-03/0049.html - Ref: https://github.com/curl/curl/pull/1257 - -Daniel Stenberg (23 Feb 2017) -- [Sergii Pylypenko brought this change] + [ci skip] - rand: added missing #ifdef HAVE_FCNTL_H around fcntl.h header +- Revert "hostip: fix compiler warning: 'variable set but not used'" - Closes #1285 + This reverts commit a577059f92fc65bd6b81717f0737f897a5b34248. + + The assignment really needs to be there or we risk working with an + uninitialized pointer. -- TODO: "OPTIONS *" +Michael Kaufmann (12 Mar 2018) +- limit-rate: fix compiler warning - Closes #1280 + follow-up to 72a0f62 -- RELEASE-NOTES: synced with 443e5b03a7d441 +Viktor Szakats (12 Mar 2018) +- checksrc.pl: add -i and -m options + + To sync it with changes made for the libssh2 project. + Also cleanup some whitespace. -- THANKS-filter: shachaf +- curl-openssl.m4: fix spelling [ci skip] -- [Ä°smail Dönmez brought this change] +- FAQ: fix a broken URL [ci skip] - tests: Set CHARSET & LANG to UTF-8 in 1035, 2046 and 2047 +Daniel Stenberg (12 Mar 2018) +- http2: mark the connection for close on GOAWAY - Closes #1283 - Fixes #1277 + ... don't consider it an error! + + Assisted-by: Jay Satiro + Reported-by: Łukasz Domeradzki + Fixes #2365 + Closes #2375 + +- credits: Viktor prefers without accent + +- openldap: white space changes, fixed up the copyright years -- bump: 7.53.1 coming up +- openldap: check ldap_get_attribute_ber() results for NULL before using - synced with df665f4df0f7a352 + CVE-2018-1000121 + Reported-by: Dario Weisser + Bug: https://curl.haxx.se/docs/adv_2018-97a2.html -- formdata: check for EOF when reading from stdin +- FTP: reject path components with control codes - Reported-by: shachaf@users.noreply.github.com + Refuse to operate when given path components featuring byte values lower + than 32. - Fixes #1281 - -Jay Satiro (22 Feb 2017) -- docs: gitignore curl.1 + Previously, inserting a %00 sequence early in the directory part when + using the 'singlecwd' ftp method could make curl write a zero byte + outside of the allocated buffer. - curl.1 is generated by the cmdline-opts script since 4c49b83. - -Daniel Stenberg (22 Feb 2017) -- TODO: HTTP Digest using SHA-256 + Test case 340 verifies. + + CVE-2018-1000120 + Reported-by: Duy Phan Thanh + Bug: https://curl.haxx.se/docs/adv_2018-9cd6.html -- TODO: brotli is deployed widely now +- readwrite: make sure excess reads don't go beyond buffer end + + CVE-2018-1000122 + Bug: https://curl.haxx.se/docs/adv_2018-b047.html + + Detected by OSS-fuzz -Jay Satiro (21 Feb 2017) -- [Viktor Szakats brought this change] +- BUGS: updated link to security process - urldata: include curl_sspi.h when Windows SSPI is enabled +- limit-rate: kick in even before "limit" data has been received - f77dabe broke builds in Windows using Windows SSPI but not Windows SSL. + ... and make sure to avoid integer overflows with really large values. - Bug: https://github.com/curl/curl/issues/1276 - Reported-by: jveazey@users.noreply.github.com + Reported-by: 刘佩东 + Fixes #2371 + Closes #2373 -- url: Improve CURLOPT_PROXY_CAPATH error handling - - - Change CURLOPT_PROXY_CAPATH to return CURLE_NOT_BUILT_IN if the option - is not supported, which is the same as what we already do for - CURLOPT_CAPATH. +- docs/SECURITY.md -> docs/SECURITY-PROCESS.md + +- SECURITY.md: call it the security process + +Michael Kaufmann (11 Mar 2018) +- Curl_range: fix FTP-only and FILE-only builds - - Change the curl tool to handle CURLOPT_PROXY_CAPATH error - CURLE_NOT_BUILT_IN as a warning instead of as an error, which is the - same as what we already do for CURLOPT_CAPATH. + follow-up to e04417d + +- hostip: fix compiler warning: 'variable set but not used' + +Daniel Stenberg (11 Mar 2018) +- HTTP: allow "header;" to replace an internal header with a blank one - - Fix CAPATH docs to show that CURLE_NOT_BUILT_IN is returned when the - respective CAPATH option is not supported by the SSL library. + Reported-by: Michael Kaufmann + Fixes #2357 + Closes #2362 + +- http2: verbose output new MAX_CONCURRENT_STREAMS values - Ref: https://github.com/curl/curl/pull/1257 + ... as it is interesting for many users. -- cyassl: fix typo +- SECURITY: distros' max embargo time is 14 days now -Version 7.53.0 (22 Feb 2017) +Patrick Monnerat (8 Mar 2018) +- curl tool: accept --compressed also if Brotli is enabled and zlib is not. -Daniel Stenberg (22 Feb 2017) -- release: 7.53.0 +Daniel Stenberg (5 Mar 2018) +- THANKS + mailmap: remove duplicates, fixup full names -- cookie: fix declaration of 'dup' shadows a global declaration +- [sergii.kavunenko brought this change] -- TLS: make SSL_VERIFYSTATUS work again + WolfSSL: adding TLSv1.3 - The CURLOPT_SSL_VERIFYSTATUS option was not properly handled by libcurl - and thus even if the status couldn't be verified, the connection would - be allowed and the user would not be told about the failed verification. + Closes #2349 + +- RELEASE-NOTES/THANKS: synced with cc1d4c505 + +- [Richard Alcock brought this change] + + winbuild: prefer documented zlib library names - Regression since cb4e2be7c6d42ca + Check for existence of import and static libraries with documented names + and use them if they do. Fallback to previous names. - CVE-2017-2629 - Bug: https://curl.haxx.se/docs/adv_20170222.html + According to + https://github.com/madler/zlib/blob/master/win32/README-WIN32.txt on + Windows, the names of the import library is "zdll.lib" and static + library is "zlib.lib". - Reported-by: Marcus Hoffmann + closes #2354 -Jay Satiro (21 Feb 2017) -- digest_sspi: Handle 'stale=TRUE' directive in HTTP digest +Marcel Raad (4 Mar 2018) +- krb5: use nondeprecated functions - - If the server has provided another challenge use it as the replacement - input token if stale=TRUE. Otherwise previous credentials have failed - so return CURLE_LOGIN_DENIED. + gss_seal/gss_unseal have been deprecated in favor of + gss_wrap/gss_unwrap with GSS-API v2 from January 1997 [1]. The first + version of "The Kerberos Version 5 GSS-API Mechanism" [2] from June + 1996 already says "GSS_Wrap() (formerly GSS_Seal())" and + "GSS_Unwrap() (formerly GSS_Unseal())". - Prior to this change the stale directive was ignored and if another - challenge was received it would cause error CURLE_BAD_CONTENT_ENCODING. + Use the nondeprecated functions to avoid deprecation warnings. - Ref: https://tools.ietf.org/html/rfc2617#page-10 + [1] https://tools.ietf.org/html/rfc2078 + [2] https://tools.ietf.org/html/rfc1964 - Bug: https://github.com/curl/curl/issues/928 - Reported-by: tarek112@users.noreply.github.com + Closes https://github.com/curl/curl/pull/2356 -Daniel Stenberg (20 Feb 2017) -- smb: use getpid replacement for windows UWP builds - - Source: https://github.com/Microsoft/vcpkg/blob/7676b8780db1e1e591c4fc7eba4f96f73c428cb4/ports/curl/0002_fix_uwp.patch - -- TODO: CURLOPT_RESOLVE for any port number - - Closes #1264 - -- RELEASE-NOTES: synced with af30f1152d43dcdb +Daniel Stenberg (4 Mar 2018) +- curl.1: mention how to add numerical IP addresses in NO_PROXY -- [Jean Gressmann brought this change] +- CURLOPT_NOPROXY.3: mention how to list numerical IPv6 addresses - sftp: improved checks for create dir failures +- NO_PROXY: fix for IPv6 numericals in the URL - Since negative values are errors and not only -1. This makes SFTP upload - with --create-dirs work (again). + Added test 1265 that verifies. - Closes #1269 + Reported-by: steelman on github + Fixes #2353 + Closes #2355 -Jay Satiro (20 Feb 2017) -- [Max Khon brought this change] - - digest_sspi: Fix nonce-count generation in HTTP digest +- build: get CFLAGS (including -werror) used for examples and tests - - on the first invocation: keep security context returned by - InitializeSecurityContext() + ... so that the CI and more detects compiler warnings/errors properly! - - on subsequent invocations: use MakeSignature() instead of - InitializeSecurityContext() to generate HTTP digest response + Closes #2337 + +Marcel Raad (3 Mar 2018) +- curl_ctype: fix macro redefinition warnings - Bug: https://github.com/curl/curl/issues/870 - Reported-by: Andreas Roth + On MinGW and Cygwin, GCC and clang have been complaining about macro + redefinitions since 4272a0b0fc49a1ac0ceab5c4a365c9f6ab8bf8e2. Fix this + by undefining the macros before redefining them as suggested in + https://github.com/curl/curl/pull/2269. - Closes https://github.com/curl/curl/pull/1251 - -- examples/multi-uv: checksrc compliance - -Michael Kaufmann (19 Feb 2017) -- string formatting: fix 4 printf-style format strings + Suggested-by: Daniel Stenberg -Dan Fandrich (18 Feb 2017) -- tests: removed the obsolete name parameter +Dan Fandrich (2 Mar 2018) +- unit1307: proper cleanup on OOM to fix torture tests -Michael Kaufmann (18 Feb 2017) -- speed caps: update the timeouts if the speed is too low/high +Marcel Raad (28 Feb 2018) +- unit1309: fix warning on Windows x64 - Follow-up to 4b86113 + When targeting x64, MinGW-w64 complains about conversions between + 32-bit long and 64-bit pointers. Fix this by reusing the + GNUTLS_POINTER_TO_SOCKET_CAST / GNUTLS_SOCKET_TO_POINTER_CAST logic + from gtls.c, moving it to warnless.h as CURLX_POINTER_TO_INTEGER_CAST / + CURLX_INTEGER_TO_POINTER_CAST. - Fixes https://github.com/curl/curl/issues/793 - Fixes https://github.com/curl/curl/issues/942 + Closes https://github.com/curl/curl/pull/2341 -- docs: fix timeout handling in multi-uv example - -- proxy: fix hostname resolution and IDN conversion - - Properly resolve, convert and log the proxy host names. - Support the "--connect-to" feature for SOCKS proxies and for passive FTP - data transfers. +- travis: update compiler versions - Follow-up to cb4e2be + Update clang to version 3.9 and GCC to version 6. - Reported-by: Jay Satiro - Fixes https://github.com/curl/curl/issues/1248 - -Jay Satiro (17 Feb 2017) -- [Isaac Boukris brought this change] + Closes https://github.com/curl/curl/pull/2345 - http: fix missing 'Content-Length: 0' while negotiating auth - - - While negotiating auth during PUT/POST if a user-specified - Content-Length header is set send 'Content-Length: 0'. +Daniel Stenberg (26 Feb 2018) +- docs/MANUAL: formfind.pl is not accessible on the site anymore - This is what we do already in HTTPREQ_POST_FORM and what we did in the - HTTPREQ_POST case (regression since afd288b). + Fixes #2342 + +Jay Satiro (24 Feb 2018) +- curl-openssl.m4: Fix version check for OpenSSL 1.1.1 - Prior to this change no Content-Length header would be sent in such a - case. + - Add OpenSSL 1.1.1 to the header/library version lists. - Bug: https://curl.haxx.se/mail/lib-2017-02/0006.html - Reported-by: Dominik Hölzl + - Detect OpenSSL 1.1.1 library using its function ERR_clear_last_mark, + which was added in that version. - Closes https://github.com/curl/curl/pull/1242 - -Daniel Stenberg (16 Feb 2017) -- [Simon Warta brought this change] + Prior to this change an erroneous header/library mismatch was caused by + lack of OpenSSL 1.1.1 detection. I tested using openssl-1.1.1-pre1. - winbuild: add note on auto-detection of MACHINE in Makefile.vc +Viktor Szakats (23 Feb 2018) +- lib655: silence compiler warning - Closes #1265 - -- RELEASE-PROCEDURE: update the upcoming release calendar + Closes https://github.com/curl/curl/pull/2335 -- TODO: consider file name from the redirected URL with -O ? +- spelling fixes - It isn't easily solved, but with some thinking someone could probably - come up with a working approach? + Detected using the `codespell` tool. - Closes #1241 - -Jay Satiro (15 Feb 2017) -- tool_urlglob: Allow a glob range with the same start and stop + Also contains one URL protocol upgrade. - For example allow ranges like [1-1] and [a-a] etc. + Closes https://github.com/curl/curl/pull/2334 + +Daniel Stenberg (24 Feb 2018) +- projects/README: remove reference to dead IDN link/package - Regression since 5ca96cb. + Reported-by: Stefan Kanthak and Rod Widdowson - Bug: https://github.com/curl/curl/issues/1238 - Reported-by: R. Dennis Steed + Fixes #2325 -Daniel Stenberg (15 Feb 2017) -- axtls: adapt to API changes +Jay Satiro (23 Feb 2018) +- [Rod Widdowson brought this change] + + winbuild: Use macros for the names of some build utilities - Builds with axTLS 2.1.2. This then also breaks compatibility with axTLS - < 2.1.0 (the older API) + - Add macros to the top of the makefile for rc and mt utilities so that + it is easier to change their locations. - ... and fix the session_id mixup brought in 04b4ee549 + Bug: https://curl.haxx.se/mail/lib-2018-02/0075.html + Reported-by: Stefan Kanthak - Fixes #1220 + Closes https://github.com/curl/curl/issues/2329 -- RELEASE-NOTES: synced with 690935390c29c +Daniel Stenberg (23 Feb 2018) +- TODO: remove "sha-256 digest", added in 2b5b37cb9109e7c2 -- [Nick Draffen brought this change] +- curl_share_setopt.3: connection cache is shared within multi handles - curl: fix typo in time condition warning message +Jay Satiro (22 Feb 2018) +- [Rod Widdowson brought this change] + + winbuild: Use CALL to run batch scripts - The warning message had a typo. The argument long form is --time-cond - not --timecond + Co-authored-by: Stefan Kanthak - Closes #1263 + Closes https://github.com/curl/curl/issues/2330 + Closes https://github.com/curl/curl/pull/2331 -- smb: code indent +Patrick Monnerat (22 Feb 2018) +- os400: add curl_resolver_start_callback type to ILE/RPG binding -Jay Satiro (14 Feb 2017) -- configure: Allow disabling pthreads, fall back on Win32 threads - - When the threaded resolver option is specified for configure the default - thread library is pthreads. This change makes it possible to - --disable-pthreads and then configure can fall back on Win32 threads for - native Windows builds. - - Closes https://github.com/curl/curl/pull/1260 +Daniel Stenberg (22 Feb 2018) +- form.d: rephrased somewhat, added two example command lines -Daniel Stenberg (13 Feb 2017) -- http2: fix memory-leak when denying push streams - - Reported-by: zelinchen@users.noreply.github.com - Fixes #1229 +Jay Satiro (21 Feb 2018) +- [Francisco Sedano brought this change] -Jay Satiro (11 Feb 2017) -- tool_operate: Show HTTPS-Proxy options on CURLE_SSL_CACERT + url: Add option CURLOPT_RESOLVER_START_FUNCTION - When CURLE_SSL_CACERT occurs the tool shows a lengthy error message to - the user explaining possible solutions such as --cacert and --insecure. + - Add new option CURLOPT_RESOLVER_START_FUNCTION to set a callback that + will be called every time before a new resolve request is started + (ie before a host is resolved) with a pointer to backend-specific + resolver data. Currently this is only useful for ares. - This change appends to that message similar options --proxy-cacert and - --proxy-insecure when there's a specified HTTPS proxy. + - Add new option CURLOPT_RESOLVER_START_DATA to set a user pointer to + pass to the resolver start callback. - Closes https://github.com/curl/curl/issues/1258 + Closes https://github.com/curl/curl/pull/2311 -Daniel Stenberg (10 Feb 2017) -- cmdline-opts/page-footer: ftp.sunet.se is no longer an FTP mirror - -- URL: only accept ";options" in SMTP/POP3/IMAP URL schemes - - Fixes #1252 - -Jay Satiro (9 Feb 2017) -- cmdline-opts/socks*: Mention --preproxy in --socks* opts +- lib: CURLOPT_HAPPY_EYEBALLS_TIMEOUT => CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS - - Document in --socks* opts they're still mutually exclusive of --proxy. + - In keeping with the naming of our other connect timeout options rename + CURLOPT_HAPPY_EYEBALLS_TIMEOUT to CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS. - Partial revert of 423a93c; I had misinterpreted the SOCKS proxy + - HTTP/HTTPS proxy combination. + This change adds the _MS suffix since the option expects milliseconds. + This is more intuitive for our users since other connect timeout options + that expect milliseconds use _MS such as CURLOPT_TIMEOUT_MS, + CURLOPT_CONNECTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS. - - Document in --socks* opts that --preproxy can be used to specify a - SOCKS proxy at the same time --proxy is used with an HTTP/HTTPS proxy. - -Daniel Stenberg (9 Feb 2017) -- CURLOPT_SSL_VERIFYPEER.3: also the https proxy version - -Kamil Dudka (9 Feb 2017) -- nss: make FTPS work with --proxytunnel + The tool option already uses an -ms suffix, --happy-eyeballs-timeout-ms. - If the NSS code was in the middle of a non-blocking handshake and it - was asked to finish the handshake in blocking mode, it unexpectedly - continued in the non-blocking mode, which caused a FTPS connection - over CONNECT to fail with "(81) Socket not ready for send/recv". + Follow-up to 2427d94 which added the lib and tool option yesterday. - Bug: https://bugzilla.redhat.com/1420327 + Ref: https://github.com/curl/curl/pull/2260 -Daniel Stenberg (9 Feb 2017) -- examples/multithread.c: link to our multi-thread docs +Patrick Monnerat (21 Feb 2018) +- sasl: prefer PLAIN mechanism over LOGIN - ... instead of the OpenSSL mutex page. + SASL PLAIN is a standard, LOGIN only a draft. The LOGIN draft says + PLAIN should be used instead if available. -- http_proxy: avoid freeing static memory - - Follow up to 7fe81ec298e0: make sure 'host' is either NULL or malloced. +Daniel Stenberg (21 Feb 2018) +- RELEASE-NOTES: synced with 2427d94c6 -- [Cameron MacMinn brought this change] +Jay Satiro (20 Feb 2018) +- [Anders Bakken brought this change] - http_proxy: Fix tiny memory leak upon edge case connecting to proxy + url: Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUT - Fixes #1255 - -Michael Kaufmann (8 Feb 2017) -- polarssl, mbedtls: Fix detection of pending data + - Add new option CURLOPT_HAPPY_EYEBALLS_TIMEOUT to set libcurl's happy + eyeball timeout value. - Reported-by: Dan Fandrich - Bug: https://curl.haxx.se/mail/lib-2017-02/0032.html - -Dan Fandrich (7 Feb 2017) -- test1139: Added the --manual keyword since the manual is required - -Daniel Stenberg (7 Feb 2017) -- RELEASE-NOTES: synced with 102454459dd688c - -- THANKS-filter: polish some recent contributors + - Add new optval macro CURL_HET_DEFAULT to represent the default happy + eyeballs timeout value (currently 200 ms). + + - Add new tool option --happy-eyeballs-timeout-ms to expose + CURLOPT_HAPPY_EYEBALLS_TIMEOUT. The -ms suffix is used because the + other -timeout options in the tool expect seconds not milliseconds. + + Closes https://github.com/curl/curl/pull/2260 -- http2: reset push header counter fixes crash +- hostip: fix 'potentially uninitialized variable' warning - When removing an easy handler from a multi before it completed its - transfer, and it had pushed streams, it would segfault due to the pushed - counted not being cleared. + Follow-up to 50d1b33. - Fixed-by: zelinchen@users.noreply.github.com - Fixes #1249 + Caught by AppVeyor. -- [Markus Westerlind brought this change] +Daniel Stenberg (20 Feb 2018) +- TODO: warning if curl version is not in sync with libcurl version + +Jay Satiro (20 Feb 2018) +- [Anders Bakken brought this change] - transfer: only retry nobody-requests for HTTP + CURLOPT_RESOLVE: Add support for multiple IP addresses per entry - Using sftp to delete a file with CURLOPT_NOBODY set with a reused - connection would fail as curl expected to get some data. Thus it would - retry the command again which fails as the file has already been - deleted. + This enables users to preresolve but still take advantage of happy + eyeballs and trying multiple addresses if some are not connecting. - Fixes #1243 + Ref: https://github.com/curl/curl/pull/2260 -Jay Satiro (7 Feb 2017) -- [Daniel Gustafsson brought this change] +Daniel Stenberg (20 Feb 2018) +- [Sergio Borghese brought this change] - telnet: Fix typos + examples/sftpuploadresume: resume upload via CURLOPT_APPEND - Ref: https://github.com/curl/curl/pull/1245 + URL: https://curl.haxx.se/mail/lib-2018-02/0072.html -- [Daniel Gustafsson brought this change] +- curl --version: show PSL if the run-time lib has it enabled + + ... not of the #define was set at build-time! - test552: Fix typos +- TODO: "Support in-memory certs/ca certs/keys" + + removed SSLKEYLOGFILE support (fixed) - Closes https://github.com/curl/curl/pull/1245 + removed "consider SSL patches" (outdated) + + Closes #2310 -- [Daniel Gustafsson brought this change] +- CURLOPT_HEADER.3: clarify problems with different data sizes - darwinssl: Avoid parsing certificates when not in verbose mode - - The information extracted from the server certificates in step 3 is only - used when in verbose mode, and there is no error handling or validation - performed as that has already been done. Only run the certificate - information extraction when in verbose mode and libcurl was built with - verbose strings. +- test1556: verify >16KB headers to the header callback + +- header callback: don't chop headers into smaller pieces - Closes https://github.com/curl/curl/pull/1246 + Reported-by: Guido Berhoerster + Fixes #2314 + Closes #2316 -- [JDepooter brought this change] +- test1154: verify that long HTTP headers get rejected - schannel: Remove incorrect SNI disabled message +- http: fix the max header length detection logic - - Remove the SNI disabled when host verification disabled message - since that is incorrect. + Previously, it would only check for max length if the existing alloc + buffer was to small to fit it, which often would make the header still + get used. - - Show a message for legacy versions of Windows <= XP that connections - may fail since those versions of WinSSL lack SNI, algorithms, etc. + Reported-by: Guido Berhoerster + Bug: https://curl.haxx.se/mail/lib-2018-02/0056.html - Bug: https://github.com/curl/curl/pull/1240 - -Daniel Stenberg (7 Feb 2017) -- CHANGES: spell fix, use correct path to script + Closes #2315 -- CHANGES.0: removed +- CURLOPT_HEADERFUNCTION.3: fix typo from d939226813 - This is the previously manually edited changelog, not touched since Aug - 2015. Still present in git for those who wants it. + Reported-by: Erik Johansson + Bug: https://github.com/curl/curl/commit/d9392268131c1b8d18dec3fa30e0bded833a5db7#commitcomment-27607495 -Dan Fandrich (6 Feb 2017) -- cmdline-opts: Fixed build and test in out of source tree builds +- CURLOPT_HEADERFUNCTION.3: mention folded headers -Viktor Szakats (6 Feb 2017) -- use *.sourceforge.io and misc URL updates +- TODO: 1.1 Option to refuse usernames in URLs - Ref: https://sourceforge.net/blog/introducing-https-for-project-websites/ - Closes: https://github.com/curl/curl/pull/1247 + Also expanded the CURL_REFUSE_CLEARTEXT section with more ideas. -Jay Satiro (6 Feb 2017) -- docs: Add more HTTPS proxy documentation +- TODO: 1.7 Support HTTP/2 for HTTP(S) proxies + +- ssh: add two missing state names - - Document HTTPS proxy type. + The list of state names (used in debug builds) was out of sync in + relation to the list of states (used in all builds). - - Document --write-out %{proxy_ssl_verify_result}. + I now added an assert to make sure the sizes of the two lists match, to + aid in detecting this mistake better in the future. - - Document SOCKS proxy + HTTP/HTTPS proxy combination. + Regression since c92d2e14cf, shipped in 7.58.0. - HTTPS proxy support was added in 7.52.0 for OpenSSL, GnuTLS and NSS. + Reported-by: Somnath Kundu - Ref: https://github.com/curl/curl/commit/cb4e2be + Fixes #2312 + Closes #2313 -- OS400: Fix symbols +- Revert "KNOWN_BUGS: 2.5 curl should not offer "ALPN: h2" when using https-proxy" - - s/CURLOPT_SOCKS_PROXY/CURLOPT_PRE_PROXY - Follow-up to 7907a2b and 845522c. + This reverts commit de9fac00c40db321d44fa6fbab6eb62ec4c83998. - - Fix incorrect id for CURLOPT_PROXY_PINNEDPUBLICKEY. + Reported-by: Jay Satiro + +Jay Satiro (15 Feb 2018) +- non-ascii: fix implicit declaration warning - - Add id for CURLOPT_ABSTRACT_UNIX_SOCKET. + Follow-up to b46cfbc. - Bug: https://github.com/curl/curl/issues/1237 - Reported-by: jonrumsey@users.noreply.github.com - -- [Sean Burford brought this change] + Caught by Travis CI. - cmake: Support curl --xattr when built with cmake +Daniel Stenberg (15 Feb 2018) +- travis: add build with iconv enabled + + ... to verify it builds and works fine. + + Ref: https://curl.haxx.se/mail/lib-2017-09/0031.html - - Test for and set HAVE_FSETXATTR when support for extended file - attributes is present. + Closes #1872 + +- TODO: 18.18 retry on network is unreachable - Closes https://github.com/curl/curl/pull/1176 + Closes #1603 -- [Adam Langley brought this change] +- KNOWN_BUGS: 2.5 curl should not offer "ALPN: h2" when using https-proxy + + Closes #1254 - openssl: Don't use certificate after transferring ownership +Kamil Dudka (15 Feb 2018) +- nss: use PK11_CreateManagedGenericObject() if available - SSL_CTX_add_extra_chain_cert takes ownership of the given certificate - while, despite the similar name, SSL_CTX_add_client_CA does not. Thus - it's best to call SSL_CTX_add_client_CA before - SSL_CTX_add_extra_chain_cert, while the code still has ownership of the - argument. + ... so that the memory allocated by applications using libcurl does not + grow per each TLS connection. + + Bug: https://bugzilla.redhat.com/1510247 - Closes https://github.com/curl/curl/pull/1236 + Closes #2297 -Daniel Stenberg (29 Jan 2017) -- [Antoine Aubert brought this change] +Daniel Stenberg (15 Feb 2018) +- [Björn Stenberg brought this change] - mbedtls: implement CTR-DRBG and HAVEGE random generators + TODO fixed: Detect when called from within callbacks - closes #1227 + Closes #2302 -- docs: we no longer ship HTML versions of man pages +- BINDINGS: fix curb link (and remove ruby-curl-multi) - ... refer to the web site for the web versions. + Reported-by: Klaus Stein -- [railsnewbie257 brought this change] +- curl_gssapi: make sure this file too uses our *printf() - docs: proofread README.netware README.win32 +- libcurl-security.3: separate file:// section - Closes #1231 + ... just to make it more apparent. Even if it repeats + some pieces of information. -- RELEASE-NOTES; synced with ab08d82648 - -Michael Kaufmann (28 Jan 2017) -- mbedtls: disable TLS session tickets - - SSL session reuse with TLS session tickets is not supported yet. - Use SSL session IDs instead. +- libcurl-security.3: the http://192.168.0.1/my_router_config case - See https://github.com/curl/curl/issues/1109 + Mentioned-By: Rich Moore -- gnutls: disable TLS session tickets - - SSL session reuse with TLS session tickets is not supported yet. - Use SSL session IDs instead. - - Fixes https://github.com/curl/curl/issues/1109 +- libcurl-security.3: mention the URL standards problems too -- polarssl: fix hangs +- libcurl-security.3: split out from libcurl-tutorial.3 - This bugfix is similar to commit c111178bd4. - -Daniel Stenberg (27 Jan 2017) -- cookies: do not assume a valid domain has a dot + To make more accessible. - This repairs cookies for localhost. + Merged in some new language from "URLs are dangerous things" as discussed on + the mailing list a few days ago: - Non-PSL builds will now only accept "localhost" without dots, while PSL - builds okeys everything not listed as PSL. + Bug: https://curl.haxx.se/mail/lib-2018-02/0013.html + +- RELEASE-NOTES: synced with e551910f8 + +Patrick Monnerat (13 Feb 2018) +- tests: new tests for http raw mode - Added test 1258 to verify. + Test 319 checks proper raw mode data with non-chunked gzip + transfer-encoded server data. + Test 326 checks raw mode with chunked server data. - This was a regression brought in a76825a5efa6b4 + Bug: #2303 + Closes #2308 -- TODO: remove "Support TLS v1.3" +Kamil Dudka (12 Feb 2018) +- tlsauthtype.d: works only if libcurl is built with TLS-SRP support - Support is trickling in already. - -- [railsnewbie257 brought this change] - - INTERNALS.md: language improvements + Bug: https://bugzilla.redhat.com/1542256 - Closes #1226 + Closes #2306 -- telnet: fix windows compiler warnings +Patrick Monnerat (12 Feb 2018) +- smtp: fix processing of initial dot in data + + RFC 5321 4.1.1.4 specifies the CRLF terminating the DATA command + should be taken into account when chasing the . end marker. + Thus a leading dot character in data is also subject to escaping. - Thumbs-up-by: Jay Satiro + Tests 911 and test server are adapted to this situation. + New tests 951 and 952 check proper handling of initial dot in data. - Closes #1225 + Closes #2304 + +Daniel Stenberg (12 Feb 2018) +- sha256: avoid redefine + +- [Douglas Mencken brought this change] -- VC: remove the makefile.vc6 build infra + sha256: build with OpenSSL < 0.9.8 too - The winbuild/ build files is now the single MSVC makefile build choice. + support for SHA-2 was introduced in OpenSSL 0.9.8 - Closes #1215 + Closes #2305 -- [Jay Satiro brought this change] +- [Bruno Grasselli brought this change] - cmdline-opts/gen.pl: Open input files in CRLF mode + README: language fix - On Windows it's possible to have input files with CRLF line endings and - a perl that defaults to LF line endings (eg msysgit). Currently that - results in generator output of mixed line endings of CR, LF and CRLF. + s/off/from - This change fixes that issue in the most succinct way by opening the - files in :crlf text mode even when the perl being used does not default - to that mode. (On operating systems that don't have a separate text mode - it's essentially a no-op.) The output continues to be in the perl's - native line ending. + Closes #2300 -- docs/curl.1: generate from the cmdline-opts script +Patrick Monnerat (12 Feb 2018) +- http_chunks: don't write chunks twice with CURLOPT_HTTP_TRANSFER_DECODING on + + Bug: #2303 + Reported-By: Henry Roeland -- vtls: source indentation fix +Daniel Stenberg (9 Feb 2018) +- get_posix_time: only check for overflows if they can happen! -- contri*.sh: cut off parentheses from names too +Michael Kaufmann (9 Feb 2018) +- schannel: fix "no previous prototype" compiler warning -- RELEASE-NOTES: synced with 01ab7c30bba6f +Jay Satiro (9 Feb 2018) +- [Mohammad AlSaleh brought this change] -- vtls: fix PolarSSL non-blocking handling + content_encoding: Add "none" alias to "identity" - A regression brought in cb4e2be + Some servers return a "content-encoding" header with a non-standard + "none" value. - Reported-by: Michael Kaufmann - Bug: https://github.com/curl/curl/issues/1174#issuecomment-274018791 - -- [Antoine Aubert brought this change] - - vtls: fix mbedtls multi non blocking handshake. + Add "none" as an alias to "identity" as a work-around, to avoid + unrecognised content encoding type errors. - When using multi, mbedtls handshake is in non blocking mode. vtls must - set wait for read/write flags for the socket. + Signed-off-by: Mohammad AlSaleh - Closes #1223 + Closes https://github.com/curl/curl/pull/2298 -- [Richy Kim brought this change] +Steve Holme (8 Feb 2018) +- build-openssl.bat: Follow up to 648679ab8e to suppress copy/move output - CURLOPT_BUFFERSIZE: support enlarging receive buffer - - Replace use of fixed macro BUFSIZE to define the size of the receive - buffer. Reappropriate CURLOPT_BUFFERSIZE to include enlarging receive - buffer size. Upon setting, resize buffer if larger than the current - default size up to a MAX_BUFSIZE (512KB). This can benefit protocols - like SFTP. +- build-openssl.bat: Fixed incorrect move if destination build folder exists + +Michael Kaufmann (8 Feb 2018) +- schannel: fix compiler warnings - Closes #1222 + Closes #2296 -- sws: use SOCKERRNO, not errno +Steve Holme (7 Feb 2018) +- curl_addrinfo.c: Allow Unix Domain Sockets to compile under Windows - Reported-by: Gisle Vanem + Windows 10.0.17061 SDK introduces support for Unix Domain Sockets. + Added the necessary include file to curl_addrinfo.c. + + Note: The SDK (which is considered beta) has to be installed, VS 2017 + project file has to be re-targeted for Windows 10.0.17061 and #define + enabled in config-win32.h. -Michael Kaufmann (19 Jan 2017) -- KNOWN_BUGS: HTTP/2 server push enabled when no pushes can be accepted +Patrick Monnerat (7 Feb 2018) +- fnmatch: optimize processing of consecutive *s and ?s pattern characters - This has been implemented with commit 9ad034e. + Reported-By: Daniel Stenberg + Fixes #2291 + Closes #2293 -Viktor Szakats (19 Jan 2017) -- *.rc: escape non-ASCII/non-UTF-8 character for clarity +Steve Holme (6 Feb 2018) +- build-openssl.bat/build-wolfssl.bat: Build platform is optional + + Whilst the compiler parameter is mandatory, platform is optional as it + is automatically calculated by the :configure section. - Closes https://github.com/curl/curl/pull/1217 + This partially reverts commit 6d62d2c55d. -Kamil Dudka (19 Jan 2017) -- docs: non-blocking SSL handshake is now supported with NSS +Daniel Stenberg (6 Feb 2018) +- [Patrick Schlangen brought this change] + + openssl: Don't add verify locations when verifypeer==0 - Implemented since curl-7_36_0-130-g8868a22 + When peer verification is disabled, calling + SSL_CTX_load_verify_locations is not necessary. Only call it when + verification is enabled to save resources and increase performance. - Reported-by: Fahim Chandurwala + Closes #2290 -Michael Kaufmann (18 Jan 2017) -- CURLOPT_CONNECT_TO: Fix compile warnings +Steve Holme (5 Feb 2018) +- build-wolfssl.bat: Extend VC15 support to include Enterprise and Professional - Fix compile warnings that appeared only when curl has been configured - with '--disable-verbose'. + ...and not just the Community Edition. -Daniel Stenberg (18 Jan 2017) -- usercertinmem.c: improve the short description +- build-openssl.bat: Extend VC15 support to include Enterprise and Professional + + ...and not just the Community Edition. -- parseurl: move back buffer to function scope +Michael Kaufmann (5 Feb 2018) +- time-cond: fix reading the file modification time on Windows - Regression since 1d4202ad, which moved the buffer into a more narrow - scope, but the data in that buffer was used outside of that more narrow - scope. + On Windows, stat() may adjust the unix file time by a daylight saving time + offset. Avoid this by calling GetFileTime() instead. - Reported-by: Dan Fandrich - Bug: https://curl.haxx.se/mail/lib-2017-01/0093.html + Fixes #2164 + Closes #2204 -Jay Satiro (17 Jan 2017) -- openssl: Fix random generation +Daniel Stenberg (5 Feb 2018) +- formdata: use the mime-content type function + + Reduce code duplication by making Curl_mime_contenttype available and + used by the formdata function. This also makes the formdata function + recognize a set of more file extensions by default. - - Fix logic error in Curl_ossl_random. + PR #2280 brought this to my attention. - Broken a few days ago in 807698d. + Closes #2282 -Daniel Stenberg (17 Jan 2017) -- TODO: share OpenSSL contexts +- getdate: return -1 for out of range - By supporting this, subsequent connects would load a lot less data from - disk. + ...as that's how the function is documented to work. - Closes #1110 - -- bump: next release will be 7.53.0 - -Kamil Dudka (15 Jan 2017) -- nss: use the correct lock in nss_find_slot_by_name() - -Alessandro Ghedini (15 Jan 2017) -- http2: disable server push if not requested + Reported-by: Michael Kaufmann + Bug found in an autobuild with 32 bit time_t - Ref: https://github.com/curl/curl/pull/1160 + Closes #2278 -Daniel Stenberg (14 Jan 2017) -- [railsnewbie257 brought this change] +- [Ben Greear brought this change] - docs: improved language in README.md HISTORY.md CONTRIBUTE.md + build: fix termios issue on android cross-compile - Closes #1211 + Bug: https://curl.haxx.se/mail/lib-2018-01/0122.html + Signed-off-by: Ben Greear -Alessandro Ghedini (14 Jan 2017) -- http: print correct HTTP string in verbose output when using HTTP/2 +- time_t-fixes: remove typecasts to 'long' for info.filetime - Before: - ``` - % src/curl https://sigsegv.ninja/ -v --http2 - ... - > GET / HTTP/1.1 - > Host: sigsegv.ninja - > User-Agent: curl/7.52.2-DEV - > Accept: */* - > - ... - ``` + They're now wrong. - After: - ``` - % src/curl https://sigsegv.ninja/ -v --http2 - ... - > GET / HTTP/2 - > Host: sigsegv.ninja - > User-Agent: curl/7.52.2-DEV - > Accept: */* - > - ``` - -Daniel Stenberg (14 Jan 2017) -- TODO: send only part of --data + Reported-by: Michael Kaufmann - Closes #1200 + Closes #2277 -- TODO: implemened "--fail-fast to exit on first transfer fail" +- curl_setup: move the precautionary define of SIZEOF_TIME_T - Even though it is called --fail-early - -- TODO: Chunked transfer multipart formpost + ... up to before it may be used for the TIME_T_MAX/MIN logic. - Closes #1139 + Reported-by: Michael Kaufmann -- TODO: Improve formpost API, not just add an easy argument +- parsedate: s/#if/#ifdef + + Reported-by: Michael Kaufmann + Bug: https://github.com/curl/curl/commit/1c39128d974666107fc6d9ea15f294036851f224#commitcomment-27246479 -- addrinfo: fix compiler warning on offsetof() use +Patrick Monnerat (31 Jan 2018) +- fnmatch: pattern syntax can no longer fail - curl_addrinfo.c:519:20: error: conversion to ‘curl_socklen_t {aka - unsigned int}’ from ‘long unsigned int’ may alter its value - [-Werror=conversion] + Whenever an expected pattern syntax rule cannot be matched, the + character starting the rule loses its special meaning and the parsing + is resumed: + - backslash at the end of pattern string matches itself. + - Error in [:keyword:] results in set containing :\[dekorwy. - Follow-up to 1d786faee1046f - -- THANKS-filter: Jiri Malak + Unit test 1307 updated for this new situation. + + Closes #2273 -- RELEASE-NOTES: synced with a7c73ae309c +- fnmatch: accept an alphanum to be followed by a non-alphanum in char set + + Also be more tolerant about set pattern syntax. + Update unit test 1307 accordingly. + + Bug: https://curl.haxx.se/mail/lib-2018-01/0114.html -Peter Wu (13 Jan 2017) -- [Isaac Boukris brought this change] +- fnmatch: do not match the empty string with a character set - unix_socket: add support for abstract unix domain socket +Jay Satiro (30 Jan 2018) +- build: fix windows build methods for curl_ctype.c - In addition to unix domain sockets, Linux also supports an - abstract namespace which is independent of the filesystem. + - Fix winbuild and the VS project generator to treat curl_ctype.{c,h} as + curlx files since they are required by both src and lib. - In order to support it, add new CURLOPT_ABSTRACT_UNIX_SOCKET - option which uses the same storage as CURLOPT_UNIX_SOCKET_PATH - internally, along with a flag to specify abstract socket. + Follow-up to 4272a0b which added curl_ctype. + +Daniel Stenberg (30 Jan 2018) +- progress-bar.d: update to match implementation - On non-supporting platforms, the abstract address will be - interpreted as an empty string and fail gracefully. + ... since commit 993dd5651a6 - Also add new --abstract-unix-socket tool parameter. + Reported-by: Martin Dreher + Bug: https://github.com/curl/curl/pull/2242#issuecomment-361059228 - Signed-off-by: Isaac Boukris - Reported-by: Chungtsun Li (typeless) - Reviewed-by: Daniel Stenberg - Reviewed-by: Peter Wu - Closes #1197 - Fixes #1061 + Closes #2271 -Daniel Stenberg (13 Jan 2017) -- write-out.d: 'time_total' is not always shown with ms precision +- http2: set DEBUG_HTTP2 to enable more HTTP/2 logging - We have higher resolution since 7.52.0 + ... instead of doing it unconditionally in debug builds. It cluttered up + the output a little too much. -- next.d: --trace and --trace-ascii are also global +- [Max Dymond brought this change] -- [Isaac Boukris brought this change] + file: Check the return code from Curl_range and bail out on error - curl: reset the easy handle at --next - - So that only "global" options (verbose mostly) survive into the next - transfer, and the others have to be set again unless default is fine. +- [Max Dymond brought this change] + + Curl_range: add check to ensure "from <= to" -- [Frank Gevaerts brought this change] +- [Max Dymond brought this change] - docs: Add note about libcurl copying strings to CURLOPT_* manpages + Curl_range: commonize FTP and FILE range handling - Closes #1169 + Closes #2205 -- [Frank Gevaerts brought this change] +- RELEASE-NOTES: synced with 811beab9f - CURLOPT_PREQUOTE.3: takes a struct curl_slist*, not a char* +- curlver: next release will be 7.59.0 -- IDN: Use TR46 non-transitional +- [Michał Janiszewski brought this change] + + curl/curl.h: fix comment typo for CURLOPT_DNS_LOCAL_IP6 - Assisted-by: Tim Rühsen + Closes #2275 -- IDN: revert use of the transitional option +- time: support > year 2038 time stamps for system with 32bit long - It made the german ß get converted to ss, IDNA2003 style, and we can't - have that for the .de TLD - a primary reason for our switch to IDNA2008. + ... with the introduction of CURLOPT_TIMEVALUE_LARGE and + CURLINFO_FILETIME_T. - Test 165 verifies. - -- [Tim Rühsen brought this change] + Fixes #2238 + Closes #2264 - IDN: Fix compile time detection of linidn2 TR46 +- curl_easy_reset: clear digest auth state - Follow-up to f30cbcac1 - - Closes #1207 + Bug: https://curl.haxx.se/mail/lib-2018-01/0074.html + Reported-by: Ruurd Beerstra + Fixes #2255 + Closes #2272 -- [ERAMOTO Masaya brought this change] +- [Adam Marcionek brought this change] - url: --noproxy option overrides NO_PROXY environment variable + winbuild: make linker generate proper PDB - Under condition using http_proxy env var, noproxy list was the - combination of --noproxy option and NO_PROXY env var previously. Since - this commit, --noproxy option overrides NO_PROXY environment variable - even if use http_proxy env var. + Link.exe requires /DEBUG to properly generate a full pdb file on release + builds. - Closes #1140 - -- [ERAMOTO Masaya brought this change] + Closes #2274 - url: Refactor detect_proxy() +- curl: add --proxy-pinnedpubkey - If defined CURL_DISABLE_HTTP, detect_proxy() returned NULL. If not - defined CURL_DISABLE_HTTP, detect_proxy() checked noproxy list. + To verify a proxy's public key. For when using HTTPS proxies. - Thus refactor to set proxy to NULL instead of calling detect_proxy() if - define CURL_DISABLE_HTTP, and refactor to call detect_proxy() if not - define CURL_DISABLE_HTTP and the host is not in the noproxy list. + Fixes #2192 + Closes #2268 -- [ERAMOTO Masaya brought this change] - - url: Fix NO_PROXY env var to work properly with --proxy option. +- configure: set PATH_SEPARATOR to colon for PATH w/o separator - The combination of --noproxy option and http_proxy env var works well - both for proxied hosts and non-proxied hosts. + The logic tries to figure out what the path separator in the $PATH + variable is, but if there's only one directory in the $PATH it + fails. This change make configure *guess* on colon instead of erroring + out, simply because that is probably the more common character. - However, when combining NO_PROXY env var with --proxy option, - non-proxied hosts are not reachable while proxied host is OK. + PATH_SEPARATOR can always be set by the user to override the guessing. - This patch allows us to access non-proxied hosts even if using NO_PROXY - env var with --proxy option. - -- [Tim Rühsen brought this change] + (tricky bug to reproduce, as in my case for example the configure script + requires binaries in more than one directory so passing in a PATH with a + single dir fails.) + + Reported-by: Earnestly on github + Fixes #2202 + Closes #2265 - IDN: Use TR46 'transitional' for toASCII translations +- curl_ctype: private is*() type macros and functions - References: http://unicode.org/faq/idn.html - http://unicode.org/reports/tr46 + ... since the libc provided one are locale dependent in a way we don't + want. Also, the "native" isalnum() (for example) works differently on + different platforms which caused test 1307 failures on macos only. - Closes #1206 - -- [railsnewbie257 brought this change] + Closes #2269 - docs: FAQ MAIL-ETIQUETTE language fixes +Marcel Raad (29 Jan 2018) +- build: open VC15 projects with VS 2017 - Closes #1194 + Previously, they were opened with Visual Studio 2015 by default, which + cannot build them. -- [Marcus Hoffmann brought this change] +Daniel Stenberg (29 Jan 2018) +- RELEASE-NOTES: synced with 094647fca - gnutls: check for alpn and ocsp in configure - - Check for presence of gnutls_alpn_* and gnutls_ocsp_* functions during - configure instead of relying on the version number. GnuTLS has options - to turn these features off and we ca just work with with such builds - like we work with older versions. - - Signed-off-by: Marcus Hoffmann +- TODO: UTF-8 filenames in Content-Disposition - Closes #1204 + Closes #1888 -Jay Satiro (12 Jan 2017) -- url: Fix parsing for when 'file' is the default protocol +- KNOWN_BUGS: DICT responses show the underlying protocol - Follow-up to 3463408. + Closes #1809 + +Jay Satiro (27 Jan 2018) +- [Alessandro Ghedini brought this change] + + docs: fix typos in man pages - Prior to 3463408 file:// hostnames were silently stripped. + Closes https://github.com/curl/curl/pull/2266 + +Patrick Monnerat (26 Jan 2018) +- lib555: drop text conversion and encode data as ascii codes - Prior to this commit it did not work when a schemeless url was used with - file as the default protocol. + If CURL_DOES_CONVERSION is enabled, uploaded LFs are mapped to CRLFs, + giving a result that is different from what is expected. + This commit avoids using CURLOPT_TRANSFERTEXT and directly encodes data + to upload in ascii. - Ref: https://curl.haxx.se/mail/lib-2016-11/0081.html - Closes https://github.com/curl/curl/pull/1124 + Bug: https://github.com/curl/curl/pull/1872 + +Daniel Stenberg (26 Jan 2018) +- lib517: make variable static to avoid compiler warning - Also fix for drive letters: + ... with clang on macos + +Patrick Monnerat (26 Jan 2018) +- lib544: sync ascii code data with textual data - - Support --proto-default file c:/foo/bar.txt + Data mismatch caused test 545 to fail when character encoding + conversion is enabled. - - Support file://c:/foo/bar.txt + Bug: https://github.com/curl/curl/pull/1872 + +Daniel Stenberg (25 Jan 2018) +- [Travis Burtrum brought this change] + + GSKit: restore pinnedpubkey functionality - - Fail when a file:// drive letter is detected and not MSDOS/Windows. + inadvertently removed in 283babfaf8d8f3bab9d3c63cea94eb0b84e79c37 - Bug: https://github.com/curl/curl/issues/1187 - Reported-by: Anatol Belski - Assisted-by: Anatol Belski + Closes #2263 -Daniel Stenberg (12 Jan 2017) -- rand: make it work without TLS backing +- [Dair Grant brought this change] + + darwinssl: Don't import client certificates into Keychain on macOS - Regression introduced in commit f682156a4fc6c4 + Closes #2085 + +- configure: fix the check for unsigned time_t - Reported-by: John Kohl - Bug: https://curl.haxx.se/mail/lib-2017-01/0055.html + Assign the time_t variable negative value and then check if it is + greater than zero, which will evaluate true for unsigned time_t but + false for signed time_t. -Jay Satiro (12 Jan 2017) -- STARTTLS: Don't print response character in denied messages +- parsedate: fix date parsing for systems with 32 bit long - Both IMAP and POP3 response characters are used internally, but when - appended to the STARTTLS denial message likely could confuse the user. + Make curl_getdate() handle dates before 1970 as well (returning negative + values). - Closes https://github.com/curl/curl/pull/1203 - -- smtp: Fix STARTTLS denied error message + Make test 517 test dates for 64 bit time_t. - - Format the numeric denial code as an integer instead of a character. - -Daniel Stenberg (11 Jan 2017) -- http2_send: avoid unsigned integer wrap around + This fixes bug (3) mentioned in #2238 - ... when checking for a too large request. + Closes #2250 -Jay Satiro (9 Jan 2017) -- [Jiri Malak brought this change] +- [McDonough, Tim brought this change] - cmake: Fix passing _WINSOCKAPI_ macro to compiler + openssl: fix pinned public key build error in FIPS mode - Define _WINSOCKAPI_ blank rather than to 1 in order to match the value - used by Microsoft's winsock header files. + Here is a version that should work with all versions of openssl 0.9.7 + through 1.1.0. - Closes https://github.com/curl/curl/pull/1195 - -Daniel Stenberg (9 Jan 2017) -- sws: retry send() on EWOULDBLOCK + Links to the docs: + https://www.openssl.org/docs/man1.0.2/crypto/EVP_DigestInit.html + https://www.openssl.org/docs/man1.1.0/crypto/EVP_DigestInit.html - Fixes spurious test 1060 and 1061 failures on OpenBSD, Solaris and more. + At the very bottom of the 1.1.0 documentation there is a history section + that states, " stack allocated EVP_MD_CTXs are no longer supported." - Bug: https://curl.haxx.se/mail/lib-2017-01/0009.html - Reported-by: Christian Weisgerber + If EVP_MD_CTX_create and EVP_MD_CTX_destroy are not defined, then a + simple mapping can be used as described here: + https://wiki.openssl.org/index.php/Talk:OpenSSL_1.1.0_Changes + + Closes #2258 -- RELEASE-NOTES: synced with a41e8592d6b3e58 +- [Travis Burtrum brought this change] -- examples: make the C++ examples follow our code style too - - At least mostly, not counting // comments. + SChannel/WinSSL: Replace Curl_none_md5sum with Curl_schannel_md5sum -- [Aulddays brought this change] +- [Travis Burtrum brought this change] - asiohiper: improved socket handling + SChannel/WinSSL: Implement public key pinning - libcurl requires CURLMOPT_SOCKETFUNCTION to KEEP watching socket events - and notify back. Modify event_cb() to continue watching events when - fired. - - Fixes #1191 - Closes #1192 - Fixed-by: Mingliang Zhu + Closes #1429 -- [Jiří Malák brought this change] +- bump: towards 7.58.1 - lib506: fix build for Open Watcom +- cookies: remove verbose "cookie size:" output - Rename symbol lock to locks to not clash with OW CRTL function name. + It was once used for some debugging/verifying logic but should never have + ended up in git! + +- TODO: hardcode the "localhost" addresses + +- TODO: CURL_REFUSE_CLEARTEXT - Closes #1196 + An idea that popped up in discussions on twitter. -- ROADMAP: 2017 cleanup +- progress-bar: don't use stderr explicitly, use bar->out - Removed items already fixed, clarified a few others. + Reported-By: Gisle Vanem + Bug: https://github.com/curl/curl/commit/993dd5651a6c853bfe3870f6a69c7b329fa4e8ce#commitcomment-27070080 -- COPYING: update the generic copyright year range +GitHub (24 Jan 2018) +- [Gisle Vanem brought this change] -- docs/silent: mention --show-error in --silent description + Fixes for MSDOS etc. - Reported in #1190 - Reported-by: Dan Jacobson - -- docs/page-header: mention how to disable the progress meter + djgpp do have 'mkdir(dir, mode)'. Other DOS-compilers does not + But djgpp seems the only choice for MSDOS anyway. - curl.1 is regenerated + PellesC do have a 'F_OK' defined in it's . - Fixes #1190 + Update year in Copyright. -Dan Fandrich (7 Jan 2017) -- wolfssl: display negotiated SSL version and cipher +- [Gisle Vanem brought this change] -- wolfssl: support setting cipher list + Fix small typo. -Patrick Monnerat (6 Jan 2017) -- CIPHERS.md: document GSKit ciphers +Version 7.58.0 (23 Jan 2018) -Jay Satiro (5 Jan 2017) -- [peterpih brought this change] +Daniel Stenberg (23 Jan 2018) +- RELEASE: 7.58.0 - TheArtOfHttpScripting: grammar +- [Gisle Vanem brought this change] -Nick Zitzmann (3 Jan 2017) -- darwinssl: --insecure overrides --cacert if both settings are in use - - Fixes #1184 + progress-bar: get screen width on windows -Jay Satiro (2 Jan 2017) -- docs/libcurl: TCP_KEEPALIVE start and interval default to 60 - - Since the TCP keep-alive options were added in 705f0f7 the start and - interval default values have been 60, but that wasn't documented. - - Bug: https://curl.haxx.se/mail/lib-2017-01/0000.html - Reported-by: Praveen Pvs +- test1454: --connect-to with IPv6 address w/o IPv6 support! -Daniel Stenberg (29 Dec 2016) -- curl.h: CURLE_FUNCTION_NOT_FOUND is no longer in use +- CONNECT_TO: fail attempt to set an IPv6 numerical without IPv6 support - This error code was once introduced when some library was dynamically - loaded and a funciton within said library couldn't be found. - -- content_encoding: change return code on a failure + Bug: https://curl.haxx.se/mail/lib-2018-01/0087.html + Reported-by: John Hascall - Failure to decompress is now a write error instead of the weird - "function not found". + Closes #2257 -- page-footer: error 36 is protocol agnostic! +- docs: fix man page syntax to make test 1140 OK again -Jay Satiro (28 Dec 2016) -- tool_operate: Fix --remote-time incorrect times on Windows +- http: prevent custom Authorization headers in redirects - - Use Windows API SetFileTime to set the file time instead of utime. + ... unless CURLOPT_UNRESTRICTED_AUTH is set to allow them. This matches how + curl already handles Authorization headers created internally. - Avoid utime on Windows if possible because it may apply a daylight - saving time offset to our UTC file time. + Note: this changes behavior slightly, for the sake of reducing mistakes. - Bug: https://curl.haxx.se/mail/archive-2016-11/0033.html - Reported-by: Tim + Added test 317 and 318 to verify. - Closes https://github.com/curl/curl/pull/1121 - -Daniel Stenberg (29 Dec 2016) -- [Max Khon brought this change] + Reported-by: Craig de Stigter + Bug: https://curl.haxx.se/docs/adv_2018-b3bf.html - digest_sspi: copy terminating NUL as well +- curl: progress bar refresh, get width using ioctl() - Curl_auth_decode_digest_http_message(): copy terminating NUL as later - Curl_override_sspi_http_realm() expects a NUL-terminated string. + Get screen width from the environment variable COLUMNS first, if set. If + not, use ioctl(). If nether works, assume 79. - Fixes #1180 - -- curl_formadd.3: CURLFORM_CONTENTSLENGTH not needed when chunked + Closes #2242 + + The "refresh" is for the -# output when no total transfer size is + known. It will now only use a single updated line even for this case: - Mentioned in #1013 + The "-=O=-" ship moves when data is transferred. The four flying + "hashes" move (on a sine wave) on each refresh, independent of data. -- [Kyselgov E.N brought this change] +- RELEASE-NOTES: synced with bb0ffcc36 - cmake: use crypt32.lib when building with OpenSSL on windows - - Reviewed-by: Peter Wu - Closes #1149 - Fixes #1147 +- libcurl-env.3: first take + +- TODO: two possible name resolver improvements -- [Chris Araman brought this change] +- [Kartik Mahajan brought this change] - darwinssl: fix CFArrayRef leak + http2: don't close connection when single transfer is stopped - Reviewed-by: Nick Zitzmann - Closes #1173 + Fixes #2237 + Closes #2249 -- [Chris Araman brought this change] +- test558: fix for multissl builds + + vtls.c:multissl_init() might do a curl_free() call so strip that out to + make this work with more builds. We just want to verify that + memorytracking works so skipping one line is no harm. - darwinssl: fix iOS build +- examples/url2file.c: add missing curl_global_cleanup() call - Reviewed-by: Nick Zitzmann - Fixes #1172 + Reported-by: XhstormR on github + Fixes #2245 + +- [Michael Gmelin brought this change] -- curl: remove superfluous include file + SSH: Fix state machine for ssh-agent authentication - The is a leftover from the past when TCP socket options - were set in this file. This include causes build issues on AIX 4.3. + In case an identity didn't match[0], the state machine would fail in + state SSH_AUTH_AGENT instead of progressing to the next identity in + ssh-agent. As a result, ssh-agent authentication only worked if the + identity required happened to be the first added to ssh-agent. - Reported-by: Kim Minjoong + This was introduced as part of commit c4eb10e2f06fbd6cc904f1d78e4, which + stated that the "else" statement was required to prevent getting stuck + in state SSH_AUTH_AGENT. Given the state machine's logic and libssh2's + interface I couldn't see how this could happen or reproduce it and I + also couldn't find a more detailed description of the problem which + would explain a test case to reproduce the problem this was supposed to + fix. - Closes #1178 + [0] libssh2_agent_userauth returning LIBSSH2_ERROR_AUTHENTICATION_FAILED + + Closes #2248 -- RELEASE-NOTES: synced with a7b38c9dc98481e +- openssl: fix potential memory leak in SSLKEYLOGFILE logic + + Coverity CID 1427646. -- vtls: s/SSLEAY/OPENSSL +- openssl: fix the libressl build again - Fixed an old leftover use of the USE_SSLEAY define which would make a - socket get removed from the applications sockets to monitor when the - multi_socket API was used, leading to timeouts. + Follow-up to 84fcaa2e7. libressl does not have the API even if it says it is + late OpenSSL version... - Bug: #1174 + Fixes #2246 + Closes #2247 + + Reported-by: jungle-boogie on github + +- unit1307: test many wildcards too + +- curl_fnmatch: only allow 5 '*' sections in a single pattern + + ... to avoid excessive recursive calls. The number 5 is totally + arbitrary and could be modified if someone has a good motivation. -- docs/ciphers: link to our own new page about ciphers +- ftp-wildcard: fix matching an empty string with "*[^a]" - ... as the former ones always go stale! + .... and avoid advancing the pointer to trigger an out of buffer read. + + Detected by OSS-fuzz + Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5251 + Assisted-by: Max Dymond -- cmdline-opts/page-footer: add three more exit codes +- SMB: fix numeric constant suffix and variable types + + 1. don't use "ULL" suffix since unsupported in older MSVC + 2. use curl_off_t instead of custom long long ifdefs + 3. make get_posix_time() not do unaligned data access - ... and regenerated curl.1 + Fixes #2211 + Closes #2240 + Reported-by: Chester Liu -- formdata: use NULL, not 0, when returning pointers +- [rouzier brought this change] -- ftp: failure to resolve proxy should return that error code + CURLOPT_TCP_NODELAY.3: fix typo + + Closes #2239 -- configure: accept --with-libidn2 instead +- smtp/pop3/imap_get_message: decrease the data length too... - ... which the help text already implied since we switched to libidn2 - from libidn in commit 9c91ec778104ae3b back in October 2016. + Follow-up commit to 615edc1f73 which was incomplete. - Reported-by: Christian Weisgerber - Bug: https://curl.haxx.se/mail/lib-2016-12/0110.html + Assisted-by: Max Dymond + Detected by OSS-fuzz + Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5206 -- test1282: verify the ftp-gss check +- openssl: enable SSLKEYLOGFILE support by default + + Fixes #2210 + Closes #2236 -- ftp-gss: check for init before use +Patrick Monnerat (14 Jan 2018) +- mime: clone mime tree upon easy handle duplication. - To avoid dereferencing a NULL pointer. + A mime tree attached to an easy handle using CURLOPT_MIMEPOST is + strongly bound to the handle: there is a pointer to the easy handle in + each item of the mime tree and following the parent pointer list + of mime items ends in a dummy part stored within the handle. - Reported-by: Daniel Romero - -Jay Satiro (24 Dec 2016) -- build-wolfssl: Sync config with wolfSSL 3.10 + Because of this binding, a mime tree cannot be shared between different + easy handles, thus it needs to be cloned upon easy handle duplication. - wolfSSL configure script relevant changes from 3.9 to 3.10: + There is no way for the caller to get the duplicated mime tree + handle: it is then set to be automatically destroyed upon freeing the + new easy handle. - - DES3 no longer enabled by default - - Shamir no longer enabled by default - - Extended master secret enabled by default - - RSA and ECC timing protections enabled by default + New test 654 checks proper mime structure duplication/release. - For backwards compatibility I enabled DES3 and ECC shamir config options - (ie no change from 3.9), and the other changes are included. + Add a warning note in curl_mime_data_cb() documentation about sharing + user data between duplicated handles. + + Closes #2235 -- cyassl: use time_t instead of long for timeout +- docs: comment about CURLE_READ_ERROR returned by curl_mime_filedata -Daniel Stenberg (23 Dec 2016) -- bump: toward next release +Daniel Stenberg (13 Jan 2018) +- test395: HTTP with overflow Content-Length value -- http: remove "Curl_http_done: called premature" message - - ... it only confuses people. +- test394: verify abort of rubbish in Content-Length: value -- openssl-random: check return code when asking for random +- test393: verify --max-filesize with excessive Content-Length + +- HTTP: bail out on negative Content-Length: values + + ... and make the max filesize check trigger if the value is too big. - and fail appropriately if it returns error + Updates test 178. + + Reported-by: Brad Spencer + Fixes #2212 + Closes #2223 -- gnutls-random: check return code for failed random +Marcel Raad (13 Jan 2018) +- [Dan Johnson brought this change] -Version 7.52.1 (22 Dec 2016) + configure.ac: append extra linker flags instead of prepending them. + + Link order should list libraries after the libraries that use them, + so when we're guessing that we might also need to add -ldl in order + to use -lssl, we should add -ldl after -lssl. + + Closes https://github.com/curl/curl/pull/2234 -Daniel Stenberg (22 Dec 2016) -- RELEASE-NOTES: curl 7.52.1 +Daniel Stenberg (13 Jan 2018) +- RELEASE-NOTES: synced with 6fa10c8fa -- lib557.c: use a shorter MAXIMIZE representation +Jay Satiro (13 Jan 2018) +- setopt: fix SSLVERSION to allow CURL_SSLVERSION_MAX_ values - Since several compilers had problems with the previous one + Broken since f121575 (precedes 7.56.1). - Reported-by: Ray Satiro - Bug: https://curl.haxx.se/mail/lib-2016-12/0098.html - -- runtests: remove the valgrind parser + Bug: https://github.com/curl/curl/issues/2225 + Reported-by: cmfrolick@users.noreply.github.com - Old legacy parsing that 1) hid problems for us and 2) probably isn't - needed anymore. + Closes https://github.com/curl/curl/pull/2227 -- [Kamil Dudka brought this change] +Patrick Monnerat (13 Jan 2018) +- setopt: reintroduce non-static Curl_vsetopt() for OS400 support + + This also upgrades ILE/RPG bindings with latest setopt options. + + Reported-By: jonrumsey on github + Fixes #2230 + Closes #2233 - randit: store the value in the buffer +Jay Satiro (11 Jan 2018) +- [Zhouyihai Ding brought this change] -- tests/Makefile: run checksrc on debug builds + http2: fix incorrect trailer buffer size - ... just like we already do in src/ and lib/ - -- lib557: move the "enable LONGLINE" to allow more long lines + Prior to this change the stored byte count of each trailer was + miscalculated and 1 less than required. It appears any trailer + after the first that was passed to Curl_client_write would be truncated + or corrupted as well as the size. Potentially the size of some + subsequent trailer could be erroneously extracted from the contents of + that trailer, and since that size is used by client write an + out-of-bounds read could occur and cause a crash or be otherwise + processed by client write. + + The bug appears to have been born in 0761a51 (precedes 7.49.0). - This file is riddled with them... + Closes https://github.com/curl/curl/pull/2231 -- bump: toward next release +- [Basuke Suzuki brought this change] -Marcel Raad (21 Dec 2016) -- lib: fix MSVC compiler warnings + easy: fix connection ownership in curl_easy_pause - Visual C++ complained: - warning C4267: '=': conversion from 'size_t' to 'long', possible loss of data - warning C4701: potentially uninitialized local variable 'path' used + Before calling Curl_client_chop_write(), change the owner of connection + to the current Curl_easy handle. This will fix the issue #2217. + + Fixes https://github.com/curl/curl/issues/2217 + Closes https://github.com/curl/curl/pull/2221 -Version 7.52.0 (20 Dec 2016) +Daniel Stenberg (9 Jan 2018) +- [Dimitrios Apostolou brought this change] -Daniel Stenberg (20 Dec 2016) -- THANKS: 13 new contributors from 7.52.0 + system.h: Additionally check __LONG_MAX__ for defining curl_off_t + + __SIZEOF_LONG__ was introduced in GCC 4.4, __LONG_MAX__ was introduced + in GCC 3.3. + + Closes #2216 -- RELEASE-NOTES: 7.52.0 +- COPYING: it's 2018! -- ssh: inhibit coverity warning with (void) +- progress: calculate transfer speed on milliseconds if possible - CID 1397391 (#1 of 1): Unchecked return value (CHECKED_RETURN) - -- Curl_recv_has_postponed_data: silence compiler warnings + to increase accuracy for quick transfers - Follow-up to d00f2a8f2 + Fixes #2200 + Closes #2206 -Jay Satiro (19 Dec 2016) -- tests: checksrc compliance - -- http_proxy: Fix proxy CONNECT hang on pending data +Jay Satiro (7 Jan 2018) +- scripts: allow all perl scripts to be run directly + + - Enable execute permission (chmod +x) - - Check for pending data before waiting on the socket. + - Change interpreter to /usr/bin/env perl - Bug: https://github.com/curl/curl/issues/1156 - Reported-by: Adam Langley + Closes https://github.com/curl/curl/pull/2222 -Daniel Stenberg (19 Dec 2016) -- cmdline-opts/tlsv1.d: rephrased +- mail-rcpt.d: fix short-text description -- [Dan McNulty brought this change] +- build: remove HAVE_LIMITS_H check + + .. because limits.h presence isn't optional, it's required by C89. + + Ref: http://port70.net/~nsz/c/c89/c89-draft.html#2.2.4.2 + + Closes https://github.com/curl/curl/pull/2215 - schannel: fix wildcard cert name validation on Win CE +- openssl: fix memory leak of SSLKEYLOGFILE filename + + - Free the copy of SSLKEYLOGFILE env returned by curl_getenv during ossl + initialization. - Fixes a few issues in manual wildcard cert name validation in - schannel support code for Win32 CE: - - when comparing the wildcard name to the hostname, the wildcard - character was removed from the cert name and the hostname - was checked to see if it ended with the modified cert name. - This allowed cert names like *.com to match the connection - hostname. This violates recommendations from RFC 6125. - - when the wildcard name in the certificate is longer than the - connection hostname, a buffer overread of the connection - hostname buffer would occur during the comparison of the - certificate name and the connection hostname. + Caught by ASAN. -- printf: fix floating point buffer overflow issues +- Revert "curl/system.h: fix compilation with gcc on AIX PPC and IA64 HP-UX" - ... and add a bunch of floating point printf tests + This reverts commit c97648b55080343bb371522bf4233e94a2a13a99. + + SIZEOF_LONG should not be checked in system.h since that macro is only + defined when building libcurl. + + Ref: https://github.com/curl/curl/pull/2186#issuecomment-354767080 + Ref: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html -- config-amigaos.h: (embarrassed) made the line shorter +Michael Kaufmann (30 Dec 2017) +- test1554: improve the error handling -- config-amigaos.h: fix bug report email reference +- test1554: add global initialization and cleanup -- RELEASE-NOTES: synced with 4517158abfeba +Daniel Stenberg (29 Dec 2017) +- curl_version_info.3: call the argument 'age' + + Reported-by: Pete Lomax + Bug: https://curl.haxx.se/mail/lib-2017-12/0074.html -- CIPHERS.md: backtick the names to show underscores fine +Patrick Monnerat (27 Dec 2017) +- [Mikalai Ananenka brought this change] -- form-string.d: fix format mistake + brotli: data at the end of content can be lost - and regenerated curl.1 + Decoding loop implementation did not concern the case when all + received data is consumed by Brotli decoder and the size of decoded + data internally hold by Brotli decoder is greater than CURL_MAX_WRITE_SIZE. + For content with unencoded length greater than CURL_MAX_WRITE_SIZE this + can result in the loss of data at the end of content. - Reported-by: Gisle Vanem + Closes #2194 -Michael Kaufmann (18 Dec 2016) -- openssl: simplify expression in Curl_ossl_version - -- curl_easy_recv: Improve documentation and example program +Jay Satiro (26 Dec 2017) +- examples/cacertinmem: ignore cert-already-exists error - Follow-up to 82245ea: Fix the example program sendrecv.c (handle - CURLE_AGAIN, handle incomplete send). Improve the documentation - for curl_easy_recv() and curl_easy_send(). + - Ignore X509_R_CERT_ALREADY_IN_HASH_TABLE errors in the CTX callback + since it's possible the cert may have already been loaded by libcurl. - Reviewed-by: Frank Meier - Assisted-by: Jay Satiro + - Remove the EXAMPLE code in the CURLOPT_SSL_CTX_FUNCTION.3 doc. + Instead have it direct the reader to this cacertinmem.c example. + + - Fix the CA certificate to use the right CA for example.com, Digicert. + + Bug: https://curl.haxx.se/mail/lib-2017-12/0057.html + Reported-by: Thomas van Hesteren - See https://github.com/curl/curl/pull/1134 + Closes https://github.com/curl/curl/pull/2182 -- [Isaac Boukris brought this change] +- [Gisle Vanem brought this change] - Curl_getconnectinfo: avoid checking if the connection is closed + tool_getparam: Support size modifiers for --max-filesize - It doesn't benefit us much as the connection could get closed at - any time, and also by checking we lose the ability to determine - if the socket was closed by reading zero bytes. + - Move the size modifier detection code from limit-rate to its own + function so that it can also be used with max-filesize. - Reported-by: Michael Kaufmann + Size modifiers are the suffixes such as G (gigabyte), M (megabyte) etc. - Closes https://github.com/curl/curl/pull/1134 - -Daniel Stenberg (18 Dec 2016) -- CIPHERS.md: attempt to document TLS cipher names + For example --max-filesize 1G - As the official docs seems really hard to keep track of and link to over - time - -- curl.1: generated after 6cce4dbf830 - -- cmdline-opts/post30X.d: fix the RFC references - -- curl.1: regenerated + Ref: https://curl.haxx.se/mail/archive-2017-12/0000.html - Fixed trailing whitespace and numerous formatting glitches - -- cmdline-opts: formatting fixes + Closes https://github.com/curl/curl/pull/2179 -- curl_easy_setopt.3: removed CURLOPT_SOCKS_PROXYTYPE +Steve Holme (22 Dec 2017) +- build: Fixed incorrect script termination from commit ad1dc10e61 -- tool_getparam.c: make comments use the up-to-date option names +- Makefile.vc: Added our standard copyright header -- manpage-scan.pl: allow deprecated options to get removed from curl.1 - - --krb4, --ftp-ssl and --ftp-ssl-reqd no longer need to be documented in the - man page - -- cmdline-opts/gen.pl: trim off trailing spaces +- winbuild: Added support for VC15 -- cmdline-opts/proxy-tlsuser.d: remove trailing .d +- build: Added Visual Studio 2017 project files -- curl_easy_setopt.3: CURLOPT_PRE_PROXY instead of CURLOPT_SOCKS_PROXY +- build-wolfssl.bat: Added support for VC15 -- symbols: removed two, added one +- build-openssl.bat: Added support for VC15 -- cmdline-opts: include the man page split up files in the dist +Jay Satiro (22 Dec 2017) +- [Dimitrios Apostolou brought this change] -- curl.1: generated with gen.pl - - This is the first time we replace the manually edited curt.1 with the - generated one created by gen.pl and the individual option documentation - pages. - - Do not edit this file, edit the individual pages and regenerate this - output. + curl/system.h: fix compilation with gcc on AIX PPC and IA64 HP-UX - This file will be generated by the build system soon and then removed - from git. + Closes https://github.com/curl/curl/pull/2186 -- cmdline-opts: added some missing info +- [Mattias Fornander brought this change] -- CURLINFO_SSL_VERIFYRESULT.3: language - -- HTTPS-PROXY docs: update/polish - -- cmdline-opts/page-header: mention it is generated + examples/rtsp: fix error handling macros - ... to avoid people from trying to edit the pending curl.1 version that - gets generated by gen.pl + Closes https://github.com/curl/curl/pull/2185 -- preproxy: renamed what was added as SOCKS_PROXY +Patrick Monnerat (20 Dec 2017) +- curl_easy_reset: release mime-related data. - CURLOPT_SOCKS_PROXY -> CURLOPT_PRE_PROXY + Move curl_mime_initpart() and curl_mime_cleanpart() calls to lower-level + functions dealing with UserDefined structure contents. + This avoids memory leakages on curl-generated part mime headers. + New test 2073 checks this using the cli tool --next option: it + triggers a valgrind error if bug is present. - Added the corresponding --preroxy command line option. Sets a SOCKS - proxy to connect to _before_ connecting to a HTTP(S) proxy. + Bug: https://curl.haxx.se/mail/lib-2017-12/0060.html + Reported-by: Martin Galvan -- curl: normal socks proxies still use CURLOPT_PROXY +- content_encoding: rework zlib_inflate - ... the newly introduced CURLOPT_SOCKS_PROXY is special and should be - asked for specially. (Needs new code.) + - When zlib version is < 1.2.0.4, process gzip trailer before considering + extra data as an error. + - Inflate with Z_BLOCK instead of Z_SYNC_FLUSH to maximize correct data + and minimize corrupt data output. + - Do not try to restart deflate decompression in raw mode if output has + started or if the leading data is not available anymore. + - New test 232 checks inflating raw-deflated content. - Unified proxy type to a single variable in the config struct. + Closes #2068 -- CURLOPT_SOCKS_PROXYTYPE: removed +- brotli: allow compiling with version 0.6.0. - This was added as part of the SOCKS+HTTPS proxy merge but there's no - need to support this as we prefer to have the protocol specified as a - prefix instead. + Some error codes were not yet defined in brotli 0.6.0: do not issue code + for them in this case. -- curl_multi_socket.3: fix typo - -- checksrc: warn for assignments within if() expressions +Daniel Stenberg (13 Dec 2017) +- CURLOPT_READFUNCTION.3: refer to argument with correct name + + Bug: #2175 - ... they're already frowned upon in our source code style guide, this - now enforces the rule harder. + [ci skip] -- checksrc: stricter no-space-before-paren enforcement +- rand: add a clang-analyzer work-around - In order to make the code style more uniform everywhere + scan-build would warn on a potential access of an uninitialized + buffer. I deem it a false positive and had to add this somewhat ugly + work-around to silence it. -- ISSUE_TEMPLATE: try mentioning known bugs/todo in new issue template +- krb5: fix a potential access of uninitialized memory + + A scan-build warning. -- RELEASE-NOTES: synced with 71a55534fa6 +- conncache: fix a return code [regression] + + This broke in 07cb27c98e. Make sure to return 'result' properly. Pointed + out by scan-build! -- [Adam Langley brought this change] +- curl: support >256 bytes warning messsages + + Bug: #2174 - openssl: don't use OpenSSL's ERR_PACK. +Michael Kaufmann (12 Dec 2017) +- libssh: fix a syntax error in configure.ac - ERR_PACK is an internal detail of OpenSSL. Also, when using it, a - function name must be specified which is overly specific: the test will - break whenever OpenSSL internally change things so that a different - function creates the error. + Follow-up to c92d2e1 - Closes #1157 - -Dan Fandrich (5 Dec 2016) -- test2032: Mark test as flaky + Closes #2172 -Jay Satiro (3 Dec 2016) -- [Jeremy Pearson brought this change] +Daniel Stenberg (12 Dec 2017) +- examples/smtp-mail.c: use separate defines for options and mail + + ... to make it clearer that the options want address-only, while the + headers in an email can also have the real name. + + Assisted-by: Sean MacLennan - libcurl-multi.3: typo +- THANKS: added missing names - Closes https://github.com/curl/curl/pull/1153 + ... as I reran the contrithanks script after the mailmap name fixups. -Dan Fandrich (2 Dec 2016) -- test1281: added http as a required feature +- mailmap: added/clarified several names -Daniel Stenberg (2 Dec 2016) -- curl: support zero-length argument strings in config files +- setopt: less *or equal* than INT_MAX/1000 should be fine - ... like 'user-agent = ""' + ... for the CURLOPT_TIMEOUT, CURLOPT_CONNECTTIMEOUT and + CURLOPT_SERVER_RESPONSE_TIMEOUT range checks. - Adjusted test 71 to verify. - -- http_proxy: simplify CONNECT response reading + Reported-by: Dominik Hölzl + Bug: https://curl.haxx.se/mail/lib-2017-12/0037.html - Since it now reads responses one byte a time, a loop could be removed - and it is no longer limited to get the whole response within 16K, it is - now instead only limited to 16K maximum header line lengths. + Closes #2173 -- tests: fix CONNECT test cases to be more strict - - ... as they broke with the cleaned up CONNECT handling +- [Dmitry Kostjuchenko brought this change] -- CONNECT: read responses one byte at a time + vtls: replaced getenv() with curl_getenv() - ... so that it doesn't read data that is actually coming from the - remote. 2xx responses have no body from the proxy, that data is from the - peer. + Fixed undefined symbol of getenv() which does not exist when compiling + for Windows 10 App (CURL_WINDOWS_APP). Replaced getenv() with + curl_getenv() which is aware of getenv() absence when CURL_WINDOWS_APP + is defined. - Fixes #1132 + Closes #2171 + +- RELEASE-NOTES: synced with 3b9ea70ee -- CONNECT: reject TE or CL in 2xx responses +- TODO: Expose tried IP addresses that failed - A server MUST NOT send any Transfer-Encoding or Content-Length header - fields in a 2xx (Successful) response to CONNECT. (RFC 7231 section - 4.3.6) + Suggested-by: Rainer Canavan - Also fixes the three test cases that did this. + Closes #2126 -- URL parser: reject non-numerical port numbers - - Test 1281 added to verify +- curl.1: mention http:// and https:// as valid proxy prefixes -Dan Fandrich (30 Nov 2016) -- runtests: made Servers: output be more consistent by removing OFF +- curl.1: documented two missing valid exit codes -- cyassl: fixed typo introduced in 4f8b1774 +- CURLOPT_DNS_LOCAL_IP4.3: fixed the seel also to not self-reference -Michael Kaufmann (30 Nov 2016) -- CURLOPT_CONNECT_TO: Skip non-matching "connect-to" entries properly - - If a port number in a "connect-to" entry does not match, skip this - entry instead of connecting to port 0. +- Revert "curl: don't set CURLOPT_INTERLEAVEDATA" - If a port number in a "connect-to" entry matches, use this entry - and look no further. + This reverts commit 9ffad8eb1329bb35c8988115ac7ed85cf91ef955. - Reported-by: Jay Satiro - Assisted-by: Jay Satiro, Daniel Stenberg - - Closes #1148 + It was actually added rather recently in 8e8afa82cbb629 due to a crash + that would otherwise happen in the RTSP code. As I don't think we've + fixed that behavior yet, we better keep this work-around until we have + fixed it better. -Daniel Stenberg (29 Nov 2016) -- BUGS: describe bug handling process +Michael Kaufmann (10 Dec 2017) +- tests: mark data files as non-executable in git -- RELEASE-NOTES: synced with 19613fb3 +- tests: update .gitignore for libtests -Jay Satiro (28 Nov 2016) -- http2: check nghttp2_session_set_local_window_size exists +Daniel Stenberg (10 Dec 2017) +- multi_done: prune DNS cache - The function only exists since nghttp2 1.12.0. + Prune the DNS cache immediately after the dns entry is unlocked in + multi_done. Timed out entries will then get discarded in a more orderly + fashion. - Bug: https://github.com/curl/curl/commit/a4d8888#commitcomment-19985676 - Reported-by: Michael Kaufmann - -Daniel Stenberg (28 Nov 2016) -- [Anders Bakken brought this change] - - http2: Fix crashes when parent stream gets aborted + Test506 is updated - Closes #1125 - -- cmdline-docs: more options converted and fixed + Reported-by: Oleg Pudeyev - Now all options are in the new system. - -- gen: include footer in mainpage output + Fixes #2169 + Closes #2170 -Jay Satiro (28 Nov 2016) -- lib1536: checksrc compliance +- mailmap: fixup two old git Author "aliases" -Daniel Stenberg (28 Nov 2016) -- cmdline-opts: more command line options documented +Jay Satiro (10 Dec 2017) +- openssl: Disable file buffering for Win32 SSLKEYLOGFILE - Moved over to the new format + Prior to this change SSLKEYLOGFILE used line buffering on WIN32 just + like it does for other platforms. However, the Windows CRT does not + actually support line buffering (_IOLBF) and will use full buffering + (_IOFBF) instead. We can't use full buffering because multiple processes + may be writing to the file and that could lead to corruption, and since + full buffering is the only buffering available this commit disables + buffering for Windows SSLKEYLOGFILE entirely (_IONBF). + + Ref: https://github.com/curl/curl/pull/1346#issuecomment-350530901 -- curl: remove --proxy-ssl* options +Daniel Stenberg (10 Dec 2017) +- RESOLVE: output verbose text when trying to set a duplicate name - There's mostly likely no need to allow setting SSLv2/3 version for HTTPS - proxy. Those protocols are insecure by design and deprecated. + ... to help users understand what is or isn't done! + +- CURLOPT_DNS_CACHE_TIMEOUT.3: see also CURLOPT_RESOLVE -- CURLOPT_PROXY_*.3: polished some proxy option man pages +- [John DeHelian brought this change] -Patrick Monnerat (26 Nov 2016) -- os400: support CURLOPT_PROXY_PINNEDPUBLICKEY + sftp: allow quoted commands to use relative paths - Also define it in ILE/RPG binding. + Closes #1900 -Daniel Stenberg (26 Nov 2016) -- [Okhin Vasilij brought this change] +Jay Satiro (8 Dec 2017) +- [Richard Alcock brought this change] - curl_version_info: add CURL_VERSION_HTTPS_PROXY + CURLOPT_PRIVATE.3: fix grammar - Closes #1142 - -- [Frank Gevaerts brought this change] + - Change "never does nothing" double-negative to "never does anything". + + Closes https://github.com/curl/curl/pull/2168 - tests: Add some testcases for recent new features. +Daniel Stenberg (8 Dec 2017) +- curl: remove __EMX__ #ifdefs - Add missing tests for CURLINFO_SCHEME, CURLINFO_PROTOCOL, %{scheme}, - and %{http_version} + These are OS/2-specific things added to the code in the year 2000. They + were always ugly. If there's any user left, they still don't need it + done this way. - closes #1143 + Closes #2166 -- [Frank Gevaerts brought this change] - - curl_easy_reset: clear info for CULRINFO_PROTOCOL and CURLINFO_SCHEME - -- CURLOPT_PROXY_CAINFO.3: clarify proxy use - -- CURLOPT_PROXY_CRLFILE.3: clarify https proxy and availability - -- curl_easy_setopt.3: add CURLOPT_PROXY_PINNEDPUBLICKEY +Jay Satiro (8 Dec 2017) +- openssl: improve data-pending check for https proxy - Follow-up to 4f8b17743d7c55a - -- docs: include all opts man pages in dist + - Allow proxy_ssl to be checked for pending data even when connssl does + not yet have an SSL handle. - Sorted the lists too. + This change is for posterity. Currently there doesn't seem to be a code + path that will cause a pending data check when proxyssl could have + pending data and the connssl handle doesn't yet exist [1]. - ... and include the new ones in the PDF and HTML generation targets - -- [Thomas Glanzmann brought this change] - - HTTPS Proxy: Implement CURLOPT_PROXY_PINNEDPUBLICKEY - -- [Thomas Glanzmann brought this change] + [1]: Recall that an https proxy connection starts out in connssl but if + the destination is also https then the proxy SSL backend data is moved + from connssl to proxyssl, which means connssl handle is temporarily + empty until an SSL handle for the destination can be created. + + Ref: https://github.com/curl/curl/commit/f4a6238#commitcomment-24396542 + + Closes https://github.com/curl/curl/pull/1916 - url: proxy: Use 443 as default port for https proxies +Daniel Stenberg (8 Dec 2017) +- curl: don't set CURLOPT_INTERLEAVEDATA + + That data is only ever used by the CURLOPT_INTERLEAVEFUNCTION callback + and that option isn't set or used by the curl tool! + + Updates the 9 tests that verify --libcurl + + Closes #2167 -- TODO: removed "HTTPS proxy" +- curl.h: remove incorrect comment about ERRORBUFFER + + ... error messages are _not_ sent to stderr if this is not set. -- [Jan-E brought this change] +- [Michael Felt brought this change] - winbuild: add config option ENABLE_NGHTTP2 + configure: add AX_CODE_COVERAGE only if using gcc - Closes #1141 + Fixes #2076 + Closes #2125 -Jay Satiro (24 Nov 2016) -- tool_urlglob: Improve sanity check in glob_range +- curl: limit -# update frequency for unknown total size - Prior to this change we depended on errno if strtol could not perform a - conversion. POSIX says EINVAL *may* be set. Some implementations like - Microsoft's will not set it if there's no conversion. + Make it use a max 10Hz update frequency for this case as well. Return + early if the "point" hasn't moved since last invoke. - Ref: https://github.com/curl/curl/commit/ee4f7660#commitcomment-19658189 + Reported-by: Elliot Saba + + Fixes #2158 + Closes #2163 -- tool_help: Change description for --retry-connrefused +- BINDINGS: another PostgreSQL client + + ...the former link is dead. - Ref: https://github.com/curl/curl/pull/1064#issuecomment-260052409 + Reported-by: Frank Gevaerts -Patrick Monnerat (25 Nov 2016) -- os400: sync ILE/RPG binding +- [Zachary Seguin brought this change] -Jay Satiro (24 Nov 2016) -- test1135: Fix curl_easy_duphandle prototype for code style + CONNECT: keep close connection flag in http_connect_state struct - Follow-up to dbadaeb which changed the style. + Fixes #2088 + Closes #2157 + +- [Per Malmberg brought this change] -- x509asn1: Restore the parameter check in Curl_getASN1Element + include: get netinet/in.h before linux/tcp.h - - Restore the removed parts of the parameter check. + ... to allow build on older Linux dists (specifically CentOS 4.8 on gcc + 4.8.5) - Follow-up to 945f60e which altered the parameter check. + Closes #2160 -Daniel Stenberg (25 Nov 2016) -- RELEASE-NOTES: update option counters +- openldap: fix checksrc nits -- [Frank Gevaerts brought this change] +- [Stepan Broz brought this change] - add CURLINFO_SCHEME, CURLINFO_PROTOCOL, and %{scheme} + openldap: add commented out debug possibilities - Adds access to the effectively used protocol/scheme to both libcurl and - curl, both in string and numeric (CURLPROTO_*) form. + ... to aid debugging openldap library using its built-in debug messages. - Note that the string form will be uppercase, as it is just the internal - string. + Closes #2159 + +- examples: move threaded-shared-conn.c to the "complicated" ones - As these strings are declared internally as const, and all other strings - returned by curl_easy_getinfo() are de-facto const as well, string - handling in getinfo.c got const-ified. + ... due it relying on pthreads to link. + +- RELEASE-NOTES: synced with b261c44e8 - Closes #1137 + ... and bump next release version to 7.58.0 -- RELEASE-NOTES: synced with 63198a4750aeb +- [Jan Ehrhardt brought this change] -- curl.1: the new --proxy options ship in 7.52.0 + URL: tolerate backslash after drive letter for FILE: + + ... as in "file://c:\some\path\curl.out" + + Reviewed-by: Matthew Kerwin + Closes #2154 -- checksrc: move open braces to comply with function declaration style +- [Randall S. Becker brought this change] -- checksrc: detect wrongly placed open braces in func declarations + tests: added netinet/in6.h includes in test servers -- checksrc: white space edits to comply to stricter checksrc +- [Randall S. Becker brought this change] -- checksrc: verify ASTERISKNOSPACE + configure: check for netinet/in6.h - Detects (char*) and 'char*foo' uses. - -- checksrc: code style: use 'char *name' style - -- checksrc: add ASTERISKSPACE + Needed by HPE NonStop NSE and NSX systems - Verifies a 'char *name' style, with no space after the asterisk. + Fixes #2146 + Closes #2155 -- openssl: remove dead code +- curl-config: add --ssl-backends - Coverity CID 1394666 - -- [Okhin Vasilij brought this change] - - HTTPS-proxy: fixed mbedtls and polishing - -- darwinssl: adopted to the HTTPS proxy changes + Lists all SSL backends that were enabled at build-time. - It builds and runs all test cases. No adaptations for actual HTTPS proxy - support has been made. + Suggested-by: Oleg Pudeyev + Fixes #2128 -- gtls: fix indent to silence compiler warning +- conncache: only allow multiplexing within same multi handle - vtls/gtls.c: In function ‘Curl_gtls_data_pending’: - vtls/gtls.c:1429:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] - if(conn->proxy_ssl[connindex].session && - ^~ - vtls/gtls.c:1433:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ - return res; - -- [Thomas Glanzmann brought this change] + Connections that are used for HTTP/1.1 Pipelining or HTTP/2 multiplexing + only get additional transfers added to them if the existing connection + is held by the same multi or easy handle. libcurl does not support doing + HTTP/2 streams in different threads using a shared connection. + + Closes #2152 - mbedtls: Fix compile errors +- threaded-shared-conn.c: fixed typo in commenta -- [Alex Rousskov brought this change] +- threaded-shared-conn.c: new example - proxy: Support HTTPS proxy and SOCKS+HTTP(s) +- conncache: fix several lock issues - * HTTPS proxies: + If the lock is released before the dealings with the bundle is over, it may + have changed by another thread in the mean time. - An HTTPS proxy receives all transactions over an SSL/TLS connection. - Once a secure connection with the proxy is established, the user agent - uses the proxy as usual, including sending CONNECT requests to instruct - the proxy to establish a [usually secure] TCP tunnel with an origin - server. HTTPS proxies protect nearly all aspects of user-proxy - communications as opposed to HTTP proxies that receive all requests - (including CONNECT requests) in vulnerable clear text. - - With HTTPS proxies, it is possible to have two concurrent _nested_ - SSL/TLS sessions: the "outer" one between the user agent and the proxy - and the "inner" one between the user agent and the origin server - (through the proxy). This change adds supports for such nested sessions - as well. + Fixes #2132 + Fixes #2151 + Closes #2139 + +- libssh: remove dead code in sftp_qoute - A secure connection with a proxy requires its own set of the usual SSL - options (their actual descriptions differ and need polishing, see TODO): + ... by removing a superfluous NULL pointer check that also confuses + Coverity. - --proxy-cacert FILE CA certificate to verify peer against - --proxy-capath DIR CA directory to verify peer against - --proxy-cert CERT[:PASSWD] Client certificate file and password - --proxy-cert-type TYPE Certificate file type (DER/PEM/ENG) - --proxy-ciphers LIST SSL ciphers to use - --proxy-crlfile FILE Get a CRL list in PEM format from the file - --proxy-insecure Allow connections to proxies with bad certs - --proxy-key KEY Private key file name - --proxy-key-type TYPE Private key file type (DER/PEM/ENG) - --proxy-pass PASS Pass phrase for the private key - --proxy-ssl-allow-beast Allow security flaw to improve interop - --proxy-sslv2 Use SSLv2 - --proxy-sslv3 Use SSLv3 - --proxy-tlsv1 Use TLSv1 - --proxy-tlsuser USER TLS username - --proxy-tlspassword STRING TLS password - --proxy-tlsauthtype STRING TLS authentication type (default SRP) + Fixes #2143 + Closes #2153 + +- sasl_getmesssage: make sure we have a long enough string to pass - All --proxy-foo options are independent from their --foo counterparts, - except --proxy-crlfile which defaults to --crlfile and --proxy-capath - which defaults to --capath. + For pop3/imap/smtp, added test 891 to somewhat verify the pop3 + case. - Curl now also supports %{proxy_ssl_verify_result} --write-out variable, - similar to the existing %{ssl_verify_result} variable. + For this, I enhanced the pingpong test server to be able to send back + responses with LF-only instead of always using CRLF. - Supported backends: OpenSSL, GnuTLS, and NSS. + Closes #2150 + +- libssh2: remove dead code from SSH_SFTP_QUOTE - * A SOCKS proxy + HTTP/HTTPS proxy combination: + Figured out while reviewing code in the libssh backend. The pointer was + checked for NULL after having been dereferenced, so we know it would + always equal true or it would've crashed. - If both --socks* and --proxy options are given, Curl first connects to - the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS - proxy. + Pointed-out-by: Nikos Mavrogiannopoulos - TODO: Update documentation for the new APIs and --proxy-* options. - Look for "Added in 7.XXX" marks. - -Patrick Monnerat (24 Nov 2016) -- Declare endian read functions argument as a const pointer. - This is done for all functions of the form Curl_read[136][624]_[lb]e. + Bug #2143 + Closes #2148 -- Limit ASN.1 structure sizes to 256K. Prevent some allocation size overflows. - See CRL-01-006. +- ssh-libssh.c: please checksrc -Jay Satiro (22 Nov 2016) -- url: Fix conn reuse for local ports and interfaces +Nikos Mavrogiannopoulos (4 Dec 2017) +- libssh: fixed dereference in statvfs access - - Fix connection reuse for when the proposed new conn 'needle' has a - specified local port but does not have a specified device interface. + The behavior is now equivalent to ssh.c when SSH_SFTP_QUOTE_STATVFS + handling fails. - Bug: https://curl.haxx.se/mail/lib-2016-11/0137.html - Reported-by: bjt3[at]hotmail.com + Fixes #2142 -Daniel Stenberg (21 Nov 2016) -- rand: pass in number of randoms as an unsigned argument +Daniel Stenberg (4 Dec 2017) +- [Guitared brought this change] -Jay Satiro (20 Nov 2016) -- rand: Fix potentially uninitialized result warning + RESOURCES: update spec names + + Closes #2145 -Marcel Raad (19 Nov 2016) -- vtls: fix build warnings +Nikos Mavrogiannopoulos (3 Dec 2017) +- libssh: corrected use of sftp_statvfs() in SSH_SFTP_QUOTE_STATVFS - Fix warnings about conversions from long to time_t in openssl.c and - schannel.c. + The previous code was incorrectly following the libssh2 error detection + for libssh2_sftp_statvfs, which is not correct for libssh's sftp_statvfs. - Follow-up to de4de4e3c7c - -Daniel Stenberg (18 Nov 2016) -- [Marcel Raad brought this change] + Fixes #2142 + + Signed-off-by: Nikos Mavrogiannopoulos - lib: fix compiler warnings after de4de4e3c7c +- libssh: no need to call sftp_get_error as ssh_get_error is sufficient - Visual C++ now complains about implicitly casting time_t (64-bit) to - long (32-bit). Fix this by changing some variables from long to time_t, - or explicitly casting to long where the public interface would be - affected. + Fixes #2141 - Closes #1131 - -Peter Wu (17 Nov 2016) -- [Isaac Boukris brought this change] + Signed-off-by: Nikos Mavrogiannopoulos - Don't mix unix domain sockets with regular ones +Daniel Stenberg (2 Dec 2017) +- libssh: fix minor static code analyzer nits - When reusing a connection, make sure the unix domain - socket option matches. - -Jay Satiro (17 Nov 2016) -- tests: Fix HTTP2-Settings header for huge window size + - remove superfluous NULL check which otherwise tricks the static code + analyzers to assume NULL pointer dereferences. - Follow-up to a4d8888. Changing the window size in that commit resulted - in a different HTTP2-Settings upgrade header, causing test 1800 to fail. + - fix fallthrough in switch() + + - indent mistake -- http2: Use huge HTTP/2 windows +- openssl: pkcs12 is supported by boringssl - - Improve performance by using a huge HTTP/2 window size. + Removes another #ifdef for BoringSSL - Bug: https://github.com/curl/curl/issues/1102 - Reported-by: afrind@users.noreply.github.com - Assisted-by: Tatsuhiro Tsujikawa - -Daniel Stenberg (16 Nov 2016) -- cmdline-docs: more conversion - -- gen: support 'protos' + Pointed-out-by: David Benjamin - and warn on unrecognized lines - -- gen: support 'single' to make an individual page man page + Closes #2134 -- cmdline-docs: more options converted over +- [Jay Satiro brought this change] -- gen: support 'redirect' + travis: use pip2 instead of pip + + .. since now mac osx image expects pip2 or pip3, and doesn't know pip: - ... and warn for too long --help lines + 0.01s$ pip install --user cpp-coveralls + /Users/travis/.travis/job_stages: line 57: pip: command not found + + Ref: https://github.com/travis-ci/travis-ci/issues/8829 + + Closes https://github.com/curl/curl/pull/2133 -- cmdline/gen: replace options in texts better +- [Nikos Mavrogiannopoulos brought this change] -Jay Satiro (16 Nov 2016) -- http2: Fix address sanitizer memcpy warning + lib582: do not verify host for SFTP - - In Curl_http2_switched don't call memcpy when src is NULL. + This SFTP test fails with libssh back-end due to failure to verify + the peer. Disable peer verification in the test as there seems to + be the intention of the test. - Curl_http2_switched can be called like: + Note that the libssh back-end automatically verifies the peer's + host using the default known_hosts file. - Curl_http2_switched(conn, NULL, 0); - - .. and prior to this change memcpy was then called like: + Signed-off-by: Nikos Mavrogiannopoulos + +- [Nikos Mavrogiannopoulos brought this change] + + libssh: added SFTP support - memcpy(dest, NULL, 0) + The SFTP back-end supports asynchronous reading only, limited + to 32-bit file length. Writing is synchronous with no other + limitations. - .. causing address sanitizer to warn: + This also brings keyboard-interactive authentication. - http2.c:2057:3: runtime error: null pointer passed as argument 2, which - is declared to never be null + Signed-off-by: Nikos Mavrogiannopoulos -- tool_help: Clarify --dump-header only writes received headers +- [Nikos Mavrogiannopoulos brought this change] -- curl.1: Clarify --dump-header only writes received headers + symbols-in-versions: added new symbols with 7.56.3 version + + Signed-off-by: Nikos Mavrogiannopoulos -Daniel Stenberg (15 Nov 2016) -- [Alex Chan brought this change] +- [Nikos Mavrogiannopoulos brought this change] - docs: Spelling fixes + .travis.yml: added build --with-libssh + + Signed-off-by: Nikos Mavrogiannopoulos -Kamil Dudka (15 Nov 2016) -- docs: the next release will be 7.52.0 +- [Nikos Mavrogiannopoulos brought this change] -Daniel Stenberg (15 Nov 2016) -- cmdline-opts: support generating the --help output + libssh2: return CURLE_UPLOAD_FAILED on failure to upload + + This brings its in sync with the error code returned by the + libssh backend. + + Signed-off-by: Nikos Mavrogiannopoulos -- [David Schweikert brought this change] +- [Nikos Mavrogiannopoulos brought this change] - darwinssl: fix SSL client certificate not found on MacOS Sierra + libssh2: send the correct CURLE error code on scp file not found + + That also updates tests to expect the right error code - Reviewed-by: Nick Zitzmann + libssh2 back-end returns CURLE_SSH error if the remote file + is not found. Expect instead CURLE_REMOTE_FILE_NOT_FOUND + which is sent by the libssh backend. - Closes #1105 + Signed-off-by: Nikos Mavrogiannopoulos -- curl: add --fail-early to help output +- [Nikos Mavrogiannopoulos brought this change] + + Added support for libssh SSH SCP back-end + + libssh is an alternative library to libssh2. + https://www.libssh.org/ - Fixes test 1139 failures + That patch set also introduces support for ECDSA + ed25519 keys, as well as gssapi authentication. - Follow-up to f82bbe01c8835 + Signed-off-by: Nikos Mavrogiannopoulos -- glob: fix [a-c] globbing regression +- RELEASE-NOTES: synced with af8cc7a69 + +- curlver: towards 7.57.1 + +- [W. Mark Kubacki brought this change] + + lib: don't export all symbols, just everything curl_* + + Absent any 'symbol map' or script to limit what gets exported, static + linking of libraries previously resulted in a libcurl with curl's and + those other symbols being (re-)exported. - Brought in ee4f76606cf + This did not happen if 'versioned symbols' were enabled (which is not + the default) because then a version script is employed. - Added test case 1280 to verify + This limits exports to everything starting in 'curl_*'., which is + what "libcurl.vers" exports. - Reported-by: Dave Reisner + This avoids strange side-effects such as with mixing methods + from system libraries and those erroneously offered by libcurl. - Bug: https://github.com/curl/curl/commit/ee4f76606cfa4ee068bf28edd37c8dae7e8db317#commitcomment-19823146 + Closes #2127 -- curl: add --fail-early +- [Johannes Schindelin brought this change] + + SSL: Avoid magic allocation of SSL backend specific data - Exit with an error on the first transfer error instead of continuing to - do the rest of the URLs. + Originally, my idea was to allocate the two structures (or more + precisely, the connectdata structure and the four SSL backend-specific + strucutres required for ssl[0..1] and proxy_ssl[0..1]) in one go, so + that they all could be free()d together. - Discussion: https://curl.haxx.se/mail/archive-2016-11/0038.html - -- Curl_rand: fixed and moved to rand.c + However, getting the alignment right is tricky. Too tricky. - Now Curl_rand() is made to fail if it cannot get the necessary random - level. + So let's just bite the bullet and allocate the SSL backend-specific + data separately. - Changed the proto of Curl_rand() slightly to provide a number of ints at - once. + As a consequence, we now have to be very careful to release the memory + allocated for the SSL backend-specific data whenever we release any + connectdata. - Moved out from vtls, since it isn't a TLS function and vtls provides - Curl_ssl_random() for this to use. + Signed-off-by: Johannes Schindelin - Discussion: https://curl.haxx.se/mail/lib-2016-11/0119.html + Closes #2119 -- cmdline-opts: first test version of a new man page generator kit +- examples/xmlstream.c: don't switch off CURL_GLOBAL_SSL - See MANPAGE.md for the description of how this works. Each command line - option is now described in a separate .d file. + Reported-by: Dima Tisnek -- time_t fix: follow-up to de4de4e3c7c +- travis: add boringssl build - Blah, I accidentally wrote size_t instead of time_t for two variables. + Uses a separate build without --enable-debug and no valgrind. - Reported-by: Dave Reisner - -- timeval: prefer time_t to hold seconds instead of long + The debug option causes far too many warnings in boringssl's headers + (C++ comments, trailing commas etc). Valgrind triggers some false + positive errors in thread-local data used by boringssl. - ... as long is still 32bit on modern 64bit windows machines, while - time_t is generally 64bit. + Closes #2118 -Dan Fandrich (12 Nov 2016) -- tests: fixed variable might be clobbered warning - - This stops the compiler from potentially making invalid assumptions - about the immutability of sdp and sap across the longjmp boundary. +Version 7.57.0 (29 Nov 2017) -Daniel Stenberg (12 Nov 2016) -- RELEASE-NOTES: synced with 346340808c +Daniel Stenberg (29 Nov 2017) +- RELEASE-NOTES: curl 7.57.0 -- URL-parser: for file://[host]/ URLs, the [host] must be localhost +- THANKS: added contributors from 7.57.0 release + +- openssl: fix boringssl build again - Previously, the [host] part was just ignored which made libcurl accept - strange URLs misleading users. like "file://etc/passwd" which might've - looked like it refers to "/etc/passwd" but is just "/passwd" since the - "etc" is an ignored host name. + commit d3ab7c5a21e broke the boringssl build since it doesn't have + RSA_flags(), so we disable that code block for boringssl builds. - Reported-by: Mike Crowe - Assisted-by: Kamil Dudka - -- test558: adapt to 0649433da + Reported-by: W. Mark Kubacki + Fixes #2117 -- openssl: make sure to fail in the unlikely event that PRNG seeding fails +- curl_ntlm_core.c: use the limits.h's SIZE_T_MAX if provided -- openssl: avoid unnecessary seeding if already done - - 1.1.0+ does more of this by itself so we can avoid extra processing this - way. +- libcurl-share.3: the connection cache is shareable now -- openssl: RAND_status always exists in OpenSSL >= 0.9.7 +- global_init: ignore CURL_GLOBAL_SSL's absense - and remove RAND_screen from configure since nothing is using that - function - -- Curl_pgrsUpdate: use dedicated function for time passed - -- realloc: use Curl_saferealloc to avoid common mistakes + This bit is no longer used. It is not clear what it meant for users to + "init the TLS" in a world with different TLS backends and since the + introduction of multissl, libcurl didn't properly work if inited without + this bit set. - Discussed: https://curl.haxx.se/mail/lib-2016-11/0087.html - -- [Daniel Hwang brought this change] - - curl: Add --retry-connrefused + Not a single user responded to the call for users of it: + https://curl.haxx.se/mail/lib-2017-11/0072.html - to consider ECONNREFUSED as a transient error. + Reported-by: Evgeny Grin + Assisted-by: Jay Satiro - Closes #1064 + Fixes #2089 + Fixes #2083 + Closes #2107 -- openssl: raise the max_version to 1.3 if asked for +- ntlm: avoid integer overflow for malloc size - Now I've managed to negotiate TLS 1.3 with https://enabled.tls13.com/ when - using boringssl. - -Jay Satiro (9 Nov 2016) -- vtls: Fail on unrecognized param for CURLOPT_SSLVERSION + Reported-by: Alex Nichols + Assisted-by: Kamil Dudka and Max Dymond - - Fix GnuTLS code for CURL_SSLVERSION_TLSv1_2 that broke when the - TLS 1.3 support was added in 6ad3add. + CVE-2017-8816 - - Homogenize across code for all backends the error message when TLS 1.3 - is not available to ": TLS 1.3 is not yet supported". + Bug: https://curl.haxx.se/docs/adv_2017-11e7.html + +- wildcardmatch: fix heap buffer overflow in setcharset - - Return an error when a user-specified ssl version is unrecognized. + The code would previous read beyond the end of the pattern string if the + match pattern ends with an open bracket when the default pattern + matching function is used. - --- + Detected by OSS-Fuzz: + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4161 - Prior to this change our code for some of the backends used the - 'default' label in the switch statement (ie ver unrecognized) for - ssl.version and treated it the same as CURL_SSLVERSION_DEFAULT. + CVE-2017-8817 - Bug: https://curl.haxx.se/mail/lib-2016-11/0048.html - Reported-by: Kamil Dudka + Bug: https://curl.haxx.se/docs/adv_2017-ae72.html -Daniel Stenberg (9 Nov 2016) -- [Isaac Boukris brought this change] +- [Jay Satiro brought this change] - SPNEGO: Fix memory leak when authentication fails + url: fix alignment of ssl_backend_data struct - If SPNEGO fails, cleanup the negotiate handle right away. + - Align the array of ssl_backend_data on a max 32 byte boundary. - Fixes #1115 + 8 is likely to be ok but I went with 32 for posterity should one of + the ssl_backend_data structs change to contain a larger sized variable + in the future. - Signed-off-by: Isaac Boukris - Reported-by: ashman-p - -- CODE_STYLE.md: link to INTERNALS.md correctly - -- bump: next version will be 7.52.0 - -- RELEASE-NOTES: synced with dfcdaaba371e9a3 - -- examples/fileupload.c: fclose the file as well - -- printf: fix ".*f" handling + Prior to this change (since dev 70f1db3, release 7.56) the connectdata + structure was undersized by 4 bytes in 32-bit builds with ssl enabled + because long long * was mistakenly used for alignment instead of + long long, with the intention being an 8 byte boundary. Also long long + may not be an available type. - It would always use precision 1 instead of reading it from the argument - list as intended. + The undersized connectdata could lead to oob read/write past the end in + what was expected to be the last 4 bytes of the connection's secondary + socket https proxy ssl_backend_data struct (the secondary socket in a + connection is used by ftp, others?). - Reported-by: Ray Satiro + Closes https://github.com/curl/curl/issues/2093 - Bug: #1113 - -- curl_formadd.3: *_FILECONTENT and *_FILE need the file to be kept + CVE-2017-8818 - Reported-by: Frank Gevaerts + Bug: https://curl.haxx.se/docs/adv_2017-af0a.html -Kamil Dudka (7 Nov 2016) -- nss: silence warning 'SSL_NEXT_PROTO_EARLY_VALUE not handled in switch' +- ssh: remove check for a NULL pointer (!) - ... with nss-3.26.0 and newer + With this check present, scan-build warns that we might dereference this + point in other places where it isn't first checked for NULL. Thus, if it + *can* be NULL we have a problem on a few places. However, this pointer + should not be possible to be NULL here so I remove the check and thus + also three different scan-build warnings. - Reported-by: Daniel Stenberg + Closes #2111 -Daniel Stenberg (7 Nov 2016) -- openssl: initial TLS 1.3 adaptions - - BoringSSL supports TLSv1.3 already, but these changes don't seem to be anough - to get it working. +- [Matthew Kerwin brought this change] -- ssh: check md5 fingerprints case insensitively (regression) - - Revert the change from ce8d09483eea but use the new function - - Reported-by: Kamil Dudka - Bug: https://github.com/curl/curl/commit/ce8d09483eea2fcb1b50e323e1a8ed1f3613b2e3#commitcomment-19666146 + test: add test for bad UNC/SMB path in file: URL -Kamil Dudka (7 Nov 2016) -- curl: introduce the --tlsv1.3 option to force TLS 1.3 - - Fully implemented with the NSS backend only for now. - - Reviewed-by: Ray Satiro +- [Matthew Kerwin brought this change] -- vtls: support TLS 1.3 via CURL_SSLVERSION_TLSv1_3 - - Fully implemented with the NSS backend only for now. - - Reviewed-by: Ray Satiro + test: add tests to ensure basic file: URLs + +- [Matthew Kerwin brought this change] -- nss: map CURL_SSLVERSION_DEFAULT to NSS default + URL: update "file:" URL handling - ... but make sure we use at least TLSv1.0 according to libcurl API + * LOTS of comment updates + * explicit error for SMB shares (e.g. "file:////share/path/file") + * more strict handling of authority (i.e. "//localhost/") + * now accepts dodgy old "C:|" drive letters + * more precise handling of drive letters in and out of Windows + (especially recognising both "file:c:/" and "file:/c:/") - Reported-by: Cure53 - Reviewed-by: Ray Satiro + Closes #2110 -Daniel Stenberg (7 Nov 2016) -- s/cURL/curl +- metalink: fix memory-leak and NULL pointer dereference - We're mostly saying just "curl" in lower case these days so here's a big - cleanup to adapt to this reality. A few instances are left as the - project could still formally be considered called cURL. + Reported by scan-build + + Closes #2109 -Jay Satiro (7 Nov 2016) -- [Tatsuhiro Tsujikawa brought this change] +- [Alessandro Ghedini brought this change] - http2: Don't send header fields prohibited by HTTP/2 spec + connect: add support for new TCP Fast Open API on Linux - Previously, we just ignored "Connection" header field. But HTTP/2 - specification actually prohibits few more header fields. This commit - ignores all of them so that we don't send these bad header fields. + The new API added in Linux 4.11 only requires setting a socket option + before connecting, without the whole sento() machinery. - Bug: https://curl.haxx.se/mail/archive-2016-10/0033.html - Reported-by: Ricki Hirner + Notably, this makes it possible to use TFO with SSL connections on Linux + as well, without the need to mess around with OpenSSL (or whatever other + SSL library) internals. - Closes https://github.com/curl/curl/pull/1092 + Closes #2056 -Daniel Stenberg (7 Nov 2016) -- curl.1: explain the SMTP data expected for -T +- make: fix "make distclean" - Fixes #1107 - - Reported-by: Adam Piggott + Fixes #2097 + Closes #2108 -Peter Wu (6 Nov 2016) -- cmake: disable poll for macOS - - Mirrors the autotools behavior introduced with curl-7_50_3-83-ga34c7ce. - - Fixes #1089 +- RELEASE-NOTES: synced with 31f18d272 -Jay Satiro (5 Nov 2016) -- easy: Initialize info variables on easy init and duphandle +Jay Satiro (23 Nov 2017) +- connect: improve the bind error message - - Call Curl_initinfo on init and duphandle. + eg consider a non-existent interface eth8, curl --interface eth8 - Prior to this change the statistical and informational variables were - simply zeroed by calloc on easy init and duphandle. While zero is the - correct default value for almost all info variables, there is one where - it isn't (filetime initializes to -1). + Before: curl: (45) Could not resolve host: eth8 + After: curl: (45) Couldn't bind to 'eth8' - Bug: https://github.com/curl/curl/issues/1103 - Reported-by: Neal Poole - -Daniel Stenberg (5 Nov 2016) -- [Mauro Rappa brought this change] + Bug: https://github.com/curl/curl/issues/2104 + Reported-by: Alfonso Martone - curl -w: added more decimal digits to timing counters +Daniel Stenberg (23 Nov 2017) +- examples/rtsp: clear RANGE again after use - Now showing microsecond resolution. - - Closes #1106 + Fixes #2106 + Reported-by: youngchopin on github + +- [Michael Kaufmann brought this change] -Jakub Zakrzewski (4 Nov 2016) -- dist: add CMakeLists.txt to the tarball + test1264: verify URL with space in host name being rejected -Daniel Stenberg (4 Nov 2016) -- mbedtls: fix build with mbedtls versions < 2.4.0 +- url: reject ASCII control characters and space in host names - Regression added in 62a8095e714 + Host names like "127.0.0.1 moo" would otherwise be accepted by some + getaddrinfo() implementations. - Reported-by: Tony Kelman + Updated test 1034 and 1035 accordingly. - Discussed in #1087 + Fixes #2073 + Closes #2092 -- configure: verify that compiler groks -Werror=partial-availability - - Reported-by: bemoody +- Curl_open: fix OOM return error correctly - Fixes #1104 + Closes #2098 -- docs: shorten and simplify the top comment in multi-uv.c - - and change URL to use https +- http2: fix "Value stored to 'end' is never read" scan-build error -- [Andrei Sedoi brought this change] +- http2: fix "Value stored to 'hdbuf' is never read" scan-build error - docs: handle CURL_POLL_INOUT in multi-uv example +- openssl: fix "Value stored to 'rc' is never read" scan-build error -- [Andrei Sedoi brought this change] +- mime: fix "Value stored to 'sz' is never read" scan-build error - docs: multi-uv: don't use CURLMsg after cleanup +- Curl_llist_remove: fix potential NULL pointer deref + + Fixes a scan-build warning. -- [Andrei Sedoi brought this change] +- ntlm: remove unnecessary NULL-check to please scan-build - docs: remove unused variables in multi-uv example +- BUGS: spellchecked -- bump: start working on 7.51.1 +Jay Satiro (18 Nov 2017) +- [fmmedeiros brought this change] -- winbuild: remove strcase.obj from curl build + examples/curlx: Fix code style - Reported-by: Bruce Stephens + - Add braces around multi-line if statement. - Fixes #1098 + Closes https://github.com/curl/curl/pull/2096 -Dan Fandrich (2 Nov 2016) -- msvc: removed a straggling reference to strequal.c +Daniel Stenberg (17 Nov 2017) +- resolve: allow IP address within [] brackets - Follow-up to 502acba2 - -Version 7.51.0 (2 Nov 2016) - -Daniel Stenberg (2 Nov 2016) -- THANKS: synced with 7.51.0 - -- RELEASE-NOTES: 7.51.0 - -- ftp_done: don't clobber the passed in error code + ... so that IPv6 addresses can be passed like they can for connect-to + and how they're used in URLs. - Coverity CID 1374359 pointed out the unused result value. - -- ftp: remove dead code in ftp_done + Added test 1324 to verify + Reported-by: Alex Malinovich - Coverity CID 1374358 + Fixes #2087 + Closes #2091 -Jay Satiro (1 Nov 2016) -- generate.bat: Include include/curl in libcurl VS projects - - .. because including those headers helps Visual Studio's Intellisense. +- [Pavol Markovic brought this change] -- generate.bat: Remove strcase.[ch] from curl tool VS projects + macOS: Fix missing connectx function with Xcode version older than 9.0 - ..because they're no longer needed in the tool build. strcase is still - built by the libcurl project and exports curl_str(n)equal which is used - by the curl tool. + The previous fix https://github.com/curl/curl/pull/1788 worked just for + Xcode 9. This commit extends the fix to older Xcode versions effectively + by not using connectx function. - Bug: https://github.com/curl/curl/commit/9363f1a#all_commit_comments + Fixes https://github.com/curl/curl/issues/1330 + Fixes https://github.com/curl/curl/issues/2080 + Closes https://github.com/curl/curl/pull/1336 + Closes #2082 -Daniel Stenberg (2 Nov 2016) -- metalink: simplify the hex parsing function - - ... and now it avoids using the libcurl toupper() function +- [Dirk Feytons brought this change] -Michael Kaufmann (1 Nov 2016) -- file: fix compiler warning + openssl: fix too broad use of HAVE_OPAQUE_EVP_PKEY - follow-up to 46133aa5 + Fixes #2079 + Closes #2081 -Dan Fandrich (1 Nov 2016) -- strcase: fixed Metalink builds by redefining checkprefix() - - ...to use the public function curl_strnequal(). This isn't ideal because - it adds extra overhead to any internal calls to checkprefix. +- TODO: ignore private IP addresses in PASV response - follow-up to 95bd2b3e + Closes #1455 -Daniel Stenberg (1 Nov 2016) -- curl.1: typo +- RELEASE-NOTES: synced with ae7369b6d -- curl.1: expand on how multiple uses of -o looks +Michael Kaufmann (14 Nov 2017) +- URL: return error on malformed URLs with junk after IPv6 bracket - Suggested-by: Dan Jacobson - Issue: https://github.com/curl/curl/issues/1097 - -- tests/util: get a private strncasecompare clone + Follow-up to aadb7c7. Verified by new test 1263. - ... since the curlx_* code no longer provides one and we don't link - libcurl to these test servers. + Closes #2072 -- strcase: make the tool use curl_str[n]equal instead - - As they are after all part of the public API. Saves space and reduces - complexity. Remove the strcase defines from the curlx_ family. - - Suggested-by: Dan Fandrich - Idea: https://curl.haxx.se/mail/lib-2016-10/0136.html +Daniel Stenberg (14 Nov 2017) +- INTERNALS: we may use libidn2 now, not libidn -Kamil Dudka (31 Oct 2016) -- gskit, nss: do not include strequal.h +Patrick Monnerat (13 Nov 2017) +- zlib/brotli: only include header files in modules needing them + + There is a conflict on symbol 'free_func' between openssl/crypto.h and + zlib.h on AIX. This is an attempt to resolve it. - follow-up to 811a693b80 + Bug: https://curl.haxx.se/mail/lib-2017-11/0032.html + Reported-By: Michael Felt -Dan Fandrich (31 Oct 2016) -- strcasecompare: include curl.h in strcase.c +Daniel Stenberg (13 Nov 2017) +- SMB: fix uninitialized local variable - This should fix the "warning: 'curl_strequal' redeclared without - dllimport attribute: previous dllimport ignored" message and subsequent - link error on Windows because of the missing CURL_EXTERN on the - prototype. + Reported-by: Brian Carpenter -Daniel Stenberg (31 Oct 2016) -- strcase: fix the remaining rawstr users +- [Orgad Shaneh brought this change] -- msvc builds: s/rawstr/strcase + connect.c: remove executable bit on file - Follow-up to 811a693b + Closes #2071 -Dan Fandrich (31 Oct 2016) -- strcasecompare: replaced remaining rawstr.h with strcase.h - - This is a followup to commit 811a693b +- [hsiao yi brought this change] -Marcel Raad (31 Oct 2016) -- digest_sspi: fix include + README.md: fixed layout - Fix compile break from 811a693b80 + Closes #2069 -Dan Fandrich (31 Oct 2016) -- libauthretry: use the external function curl_strequal +- setopt: split out curl_easy_setopt() to its own file - The internal version strcasecompare isn't available outside libcurl - -Daniel Stenberg (31 Oct 2016) -- RELEASE-NOTES: synced with d14538d2501ef0da - -- configure: raise the default minimum version for macos to 10.8 + ... to make url.c smaller. - follow-up to 4f8d0b6f02aa7043. Since the darwinssl code breaks - otherwise. If you build without darwinssl 10.5 works fine. + Closes #1944 -- unit1301: keep testing curl_strequal - - as that is still part of the API, fix from 8fe4bd084412f30 +Jay Satiro (10 Nov 2017) +- [John Starks brought this change] -- ldap: fix include + cmake: Add missing setmode check - Fix bug from 811a693b80 - -- url: remove unconditional idn2.h include + Ensure HAVE_SETMODE is set to 1 on OSes that have setmode. Without this, + curl will corrupt binary files when writing them to stdout on Windows. - Mistake brought by 9c91ec778104a + Closes https://github.com/curl/curl/pull/2067 -- curl_strequal: part of public API/ABI, needs to be kept +Daniel Stenberg (10 Nov 2017) +- curl_share_setopt: va_end was not called if conncache errors - These two public functions have been mentioned as deprecated since a - very long time but since they are still part of the API and ABI we need - to keep them around. + CID 984459, detected by Coverity -- strcase: s/strequal/strcasecompare - - some more follow-ups to 811a693b80 +Sergei Nikulov (10 Nov 2017) +- [John Starks brought this change] -- ldap: fix strcase use + cmake: Correctly include curl.rc in Windows builds (#2064) - follow-up to 811a693b80 + Update CMakeLists.txt to add curl.rc to the correct list. -- test165: adapted to the libidn2 use and IDNA2008 fix +Daniel Stenberg (9 Nov 2017) +- RELEASE-NOTES: synced with 32828cc4f -- cookie: replace use of fgets() with custom version +- [Luca Boccassi brought this change] + + --interface: add support for Linux VRF - ... that will ignore lines that are too long to fit in the buffer. + The --interface command (CURLOPT_INTERFACE option) already uses + SO_BINDTODEVICE on Linux, but it tries to parse it as an interface or IP + address first, which fails in case the user passes a VRF. - CVE-2016-8615 + Try to use the socket option immediately and parse it as a fallback + instead. Update the documentation to mention this feature, and that it + requires the binary to be ran by root or with CAP_NET_RAW capabilities + for this to work. - Bug: https://curl.haxx.se/docs/adv_20161102A.html - Reported-by: Cure53 + Closes #2024 -- strcasecompare: all case insensitive string compares ignore locale now +- curl_share_setopt.3: document CURL_LOCK_DATA_CONNECT - We had some confusions on when each function was used. We should not act - differently on different locales anyway. + Closes #2043 -- strcasecompare: is the new name for strequal() - - ... to make it less likely that we forget that the function actually - does case insentive compares. Also replaced several invokes of the - function with a plain strcmp when case sensitivity is not an issue (like - comparing with "-"). +- examples: add shared-connection-cache -- ftp: check for previous patch must be case sensitive! - - ... otherwise example.com/PATH and example.com/path would be assumed to - be the same and they usually aren't! +- test1554: verify connection cache sharing -- SSH: check md5 fingerprint case sensitively +- share: add support for sharing the connection cache -- connectionexists: use case sensitive user/password comparisons +- imap: deal with commands case insensitively - CVE-2016-8616 + As documented in RFC 3501 section 9: + https://tools.ietf.org/html/rfc3501#section-9 - Bug: https://curl.haxx.se/docs/adv_20161102B.html - Reported-by: Cure53 + Closes #2061 -- base64: check for integer overflow on large input +- connect: store IPv6 connection status after valid connection - CVE-2016-8617 + ... previously it would store it already in the happy eyeballs stage + which could lead to the IPv6 bit being set for an IPv4 connection, + leading to curl not wanting to do EPSV=>PASV for FTP transfers. - Bug: https://curl.haxx.se/docs/adv_20161102C.html - Reported-by: Cure53 + Closes #2053 -- krb5: avoid realloc(0) - - If the requested size is zero, bail out with error instead of doing a - realloc() that would cause a double-free: realloc(0) acts as a free() - and then there's a second free in the cleanup path. +- curl_multi_fdset.3: emphasize curl_multi_timeout - CVE-2016-8619 - - Bug: https://curl.haxx.se/docs/adv_20161102E.html - Reported-by: Cure53 + ... even when there's no socket to wait for, the timeout can still be + very short. -- aprintf: detect wrap-around when growing allocation +Jay Satiro (9 Nov 2017) +- content_encoding: fix inflate_stream for no bytes available - On 32bit systems we could otherwise wrap around after 2GB and allocate 0 - bytes and crash. + - Don't call zlib's inflate() when avail_in stream bytes is 0. - CVE-2016-8618 + This is a follow up to the parent commit 19e66e5. Prior to that change + libcurl's inflate_stream could call zlib's inflate even when no bytes + were available, causing inflate to return Z_BUF_ERROR, and then + inflate_stream would treat that as a hard error and return + CURLE_BAD_CONTENT_ENCODING. - Bug: https://curl.haxx.se/docs/adv_20161102D.html - Reported-by: Cure53 - -- range: reject char globs with missing end like '[L-]' + According to the zlib FAQ, Z_BUF_ERROR is not fatal. - ... which previously would lead to out of boundary reads. + This bug would happen randomly since packet sizes are arbitrary. A test + of 10,000 transfers had 55 fail (ie 0.55%). - Reported-by: Luật Nguyễn + Ref: https://zlib.net/zlib_faq.html#faq05 + + Closes https://github.com/curl/curl/pull/2060 -- glob_next_url: make sure to stay within the given output buffer +Patrick Monnerat (7 Nov 2017) +- content_encoding: do not write 0 length data -- range: prevent negative end number in a glob range +Daniel Stenberg (6 Nov 2017) +- fnmatch: remove dead code - CVE-2016-8620 + There was a duplicate check for backslashes in the setcharset() + function. - Bug: https://curl.haxx.se/docs/adv_20161102F.html - Reported-by: Luật Nguyễn + Coverity CID 1420611 -- parsedate: handle cut off numbers better - - ... and don't read outside of the given buffer! +- url: remove unncessary NULL-check - CVE-2016-8621 - - bug: https://curl.haxx.se/docs/adv_20161102G.html - Reported-by: Luật Nguyễn - -- escape: avoid using curl_easy_unescape() internally + Since 'conn' won't be NULL in there and we also access the pointer in + there without the check. - Since the internal Curl_urldecode() function has a better API. + Coverity CID 1420610 -- unescape: avoid integer overflow +Viktor Szakats (6 Nov 2017) +- src/Makefile.m32: fix typo in brotli lib customization - CVE-2016-8622 - - Bug: https://curl.haxx.se/docs/adv_20161102H.html - Reported-by: Cure53 + Ref cc1f4436099decb9d1a7034b2bb773a9f8379d31 -- cookies: getlist() now holds deep copies of all cookies - - Previously it only held references to them, which was reckless as the - thread lock was released so the cookies could get modified by other - handles that share the same cookie jar over the share interface. +- Makefile.m32: allow to customize brotli libs - CVE-2016-8623 + It adds the ability to link against static brotli libs. - Bug: https://curl.haxx.se/docs/adv_20161102I.html - Reported-by: Cure53 + Also fix brotli include path. -- TODO: remove IDNA2008 +Patrick Monnerat (5 Nov 2017) +- travis: add a job with brotli enabled -- idn: switch to libidn2 use and IDNA2008 support - - CVE-2016-8625 - - Bug: https://curl.haxx.se/docs/adv_20161102K.html - Reported-by: Christian Heimes +- [Viktor Szakats brought this change] -- test1246: verify URL parsing with host name ending with '#' + Makefile.m32: add brotli support -- urlparse: accept '#' as end of host name +- HTTP: implement Brotli content encoding - 'http://example.com#@127.0.0.1/x.txt' equals a request to example.com - for the '/' document with the rest of the URL being a fragment. + This uses the brotli external library (https://github.com/google/brotli). + Brotli becomes a feature: additional curl_version_info() bit and + structure fields are provided for it and CURLVERSION_NOW bumped. - CVE-2016-8624 + Tests 314 and 315 check Brotli content unencoding with correct and + erroneous data. - Bug: https://curl.haxx.se/docs/adv_20161102J.html - Reported-by: Fernando Muñoz + Some tests are updated to accomodate with the now configuration dependent + parameters of the Accept-Encoding header. -Jay Satiro (31 Oct 2016) -- INTERNALS: better markdown (follow-up) - - - Wrap more words with underscores in backticks. +- HTTP: support multiple Content-Encodings - Follow-up to 13f4913. - -Daniel Stenberg (30 Oct 2016) -- INTERNALS: better markdown + This is implemented as an output streaming stack of unencoders, the last + calling the client write procedure. - words with underscore need to be within `these` + New test 230 checks this feature. - Bug: https://github.com/curl/curl-www/issues/19 - Reported-by : Jay Satiro + Bug: https://github.com/curl/curl/pull/2002 + Reported-By: Daniel Bankhead -Jay Satiro (30 Oct 2016) -- mk-ca-bundle.vbs: Fix UTF-8 output +Jay Satiro (4 Nov 2017) +- url: remove arg value check from CURLOPT_SSH_AUTH_TYPES - - Change initial message box to mention delay when downloading/parsing. + Since CURLSSH_AUTH_ANY (aka CURLSSH_AUTH_DEFAULT) is ~0 an arg value + check on this option is incorrect; we have to accept any value. - Since there is no progress meter it was somewhat unexpected that after - choosing a filename nothing appears to happen, when actually the cert - data is in the process of being downloaded and parsed. + Prior to this change since f121575 (7.56.1+) CURLOPT_SSH_AUTH_TYPES + erroneously rejected CURLSSH_AUTH_ANY with CURLE_BAD_FUNCTION_ARGUMENT. - - Warn if OpenSSL is not present. + Bug: https://github.com/curl/curl/commit/f121575#commitcomment-25347120 + +Daniel Stenberg (4 Nov 2017) +- ntlm: avoid malloc(0) for zero length passwords - - Use a UTF-8 stream to make the ca-bundle data. + It triggers an assert() when built with memdebug since malloc(0) may + return NULL *or* a valid pointer. - - Save the UTF-8 ca-bundle stream as binary so that no BOM is added. + Detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4054 - --- + Assisted-by: Max Dymond + Closes #2054 + +- RELEASE-NOTES: synced with ee8016b3d + +- curl: speed up handling of many URLs - This is a follow-up to d2c6d15 which switched mk-ca-bundle.vbs output to - ANSI due to corrupt UTF-8 output, now fixed. + By properly keeping track of the last entry in the list of URLs/uploads + to handle, curl now avoids many meaningless traverses of the list which + speeds up many-URL handling *MASSIVELY* (several magnitudes on 100K + URLs). - This change completes making the default certificate bundle output of - mk-ca-bundle.vbs as close as possible to that of mk-ca-bundle.pl, which - should make it easier to review any difference between their output. + Added test 1291, to verify that it doesn't take ages - but we don't have + any detection of "too slow" command in the test suite. - Ref: https://github.com/curl/curl/pull/1012 + Reported-by: arainchik on github + Fixes #1959 + Closes #2052 -Daniel Stenberg (28 Oct 2016) -- BINDINGS: converted to markdown +- curl: pass through [] in URLs instead of calling globbing error - To make it render better on the web site, at the price of it becoming - slightly less readable as text. + Assisted-by: Per Lundberg + Fixes #2044 + Closes #2046 + Closes #2048 -Jay Satiro (27 Oct 2016) -- CURLMOPT_MAX_PIPELINE_LENGTH.3: Clarify it's not for HTTP/2 +- CURLOPT_INFILESIZE: accept -1 - - Clarify that this option is only for HTTP/1.1 pipelining. - - Bug: https://github.com/curl/curl/issues/1059 - Reported-by: Jeroen Ooms + Regression since f121575 - Assisted-by: Daniel Stenberg + Reported-by: Petr Voytsik + Fixes #2047 -Daniel Stenberg (27 Oct 2016) -- KNOWN_BUGS: HTTP/2 server push enabled when no pushes can be accepted +Jay Satiro (2 Nov 2017) +- url: fix CURLOPT_DNS_CACHE_TIMEOUT arg value check to allow -1 - Closes #927 + Prior to this change since f121575 (7.56.1+) CURLOPT_DNS_CACHE_TIMEOUT + erroneously rejected -1 with CURLE_BAD_FUNCTION_ARGUMENT. -- KNOWN_BUGS: c-ares deviates from stock resolver on http://1346569778 +Dan Fandrich (1 Nov 2017) +- http2: Fixed OOM handling in upgrade request - Closes #893 + This caused the torture tests on test 1800 to fail. -Michael Osipov (27 Oct 2016) -- configure.in: Fix test syntax +- tests: Fixed torture tests on tests 556 and 650 - Some versions of test allow == for equality, but others (such as the HP-UX - version) do not. Use a single = for correctness. - - Error output: - checking for monotonic clock_gettime... ./configure[20445]: ==: A test command parameter is not valid. + Test cleanup after OOM wasn't being consistently performed. -Daniel Stenberg (27 Oct 2016) -- SECURITY: minor updates +Daniel Stenberg (1 Nov 2017) +- CURLOPT_MAXREDIRS: allow -1 as a value - - we allow the security push up to 48 hours before the release + ... which is valid according to documentation. Regression since + f121575c0b5f. - - add a mention about possible pre-notifications + Verified now in test 501. - - lower case the 'curl-security' title - -- [Andrei Sedoi brought this change] + Reported-by: cbartl on github + Fixes #2038 + Closes #2039 - docs: fix req->data in multi-uv example - - Closes #1088 +- include: remove conncache.h inclusion from where its not needed -- mbedtls: stop using deprecated include file +Jay Satiro (1 Nov 2017) +- url: fix CURLOPT_POSTFIELDSIZE arg value check to allow -1 - Reported-by: wyattoday - Fixes #1087 - -Kamil Dudka (25 Oct 2016) -- [Martin Frodl brought this change] - - nss: fix tight loop in non-blocking TLS handhsake over proxy + .. also add same arg value check to CURLOPT_POSTFIELDSIZE_LARGE. - ... in case the handshake completes before entering - CURLM_STATE_PROTOCONNECT + Prior to this change since f121575 (7.56.1+) CURLOPT_POSTFIELDSIZE + erroneously rejected -1 value with CURLE_BAD_FUNCTION_ARGUMENT. - Bug: https://bugzilla.redhat.com/1388162 + Bug: https://curl.haxx.se/mail/lib-2017-11/0000.html + Reported-by: Andrew Lambert -Jay Satiro (25 Oct 2016) -- mk-ca-bundle: Update the vbscript version +Daniel Stenberg (31 Oct 2017) +- cookie: avoid NULL dereference - Bring the VBScript version more in line with the perl version: + ... when expiring old cookies. - - Change timestamp to UTC. + Reported-by: Pavel Gushchin + Fixes #2032 + Closes #2035 + +Marcel Raad (30 Oct 2017) +- memdebug: use send/recv signature for curl_dosend/curl_dorecv - - Change URL retrieval to HTTPS-only by default. + This avoids build errors and warnings caused by implicit casts. - - Comment out the options that disabled SSL cert checking by default. + Closes https://github.com/curl/curl/pull/2031 + +Daniel Stenberg (30 Oct 2017) +- [Juro Bystricky brought this change] + + mkhelp.pl: support reproducible build - - Assume OpenSSL is present, get SHA256. And add a flag to toggle it. + Do not generate line with the current date, such as: - - Fix cert issuer name output. + * Generation time: Tue Oct-24 18:01:41 2017 - The cert issuer output is now ansi, converted from UTF-8. Prior to this - it was corrupt UTF-8. It turns out though we can work with UTF-8 the - FSO object that writes ca-bundle can't write UTF-8, so there will have - to be some alternative if UTF-8 is needed (like an ADODB.Stream). + This will improve reproducibility. The generated string is only + part of a comment, so there should be no adverse consequences. - - Disable the certificate text info feature. + Signed-off-by: Juro Bystricky - The certificate text info doesn't work properly with any recent OpenSSL. + closes #2026 -Daniel Stenberg (24 Oct 2016) -- TODO: indent code to make it render properly +Dan Fandrich (30 Oct 2017) +- runtests.pl: Fixed typo in message -- TODO: Remove the generated include file - -- TODO: add "--retry should resume" - - See #1084 - -- mk-ca-bundle.1: document -k +Daniel Stenberg (30 Oct 2017) +- curlx: the timeval functions are no longer provided as curlx_* - Brought in 1ad2bdcf110266c. Now does HTTPS by default and needs -k to - fall back to plain HTTP. - -- [Jay Satiro brought this change] + Pointed-out-by: Dmitri Tikhonov + Bug: #2034 - mk-ca-bundle: Change URL retrieval to HTTPS-only by default - - - Change all predefined Mozilla URLs to HTTPS (Gregory Szorc). - - - New option -k to allow URLs other than HTTPS and enable HTTP fallback. - - Prior to this change the default URL retrieval mode was to fall back to - HTTP if HTTPS didn't work. +- select: update comments - Reported-by: Gregory Szorc - - Closes #1012 + s/curlx_tvnow/Curl_now -- RELEASE-NOTES: synced with 50ee3aaf1a9b22d +- INTERNALS: remove curlx_tv* functions no longer provided -Dan Fandrich (23 Oct 2016) -- INSTALL.md: Updated minimum file sizes for 7.50.3 +- [Dmitri Tikhonov brought this change] -Daniel Stenberg (22 Oct 2016) -- multi: force connections to get closed in close_all_connections - - Several independent reports on infinite loops hanging in the - close_all_connections() function when closing a multi handle, can be - fixed by first marking the connection to get closed before calling - Curl_disconnect. + timeval: use mach time on MacOS - This is more fixing-the-symptom rather than the underlying problem - though. + If clock_gettime() is not supported, use mach_absolute_time() on MacOS. - Bug: https://curl.haxx.se/mail/lib-2016-10/0011.html - Bug: https://curl.haxx.se/mail/lib-2016-10/0059.html - - Reported-by: Dan Fandrich, Valentin David, MiloÅ¡ Ljumović - -- [Anders Bakken brought this change] + closes #2033 - curl_multi_remove_handle: fix a double-free - - In short the easy handle needs to be disconnected from its connection at - this point since the connection still is serving other easy handles. - - In our app we can reliably reproduce a crash in our http2 stress test - that is fixed by this change. I can't easily reproduce the same test in - a small example. - - This is the gdb/asan output: - - ==11785==ERROR: AddressSanitizer: heap-use-after-free on address 0xe9f4fb80 at pc 0x09f41f19 bp 0xf27be688 sp 0xf27be67c - READ of size 4 at 0xe9f4fb80 thread T13 (RESOURCE_HTTP) - #0 0x9f41f18 in curl_multi_remove_handle /path/to/source/3rdparty/curl/lib/multi.c:666 - - 0xe9f4fb80 is located 0 bytes inside of 1128-byte region [0xe9f4fb80,0xe9f4ffe8) - freed by thread T13 (RESOURCE_HTTP) here: - #0 0xf7b1b5c2 in __interceptor_free /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_malloc_linux.cc:45 - #1 0x9f7862d in conn_free /path/to/source/3rdparty/curl/lib/url.c:2808 - #2 0x9f78c6a in Curl_disconnect /path/to/source/3rdparty/curl/lib/url.c:2876 - #3 0x9f41b09 in multi_done /path/to/source/3rdparty/curl/lib/multi.c:615 - #4 0x9f48017 in multi_runsingle /path/to/source/3rdparty/curl/lib/multi.c:1896 - #5 0x9f490f1 in curl_multi_perform /path/to/source/3rdparty/curl/lib/multi.c:2123 - #6 0x9c4443c in perform /path/to/source/src/net/resourcemanager/ResourceManagerCurlThread.cpp:854 - #7 0x9c445e0 in ... - #8 0x9c4cf1d in ... - #9 0xa2be6b5 in ... - #10 0xf7aa5780 in asan_thread_start /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_interceptors.cc:226 - #11 0xf4d3a16d in __clone (/lib/i386-linux-gnu/libc.so.6+0xe716d) - - previously allocated by thread T13 (RESOURCE_HTTP) here: - #0 0xf7b1ba27 in __interceptor_calloc /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_malloc_linux.cc:70 - #1 0x9f7dfa6 in allocate_conn /path/to/source/3rdparty/curl/lib/url.c:3904 - #2 0x9f88ca0 in create_conn /path/to/source/3rdparty/curl/lib/url.c:5797 - #3 0x9f8c928 in Curl_connect /path/to/source/3rdparty/curl/lib/url.c:6438 - #4 0x9f45a8c in multi_runsingle /path/to/source/3rdparty/curl/lib/multi.c:1411 - #5 0x9f490f1 in curl_multi_perform /path/to/source/3rdparty/curl/lib/multi.c:2123 - #6 0x9c4443c in perform /path/to/source/src/net/resourcemanager/ResourceManagerCurlThread.cpp:854 - #7 0x9c445e0 in ... - #8 0x9c4cf1d in ... - #9 0xa2be6b5 in ... - #10 0xf7aa5780 in asan_thread_start /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_interceptors.cc:226 - #11 0xf4d3a16d in __clone (/lib/i386-linux-gnu/libc.so.6+0xe716d) - - SUMMARY: AddressSanitizer: heap-use-after-free /path/to/source/3rdparty/curl/lib/multi.c:666 in curl_multi_remove_handle - Shadow bytes around the buggy address: - 0x3d3e9f20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9f30: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9f40: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9f50: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa - 0x3d3e9f60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa - =>0x3d3e9f70:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9f80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9f90: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9fa0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9fb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - 0x3d3e9fc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd - Shadow byte legend (one shadow byte represents 8 application bytes): - Addressable: 00 - Partially addressable: 01 02 03 04 05 06 07 - Heap left redzone: fa - Heap right redzone: fb - Freed heap region: fd - Stack left redzone: f1 - Stack mid redzone: f2 - Stack right redzone: f3 - Stack partial redzone: f4 - Stack after return: f5 - Stack use after scope: f8 - Global redzone: f9 - Global init order: f6 - Poisoned by user: f7 - Container overflow: fc - Array cookie: ac - Intra object redzone: bb - ASan internal: fe - Left alloca redzone: ca - Right alloca redzone: cb - ==11785==ABORTING - - Thread 14 "RESOURCE_HTTP" received signal SIGABRT, Aborted. - [Switching to Thread 0xf27bfb40 (LWP 12324)] - 0xf7fd8be9 in __kernel_vsyscall () - (gdb) bt - #0 0xf7fd8be9 in __kernel_vsyscall () - #1 0xf4c7ee89 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54 - #2 0xf4c803e7 in __GI_abort () at abort.c:89 - #3 0xf7b2ef2e in __sanitizer::Abort () at /opt/toolchain/src/gcc-6.2.0/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:122 - #4 0xf7b262fa in __sanitizer::Die () at /opt/toolchain/src/gcc-6.2.0/libsanitizer/sanitizer_common/sanitizer_common.cc:145 - #5 0xf7b21ab3 in __asan::ScopedInErrorReport::~ScopedInErrorReport (this=0xf27be171, __in_chrg=) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_report.cc:689 - #6 0xf7b214a5 in __asan::ReportGenericError (pc=166993689, bp=4068206216, sp=4068206204, addr=3925146496, is_write=false, access_size=4, exp=0, fatal=true) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_report.cc:1074 - #7 0xf7b21fce in __asan::__asan_report_load4 (addr=3925146496) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_rtl.cc:129 - #8 0x09f41f19 in curl_multi_remove_handle (multi=0xf3406080, data=0xde582400) at /path/to/source3rdparty/curl/lib/multi.c:666 - #9 0x09f6b277 in Curl_close (data=0xde582400) at /path/to/source3rdparty/curl/lib/url.c:415 - #10 0x09f3354e in curl_easy_cleanup (data=0xde582400) at /path/to/source3rdparty/curl/lib/easy.c:860 - #11 0x09c6de3f in ... - #12 0x09c378c5 in ... - #13 0x09c48133 in ... - #14 0x09c4d092 in ... - #15 0x0a2be6b6 in ... - #16 0xf7aa5781 in asan_thread_start (arg=0xf2d22938) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_interceptors.cc:226 - #17 0xf5de52b5 in start_thread (arg=0xf27bfb40) at pthread_create.c:333 - #18 0xf4d3a16e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114 - - Fixes #1083 - -- testcurl.1: fix the URL to the autobuild summary - -- testcurl.1: update URLs - -- INSTALL: converted to markdown => INSTALL.md - - Also heavily edited for content. Removed lots of old cruft that we added - like 10+ years ago that is likely incorrect by now. - - Also removed INSTALL.devcpp for same reason. +monnerat (29 Oct 2017) +- [Patrick Monnerat brought this change] -- [Martin Storsjo brought this change] + cli tool: improve ";type=" handling in -F option arguments - configure: Check for other variants of the -m*os*-version-min flags - - In addition to -miphoneos-version-min, the same version can be set - using -mios-version-min. And for WatchOS and TvOS, there's - -mwatchos-version-min and -mtvos-version-min. +- [Patrick Monnerat brought this change] -- configure: set min version flags for builds on mac - - This helps building binaries that can work on multiple macOS versions. + cli tool: in -F option arg, comma is a delimiter for files only - Help-by: Martin Storsjö + Also upgrade test 1133 to cover this case and clarify man page about + form data quoting. - Fixes #1069 + Bug: https://github.com/curl/curl/issues/2022 + Reported-By: omau on github -- curl_multi_add_handle: set timeouts in closure handles - - The closure handle only ever has default timeouts set. To improve the - state somewhat we clone the timeouts from each added handle so that the - closure handle always has the same timeouts as the most recently added - easy handle. - - Fixes #739 +Daniel Stenberg (29 Oct 2017) +- timeleft: made two more users of Curl_timeleft use timediff_t -- configure/CURL_CHECK_FUNC_POLL: disable poll completely on mac +Jakub Zakrzewski (28 Oct 2017) +- cmake: Export libcurl and curl targets to use by other cmake projects - ... so that the same libcurl build easier can run on any version. + The config files define curl and libcurl targets as imported targets + CURL::curl and CURL::libcurl. For backward compatibility with CMake- + provided find-module the CURL_INCLUDE_DIRS and CURL_LIBRARIES are + also set. - Follow-up to issue #1057 + Closes #1879 -- RELEASE-NOTES: synced with f36f8c14551efc6772 +Daniel Stenberg (28 Oct 2017) +- RELEASE-NOTES: synced with f20cbac97 -- test14xx: fixed --libcurl output tests again after 8e8afa82cbb +- [Florin Petriuc brought this change] -- s/cURL/curl + auth: Added test cases for RFC7616 + + Updated docs to include support for RFC7616 + + Signed-off-by: Florin - The tool was never called cURL, only the project. But even so, we have - more and more over time switched to just use lower case. + Closes #1934 -- polarssl: indented code, removed unused variables +- [Florin Petriuc brought this change] -- polarssl: reduce #ifdef madness with a macro + auth: add support for RFC7616 - HTTP Digest access authentication + + Signed-off-by: Florin -- polarssl: fix unaligned SSL session-id lock +- [Daniel Bankhead brought this change] -- Curl_polarsslthreadlock_thread_setup: clear array at init + TODO: support multiple Content-Encodings - ... since if it fails to init the entire array and then tries to clean - it up, it would attempt to work on an uninitialized pointer. + Closes #2002 -- curl: set INTERLEAVEDATA too +- ROADMAP: cleanup - As otherwise the callback could be called with a NULL pointer when RTSP - data is provided. + Removed done stuff. Removed entries no longer considered for the near + term. -- gopher: properly return error for poll failures +- [Magicansk brought this change] -- select: switch to macros in uppercase - - Curl_select_ready() was the former API that was replaced with - Curl_select_check() a while back and the former arg setup was provided - with a define (in order to leave existing code unmodified). + ROADMAP.md: spelling fixes - Now we instead offer SOCKET_READABLE and SOCKET_WRITABLE for the most - common shortcuts where only one socket is checked. They're also more - visibly macros. + Closes #2028 -- select: use more proper macro-looking names +- Curl_timeleft: change return type to timediff_t - ... so that it becomes more obvious in the code what is what. Also added - a typecast for one of the calculations. + returning 'time_t' is problematic when that type is unsigned and we + return values less than zero to signal "already expired", used in + several places in the code. + + Closes #2021 -- Curl_socket_check: add extra check to avoid integer overflow +- appveyor: add a win32 build -- maketgz: make it support "only" generating version info +- setopt: fix CURLOPT_SSH_AUTH_TYPES option read + + Regression since f121575c0b5f - ... to allow you to update the local repository with the given version - number data. + Reported-by: Rob Cotrone -Jay Satiro (17 Oct 2016) -- url: skip to-be-closed connections when pipelining (follow-up) +Marcel Raad (27 Oct 2017) +- resolvers: only include anything if needed - - Change back behavior so that pipelining is considered possible for - connections that have not yet reached the protocol level. + This avoids warnings about unused stuff. - This is a follow-up to e5f0b1a which had changed the behavior of - checking if pipelining is possible to ignore connections that had - 'bits.close' set. Connections that have not yet reached the protocol - level also have that bit set, and we need to consider pipelining - possible on those connections. + Closes https://github.com/curl/curl/pull/2023 -Daniel Stenberg (17 Oct 2016) -- HTTP2: mention the tool's limited support +Daniel Stenberg (27 Oct 2017) +- HELP-US: rename the subtitle too since the label is changed + + "PR-welcome" was the former name. -- RELEASE-NOTES: synced with a1a5cd04877fd6fd +- curl_setup.h: oops, shorten the too long line -- [David Woodhouse brought this change] +- [Martin Storsjo brought this change] - curl: do not set CURLOPT_SSLENGINEDEFAULT automatically + curl_setup: Improve detection of CURL_WINDOWS_APP - There were bugs in the PKCS#11 engine, and fixing them triggers bugs in - OpenSSL. Just don't get involved; there's no need to be making the - engine methods the default anyway. + If WINAPI_FAMILY is defined, it should be safe to try to include + winapifamily.h to check what the define evaluates to. - https://github.com/OpenSC/libp11/pull/108 - https://github.com/openssl/openssl/pull/1639 + This should fix detection of CURL_WINDOWS_APP if building with + _WIN32_WINNT set to 0x0600. - Merges #1042 + Closes #2025 -- KNOWN_BUGS: two more existing problems - -Marcel Raad (16 Oct 2016) -- win: fix Universal Windows Platform build +Jay Satiro (26 Oct 2017) +- transfer: Fix chunked-encoding upload bug - This fixes a merge error in commit 7f3df80 caused by commit 332e8d6. + - When uploading via chunked-encoding don't compare file size to bytes + sent to determine whether the upload has finished. - Additionally, this changes Curl_verify_windows_version for Windows App - builds to assume to always be running on the target Windows version. - There seems to be no way to determine the Windows version from a - UWP app. Neither GetVersion(Ex), nor VerifyVersionInfo, nor the - Version Helper functions are supported. + Chunked-encoding adds its own overhead which why the bytes sent is not + equal to the file size. Prior to this change if a file was uploaded in + chunked-encoding and its size was known it was possible that the upload + could end prematurely without sending the final few chunks. That would + result in a server hang waiting for the remaining data, likely followed + by a disconnect. - Bug: https://github.com/curl/curl/pull/820#issuecomment-250889878 - Reported-by: Paul Joyce + The scope of this bug is limited to some arbitrary file sizes which have + not been determined. One size that triggers the bug is 475020. - Closes https://github.com/curl/curl/pull/1048 - -Daniel Stenberg (16 Oct 2016) -- KNOWN_BUGS: minor formatting edit - -Jay Satiro (14 Oct 2016) -- [Rider Linden brought this change] + Bug: https://github.com/curl/curl/issues/2001 + Reported-by: moohoorama@users.noreply.github.com + + Closes https://github.com/curl/curl/pull/2010 - url: skip to-be-closed connections when pipelining +Daniel Stenberg (26 Oct 2017) +- timeval: make timediff_t also work on 32bit windows - No longer attempt to use "doomed" to-be-closed connections when - pipelining. Prior to this change connections marked for deletion (e.g. - timeout) would be erroneously used, resulting in sporadic crashes. + ... by using curl_off_t for the typedef if time_t is larger than 4 + bytes. - As originally reported and fixed by Carlo Wood (origin unknown). + Reported-by: Gisle Vanem + Bug: https://github.com/curl/curl/commit/b9d25f9a6b3ca791385b80a6a3c3fa5ae113e1e0#co + mmitcomment-25205058 + Closes #2019 + +- curl_fnmatch: return error on illegal wildcard pattern - Bug: https://github.com/curl/curl/issues/627 - Reported-by: Rider Linden + ... instead of doing an infinite loop! - Closes https://github.com/curl/curl/pull/1075 - Participation-by: nopjmp@users.noreply.github.com - -Daniel Stenberg (13 Oct 2016) -- vtls: only re-use session-ids using the same scheme + Added test 1162 to verify. - To make it harder to do cross-protocol mistakes + Reported-by: Max Dymond + Fixes #2015 + Closes #2017 -Jay Satiro (11 Oct 2016) -- [Torben Dannhauer brought this change] +- [Max Dymond brought this change] - dist: add missing cmake modules to the tarball + wildcards: don't use with non-supported protocols - Closes https://github.com/curl/curl/pull/1070 - -Daniel Stenberg (11 Oct 2016) -- configure: detect the broken poll() in macOS 10.12 + Fixes timeouts in the fuzzing tests for non-FTP protocols. - Fixes #1057 + Closes #2016 -- dist: remove PDF and HTML converted docs from the releases +- [Max Dymond brought this change] -- [Remo E brought this change] - - cmake: add nghttp2 support + multi: allow table handle sizes to be overridden - Closes #922 - -- [Andreas Streichardt brought this change] - - resolve: add error message when resolving using SIGALRM + Allow users to specify their own hash define for + CURL_CONNECTION_HASH_SIZE so that both values can be overridden. - Closes #1066 + Closes #1982 -- GIT-INFO: remove the Mac 10.1-specific details +- time: rename Curl_tvnow to Curl_now - There shouldn't be many devs out there anymore using such outdated macOS - versions. And it removes the dead link. + ... since the 'tv' stood for timeval and this function does not return a + timeval struct anymore. - Closes #1049 - -- RELEASE-NOTES: spellfix - -- RELEASE-NOTES: synced with 82720490628cb53a + Also, cleaned up the Curl_timediff*() functions to avoid typecasts and + clean up the descriptive comments. - 5 more fixes, 2 more contributors - -- [Tobias Stoeckmann brought this change] + Closes #2011 - smb: properly check incoming packet boundaries - - Not all reply messages were properly checked for their lengths, which - made it possible to access uninitialized memory (but this does not lead - to out of boundary accesses). - - Closes #1052 +- ftplistparser: follow-up cleanup to remove PL_ERROR() -- test557: verify printf() with 128 and 129 arguments +- [Max Dymond brought this change] -- mprintf: return error on too many arguments + ftplistparser: free off temporary memory always - 128 arguments should be enough for everyone + When using the FTP list parser, ensure that the memory that's + allocated is always freed. + + Detected by OSS-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3682 + Closes #2013 -- ftp: fix Curl_ftpsendf() +- timediff: return timediff_t from the time diff functions - ... it no longer takes printf() arguments since it was only really taken - advantage by one user and it was not written and used in a safe - way. Thus the 'f' is removed from the function name and the proto is - changed. + ... to cater for systems with unsigned time_t variables. - Although the current code wouldn't end up in badness, it was a risk that - future changes could end up springf()ing too large data or passing in a - format string inadvertently. - -- formpost: avoid silent snprintf() truncation + - Renamed the functions to curlx_timediff and Curl_timediff_us. - The previous use of snprintf() could make libcurl silently truncate some - input data and not report that back on overly large input, which could - make data get sent over the network in a bad format. + - Added overflow protection for both of them in either direction for + both 32 bit and 64 bit time_ts - Example: + - Reprefixed the curlx_time functions to use Curl_* - $ curl --form 'a=b' -H "Content-Type: $(perl -e 'print "A"x4100')" + Reported-by: Peter Piekarski + Fixes #2004 + Closes #2005 -- TODO: build: Enable PIE and RELRO by default +- [Paul Howarth brought this change] -- TODO: Support better than MD5 hostkey hash (for ssh) + libtest: Add required test libraries for lib1552 and lib1553 + + They use $(TESTUTIL) and thus should use $(TESTUTIL_LIBS) too. + + This fixes build failures on Fedora 13. + + Closes #2006 -- [Daniel Gustafsson brought this change] +- [Alessandro Ghedini brought this change] - tests: Fix a small typo in the tests README (#1060) + libcurl-tutorial.3: fix typo - The subdirectory for logs in tests/ is named log/ without an 's' - at the end. + closes #2008 -- TODO: Introduce --fail-fast to exit on first transfer fail - - See #1054 +Alessandro Ghedini (23 Oct 2017) +- curl_mime_filedata.3: fix typos -- TODO: Leave secure cookies alone +Daniel Stenberg (23 Oct 2017) +- RELEASE-NOTES: clean slate towards 7.57.0 -- [Rainer Müller brought this change] +- [Max Dymond brought this change] - CURLOPT_DEBUGFUNCTION.3: unused argument warning (#1056) + travis: exit if any steps fail - The 'userp' argument is unused in this example code. - -- TODO: TCP Fast Open for windows + We don't expect any steps to fail in travis. Exit the script if they do. + + Closes #1966 -- RELEASE-NOTES: synced with 8fd2a754f0de +Version 7.56.1 (23 Oct 2017) -- CURLOPT_KEEP_SENDING_ON_ERROR.3: mention when it is added +Daniel Stenberg (23 Oct 2017) +- RELEASE-NOTES: 7.56.1 -- memdup: use 'void *' as return and source type +- THANKS: update at 7.56.1 release time -- TODO: Add easy argument to formpost functions +- [Jon DeVree brought this change] -- formpost: trying to attach a directory no longer crashes + mk-ca-bundle: Remove URL for aurora - The error path would previously add a freed entry to the linked list. + Aurora is no longer used by Mozilla + https://hacks.mozilla.org/2017/04/simplifying-firefox-release-channels/ + +- [Jon DeVree brought this change] + + mk-ca-bundle: Fix URL for NSS - Reported-by: Toby Peterson + The 'tip' is the most recent branch committed to, this should be + 'default' like the URLs for the browser are. - Fixes #1053 + Closes #1998 -- [Sergei Kuzmin brought this change] +- imap: if a FETCH response has no size, don't call write callback + + CVE-2017-1000257 + + Reported-by: Brian Carpenter and 0xd34db347 + Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586 - cookies: same domain handling changed to match browser behavior +- ftp: reject illegal IP/port in PASV 227 response - Cokie with the same domain but different tailmatching property are now - considered different and do not replace each other. If header contains - following lines then two cookies will be set: Set-Cookie: foo=bar; - domain=.foo.com; expires=Thu Mar 3 GMT 8:56:27 2033 Set-Cookie: foo=baz; - domain=foo.com; expires=Thu Mar 3 GMT 8:56:27 2033 + ... by using range checks. Among other things, this avoids an undefined + behavior for a left shift that could happen on negative or very large + values. - This matches Chrome, Opera, Safari, and Firefox behavior. When sending - stored tokens to foo.com Chrome, Opera, Firefox store send them in the - stored order, while Safari pre-sort the cookies. + Closes #1997 - Closes #1050 - -- [Stephen Brokenshire brought this change] + Detected by OSS-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3694 - FAQ: Fix typos in section 5.14 (#1047) +Patrick Monnerat (20 Oct 2017) +- test653: check reuse of easy handle after mime data change - Type required for YourClass::func C++ function (using size_t in line - with the documentation for CURLOPT_WRITEFUNCTION) and missing second - colon when specifying the static function for CURLOPT_WRITEFUNCTION. + See issue #1999 -- [Sebastian Mundry brought this change] +- mime: do not reuse previously computed multipart size + + The contents might have changed: size must be recomputed. + + Reported-by: moteus on github + Fixes #1999 - KNOWN_BUGS: Fix typos in section 5.8. +- test308: disable if MultiSSL feature enabled - Closes #1046 + Even if OpenSSL is enabled, it might not be the default backend when + multi-ssl is enabled, causing the test to fail. -- [mundry brought this change] +- runtests: support MultiSSL client feature - CONTRIBUTE.md: Fix typo in 'About pull requests' section. (#1045) +- vtls: change struct Curl_ssl `close' field name to `close_one'. + + On OS/400, `close' is an ASCII system macro that corrupts the code if + not used in a context not targetting the close() system API. -- curl.1: --trace supports % for sending to stderr! +- os400: add missing symbols in config file. + + Also adjust makefile to renamed files and warn about installation dirs mix-up. -- KNOWN_BUGS: 5.8 configure finding libs in wrong directory +- test652: curl_mime_data + base64 encoder with large contents -Dan Fandrich (24 Sep 2016) -- configure: Fixed builds with libssh2 in a custom location - - A libssh2 library in the standard system location was being used in - preference to the desired one while linking. +- mime: limit bas64-encoded lines length to 76 characters -Daniel Stenberg (23 Sep 2016) -- SECURITY: remove the top ascii logo +Daniel Stenberg (16 Oct 2017) +- RELEASE-NOTES: synced with f121575c0 -Michael Kaufmann (22 Sep 2016) -- New libcurl option to keep sending on error +- setopt: range check most long options - Add the new option CURLOPT_KEEP_SENDING_ON_ERROR to control whether - sending the request body shall be completed when the server responds - early with an error status code. + ... filter early instead of risking "funny values" having to be dealt + with elsewhere. + +- setopt: avoid integer overflows when setting millsecond values - This is suitable for manual NTLM authentication. + ... that are multiplied by 1000 when stored. - Reviewed-by: Jay Satiro + For 32 bit long systems, the max value accepted (2147483 seconds) is > + 596 hours which is unlikely to ever be set by a legitimate application - + and previously it didn't work either, it just caused undefined behavior. - Closes https://github.com/curl/curl/pull/904 - -Kamil Dudka (22 Sep 2016) -- nss: add chacha20-poly1305 cipher suites if supported by NSS - -- nss: add cipher suites using SHA384 if supported by NSS - -- nss: fix typo in ecdhe_rsa_null cipher suite string + Also updated the man pages for these timeout options to mention the + return code. - As it seems to be a rarely used cipher suite (for securely established - but _unencrypted_ connections), I believe it is fine not to provide an - alias for the misspelled variant. + Closes #1938 -Jay Satiro (21 Sep 2016) -- docs: Remove that --proto is just used for initial retrieval +Viktor Szakats (15 Oct 2017) +- makefile.m32: allow to override gcc, ar and ranlib - .. and add that --proto-redir and CURLOPT_REDIR_PROTOCOLS do not - override protocols denied by --proto and CURLOPT_PROTOCOLS. + Allow to ovverride certain build tools, making it possible to + use LLVM/Clang to build curl. The default behavior is unchanged. + To build with clang (as offered by MSYS2), these settings can + be used: - - Add a test to enforce: --proto deny must override --proto-redir allow + CURL_CC=clang + CURL_AR=llvm-ar + CURL_RANLIB=llvm-ranlib - Closes https://github.com/curl/curl/pull/1031 + Closes https://github.com/curl/curl/pull/1993 -Daniel Stenberg (21 Sep 2016) -- dist: add CurlSymbolHiding.cmake to the tarball +- ldap: silence clang warning - Follow-up to 6140dfcf3e784 + Use memset() to initialize a structure to avoid LLVM/Clang warning: + ldap.c:193:39: warning: missing field 'UserLength' initializer [-Wmissing-field-initializers] - Reported-by: Alexander Sinditskiy + Closes https://github.com/curl/curl/pull/1992 -- curl_global_cleanup.3: don't unload the lib with sub threads running - - Discussed in #997 +Daniel Stenberg (14 Oct 2017) +- runtests: use valgrind for torture as well - Assisted-by: Jay Satiro + NOTE: it makes them terribly slow. I recommend only using valgrind for + specific torture tests or using lots of patience. -- MAIL-ETIQUETTE: language +- memdebug: trace send, recv and socket + + ... to allow them to be included in torture tests too. + + closes #1980 -Jay Satiro (20 Sep 2016) -- easy: Reset all statistical session info in curl_easy_reset +- configure: remove the C++ compiler check - Bug: https://github.com/curl/curl/issues/1017 - Reported-by: Jeroen Ooms + ... we used it only for the fuzzer, which we now have in a separate git + repo. + + Closes #1990 -Daniel Stenberg (19 Sep 2016) -- RELEASE-NOTES: synced with 79607eec51055 +Patrick Monnerat (13 Oct 2017) +- mime: do not call failf() if easy handle is NULL. -Jay Satiro (19 Sep 2016) -- [Daniel Gustafsson brought this change] +Daniel Stenberg (13 Oct 2017) +- test651: curl_formadd with huge COPYCONTENTS - darwinssl: Fix typo in comment +- mime: fix the content reader to handle >16K data properly - Closes https://github.com/curl/curl/pull/1028 - -Daniel Stenberg (19 Sep 2016) -- [Bernard Spil brought this change] + Reported-by: Jeroen Ooms + Closes #1988 - libressl: fix version output - - LibreSSL defines `OPENSSL_VERSION_NUMBER` as `0x20000000L` for all - versions returning `LibreSSL/2.0.0` for any LibreSSL version. +Patrick Monnerat (12 Oct 2017) +- mime: keep "text/plain" content type if user-specified. - This change provides a local OpenSSL_version_num function replacement - returning LIBRESSL_VERSION_NUMBER instead. - - Closes #1029 - -- [rugk brought this change] - - TODO: Add PINNEDPUBLICKEY - HPKP compatibility, HSTS & HPKP + Include test cases in 554, 587, 650. - Closes #1025 - Closes #1026 - Closes #1027 + Fixes https://github.com/curl/curl/issues/1986 -- openssl: don't call ERR_remote_thread_state on >= 1.1.0 +- cli tool: use file2memory() to buffer stdin in -F option. - Follow-up fix to d9321562 + Closes PR https://github.com/curl/curl/pull/1985 -- openssl: don’t call CRYTPO_cleanup_all_ex_data +- cli tool: reimplement stdin buffering in -F option. - The OpenSSL function CRYTPO_cleanup_all_ex_data() cannot be called - multiple times without crashing - and other libs might call it! We - basically cannot call it without risking a crash. The function is a - no-op since OpenSSL 1.1.0. + If stdin is not a regular file, its content is memory-buffered to enable + a possible data "rewind". + In all cases, stdin data size is determined before real use to avoid + having an unknown part's size. - Not calling this function only risks a small memory leak with OpenSSL < - 1.1.0. + --libcurl generated code is left as an unbuffered stdin fread/fseek callback + part with unknown data size. - Bug: https://curl.haxx.se/mail/lib-2016-09/0045.html - Reported-by: Todd Short - -- TODO: Support SSLKEYLOGFILE + Buffering is not supported in deprecated curl_formadd() API. -Jay Satiro (18 Sep 2016) -- CURLOPT_PINNEDPUBLICKEY.3: fix the AVAILABILITY formatting +Daniel Stenberg (12 Oct 2017) +- winbuild/BUILD.WINDOWS.txt: mention WITH_NGHTTP2 -Nick Zitzmann (18 Sep 2016) -- darwinssl: disable RC4 cipher-suite support +- HELP-US: the label "PR-welcome" is now renamed to "help wanted" - RC4 was a nice alternative to CBC back in the days of BEAST, but it's insecure and obsolete now. + following the new github "standard" -- configure: change "iOS/Mac OS X native" to "Apple OS native" - - Since I first wrote that text, Apple introduced tvOS and watchOS, and renamed "Mac OS X" to "macOS." Let's make the text a little more inclusive, since curl can be built for all four operating systems. +- RELEASE-NOTES: synced with 5505df7d2 -Jay Satiro (18 Sep 2016) -- test2048: fix url +Jay Satiro (11 Oct 2017) +- [Artak Galoyan brought this change] -- examples/imap-append: Set size of data to be uploaded + url: Update current connection SSL verify params in setopt + + Now VERIFYHOST, VERIFYPEER and VERIFYSTATUS options change during active + connection updates the current connection's (i.e.'connectdata' + structure) appropriate ssl_config (and ssl_proxy_config) structures + variables, making these options effective for ongoing connection. - Prior to this commit this example failed with error - 'Cannot APPEND with unknown input file size'. + This functionality was available before and was broken by the + following change: + "proxy: Support HTTPS proxy and SOCKS+HTTP(s)" + CommitId: cb4e2be7c6d42ca0780f8e0a747cecf9ba45f151. - Bug: https://github.com/curl/curl/issues/1008 - Reported-by: lukaszgn@users.noreply.github.com + Bug: https://github.com/curl/curl/issues/1941 - Closes https://github.com/curl/curl/pull/1011 + Closes https://github.com/curl/curl/pull/1951 -Daniel Stenberg (16 Sep 2016) -- [Tony Kelman brought this change] +Daniel Stenberg (11 Oct 2017) +- [David Benjamin brought this change] - LICENSE-MIXING.md: update with mbedTLS dual licensing + openssl: don't use old BORINGSSL_YYYYMM macros - Recent versions of mbedTLS are available under either Apache 2.0 or GPL - 2.0, see https://tls.mbed.org/how-to-get + Those were temporary things we'd add and remove for our own convenience + long ago. The last few stayed around for too long as an oversight but + have since been removed. These days we have a running + BORINGSSL_API_VERSION counter which is bumped when we find it + convenient, but 2015-11-19 was quite some time ago, so just check + OPENSSL_IS_BORINGSSL. - Closes #1019 + Closes #1979 -- KNOWN_BUGS: chunked-encoded requests with HTTP/2 is fixed +- test950; verify SMTP with custom request -- http2: debug ouput sent HTTP/2 request headers +- ftpserver: support case insensitive commands -- http: accept "Transfer-Encoding: chunked" for HTTP/2 as well +- smtp_done: free data before returning (on send failure) - ... but don't send the actual header over the wire as it isn't accepted. - Chunked uploading is still triggered using this method. + ... as otherwise it could leak that memory. - Fixes #1013 - Fixes #662 + Detected by OSS-fuzz: + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3600 + + Assisted-by: Max Dymond + Closes #1977 -- openssl: fix per-thread memory leak usiong 1.0.1 or 1.0.2 +- FTP: URL decode path for dir listing in nocwd mode + + Reported-by: Zenju on github - OpenSSL 1.0.1 and 1.0.2 build an error queue that is stored per-thread - so we need to clean it when easy handles are freed, in case the thread - will be killed in which the easy handle was used. All OpenSSL code in - libcurl should extract the error in association with the error already - so clearing this queue here should be harmless at worst. + Test 244 added to verify + Fixes #1974 + Closes #1976 + +- test298: verify --ftp-method nowcwd with URL encoded path - Fixes #964 + Ref: #1974 -- RELEASE-NOTES: reset and go toward 7.51.0 (again) +- CURLOPT_XFERINFODATA.3: fix duplicate see also -Version 7.50.3 (14 Sep 2016) +- CURLOPT_NOPROGRESS.3: also refer to xferinfofunction -Daniel Stenberg (14 Sep 2016) -- THANKS: updated with curl 7.50.3 contributors +- FAQ: s/CURLOPT_PROGRESSFUNCTION/CURLOPT_XFERINFOFUNCTION -- RELEASE-NOTES: curl 7.50.3 +- openssl: enable PKCS12 support for !BoringSSL + + Enable PKCS12 for all non-boringssl builds without relying on configure + or cmake checks. + + Bug: https://curl.haxx.se/mail/lib-2017-10/0007.html + Reported-by: Christian Schmitz + Closes #1948 -- test1605: verify negative input lengths to (un)escape functions +- [Kristiyan Tsaklev brought this change] -- curl_easy_unescape: deny negative string lengths as input + curl: don't pass semicolons when parsing Content-Disposition - CVE-2016-7167 + Test 1422 updated to verify. - Bug: https://curl.haxx.se/docs/adv_20160914.html + Closes #1964 -- curl_easy_escape: deny negative string lengths as input +Patrick Monnerat (9 Oct 2017) +- mime: properly unbind mime structure in curl_mime_free(). - CVE-2016-7167 + This allows freeing a mime structure bound to the easy handle before + curl_easy_cleanup(). - Bug: https://curl.haxx.se/docs/adv_20160914.html + Fixes #1970. -- curl: make --create-dirs on windows grok both forward and backward slashes +Daniel Stenberg (9 Oct 2017) +- RTSP: avoid integer overflow on funny RTSP response + + ... like a very large non-existing RTSP version number. - Reported-by: Ryan Scott + Added test 577 to verify. - Fixes #1007 + Detected by OSS-fuzz. + Closes #1969 -- RELEASE-NOTES: synced with 665694979b6 +Patrick Monnerat (8 Oct 2017) +- ftpserver: properly reset $ftptargetdir. -- [Tony Kelman brought this change] +- test643: verify curl_mime_subparts() rejects cyclic additions. - mbedtls: switch off NTLM in build if md4 isn't available +- mime: refuse to add subparts to one of their own descendants. - NTLM support with mbedTLS was added in 497e7c9 but requires that mbedTLS - is built with the MD4 functions available, which it isn't in default - builds. This now adapts if the funtion isn't there and builds libcurl - without NTLM support if so. - - Fixes #1004 + Reported-by: Alexey Melnichuk + Fixes #1962 -Jay Satiro (12 Sep 2016) -- CODE_STYLE: fix long-line guideline - - - Change maximum allowed line length from 80 to 79. +- mime: avoid resetting a part's encoder when part's contents change. -- CODE_STYLE: add column alignment section +- mime: improve unbinding top multipart from easy handle. - Note that since the added examples are for column alignment I had to - encapsulate with ~~~c markdown to preserve their alignment. + Also avoid dangling pointers in referencing parts. -Peter Wu (11 Sep 2016) -- cmake: fix curl-config --static-libs - - The `curl-config --static-libs` command should not output paths like - -l/usr/lib/libssl.so, instead print the absolute path without `-l`. - - This also removes the confusing message "Static linking is broken" which - was printed because curl-config --static-libs was disfunctional even - though the static libcurl.a library works properly. - - Fixes https://github.com/curl/curl/issues/841 +Daniel Stenberg (8 Oct 2017) +- RELEASE-NOTES: synced with a4c1c75da30af1 + +- curlver.h: next expected release is 7.57.0 -Daniel Stenberg (11 Sep 2016) -- http: refuse to pass on response body with NO_NODY was set +Patrick Monnerat (8 Oct 2017) +- mime: be tolerant about setting twice the same header list in a part. + +- docs: clarify form/mime usage of non-regular data files. + +Daniel Stenberg (8 Oct 2017) +- Revert "multi_done: wait for name resolve to finish if still ongoing" - ... like when a HTTP/0.9 response comes back without any headers at all - and just a body this now prevents that body from being sent to the - callback etc. + This reverts commit f3e03f6c0ac52a1bf396e03f7d7e9b5b3b7165fe. - Adapted test 1144 to verify. + Caused memory leaks in the fuzzer, needs to be done differently. - Fixes #973 + Disable test 1553 for now too, as it causes memory leaks without this + commit! + +- remove_handle: call multi_done() first, then clear dns cache pointer - Assisted-by: Ray Satiro + Closes #1960 -- RELEASE-NOTES: synced with 257bf3ac67eb6 +- multi_done: wait for name resolve to finish if still ongoing + + ... as we must clean up memory. -Jakub Zakrzewski (10 Sep 2016) -- CMake: Don't build unit tests if private symbols are hidden +- pingpong: return error when trying to send without connection - This only excludes building unit tests from default build ( 'all' Make - target or "Build Solution" in VisualStudio). The projects and Make - targets will still be generated and shown in supporting IDEs. + When imap_done() got called before a connection is setup, it would try + to "finish up" and dereffed a NULL pointer. - Fixes https://github.com/curl/curl/issues/981 - Reported-by: Randy Armstrong + Test case 1553 managed to reproduce. I had to actually use a host name + to try to resolve to slow it down, as using the normal local server IP + will make libcurl get a connection in the first curl_multi_perform() + loop and then the bug doesn't trigger. - Closes https://github.com/curl/curl/pull/990 + Fixes #1953 + Assisted-by: Max Dymond -- CMake: Try to (un-)hide private library symbols - - Detect support for compiler symbol visibility flags and apply those - according to CURL_HIDDEN_SYMBOLS option. - It should work true to the autotools build except it tries to unhide - symbols on Windows when requested and prints warning if it fails. +Dan Fandrich (6 Oct 2017) +- tests: added flaky keyword to tests 587 and 644 - Ref: https://github.com/curl/curl/issues/981#issuecomment-242665951 - Reported-by: Daniel Stenberg + These are around 5% flaky in my Linux x86 autobuilds. -Daniel Stenberg (9 Sep 2016) -- openssl: fix bad memory free (regression) - - ... by partially reverting f975f06033b1. The allocation could be made by - OpenSSL so the free must be made with OPENSSL_free() to avoid problems. +Marcel Raad (6 Oct 2017) +- vtls: fix warnings with --disable-crypto-auth - Reported-by: Harold Stuart - Fixes #1005 + When CURL_DISABLE_CRYPTO_AUTH is defined, Curl_none_md5sum's parameters + are not used. -- http2: support > 64bit sized uploads +Daniel Stenberg (6 Oct 2017) +- multi_cleanup: call DONE on handles that never got that - ... by making sure we don't count down the "upload left" counter when the - uploaded size is unknown and then it can be allowed to continue forever. + ... fixes a memory leak with at least IMAP when remove_handle is never + called and the transfer is abruptly just abandoned early. - Fixes #996 + Test 1552 added to verify + + Detected by OSS-fuzz + Assisted-by: Max Dymond + Closes #1954 + +- [Benbuck Nason brought this change] -Jay Satiro (7 Sep 2016) -- errors: new alias CURLE_WEIRD_SERVER_REPLY (8) + strtoofft: Remove extraneous null check - Since we're using CURLE_FTP_WEIRD_SERVER_REPLY in imap, pop3 and smtp as - more of a generic "failed to parse" introduce an alias without FTP in - the name. + Fixes #1950: curlx_strtoofft() doesn't fully protect against null 'str' + argument. - Closes https://github.com/curl/curl/pull/975 - -Daniel Stenberg (7 Sep 2016) -- bump: toward 7.51.0 + Closes #1952 -- HISTORY: remove ascii logo to render nicer on web +- openssl: fix build without HAVE_OPAQUE_EVP_PKEY + + Reported-by: Javier Sixto + Fixes #1955 + Closes #1956 -- curl: whitelist use of strtok() in non-threaded context +Viktor Szakats (6 Oct 2017) +- lib/config-win32.h: let SMB/SMBS be enabled with OpenSSL/NSS + + The source code is now prepared to handle the case when both + Win32 Crypto and OpenSSL/NSS crypto backends are enabled + at the same time, making it now possible to enable `USE_WIN32_CRYPTO` + whenever the targeted Windows version supports it. Since this + matches the minimum Windows version supported by curl + (Windows 2000), enable it unconditionally for the Win32 platform. + + This in turn enables SMB (and SMBS) protocol support whenever + Win32 Crypto is available, regardless of what other crypto backends + are enabled. + + Ref: https://github.com/curl/curl/pull/1840#issuecomment-325682052 + + Closes https://github.com/curl/curl/pull/1943 -- checksrc: detect strtok() use +Daniel Stenberg (5 Oct 2017) +- build: fix --disable-crypto-auth - ... as that function slipped through once before. + Reported-by: Wyatt O'Day + Fixes #1945 + Closes #1947 -GitHub (7 Sep 2016) -- [Viktor Szakats brought this change] +Jay Satiro (5 Oct 2017) +- [Nick Zitzmann brought this change] - mk-ca-bundle.pl: use SHA256 instead of SHA1 + darwinssl: add support for TLSv1.3 - This hash is used to verify the original downloaded certificate bundle - and also included in the generated bundle's comment header. Also - rename related internal symbols to algorithm-agnostic names. + Closes https://github.com/curl/curl/pull/1794 -Version 7.50.2 (7 Sep 2016) +Daniel Stenberg (4 Oct 2017) +- [Felix Kaiser brought this change] -Daniel Stenberg (7 Sep 2016) -- RELEASE-NOTES: curl 7.50.2 release + docs: fix typo in curl_mime_data_cb man page + + Closes #1946 -- THANKS: updated for 7.50.2 +Viktor Szakats (4 Oct 2017) +- lib/Makefile.m32: allow customizing dll suffixes + + - New `CURL_DLL_SUFFIX` envvar will add a suffix to the generated + libcurl dll name. Useful to add `-x64` to 64-bit builds so that + it can live in the same directory as the 32-bit one. By default + this is empty. + + - New `CURL_DLL_A_SUFFIX` envvar to customize the suffix of the + generated import library (implib) for libcurl .dll. It defaults + to `dll`, and it's useful to modify that to `.dll` to have the + standard naming scheme for mingw-built .dlls, i.e. `libcurl.dll.a`. + + Closes https://github.com/curl/curl/pull/1942 -Jay Satiro (6 Sep 2016) -- [Gaurav Malhotra brought this change] +Daniel Stenberg (4 Oct 2017) +- [Max Dymond brought this change] - openssl: fix CURLINFO_SSL_VERIFYRESULT + fuzzer: move to using external curl-fuzzer - CURLINFO_SSL_VERIFYRESULT does not get the certificate verification - result when SSL_connect fails because of a certificate verification - error. + Use the external curl-fuzzer repository for fuzzing. - This fix saves the result of SSL_get_verify_result so that it is - returned by CURLINFO_SSL_VERIFYRESULT. - - Closes https://github.com/curl/curl/pull/995 + Closes #1923 -Daniel Stenberg (6 Sep 2016) -- [Daniel Gustafsson brought this change] +- failf: skip the sprintf() if there are no consumers + + Closes #1936 - darwinssl: test for errSecSuccess in PKCS12 import rather than noErr (#993) +- ftp: UBsan fixup 'pointer index expression overflowed' - While noErr and errSecSuccess are defined as the same value, the API - documentation states that SecPKCS12Import() returns errSecSuccess if - there were no errors in importing. Ensure that a future change of the - defined value doesn't break (however unlikely) and be consistent with - the API docs. + Closes #1939 -- [Daniel Gustafsson brought this change] +- RELEASE-PROCEDURE: update the release schedule - docs: Fix link to CONTRIBUTE in Github contribution guidelines (#994) +Version 7.56.0 (4 Oct 2017) -- [Marcel Raad brought this change] +Daniel Stenberg (4 Oct 2017) +- RELEASE-NOTES: curl 7.56.0 - openssl: Fix compilation with OPENSSL_API_COMPAT=0x10100000L - - With OPENSSL_API_COMPAT=0x10100000L (OpenSSL 1.1 API), the cleanup - functions are unavailable (they're no-ops anyway in OpenSSL 1.1). The - replacements for SSL_load_error_strings, SSLeay_add_ssl_algorithms, and - OpenSSL_add_all_algorithms are called automatically [1][2]. SSLeay() is - now called OpenSSL_version_num(). - - [1]: https://www.openssl.org/docs/man1.1.0/ssl/OPENSSL_init_ssl.html - [2]: https://www.openssl.org/docs/man1.1.0/crypto/OPENSSL_init_crypto.html +- THANKS: added new 7.56.0 contributors + +Jay Satiro (4 Oct 2017) +- build-openssl.bat: Warn OpenSSL 1.1.0 not yet supported - Closes #992 + Ref: https://github.com/curl/curl/issues/1002 -- RELEASE-NOTES: synced with 3d4c0c8b9bc1d +Michael Kaufmann (3 Oct 2017) +- idn: fix source code comment -- http2: return EOF when done uploading without known size +- vtls: compare and clone ssl configs properly + + Compare these settings in Curl_ssl_config_matches(): + - verifystatus (CURLOPT_SSL_VERIFYSTATUS) + - random_file (CURLOPT_RANDOM_FILE) + - egdsocket (CURLOPT_EGDSOCKET) + + Also copy the setting "verifystatus" in Curl_clone_primary_ssl_config(), + and copy the setting "sessionid" unconditionally. + + This means that reusing connections that are secured with a client + certificate is now possible, and the statement "TLS session resumption + is disabled when a client certificate is used" in the old advisory at + https://curl.haxx.se/docs/adv_20170419.html is obsolete. + + Reviewed-by: Daniel Stenberg - Fixes #982 + Closes #1917 -- http2: skip the content-length parsing, detect unknown size +- proxy: read the "no_proxy" variable only if necessary + + Reviewed-by: Daniel Stenberg + + Closes #1919 -- http2: minor white space edit +Patrick Monnerat (3 Oct 2017) +- libcurl-tutorial: add casts in example to avoid compilation warnings. -- http2: use named define instead of magic constant in read callback +Daniel Stenberg (3 Oct 2017) +- examples: bring back curl_formadd-using examples + + ... now with a -formadd suffix. While the new mime API is introduced in + 7.56.0 we must acknowledge that lots of users can't upgrade their curl + versions immediately. -- [Craig Davison brought this change] +- test1153: verify quoted double-qoutes in PWD response - configure: make the cpp -P detection not clobber CPPFLAGS +- FTP: zero terminate the entry path even on bad input - CPPPFLAGS is now CPPPFLAG. Fixes CURL_CHECK_DEF. + ... a single double quote could leave the entry path buffer without a zero + terminating byte. CVE-2017-1000254 - Fixes #958 + Test 1152 added to verify. + + Reported-by: Max Dymond + Bug: https://curl.haxx.se/docs/adv_20171004.html -- [Olivier Brunel brought this change] +Jay Satiro (2 Oct 2017) +- [Sergei Nikulov brought this change] - speed caps: not based on average speeds anymore + cmake: disable tests and man generation if perl/nroff not found - Speed limits (from CURLOPT_MAX_RECV_SPEED_LARGE & - CURLOPT_MAX_SEND_SPEED_LARGE) were applied simply by comparing limits - with the cumulative average speed of the entire transfer; While this - might work at times with good/constant connections, in other cases it - can result to the limits simply being "ignored" for more than "short - bursts" (as told in man page). + Fixes https://github.com/curl/curl/issues/1500 + Reported-by: Jay Satiro - Consider a download that goes on much slower than the limit for some - time (because bandwidth is used elsewhere, server is slow, whatever the - reason), then once things get better, curl would simply ignore the limit - up until the average speed (since the beginning of the transfer) reached - the limit. This could prove the limit useless to effectively avoid - using the entire bandwidth (at least for quite some time). + Fixes https://github.com/curl/curl/pull/1662 + Assisted-by: Tom Seddon + Assisted-by: dpull@users.noreply.github.com + Assisted-by: elelel@users.noreply.github.com - So instead, we now use a "moving starting point" as reference, and every - time at least as much as the limit as been transferred, we can reset - this starting point to the current position. This gets a good limiting - effect that applies to the "current speed" with instant reactivity (in - case of sudden speed burst). + Closes https://github.com/curl/curl/pull/1924 + +Patrick Monnerat (2 Oct 2017) +- libcurl-tutorial: fix two typos. + +- TODO: remove deprecated form API items. + +- libcurl-tutorial: describe MIME API and deprecate form API. - Closes #971 + Include a guide to form/mime API conversion. -- HISTORY.md: the multi socket was put in the wrong year! +Daniel Stenberg (30 Sep 2017) +- cookie: fix memory leak if path was set twice in header + + ... this will let the second occurance override the first. + + Added test 1161 to verify. + + Reported-by: Max Dymond + Fixes #1932 + Closes #1933 -- [Mark Hamilton brought this change] +Dan Fandrich (30 Sep 2017) +- test650: Use variable replacement to set the host address and port + + Otherwise, the test fails when the -b test option is used to set a + different test port range. - tool_helpers.c: fix comment typo (#989) +- Set and use more necessary options when some protocols are disabled + + When curl and libcurl are built with some protocols disabled, they stop + setting and receiving some options that don't make sense with those + protocols. In particular, when HTTP is disabled many options aren't set + that are used only by HTTP. However, some options that appear to be + HTTP-only are actually used by other protocols as well (some despite + having HTTP in the name) and should be set, but weren't. This change now + causes some of these options to be set and used for more (or for all) + protocols. In particular, this fixes tests 646 through 649 in an + HTTP-disabled build, which use the MIME API in the mail protocols. -- [Mark Hamilton brought this change] +Daniel Stenberg (29 Sep 2017) +- test1160: verifies cookie leak for large cookies + + The fix done in 20ea22ff735 - libtest/test.h: fix typo (#988) +- cookie: fix memory leak on oversized rejection + + Regression brought by 2bc230de63b + + Detected by OSS-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3513 + Assisted-by: Max Dymond + + Closes #1930 -- CURLMOPT_PIPELINING.3: language +- [Anders Bakken brought this change] -- CURLMOPT_PIPELINING.3: extended and clarified + connect: fix race condition with happy eyeballs timeout - Especially in regards to the multiplexing part. + The timer should be started after conn->connecttime is set. Otherwise + the timer could expire without this condition being true: + + /* should we try another protocol family? */ + if(i == 0 && conn->tempaddr[1] == NULL && + curlx_tvdiff(now, conn->connecttime) >= HAPPY_EYEBALLS_TIMEOUT) { + + Ref: #1928 -Steve Holme (31 Aug 2016) -- curl_sspi.c: Updated function description comments +Michael Kaufmann (28 Sep 2017) +- docs: link CURLOPT_CONNECTTIMEOUT and CURLOPT_CONNECTTIMEOUT_MS - * Added description to Curl_sspi_free_identity() - * Added parameter and return explanations to Curl_sspi_global_init() - * Added parameter explaination to Curl_sspi_global_cleanup() + Closes #1922 -- README: Corrected the supported Visual Studio versions +- docs: clarify the use of environment variables for proxy - Missed from commit 8356022d17. + Closes #1921 -- KNOWN_BUGS: Move the Visual Studio project shortcomings from local README +- http: add custom empty headers to repeated requests + + Closes #1920 -- KNOWN_BUGS: Expand 6.4 to include Kerberos V5 +- reuse_conn: don't copy flags that are known to be equal + + A connection can only be reused if the flags "conn_to_host" and + "conn_to_port" match. Therefore it is not necessary to copy these flags + in reuse_conn(). - ...and discuss a possible solution. + Closes #1918 -Daniel Stenberg (30 Aug 2016) -- connect: fix #ifdefs for debug versions of conn/streamclose() macros +Daniel Stenberg (27 Sep 2017) +- curl.h: include on cygwin too - CURLDEBUG is for the memory debugging + When building with -std=c++14 on cygwin, this header won't be + automatically included as it otherwise is. - DEBUGBUILD is for the extra debug stuff + The include decision should ideally be reversed and be + avoided where that header file doesn't exist. - Pointed-out-by: Steve Holme + Reported-by: Ian Fette + Fixes #1925 -- KNOWN_BUGS: mention some cmake "support gaps" +- RELEASE-NOTES: synced with d8ab5dc50 -Nick Zitzmann (28 Aug 2016) -- darwinssl: add documentation stating that the --cainfo option is intended for backward compatibility only +Michael Kaufmann (24 Sep 2017) +- tests: adjust .gitignore for new tests + +Jay Satiro (23 Sep 2017) +- ntlm: move NTLM_NEEDS_NSS_INIT define into core NTLM header + + .. and include the core NTLM header in all NTLM-related source files. - In other news, I changed one other reference to "Mac OS X" in the documentation (that I previously wrote) to say "macOS" instead. + Follow up to 6f86022. Since then http_ntlm checks NTLM_NEEDS_NSS_INIT + but did not include vtls.h where it was defined. + + Closes https://github.com/curl/curl/pull/1911 -Daniel Stenberg (28 Aug 2016) -- http2: return CURLE_HTTP2_STREAM for unexpected stream close +Daniel Stenberg (23 Sep 2017) +- file_range: avoid integer overflow when figuring out byte range - Follow-up to c3e906e9cd0f, seems like a more appropriate error code + When trying to bump the value with one and the value is already at max, + it causes an integer overflow. - Suggested-by: Jay Satiro + Closes #1908 + Detected by oss-fuzz: + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3465 + + Assisted-by: Max Dymond + +Michael Kaufmann (23 Sep 2017) +- tests: fix a compiler warning in test 643 -- [Tatsuhiro Tsujikawa brought this change] +Jay Satiro (23 Sep 2017) +- symbols-in-versions: fix CURLSSLSET_NO_BACKENDS entry + + - Use spaces instead of tabs as the delimiter. + + Follow up to 7c52b12 which added the entry. The entry had used tabs but + the symbol-scan parser doesn't recognize tabs and would fail the symbol. - http2: handle closed streams when uploading +Viktor Szakats (22 Sep 2017) +- metalink: fix NSS issue in MultiSSL builds - Fixes #986 + In MultiSSL mode (i.e. when more than one SSL backend is compiled + in), we cannot use the compile time flag `USE_NSS` as indicator that + the NSS backend is in use. As far as Metalink is concerned, the SSL + backend is only used for MD5, SHA-1 and SHA-256 calculations, + therefore one of the available SSL backends is selected at compile + time, in a strict order of preference. + + Let's introduce a new `HAVE_NSS_CONTEXT` constant that can be used + to determine whether the SSL backend used for Metalink is the NSS + backend, and use that to guard the code that wants to de-initialize + the NSS-specific data structure. + + Ref: https://github.com/curl/curl/pull/1848 -- http2: make sure stream errors don't needlessly close the connection +- ntlm: use strict order for SSL backend #if branches + + With the recently introduced MultiSSL support multiple SSL backends + can be compiled into cURL That means that now the order of the SSL + + One option would be to use the same SSL backend as was configured + via `curl_global_sslset()`, however, NTLMv2 support would appear + to be available only with some SSL backends. For example, when + eb88d778e (ntlm: Use Windows Crypt API, 2014-12-02) introduced + support for NTLMv1 using Windows' Crypt API, it specifically did + *not* introduce NTLMv2 support using Crypt API at the same time. - With HTTP/2 each transfer is made in an indivial logical stream over the - connection, making most previous errors that caused the connection to get - forced-closed now instead just kill the stream and not the connection. + So let's select one specific SSL backend for NTLM support when + compiled with multiple SSL backends, using a priority order such + that we support NTLMv2 even if only one compiled-in SSL backend can + be used for that. - Fixes #941 + Ref: https://github.com/curl/curl/pull/1848 -- Curl_verify_windows_version: minor edit to avoid compiler warnings +Daniel Stenberg (22 Sep 2017) +- symbols-in-versions: add CURLSSLSET_NO_BACKENDS - ... instead of if() before the switch(), add a default to the switch so - that the compilers don't warn on "warning: enumeration value - 'PLATFORM_DONT_CARE' not handled in switch" anymore. + ...fixup from b8e0fe19ec -Steve Holme (27 Aug 2016) -- RELEASE-NOTES: Added missing fix from commit 15592143f +- imap: quote atoms properly when escaping characters + + Updates test 800 to verify + + Fixes #1902 + Closes #1903 -Jay Satiro (26 Aug 2016) -- schannel: Disable ALPN for Wine since it is causing problems +- tests: make the imap server not verify user+password - - Disable ALPN on Wine. + ... as the test cases themselves do that and it makes it easier to add + crazy test cases. - - Don't pass input secbuffer when ALPN is disabled. + Test 800 updated to use user name + password that need quoting. - When ALPN support was added a change was made to pass an input secbuffer - to initialize the context. When ALPN is enabled the buffer contains the - ALPN information, and when it's disabled the buffer is empty. In either - case this input buffer caused problems with Wine and connections would - not complete. + Test 856 updated to trigger an auth fail differently. - Bug: https://github.com/curl/curl/issues/983 - Reported-by: Christian Fillion + Ref: #1902 -Kamil Dudka (26 Aug 2016) -- [Peter Wang brought this change] - - nss: work around race condition in PK11_FindSlotByName() +- vtls: provide curl_global_sslset() even in non-SSL builds - Serialise the call to PK11_FindSlotByName() to avoid spurious errors in - a multi-threaded environment. The underlying cause is a race condition - in nssSlot_IsTokenPresent(). + ... it just returns error: - Bug: https://bugzilla.mozilla.org/1297397 + Bug: https://github.com/curl/curl/commit/1328f69d53f2f2e937696ea954c480412b018451#commitcomment-24470367 + Reported-by: Marcel Raad - Closes #985 + Closes #1906 -- nss: refuse previously loaded certificate from file +Patrick Monnerat (22 Sep 2017) +- form/mime: field names are not allowed to contain zero-valued bytes. - ... when we are not asked to use a certificate from file + Also suppress length argument of curl_mime_name() (names are always + zero-terminated). + +Daniel Stenberg (21 Sep 2017) +- [Dirk Feytons brought this change] -Daniel Stenberg (26 Aug 2016) -- ftp_done: remove dead code + openssl: only verify RSA private key if supported + + In some cases the RSA key does not support verifying it because it's + located on a smart card, an engine wants to hide it, ... + Check the flags on the key before trying to verify it. + OpenSSL does the same thing internally; see ssl/ssl_rsa.c + + Closes #1904 -- TLS: random file/egd doesn't have to match for conn reuse +Marcel Raad (21 Sep 2017) +- examples/post-callback: use long for CURLOPT_POSTFIELDSIZE + + Otherwise, typecheck-gcc.h warns on MinGW-w64. -- test161: add comment for the exit code +Patrick Monnerat (20 Sep 2017) +- mime: rephrase the multipart output state machine (#1898) ... + + ... in hope coverity will like it much. -Dan Fandrich (26 Aug 2016) -- test219: Add http as a required feature +- mime: fix an explicit null dereference (#1899) -Daniel Stenberg (25 Aug 2016) -- [Michael Kaufmann brought this change] +Daniel Stenberg (20 Sep 2017) +- curl: check fseek() return code and bail on error + + Detected by coverity. CID 1418137. - HTTP: stop parsing headers when switching to unknown protocols +- smtp: fix memory leak in OOM - - unknown protocols probably won't send more headers (e.g. WebSocket) - - improved comments and moved them to the correct case statements + Regression since ce0881edee - Closes #899 + Coverity CID 1418139 and CID 1418136 found it, but it was also seen in + torture testing. + +- RELEASE-NOTES: synced with 5fe85587c + +- [Pavel Pavlov brought this change] -- openssl: make build with 1.1.0 again + cookies: use lock when using CURLINFO_COOKIELIST - synced with OpenSSL git master commit cc06906707 + Closes #1896 -- INTERNALS: fix title +- [Max Dymond brought this change] -- configure: detect zlib with our pkg-config macros + ossfuzz: changes before merging the generated corpora - ... instead of relying on the pkg-config autoconf macros to be present. + Before merging in the oss-fuzz corpora from Google, there are some changes + to the fuzzer. + - Add a read corpus script, to display corpus files nicely. + - Change the behaviour of the fuzzer so that TLV parse failures all now + go down the same execution paths, which should reduce the size of the + corpora. + - Make unknown TLVs a failure to parse, which should decrease the size + of the corpora as well. - Fixes #972 (again...) + Closes #1881 -Jay Satiro (25 Aug 2016) -- http2: Remove incorrect comments +- mime:escape_string minor clarification change - .. also remove same from scp + ... as it also removes a warning with old gcc versions. + + Bug: https://curl.haxx.se/mail/lib-2017-09/0049.html + Reported-by: Ben Greear -Daniel Stenberg (23 Aug 2016) -- [Ales Novak brought this change] +- [Max Dymond brought this change] - ftp: fix wrong poll on the secondary socket - - When we're uploading using FTP and the server issues a tiny pause - between opening the connection to the client's secondary socket, the - client's initial poll() times out, which leads to second poll() which - does not wait for POLLIN on the secondary socket. So that poll() also - has to time out, creating a long (200ms) pause. + ossfuzz: don't write out to stdout - This patch adds the correct flag to the secondary socket, making the - second poll() correctly wait for the connection there too. + Don't make the fuzzer write out to stdout - instead write some of the + contents to a memory block so we exercise the data output code but + quietly. - Signed-off-by: Ales Novak - - Closes #978 - -- RELEASE-NOTES: synced with 95ded2c56 + Closes #1885 -- configure: make it work without PKG_CHECK_MODULES +- cookies: reject oversized cookies - With commit c2f9b78 we added a new dependency on pkg-config for - developers which may be unwanted. This change make the configure script - still work as before if pkg-config isn't installed, it'll just use the - old zlib detection logic without pkg-config. + ... instead of truncating them. - Reported-by: Marc Hörsken + There's no fixed limit for acceptable cookie names in RFC 6265, but the + entire cookie is said to be less than 4096 bytes (section 6.1). This is + also what browsers seem to implement. - Fixes #972 - -Marc Hoersken (21 Aug 2016) -- Revert "KNOWN_BUGS: SOCKS proxy not working via IPv6" + We now allow max 5000 bytes cookie header. Max 4095 bytes length per + cookie name and value. Name + value together may not exceed 4096 bytes. - This reverts commit 9cb1059f92286a6eb5d28c477fdd3f26aed1d554. + Added test 1151 to verify - As discussed in #835 SOCKS5 supports IPv6 proxies and destinations. - -Daniel Stenberg (21 Aug 2016) -- [Marco Deckel brought this change] - - win: Basic support for Universal Windows Platform apps + Bug: https://curl.haxx.se/mail/lib-2017-09/0062.html + Reported-by: Kevin Smith - Closes #820 + Closes #1894 -Steve Holme (21 Aug 2016) -- sasl: Don't use GSSAPI authentication when domain name not specified +- travis: on mac, don't install openssl or libidn - Only choose the GSSAPI authentication mechanism when the user name - contains a Windows domain name or the user is a valid UPN. + - openssl is already installed and causes warnings when trying to + install again - Fixes #718 - -- vauth: Added check for supported SSPI based authentication mechanisms + - libidn isn't used these days, and homebrew doesn't seem to have a + libidn2 package to replace with easily - Completing commit 00417fd66c and 2708d4259b. + Closes #1895 -- http.c: Remove duplicate (authp->avail & CURLAUTH_DIGEST) check +- curl: make str2udouble not return values on error - From commit 2708d4259b. + ... previously it would store a return value even when it returned + error, which could make the value get used anyway! + + Reported-by: Brian Carpenter + Closes #1893 -Marc Hoersken (20 Aug 2016) -- socks.c: display the hostname returned by the SOCKS5 proxy server +Jay Satiro (18 Sep 2017) +- socks: fix incorrect port number in SOCKS4 error message - Instead of displaying the requested hostname the one returned - by the SOCKS5 proxy server is used in case of connection error. - The requested hostname is displayed earlier in the connection sequence. + Prior to this change it appears the SOCKS5 port parsing was erroneously + used for the SOCKS4 error message, and as a result an incorrect port + would be shown in the error message. - The upper-value of the port is moved to a temporary variable and - replaced with a 0-byte to make sure the hostname is 0-terminated. + Bug: https://github.com/curl/curl/issues/1892 + Reported-by: Jackarain@users.noreply.github.com -Steve Holme (20 Aug 2016) -- urldata.h: Corrected comment for httpcode which is also populated by SMTP - - As of 7.25.0 and commit 5430007222. +- [Marc Aldorasi brought this change] -Marc Hoersken (20 Aug 2016) -- socks.c: use Curl_printable_address in SOCKS5 connection sequence + schannel: Support partial send for when data is too large - Replace custom string formatting with Curl_printable_address. - Add additional debug and error output in case of failures. - -- socks.c: align SOCKS4 connection sequence with SOCKS5 + Schannel can only encrypt a certain amount of data at once. Instead of + failing when too much data is to be sent at once, send as much data as + we can and let the caller send the remaining data by calling send again. - Calling sscanf is not required since the raw IPv4 address is - available and the protocol can be detected using ai_family. - -Steve Holme (20 Aug 2016) -- http.c: Corrected indentation change from commit 2708d4259b + Bug: https://curl.haxx.se/mail/lib-2014-07/0033.html - Made by Visual Studio's auto-correct feature and missed by me in my own - code reviews! + Closes https://github.com/curl/curl/pull/1890 -- http: Added calls to Curl_auth_is__supported() +- [David Benjamin brought this change] + + openssl: add missing includes - Hooked up the HTTP authentication layer to query the new 'is mechanism - supported' functions when deciding what mechanism to use. + lib/vtls/openssl.c uses OpenSSL APIs from BUF_MEM and BIO APIs. Include + their headers directly rather than relying on other OpenSSL headers + including things. - As per commit 00417fd66c existing functionality is maintained for now. + Closes https://github.com/curl/curl/pull/1891 -Marc Hoersken (20 Aug 2016) -- socks.c: improve verbose output of SOCKS5 connection sequence +Daniel Stenberg (15 Sep 2017) +- conversions: fix several compiler warnings -- configure.ac: add missing quotes to PKG_CHECK_MODULES +- server/getpart: provide dummy function to build conversion enabled -Steve Holme (20 Aug 2016) -- sasl: Added calls to Curl_auth_is__supported() - - Hooked up the SASL authentication layer to query the new 'is mechanism - supported' functions when deciding what mechanism to use. +- non-ascii: use iconv() with 'char **' argument - For now existing functionality is maintained. + Bug: https://curl.haxx.se/mail/lib-2017-09/0031.html -Daniel Stenberg (19 Aug 2016) -- [Miroslav Franc brought this change] +- escape.c: error: pointer targets differ in signedness - spnego_sspi: fix memory leak in case *outlen is zero (#970) +- docs: clarify the CURLOPT_INTERLEAVE* options behavior -- CURLMOPT_MAX_TOTAL_CONNECTIONS.3: mention it can also multiplex +- [Max Dymond brought this change] -Steve Holme (18 Aug 2016) -- vauth: Introduced Curl_auth_is__supported() functions + rtsp: Segfault in rtsp.c when using WRITEDATA - As Windows SSPI authentication calls fail when a particular mechanism - isn't available, introduced these functions for DIGEST, NTLM, Kerberos 5 - and Negotiate to allow both HTTP and SASL authentication the opportunity - to query support for a supported mechanism before selecting it. + If the INTERLEAVEFUNCTION is defined, then use that plus the + INTERLEAVEDATA information when writing RTP. Otherwise, use + WRITEFUNCTION and WRITEDATA. - For now each function returns TRUE to maintain compatability with the - existing code when called. + Fixes #1880 + Closes #1884 -Daniel Stenberg (18 Aug 2016) -- test1144: verify HEAD with body-only response +Marcel Raad (15 Sep 2017) +- [Isaac Boukris brought this change] -Steve Holme (17 Aug 2016) -- RELEASE-PROCEDURE: Added some more future release dates + tests: enable gssapi in travis-ci linux build - ...and removed some old ones + Closes https://github.com/curl/curl/pull/1687 -Daniel Stenberg (17 Aug 2016) -- [David Woodhouse brought this change] +- [Isaac Boukris brought this change] - curl: allow "pkcs11:" prefix for client certificates + tests: add initial gssapi test using stub implementation - RFC7512 provides a standard method to reference certificates in PKCS#11 - tokens, by means of a URI starting 'pkcs11:'. + The stub implementation is pre-loaded using LD_PRELOAD + and emulates common gssapi uses (only builds if curl is + initially built with gssapi support). - We're working on fixing various applications so that whenever they would - have been able to use certificates from a file, users can simply insert - a PKCS#11 URI instead and expect it to work. This expectation is now a - part of the Fedora packaging guidelines, for example. + The initial tests are currently disabled for debug builds + as LD_PRELOAD is not used then. - This doesn't work with cURL because of the way that the colon is used - to separate the certificate argument from the passphrase. So instead of - - curl -E 'pkcs11:manufacturer=piv_II;id=%01' … - - I instead need to invoke cURL with the colon escaped, like this: - - curl -E 'pkcs11\:manufacturer=piv_II;id=%01' … + Ref: https://github.com/curl/curl/pull/1687 + +Daniel Stenberg (15 Sep 2017) +- test1150: verify same host fetch using different ports over proxy - This is suboptimal because we want *consistency* — the URI should be - usable in place of a filename anywhere, without having strange - differences for different applications. + Closes #1889 + +- URL: on connection re-use, still pick the new remote port - This patch therefore disables the processing in parse_cert_parameter() - when the string starts with 'pkcs11:'. It means you can't pass a - passphrase with an unescaped PKCS#11 URI, but there's no need to do so - because RFC7512 allows a PIN to be given as a 'pin-value' attribute in - the URI itself. + ... as when a proxy connection is being re-used, it can still get a + different remote port. - Also, if users are already using RFC7512 URIs with the colon escaped as - in the above example — even providing a passphrase for cURL to handling - instead of using a pin-value attribute, that will continue to work - because their string will start 'pkcs11\:' and won't match the check. + Fixes #1887 + Reported-by: Oli Kingshott + +- RELEASE-NOTES: synced with 87501e57f + +- code style: remove wrong uses of multiple spaces - What *does* break with this patch is the extremely unlikely case that a - user has a file which is in the local directory and literally named - just "pkcs11", and they have a passphrase on it. If that ever happened, - the user would need to refer to it as './pkcs11:' instead. + Closes #1878 + +- checksrc: detect and warn for multiple spaces -- nss: make the global variables static +- code style: use space after semicolon -- openssl: use regular malloc instead of OPENSSL_malloc +- checksrc: verify space after semicolons + +- code style: use spaces around pluses + +- checksrc: detect and warn for lack of spaces next to plus signs + +- code style: use spaces around equals signs + +- checksrc: verify spaces around equals signs - This allows for better memmory debugging and torture tests. + ... as the code style mandates. -- proxy: fix tests as follow-up to 93b0d907d5 +- Curl_checkheaders: make it available for IMAP and SMTP too - This fixes tests that were added after 113f04e664b as the tests would - fail otherwise. + ... not only HTTP uses this now. - We bring back "Proxy-Connection: Keep-Alive" now unconditionally to fix - regressions with old and stupid proxies, but we could possibly switch to - using it only for CONNECT or only for NTLM in a future if we want to - gradually reduce it. + Closes #1875 + +- travis: add build without HTTP/SMTP/IMAP + +Jay Satiro (10 Sep 2017) +- mbedtls: enable CA path processing - Fixes #954 + CA path processing was implemented when mbedtls.c was added to libcurl + in fe7590f, but it was never enabled. - Reported-by: János Fekete + Bug: https://github.com/curl/curl/issues/1877 + Reported-by: SBKarr@users.noreply.github.com -- Revert "Proxy-Connection: stop sending this header by default" +Daniel Stenberg (8 Sep 2017) +- rtsp: do not call fwrite() with NULL pointer FILE * + + If the default write callback is used and no destination has been set, a + NULL pointer would be passed to fwrite()'s 4th argument. + + OSS-fuzz bug https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3327 + (not publicly open yet) - This reverts commit 113f04e664b16b944e64498a73a4dab990fe9a68. + Detected by OSS-fuzz + Closes #1874 -- CURLOPT_PROXY.3: unsupported schemes cause errors now +- configure: use -Wno-varargs on clang 3.9[.X] debug builds - Follow-up to a96319ebb9 (document the new behavior) + ... to avoid a clang bug -- tests/README: mention nghttpx for HTTP/2 tests +- [Max Dymond brought this change] -- README.md: add our CII Best Practices badge + ossfuzz: add some more handled CURL options + + Add support for HEADER, COOKIE, RANGE, CUSTOMREQUEST, MAIL_RECIPIENT, + MAIL_FROM and uploading data. -- proxy: polished the error message for unsupported schemes +- configure: check for C++ compiler after C, to make it non-fatal + + The tests for object file/executable file extensions are presumably only + done for the first of these macros in the configure file. - Follow up to a96319ebb93 + Bug: https://github.com/curl/curl/pull/1851#issuecomment-327597515 + Reported-by: Marcel Raad + Closes #1873 -- test219: verify unsupported scheme for proxies get rejected +Patrick Monnerat (7 Sep 2017) +- form API: add new test 650. + + Now that the form API is deprecated and not used anymore in curl tool, + a lot of its features left untested. Test 650 attempts to check all these + features not tested elsewhere. -- proxy: reject attempts to use unsupported proxy schemes +Jay Satiro (7 Sep 2017) +- configure: fix curl_off_t check's include order + + - Prepend srcdir include path instead of append. - I discovered some people have been using "https://example.com" style - strings as proxy and it "works" (curl doesn't complain) because curl - ignores unknown schemes and then assumes plain HTTP instead. + Prior to this change it was possible that during the check for the size + of curl_off_t the include path of a user's already installed curl could + come before the include path of the to-be-built curl, resulting in the + system.h of the former being incorrectly included for that check. - I think this misleads users into believing curl uses HTTPS to proxies - when it doesn't. Now curl rejects proxy strings using unsupported - schemes instead of just ignoring and defaulting to HTTP. + Closes https://github.com/curl/curl/pull/1870 -- RELEASE-NOTES: synced with b7ee5316c2fd5b +Daniel Stenberg (7 Sep 2017) +- [Jakub Zakrzewski brought this change] -Marc Hoersken (14 Aug 2016) -- socks.c: Correctly calculate position of port in response packet + KNOWN_BUGS: Remove CMake symbol hiding issue - Third commit to fix issue #944 regarding SOCKS5 error handling. - - Reported-by: David Kalnischkies + It has already been fixed in 6140dfc -- socks.c: Do not modify and invalidate calculated response length +- http-proxy: when not doing CONNECT, that phase is done immediately - Second commit to fix issue #944 regarding SOCKS5 error handling. + `conn->connect_state` is NULL when doing a regular non-CONNECT request + over the proxy and should therefor be considered complete at once. - Reported-by: David Kalnischkies + Fixes #1853 + Closes #1862 + Reported-by: Lawrence Wagerfield + +- [Johannes Schindelin brought this change] -- socks.c: Move error output after reading the whole response packet + OpenSSL: fix yet another mistake while encapsulating SSL backend data - First commit to fix issue #944 regarding SOCKS5 error handling. + Another mistake in my manual fixups of the largely mechanical + search-and-replace ("connssl->" -> "BACKEND->"), just like the previous + commit concerning HTTPS proxies (and hence not caught during my + earlier testing). - Reported-by: David Kalnischkies + Fixes #1855 + Closes #1871 + + Signed-off-by: Johannes Schindelin -Daniel Stenberg (13 Aug 2016) -- [Ronnie Mose brought this change] +- [Johannes Schindelin brought this change] - MANUAL: Remove invalid link to LDAP documentation (#962) + OpenSSL: fix erroneous SSL backend encapsulation - The server developer.netscape.com does not resolve into any - ip address and can be removed. - -Jay Satiro (13 Aug 2016) -- openssl: accept subjectAltName iPAddress if no dNSName match + In d65e6cc4f (vtls: prepare the SSL backends for encapsulated private + data, 2017-06-21), this developer prepared for a separation of the + private data of the SSL backends from the general connection data. - Undo change introduced in d4643d6 which caused iPAddress match to be - ignored if dNSName was present but did not match. + This conversion was partially automated (search-and-replace) and + partially manual (e.g. proxy_ssl's backend data). - Also, if iPAddress is present but does not match, and dNSName is not - present, fail as no-match. Prior to this change in such a case the CN - would be checked for a match. + Sadly, there was a crucial error in the manual part, where the wrong + handle was used: rather than connecting ssl[sockindex]' BIO to the + proxy_ssl[sockindex]', we reconnected proxy_ssl[sockindex]. The reason + was an incorrect location to paste "BACKEND->"... d'oh. - Bug: https://github.com/curl/curl/issues/959 - Reported-by: wmsch@users.noreply.github.com + Reported by Jay Satiro in https://github.com/curl/curl/issues/1855. + + Signed-off-by: Johannes Schindelin -Daniel Stenberg (12 Aug 2016) -- [Dambaev Alexander brought this change] +- [Jay Satiro brought this change] - configure.ac: add zlib search with pkg-config + vtls: fix memory corruption - Closes #956 - -- rtsp: ignore whitespace in session id + Ever since 70f1db321 (vtls: encapsulate SSL backend-specific data, + 2017-07-28), the code handling HTTPS proxies was broken because the + pointer to the SSL backend data was not swapped between + conn->ssl[sockindex] and conn->proxy_ssl[sockindex] as intended, but + instead set to NULL (causing segmentation faults). - Follow-up to e577c43bb to fix test case 569 brekage: stop the parser at - whitespace as well. + [jes: provided the commit message, tested and verified the patch] - Help-by: Erik Janssen + Signed-off-by: Johannes Schindelin -- HTTP: retry failed HEAD requests too +- vtls: switch to CURL_SHA256_DIGEST_LENGTH define - Mark's new document about HTTP Retries - (https://mnot.github.io/I-D/httpbis-retry/) made me check our code and I - spotted that we don't retry failed HEAD requests which seems totally - inconsistent and I can't see any reason for that separate treatment. + ... instead of the prefix-less version since WolfSSL 3.12 now uses an + enum with that name that causes build failures for us. - So, no separate treatment for HEAD starting now. A HTTP request sent - over a reused connection that gets cut off before a single byte is - received will be retried on a fresh connection. + Fixes #1865 + Closes #1867 + Reported-by: Gisle Vanem + +- travis: add c-ares enabled builds linux + osx - Made-aware-by: Mark Nottingham + Closes #1868 -- mk-ca-bundle.1: document -m, added in 1.26 +- HISTORY: added some recent items -- RELEASE-NOTES: synced with e577c43bb5 +Jay Satiro (6 Sep 2017) +- SSL: fix unused parameter warnings -- [Erik Janssen brought this change] +Patrick Monnerat (6 Sep 2017) +- mime: drop internal FILE * support. + + - The part kind MIMEKIND_FILE and associated code are suppressed. + - Seek data origin offset not used anymore: suppressed. + - MIMEKIND_NAMEDFILE renamed MIMEKIND_FILE; associated fields/functions + renamed accordingly. + - Curl_getformdata() processes stdin via a callback. - rtsp: accept any RTSP session id +Daniel Stenberg (6 Sep 2017) +- configure: remove --enable-soname-bump and SONAME_BUMP + + Back in 2008, (and commit 3f3d6ebe665f3) we changed the logic in how we + determine the native type for `curl_off_t`. To really make sure we + didn't break ABI without bumping SONAME, we introduced logic that + attempted to detect that it would use a different size and thus not be + compatible. We also provided a manual switch that allowed users to tell + configure to bump SONAME by force. + + Today, we know of no one who ever got a SONAME bump auto-detected and we + don't know of anyone who's using the manual bump feature. The auto- + detection is also no longer working since we introduced defining + curl_off_t in system.h (7.55.0). - Makes libcurl work in communication with gstreamer-based RTSP - servers. The original code validates the session id to be in accordance - with the RFC. I think it is better not to do that: + Finally, this bumping logic is not present in the cmake build. - - For curl the actual content is a don't care. + Closes #1861 + +Jay Satiro (6 Sep 2017) +- [Gisle Vanem brought this change] + + vtls: select ssl backend case-insensitive (follow-up) - - The clarity of the RFC is debatable, is $ allowed or only as \$, that - is imho not clear + - Do a case-insensitive comparison of CURL_SSL_BACKEND env as well. - - Gstreamer seems to url-encode the session id but % is not allowed by - the RFC + - Change Curl_strcasecompare calls to strcasecompare + (maps to the former but shorter). - - less code + Follow-up to c290b8f. - With this patch curl will correctly handle real-life lines like: - Session: biTN4Kc.8%2B1w-AF.; timeout=60 + Bug: https://github.com/curl/curl/commit/c290b8f#commitcomment-24094313 - Bug: https://curl.haxx.se/mail/lib-2016-08/0076.html + Co-authored-by: Jay Satiro -- symbols-in-versions: add CURL_STRICTER +- openssl: Integrate Peter Wu's SSLKEYLOGFILE implementation - Added in 5fce88aa8c12564 - -- [Simon Warta brought this change] - - winbuild: Allow changing C compiler via environment variable CC (#952) + This is an adaptation of 2 of Peter Wu's SSLKEYLOGFILE implementations. + + The first one, written for old OpenSSL versions: + https://git.lekensteyn.nl/peter/wireshark-notes/tree/src/sslkeylog.c + + The second one, written for BoringSSL and new OpenSSL versions: + https://github.com/curl/curl/pull/1346 - This makes it possible to use specific compilers or a cache. + Note the first one is GPL licensed but the author gave permission to + waive that license for libcurl. - Sample use for clcache: - set CC=clcache.bat - nmake /f Makefile.vc DEBUG=no MODE=static VC=14 GEN_PDB=no + As of right now this feature is disabled by default, and does not have + a configure option to enable it. To enable this feature define + ENABLE_SSLKEYLOGFILE when building libcurl and set environment + variable SSLKEYLOGFILE to a pathname that will receive the keys. + + And in Wireshark change your preferences to point to that key file: + Edit > Preferences > Protocols > SSL > Master-Secret + + Co-authored-by: Peter Wu + + Ref: https://github.com/curl/curl/pull/1030 + Ref: https://github.com/curl/curl/pull/1346 + + Closes https://github.com/curl/curl/pull/1866 -- LICENSE-MIXING.md: switched to markdown +Patrick Monnerat (5 Sep 2017) +- mime: fix a trivial warning. -- docs-make: have markdown files use .md +- mime: replace 'struct Curl_mimepart' by 'curl_mimepart' in encoder code. + + mime_state is now a typedef. + +- mime: implement encoders. + + curl_mime_encoder() is operational and documented. + curl tool -F option is extended with ";encoder=". + curl tool --libcurl option generates calls to curl_mime_encoder(). + New encoder tests 648 & 649. + Test 1404 extended with an encoder specification. -- curl.h: make CURL_NO_OLDIES define CURL_STRICTER +- runtests.pl: support attribute "nonewline" in part verify/upload. -- HISTORY.md: use markdown extension +- [Daniel Stenberg brought this change] -- SSLCERTS.md: renamed to markdown extension + fixup data/test1135 -- INTERNALS.md: use markdown extension for markdown content +- [Daniel Stenberg brought this change] -- CONTRIBUTE.md: markdown extension + mime: unified to use the typedef'd mime structs everywhere + + ... and slightly edited to follow our code style better. -- CONTRIBUTE: changed to markdown +- [Daniel Stenberg brought this change] -- CONTRIBUTE: refreshed + curl.h: use lower case curl_mime* as for all public symbols -- TODO: added an SSH section and two SFTP things to do +- [Daniel Stenberg brought this change] -- TODO: remove the 1.22 duplicated item + docs/curl_mime_*.3: use correct variable types in examples -- TODO: move "CURLOPT_MAIL_CLIENT" to SMTP section +Kamil Dudka (5 Sep 2017) +- openssl: use OpenSSL's default ciphers by default + + Up2date versions of OpenSSL maintain the default reasonably secure + without breaking compatibility, so it is better not to override the + default by curl. Suggested at https://bugzilla.redhat.com/1483972 + + Closes #1846 -- TODO: API for URL parsing/splitting +Viktor Szakats (5 Sep 2017) +- examples/mime: minor example code fixes -- TODO: move QUIC to the HTTP section +Daniel Stenberg (5 Sep 2017) +- docs/curl_mime_*.3: added examples -- [Simon Warta brought this change] +- configure: add MultiSSL to FEATURES when enabled + + ...for curl-config and its corresponding test 1014 - winbuild: Free name $(CC) in Makefile (#950) +- http-proxy: treat all 2xx as CONNECT success - In the old line number 290, CC and CURL_CC had the same value. After - that, /DCURL_STATICLIB was added to CC but not CURL_CC (intended?). + Added test 1904 to verify. - This gets rid of the CC variable entirely. It is a first step to make it - possible to manualyl set a CC variable in order to be able to change the - compiler. + Reported-by: Lawrence Wagerfield + Fixes #1859 + Closes #1860 -- TODO: Use huge HTTP/2 windows +- MAIL-ETIQUETTE: added "1.9 Your emails are public" -- [Simon Warta brought this change] +- curl.h: fix "unused checksrc ignore", remove dangling reference + + ... to a README file that doesn't exist anymore - winbuild: Avoid setting redundant CFLAGS to compile commands (#949) +Viktor Szakats (4 Sep 2017) +- docs: Update to secure URL versions + +- mime: use CURL_ZERO_TERMINATED in examples - $(CURL_CC) is always used with $(CURL_CFLAGS) appended, so before this, - all arguments in CURL_CFLAGS have been added twice. + and some minor whitespace fixes -Jay Satiro (8 Aug 2016) -- cmake: Enable win32 threaded resolver by default +Daniel Stenberg (4 Sep 2017) +- schannel: return CURLE_SSL_CACERT on failed verification - - Turn on USE_THREADS_WIN32 in Windows if ares isn't on + ... not *CACERT_BADFILE as it isn't really because of a bad file. - This change is similar to what we already do in the autotools build. + Bug: https://curl.haxx.se/mail/lib-2017-09/0002.html + Closes #1858 + +- test1135: fixed after bd8070085f9 -- cmake: Enable win32 large file support by default +- examples/post-callback: stop returning one byte at a time - All compilers used by cmake in Windows should support large files. + ... since people copy and paste code from this example and thus they get + an inefficient POST operation without a good reason and sometimes + without understanding why. - - Add test SIZEOF_OFF_T - - Remove outdated test SIZEOF_CURL_OFF_T - - Turn on USE_WIN32_LARGE_FILES in Windows - - Check for 'Largefile' during the features output + Instead this now returns as much data as possible. -Daniel Stenberg (7 Aug 2016) -- TODO: added several ideas, removed SPDY +- RELEASE-NOTES: fixed the function counter script -- http2: always wait for readable socket +- curl.h: make the curl_strequal() protos use the same style - Since the server can at any time send a HTTP/2 frame to us, we need to - wait for the socket to be readable during all transfers so that we can - act on incoming frames even when uploading etc. - - Reminded-by: Tatsuhiro Tsujikawa + ... as the other functions. Makes it easier to machine-parse! -- RELEASE-NOTES: synced with 7b4bf37a44791 +- docs: curl_mime_*.3 man page formatting edits -- [Thomas Glanzmann brought this change] +- RELEASE-NOTES: synced with 1ab9e9b50 - mbedtls: set debug threshold to 4 (verbose) when MBEDTLS_DEBUG is defined - - In order to make MBEDTLS_DEBUG work, the debug threshold must be unequal - to 0. This patch also adds a comment how mbedtls must be compiled in - order to make debugging work, and explains the possible debug levels. +Patrick Monnerat (4 Sep 2017) +- lib: bump version info (soname). Adapt and reenable test 1135. -- CURLOPT_TCP_NODELAY: now enabled by default +Daniel Stenberg (3 Sep 2017) +- headers: move the global_sslset() proto from multi.h to curl.h - After a few wasted hours hunting down the reason for slowness during a - TLS handshake that turned out to be because of TCP_NODELAY not being - set, I think we have enough motivation to toggle the default for this - option. We now enable TCP_NODELAY by default and allow applications to - switch it off. - - This also makes --tcp-nodelay unnecessary, but --no-tcp-nodelay can be - used to disable it. + As it was added to multi.h simply to not break test 1135, which now has + been disabled due to the mime API addition anyway and su we can now move + the sslset stuff to where the other curl_global_* prototypes are. + +Patrick Monnerat (3 Sep 2017) +- mime: fix signed/unsigned conversions. - Thanks-to: Tim Rühsen - Bug: https://curl.haxx.se/mail/lib-2016-06/0143.html + Use and generate CURL_ZERO_TERMINATED in curl tool and tests. -- [Serj Kalichev brought this change] +Jay Satiro (3 Sep 2017) +- tool_formparse: fix some trivial warnings - TFTP: Fix upload problem with piped input +Patrick Monnerat (3 Sep 2017) +- mime: use size_t instead of ssize_t in public API interface. - When input stream for curl is stdin and input stream is not a file but - generated by a script then curl can truncate data transfer to arbitrary - size since a partial packet is treated as end of transfer by TFTP. + To support telling a string is nul-terminated, symbol CURL_ZERO_TERMINATED + has been introduced. - Fixes #857 - -- mk-ca-bundle.pl: -m keeps ca cert meta data in output - - Makes the script pass on comments holding meta data to the output - file. Like fingerprinters, issuer, date ranges etc. + Documentation updated accordingly. - Closes #937 + symbols in versions updated. Added form API symbols deprecation info. -- multi: make Curl_expire() work with 0 ms timeouts +- mime: remove support "-" stdin pseudo-file name in curl_mime_filedata(). - Previously, passing a timeout of zero to Curl_expire() was a magic code - for clearing all timeouts for the handle. That is now instead made with - the new Curl_expire_clear() function and thus a 0 timeout is fine to set - and will trigger a timeout ASAP. + This feature is badly supported in Windows: as a replacement, a caller has + to use curl_mime_data_cb() with fread, fseek and possibly fclose + callbacks to process opened files. - This will help removing short delays, in particular notable when doing - HTTP/2. - -- transfer: return without select when the read loop reached maxcount + The cli tool and documentation are updated accordingly. - Regression added in 790d6de48515. The was then added to avoid one - particular transfer to starve out others. But when aborting due to - reading the maxcount, the connection must be marked to be read from - again without first doing a select as for some protocols (like SFTP/SCP) - the data may already have been read off the socket. + The feature is however kept internally for form API compatibility, with + the known caveats it always had. - Reported-by: Dan Donahue - Bug: https://curl.haxx.se/mail/lib-2016-07/0057.html - -Steve Holme (3 Aug 2016) -- [Bill Nagel brought this change] + As a side effect, stdin size is not determined by the cli tool even if + possible and this results in a chunked transfer encoding. Test 173 is + updated accordingly. - mbedtls: Added support for NTLM +- mime: fix some implicit curl_off_t --> size_t conversion warnings. -Daniel Stenberg (3 Aug 2016) -- [Sergei Nikulov brought this change] - - travis: removed option to rebuild autotool from source +- mime: tests and examples. - Fixes #943 - -- bump: start working toward 7.50.2 - -Version 7.50.1 (3 Aug 2016) + Additional mime-specific tests. + Existing tests updated to reflect small differences (Expect: 100-continue, + data size change due to empty lines, etc). + Option -F headers= keyword added to tests. + test1135 disabled until the entry point order change is resolved. + New example smtp-mime. + Examples postit2 and multi-post converted from form API to mime API. -Daniel Stenberg (3 Aug 2016) -- THANKS: 7 new contributors from the 7.50.1 release - -- RELEASE-NOTES: 7.50.1 - -- TLS: only reuse connections with the same client cert +- mime: use in curl cli tool instead of form API. - CVE-2016-5420 - Bug: https://curl.haxx.se/docs/adv_20160803B.html + Extended -F option syntax to support multipart mail messages. + -F keyword headers= added to include custom headers in parts. + Documentation upgraded. -- TLS: switch off SSL session id when client cert is used +- mime: new MIME API. - CVE-2016-5419 - Bug: https://curl.haxx.se/docs/adv_20160803A.html - Reported-by: Bru Rom - Contributions-by: Eric Rescorla and Ray Satiro + Available in HTTP, SMTP and IMAP. + Deprecates the FORM API. + See CURLOPT_MIMEPOST. + Lib code and associated documentation. -- curl_multi_cleanup: clear connection pointer for easy handles +- test564: Add a warning comment about shell profile output. - CVE-2016-5421 - Bug: https://curl.haxx.se/docs/adv_20160803C.html - Reported-by: Marcelo Echeverria and Fernando Muñoz + Shell profile output makes the SSH server failing and this problem reason + is not easy to find when no hint is given. -- KNOWN_BUGS: SOCKS proxy not working via IPv6 +- checksrc: disable SPACEBEFOREPAREN for case statement. - Closes #835 + The case keyword may be followed by a constant expression and thus should + allow it to start with an open parenthesis. -- KNOWN_BUGS: CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM +- runtests.pl: allow tags in client section. - Closes #768 + This enables tests to create more than one file on the client side. -- KNOWN_BUGS: transfer-encoding: chunked in HTTP/2 +- runtests.pl: Apply strippart to upload too. - Closes #662 + This will allow substitution of boundaries in mail messages. -- TODO: Provide cmake config-file +- Curl_base64_encode: always call with a real data handle. - Closes #885 + Some calls in different modules were setting the data handle to NULL, causing + segmentation faults when using builds that enable character code conversions. -Patrick Monnerat (2 Aug 2016) -- os400: define BUILDING_LIBCURL in make script. +- non-ascii: allow conversion functions to be called with a NULL data handle. -Daniel Stenberg (1 Aug 2016) -- RELEASE-NOTES: synced with aa9f536a18b +- http: fix a memory leakage in checkrtspprefix(). -Jay Satiro (1 Aug 2016) -- [Thomas Glanzmann brought this change] +Daniel Stenberg (2 Sep 2017) +- [Max Dymond brought this change] - mbedtls: Fix debug function name + ossfuzz: Move to C++ for curl_fuzzer. - This patch is necessary so that curl compiles if MBEDTLS_DEBUG is - defined. + Automake gets confused if you want to use C++ static libraries with C + code - basically we need to involve the clang++ linker. The easiest way + of achieving this is to rename the C code as C++ code. This gets us a + bit further along the path and ought to be compatible with Google's + version of clang. + +- curl_global_sslset: select backend by name case insensitively - Bug: https://curl.haxx.se/mail/lib-2016-08/0001.html + Closes #1849 -Daniel Stenberg (1 Aug 2016) -- [Sergei Nikulov brought this change] +- [Max Dymond brought this change] - travis: fix OSX build by re-installing libtool + ossfuzz: additional seed corpora - Apparently due to a broken homebrew install + Create simple seed corpora for: + - FTP + - telnet + - dict + - tftp + - imap + - pop3 - fixes #934 - Closes #939 + based off the tests of the same number. + + Closes #1842 -- [Martin Vejnár brought this change] +- [Max Dymond brought this change] - win32: fix a potential memory leak in Curl_load_library + ossfuzz: moving towards the ideal integration - If a call to GetSystemDirectory fails, the `path` pointer that was - previously allocated would be leaked. This makes sure that `path` is - always freed. + - Start with the basic code from the ossfuzz project. + - Rewrite fuzz corpora to be binary files full of Type-Length-Value + data, and write a glue layer in the fuzzing function to convert + corpora into CURL options. + - Have supporting functions to generate corpora from existing tests + - Integrate with Makefile.am + +- strcase: corrected comment header for Curl_strcasecompare() + +- unit1301: fix error message on first test + +- curl_global_sslset.3: show the struct and enum too - Closes #938 + ... so that users can actually write code based on the man page alone, + not having to read the header file. -- include: revert 9adf3c4 and make public types void * again +Jay Satiro (31 Aug 2017) +- darwinssl: handle long strings in TLS certs (follow-up) - Many applications assume the actual contents of the public types and use - that do for example forward declarations (saving them from including our - public header) which then breaks when we switch from void * to a struct - *. + - Fix handling certificate subjects that are already UTF-8 encoded. - I'm not convinced we were wrong, but since this practise seems - widespread enough I'm willing to (partly) step down. + Follow-up to b3b75d1 from two days ago. Since then a copy would be + skipped if the subject was already UTF-8, possibly resulting in a NULL + deref later on. - Now libcurl uses the struct itself when it is built and it allows - applications to use the struct type if CURL_STRICTER is defined at the - time of the #include. + Ref: https://github.com/curl/curl/issues/1823 + Ref: https://github.com/curl/curl/pull/1831 - Reported-by: Peter Frühberger - Fixes #926 + Closes https://github.com/curl/curl/pull/1836 -Jay Satiro (28 Jul 2016) -- [Yonggang Luo brought this change] - - cmake: Fix for schannel support +Daniel Stenberg (31 Aug 2017) +- cyassl: call it the "WolfSSL" backend - The check_library_exists_concat do not check crypt32 library properly. - So include it directly. + ... instead of cyassl, as this is the current name for it. - Bug: https://github.com/curl/curl/pull/917 - Reported-by: Yonggang Luo + Closes #1844 + +- polarssl: fix multissl breakage - Bug: https://github.com/curl/curl/issues/935 - Reported-by: Alain Danteny + Reported-by: Dan Fandrich + Bug: https://curl.haxx.se/mail/lib-2017-08/0121.html + Closes #1843 -- Revert "travis: Install libtool for OS X builds" +- configure: remove the leading comma from the backends list - Didn't work. + ... when darwinssl is used. - This reverts commit 50723585ed380744358de054e2a55dccee65dfd7. - -- travis: Install libtool for OS X builds + Reported-by: Viktor Szakats + Bug: https://github.com/curl/curl/commit/b0989cd3abaff4f9a0717b4875022fa79e33b481#commitcomment-23943493 - CI is failing due to missing libtoolize, so I'm trying this. + Closes #1845 -Daniel Stenberg (26 Jul 2016) -- [Viktor Szakats brought this change] +Kamil Dudka (30 Aug 2017) +- examples/sslbackend.c: fix failure of 'make checksrc' + + ./sslbackend.c:58:3: warning: else after closing brace on same line (BRACEELSE) + } else if(isdigit(*name)) { + ^ + ./sslbackend.c:62:3: warning: else after closing brace on same line (BRACEELSE) + } else + ^ - TODO: minor typo in last commit +Viktor Szakats (30 Aug 2017) +- makefile.m32: add multissl support - merged #931 + Closes https://github.com/curl/curl/pull/1840 -- TODO: Timeout idle connections from the pool +Daniel Stenberg (30 Aug 2017) +- curl.h: CURLSSLBACKEND_WOLFSSL used wrong value + + The CURLSSLBACKEND_WOLFSSL is supposed to be an alias for + CURLSSLBACKEND_CYASSL, but used an erronous value. To reduce the risk + for a similar mistake, define the backend aliases to use the enum values + instead. + + Reported-by: Gisle Vanem + Bug: https://curl.haxx.se/mail/lib-2017-08/0120.html -Patrick Monnerat (25 Jul 2016) -- os400: minimum supported OS version: V6R1M0. - Do not log compilation informational messages. +- curl_global_sslset.3: clarify + + it is a one time *set*, not necessarily a one time use... it can be + called again if the first call failed or just listed the alternatives. + + clarify that the available backends are the ones this build supports + + plus add some formatting + + Reported-by: Rich Gray + Bug: https://curl.haxx.se/mail/lib-2017-08/0119.html -Jay Satiro (24 Jul 2016) -- tests: Fix for http/2 feature +- curl/multi.h: remove duplicated closing c++ brace + + Regression since 1328f69d53f2f2e93 - Bug: https://curl.haxx.se/mail/lib-2016-07/0070.html - Reported-by: Paul Howarth + Fixes #1841 + Reported-by: Andrei Karas -Steve Holme (23 Jul 2016) -- README: Mention wolfSSL in the 'Dependencies' section +- RELEASE-NOTES: synced with 8c33c963a -- vauth.h: No need to query HAVE_GSSAPI || USE_WINDOWS_SSPI for SPNEGO - - As SPNEGO is only defined when these pre-processor variables are defined - there is no need to query them explicitly. +- HELP-US.md: spelling -- spnego: Corrected miss-placed * in Curl_auth_spnego_cleanup() declaration +- HELP-US.md: "How to get started helping out in the curl project" - Typo introduced in commit ad5e9bfd5d. + Closes #1837 -Daniel Stenberg (22 Jul 2016) -- SECURITY: mention how to get windows-specific CVEs +Dan Fandrich (29 Aug 2017) +- asyn-thread: Fixed cleanup after OOM - ... and make the distros link a proper link - -Dan Fandrich (21 Jul 2016) -- test558: fix test by stripping file paths from FD lines + destroy_async_data() assumes that if the flag "done" is not set yet, the + thread itself will clean up once the request is complete. But if an + error (generally OOM) occurs before the thread even has a chance to + start, it will never get a chance to clean up and memory will be leaked. + By clearing "done" only just before starting the thread, the correct + cleanup sequence will happen in all cases. -Kamil Dudka (21 Jul 2016) -- tests: distribute the http2-server.pl script, too +Daniel Stenberg (28 Aug 2017) +- curl_global_init.3: mention curl_global_sslset(3) -- docs: distribute the CURLINFO_HTTP_VERSION(3) man page, too +Dan Fandrich (28 Aug 2017) +- unit1606: Fixed shadowed variable warning -Daniel Stenberg (21 Jul 2016) -- bump: start working on 7.50.1 +- asyn-thread: Improved cleanup after OOM situations -Version 7.50.0 (21 Jul 2016) - -Daniel Stenberg (21 Jul 2016) -- RELEASE-NOTES: version 7.50.0 ready +- asyn-thread: Set errno to the proper value ENOMEM in OOM situation + + This used to be set in some configurations to EAI_MEMORY which is not a + valid value for errno and caused Curl_strerror to fail an assertion. -- THANKS: 13 new contributors from the 7.50.0 release +Daniel Stenberg (28 Aug 2017) +- [Johannes Schindelin brought this change] -Jay Satiro (21 Jul 2016) -- winbuild: fix embedded manifest option + configure: Handle "MultiSSL" specially When versioning symbols - Embedded manifest option didn't work due to typo. + There is a mode in which libcurl is compiled with versioned symbols, + depending on the active SSL backend. - Reported-by: Stefan Kanthak - -- vauth: Fix memleak by freeing credentials if out of memory + When multiple SSL backends are active, it does not make sense to favor + one over the others, so let's not: introduce a new prefix for the case + where multiple SSL backends are compiled into cURL. - This is a follow up to the parent commit dcdd4be which fixes one leak - but creates another by failing to free the credentials handle if out of - memory. Also there's a second location a few lines down where we fail to - do same. This commit fixes both of those issues. + Signed-off-by: Johannes Schindelin -Daniel Stenberg (20 Jul 2016) -- [Saurav Babu brought this change] +- [Johannes Schindelin brought this change] - vauth: Fixed memory leak due to function returning without free + configure: allow setting the default SSL backend - This patch allocates memory to "output_token" only when it is required - so that memory is not leaked if function returns. - -- test558: updated after ipv6-check move + Previously, we used as default SSL backend whatever was first in the + `available_backends` array. - Follow-up commit to c50980807c5 to make this test pass. - -Jay Satiro (20 Jul 2016) -- connect: disable TFO on Linux when using SSL + However, some users may want to override that default without patching + the source code. - - Linux TFO + TLS is not implemented yet. + Now they can: with the --with-default-ssl-backend= option of + the ./configure script. - Bug: https://github.com/curl/curl/issues/907 - -Daniel Stenberg (19 Jul 2016) -- ROADMAP: QUIC and TLS 1.3 - -- RELEASE-NOTES: synced with c50980807c5 + Signed-off-by: Johannes Schindelin -Jay Satiro (18 Jul 2016) -- [Brian Prodoehl brought this change] +- [Johannes Schindelin brought this change] - curl_global_init: Check if IPv6 works + vtls: use Curl_ssl_multi pseudo backend only when needed - - Curl_ipv6works() is not thread-safe until after the first call, so - call it once during global init to avoid a possible race condition. + When only one SSL backend is configured, it is totally unnecessary to + let multissl_init() configure the backend at runtime, we can select the + correct backend at build time already. - Bug: https://github.com/curl/curl/issues/915 - PR: https://github.com/curl/curl/pull/918 + Signed-off-by: Johannes Schindelin -- [Timothy Polich brought this change] +- [Johannes Schindelin brought this change] - CURLMOPT_SOCKETFUNCTION.3: fix typo + version: if built with more than one SSL backend, report all of them - Closes https://github.com/curl/curl/pull/914 - -- [Miroslav Franc brought this change] - - library: Fix memory leaks found during static analysis + To discern the active one from the inactive ones, put the latter into + parentheses. - Closes https://github.com/curl/curl/pull/913 - -- [Viktor Szakats brought this change] + Signed-off-by: Johannes Schindelin - cookie.c: Fix misleading indentation - - Closes https://github.com/curl/curl/pull/911 +- [Johannes Schindelin brought this change] -- FAQ: Update FTP directory listing section for MLSD command + version: add the CURL_VERSION_MULTI_SSL feature flag - Explain how some FTP servers support the machine readable listing - format MLSD from RFC 3659 and compare it to LIST. + This new feature flag reports When cURL was built with multiple SSL + backends. - Ref: https://github.com/curl/curl/issues/906 + Signed-off-by: Johannes Schindelin -Daniel Stenberg (1 Jul 2016) -- [Sergei Nikulov brought this change] +- [Johannes Schindelin brought this change] - Appveyor: Updates for options - CURL_STATICLIB/BUILD_TESTING + metalink: allow compiling with multiple SSL backends + + Previously, the code assumed that at most one of the SSL backends would + be compiled in, emulating OpenSSL's functions if the configured backend + was not OpenSSL itself. + + However, now we allow building with multiple SSL backends and choosing + one at runtime. Therefore, metalink needs to be adjusted to handle this + scenario, too. - Closes #892 + Signed-off-by: Johannes Schindelin -- TODO: 17.4 also brings more HTTP/2 support +- [Johannes Schindelin brought this change] -- TODO: try next proxy if one doesn't work + docs/examples: demonstrate how to select SSL backends - Closes #896 - -- conn: don't free easy handle data in handler->disconnect + The newly-introduced curl_global_sslset() function deserves to be + show-cased. - Reported-by: Gou Lingfeng - Bug: https://curl.haxx.se/mail/lib-2016-06/0139.html - -- test1244: test different proxy ports same URL + Signed-off-by: Johannes Schindelin -- curl_global_init.3: improved formatting of the flags +- [Johannes Schindelin brought this change] -- curl_global_init.3: expand on the SSL and WIN32 bits purpose + Add a man page for curl_global_sslset() - Reported-by: Richard Gray - Bug: https://curl.haxx.se/mail/lib-2016-06/0136.html + Signed-off-by: Johannes Schindelin -- [Michael Kaufmann brought this change] +- [Johannes Schindelin brought this change] - cleanup: minor code cleanup in Curl_http_readwrite_headers() + vtls: introduce curl_global_sslset() - - the expression of an 'if' was always true - - a 'while' contained a condition that was always true - - use 'if(k->exp100 > EXP100_SEND_DATA)' instead of 'if(k->exp100)' - - fixed a typo + Let's add a compile time safe API to select an SSL backend. This + function needs to be called *before* curl_global_init(), and can be + called only once. - Closes #889 - -- SFTP: set a generic error when no SFTP one exists... + Side note: we do not explicitly test that it is called before + curl_global_init(), but we do verify that it is not called multiple times + (even implicitly). - ... as otherwise we could get a 0 which would count as no error and we'd - wrongly continue and could end up segfaulting. + If SSL is used before the function was called, it will use whatever the + CURL_SSL_BACKEND environment variable says (or default to the first + available SSL backend), and if a subsequent call to + curl_global_sslset() disagrees with the previous choice, it will fail + with CURLSSLSET_TOO_LATE. - Bug: https://curl.haxx.se/mail/lib-2016-06/0052.html - Reported-by: 暖和的和暖 - -- ROADMAP: http2 tests are merged, mention http2 perf - -- docs/README.md: to render nicer pages on github + The function also accepts an "avail" parameter to point to a (read-only) + NULL-terminated list of available backends. This comes in real handy if + an application wants to let the user choose between whatever SSL backends + the currently available libcurl has to offer: simply call - ... as previously the README.cmake would be picked and put at the bottom - of the docs page there and it wasn't very representative! - -- README.md: change host name for the svg logo + curl_global_sslset(-1, NULL, &avail); - rawgit.com asks to use the domain cdn.rawgit.com for production + which will return CURLSSLSET_UNKNOWN_BACKEND and populate the avail + variable to point to the relevant information to present to the user. - See #900 - -- [Viktor Szakats brought this change] - - README.md: use the SVG logo + Just like with the HTTP/2 push functions, we have to add the function + declaration of curl_global_sslset() function to the header file + *multi.h* because VMS and OS/400 require a stable order of functions + declared in include/curl/*.h (where the header files are sorted + alphabetically). This looks a bit funny, but it cannot be helped. + + Signed-off-by: Johannes Schindelin -- README.md: logo on top! +- [Johannes Schindelin brought this change] -- KNOWN_BUGS: 3.4 POP3 expects "CRLF.CRLF" eob for some + vtls: refactor out essential information about the SSL backends - Closes #740 - -- RELEASE-NOTES: synced with d61c80515aa8 + There is information about the compiled-in SSL backends that is really + no concern of any code other than the SSL backend itself, such as which + function (if any) implements SHA-256 summing. + + And there is information that is really interesting to the user, such as + the name, or the curl_sslbackend value. + + Let's factor out the latter into a publicly visible struct. This + information will be used in the upcoming API to set the SSL backend + globally. + + Signed-off-by: Johannes Schindelin -- [Michael Osipov brought this change] +- [Johannes Schindelin brought this change] - acinclude.m4: improve autodetection of CA bundle on FreeBSD + vtls: allow selecting which SSL backend to use at runtime - The FreeBSD Port security/ca_root_nss installs the Mozilla NSS CA bundle - to /usr/local/share/certs/ca-root-nss.crt. Use this bundle in the - discovery process. + When building software for the masses, it is sometimes not possible to + decide for all users which SSL backend is appropriate. - This change also removes the former FreeBSD path that has been obsolete - for 8 years since this FreeBSD ports commit: - https://svnweb.freebsd.org/ports/head/security/?view=revision&revision=215953 + Git for Windows, for example, uses cURL to perform clones, fetches and + pushes via HTTPS, and some users strongly prefer OpenSSL, while other + users really need to use Secure Channel because it offers + enterprise-ready tools to manage credentials via Windows' Credential + Store. - Closes #894 - -- configure: don't specify .lib for libs on windows + The current Git for Windows versions use the ugly work-around of + building libcurl once with OpenSSL support and once with Secure Channel + support, and switching out the binaries in the installer depending on + the user's choice. - Another follow up for crypt32.lib linking with winssl - -- configure: fix winssl LIBS change typo + Needless to say, this is a super ugly workaround that actually only + works in some cases: Git for Windows also comes in a portable form, and + in a form intended for third-party applications requiring Git + functionality, in which cases this "swap out libcurl-4.dll" simply is + not an option. - follow-up from 120bf29e - -- TODO: "TCP Fast Open" is done, add monitor pool connections - -- configure: add crypt32.lib for winssl builds + Therefore, the Git for Windows project has a vested interest in teaching + cURL to make the SSL backend a *runtime* option. - Necessary since 6cabd78531f - -- Makefile.vc: link with crypt32.lib for winssl builds + This patch makes that possible. - Necessary since 6cabd78531f + By running ./configure with multiple --with- options, cURL will + be built with multiple backends. - Fixes #853 + For the moment, the backend can be configured using the environment + variable CURL_SSL_BACKEND (valid values are e.g. "openssl" and + "schannel"). + + Signed-off-by: Johannes Schindelin -- [Joel Depooter brought this change] +- [Johannes Schindelin brought this change] - VC: Add crypt32.lib to Visual Sudio project template files + vtls: fold the backend ID into the Curl_ssl structure - Closes #854 + Signed-off-by: Johannes Schindelin -- vc: fix the build for schannel certinfo support - - Broken since 6cabd785, which adds use of the Curl_extract_certinfo - function from the x509asn1.c file. +- [Johannes Schindelin brought this change] -- typedefs: use the full structs in internal code... + curl_ntlm_core: don't complain but #include OpenSSL header if needed - ... and save the typedef'ed names for headers and external APIs. + Signed-off-by: Johannes Schindelin -- internals: rename the SessionHandle struct to Curl_easy +- [Johannes Schindelin brought this change] -- headers: forward declare CURL, CURLM and CURLSH as structs + vtls: encapsulate SSL backend-specific data - Instead of typedef'ing to void, typedef to their corresponding actual - struct names to allow compilers to type-check. + So far, all of the SSL backends' private data has been declared as + part of the ssl_connect_data struct, in one big #if .. #elif .. #endif + block. - Assisted-by: Reinhard Max - -Jay Satiro (22 Jun 2016) -- vtls: Only call add/getsession if session id is enabled + This can only work as long as the SSL backend is a compile-time option, + something we want to change in the next commits. - Prior to this change we called Curl_ssl_getsessionid and - Curl_ssl_addsessionid regardless of whether session ID reusing was - enabled. According to comments that is in case session ID reuse was - disabled but then later enabled. + Therefore, let's encapsulate the exact data needed by each SSL backend + into a private struct, and let's avoid bleeding any SSL backend-specific + information into urldata.h. This is also necessary to allow multiple SSL + backends to be compiled in at the same time, as e.g. OpenSSL's and + CyaSSL's headers cannot be included in the same .c file. - The old way was not intuitive and probably not something users expected. - When a user disables session ID caching I'd guess they don't expect the - session ID to be cached anyway in case the caching is later enabled. - -Daniel Stenberg (22 Jun 2016) -- curl.1: the used progress meter suffix is k in lower case + To avoid too many malloc() calls, we simply append the private structs + to the connectdata struct in allocate_conn(). - Closes #883 + This requires us to take extra care of alignment issues: struct fields + often need to be aligned on certain boundaries e.g. 32-bit values need to + be stored at addresses that divide evenly by 4 (= 32 bit / 8 + bit-per-byte). + + We do that by assuming that no SSL backend's private data contains any + fields that need to be aligned on boundaries larger than `long long` + (typically 64-bit) would need. Under this assumption, we simply add a + dummy field of type `long long` to the `struct connectdata` struct. This + field will never be accessed but acts as a placeholder for the four + instances of ssl_backend_data instead. the size of each ssl_backend_data + struct is stored in the SSL backend-specific metadata, to allow + allocate_conn() to know how much extra space to allocate, and how to + initialize the ssl[sockindex]->backend and proxy_ssl[sockindex]->backend + pointers. + + This would appear to be a little complicated at first, but is really + necessary to encapsulate the private data of each SSL backend correctly. + And we need to encapsulate thusly if we ever want to allow selecting + CyaSSL and OpenSSL at runtime, as their headers cannot be included within + the same .c file (there are just too many conflicting definitions and + declarations for that). + + Signed-off-by: Johannes Schindelin -- [Sergei Nikulov brought this change] +- [Johannes Schindelin brought this change] - cmake: now using BUILD_TESTING=ON/OFF + vtls: prepare the SSL backends for encapsulated private data - CMake build now using BUILD_TESTING=ON/OFF (default is OFF) to build - tests and enabling CTest integration. Options BUILD_CURL_TESTS and - BUILD_DASHBOARD_REPORTS was removed. + At the moment, cURL's SSL backend needs to be configured at build time. + As such, it is totally okay for them to hard-code their backend-specific + data in the ssl_connect_data struct. - Closes #882 + In preparation for making the SSL backend a runtime option, let's make + the access of said private data a bit more abstract so that it can be + adjusted later in an easy manner. - Reviewed-by: Brad King + Signed-off-by: Johannes Schindelin -- [Michael Kaufmann brought this change] +- [Johannes Schindelin brought this change] - cleanup: fix method names in code comments + urldata.h: move SSPI-specific #include to correct location - Closes #887 - -Kamil Dudka (21 Jun 2016) -- curl-compilers.m4: improve detection of GCC's -fvisibility= flag + In 86b889485 (sasl_gssapi: Added GSS-API based Kerberos V5 variables, + 2014-12-03), an SSPI-specific field was added to the kerberos5data + struct without moving the #include "curl_sspi.h" later in the same file. - Some builds of GCC produce output on both stdout and stderr when --help - --verbose is used. The 2>&1 redirection caused them to be arbitrarily - interleaved with each other because of stream buffering. Consequently, - grep failed to match the fvisibility= string in the mixed output, even - though the string was present in GCC's standard output. + This broke the build when SSPI was enabled, unless Secure Channel was + used as SSL backend, because it just so happens that Secure Channel also + requires "curl_sspi.h" to be #included. - This led to silently disabling symbol hiding in some builds of curl. - -Daniel Stenberg (19 Jun 2016) -- tests: fix the HTTP/2 tests + In f4739f639 (urldata: include curl_sspi.h when Windows SSPI is enabled, + 2017-02-21), this bug was fixed incorrectly: Instead of moving the + appropriate conditional #include, the Secure Channel-conditional part + was now also SSPI-conditional. - The HTTP/2 tests brought with commit bf05606ef1f were using the internal - name 'http2' for the HTTP/2 server, while in fact that name was already - used for the second instance of the HTTP server. This made tests using - the second instance (like test 2050) fail after a HTTP/2 test had run. + Fix this problem by moving the correct #include instead. - The server is now known as HTTP/2 internally and within the - section in test cases. 1700, 1701 and 1702 were updated accordingly. - -- openssl: use more 'const' to fix build warnings with 1.1.0 branch - -- curl.1: missed 'T' in the progress unit suffixes - -- curl.1: mention the unix for the progress meter + This is also required for an upcoming patch that moves all the Secure + Channel-specific stuff out of urldata.h and encapsulates it properly in + vtls/schannel.c instead. + + Signed-off-by: Johannes Schindelin -Patrick Monnerat (16 Jun 2016) -- os400: add new definitions to ILE/RPG binding. +- [Johannes Schindelin brought this change] -Daniel Stenberg (16 Jun 2016) -- openssl: fix cert check with non-DNS name fields present + urldata.h: remove support for obsolete PolarSSL version - Regression introduced in 5f5b62635 (released in 7.48.0) + Since 5017d5ada (polarssl: now require 1.3.0+, 2014-03-17), we require + a newer PolarSSL version. No need to keep code trying to support any + older version. - Reported-by: Fabian Ruff - Fixes #875 - -Dan Fandrich (16 Jun 2016) -- axtls: Use Curl_wait_ms instead of the less-portable usleep + Signed-off-by: Johannes Schindelin -- axtls: Fixed compile after compile 31c521b0 +- [Johannes Schindelin brought this change] -- tests: Added HTTP proxy keywords to tests 1141 & 1142 + getinfo: access SSL internals via Curl_ssl + + In the ongoing endeavor to abstract out all SSL backend-specific + functionality, this is the next step: Instead of hard-coding how the + different SSL backends access their internal data in getinfo.c, let's + implement backend-specific functions to do that task. + + This will also allow for switching SSL backends as a runtime option. + + Signed-off-by: Johannes Schindelin -Jay Satiro (15 Jun 2016) -- [Sergei Nikulov brought this change] +- [Johannes Schindelin brought this change] - cmake: Fix build with winldap + vtls: move SSL backends' private constants out of their header files - Bug: https://github.com/curl/curl/pull/874 - Reported-by: Sergei Nikulov + Signed-off-by: Johannes Schindelin -- CURLOPT_POSTFIELDS.3: Clarify what happens when set empty - - When CURLOPT_POSTFIELDS is set to an empty string libcurl will send a - zero-byte POST. Prior to this change it was documented as sending data - from the read callback. +- [Johannes Schindelin brought this change] + + axtls: use Curl_none_* versions of init() and cleanup() - This also changes the wording of what happens when empty or NULL so that - it's hopefully easier to understand for people whose primary language - isn't English. + There are convenient no-op versions of the init/cleanup functions now, + no need to define private ones for axTLS. - Bug: https://github.com/curl/curl/issues/862 - Reported-by: Askar Safin + Signed-off-by: Johannes Schindelin -- [Michael Wallner brought this change] +- [Johannes Schindelin brought this change] - curl_multi_socket_action.3: Fix rewording + vtls: remove obsolete declarations of SSL backend functionality + + These functions are all available via the Curl_ssl struct now, no need + to declare them separately anymore. + + As the global declarations are removed, the corresponding function + definitions are marked as file-local. The only two exceptions here are + Curl_mbedtls_shutdown() and Curl_polarssl_shutdown(): only the + declarations were removed, there are no function definitions to mark + file-local. - - Remove some erroneous text. + Please note that Curl_nss_force_init() is *still* declared globally, as + the only SSL backend-specific function, because it was introduced + specifically for the use case where cURL was compiled with + `--without-ssl --with-nss`. For details, see f3b77e561 (http_ntlm: add + support for NSS, 2010-06-27). - Closes https://github.com/curl/curl/pull/865 + Signed-off-by: Johannes Schindelin -- [Luo Jinghua brought this change] +- [Johannes Schindelin brought this change] - resolve: enable protocol family logic for synthesized IPv6 + schannel: reorder functions topologically - - Enable protocol family logic for IPv6 resolves even when support - for synthesized addresses is enabled. + The _shutdown() function calls the _session_free() function; While this + is not a problem now (because schannel.h declares both functions), a + patch looming in the immediate future with make all of these functions + file-local. - This is a follow up to the parent commit that added support for - synthesized IPv6 addresses from IPv4 on iOS/OS X. The protocol family - logic needed for IPv6 was inadvertently excluded if support for - synthesized addresses was enabled. + So let's just move the _session_free() function's definition before it + is called. - Bug: https://github.com/curl/curl/issues/863 - Ref: https://github.com/curl/curl/pull/866 - Ref: https://github.com/curl/curl/pull/867 + Signed-off-by: Johannes Schindelin -Daniel Stenberg (7 Jun 2016) -- [Luo Jinghua brought this change] +- [Johannes Schindelin brought this change] - resolve: add support for IPv6 DNS64/NAT64 Networks on OS X + iOS + axtls: reorder functions topologically - Use getaddrinfo() to resolve the IPv4 address literal on iOS/Mac OS X. - If the current network interface doesn’t support IPv4, but supports - IPv6, NAT64, and DNS64. + The connect_finish() function (like many other functions after it) calls + the Curl_axtls_close() function; While this is not a problem now + (because axtls.h declares the latter function), a patch looming in the + immediate future with make all of these functions file-local. - Closes #866 - Fixes #863 - -- tests: two more HTTP/2 tests + So let's just move the Curl_axtls_close() function's definition before + it is called. - 1701 and 1702 + Signed-off-by: Johannes Schindelin -- runtests: don't display logs when http2 server fails to start +- [Johannes Schindelin brought this change] -- runtests: make stripfile work on stdout as well + vtls: move the SUPPORT_HTTPS_PROXY flag into the Curl_ssl struct + + That will allow us to choose the SSL backend at runtime. - ... and have test 1700 use that to strip out the nghttpx server: headers + Signed-off-by: Johannes Schindelin -- http2-tests: test1700 is the first real HTTP/2 test +- [Johannes Schindelin brought this change] + + vtls: convert the have_curlssl_* constants to runtime flags - It requires that 'nghttpx' is in the PATH, and it will run the tests - using nghttpx as a front-end proxy in front of the standard HTTP/1 test - server. This uses HTTP/2 over plain TCP. + The entire idea of introducing the Curl_ssl struct to describe SSL + backends is to prepare for choosing the SSL backend at runtime. - If you like me have nghttpx installed in a custom path, you can run test 1700 - like this: + To that end, convert all the #ifdef have_curlssl_* style conditionals + to use bit flags instead. - $ PATH=$PATH:$HOME/build-nghttp2/bin/ ./runtests.pl 1700 + Signed-off-by: Johannes Schindelin -- RELEASE-NOTES: synced with 34855feeb4c299 +- [Johannes Schindelin brought this change] -Steve Holme (6 Jun 2016) -- schannel: Disable ALPN on Windows < 8.1 + vtls: move sha256sum into the Curl_ssl struct - Calling QueryContextAttributes with SECPKG_ATTR_APPLICATION_PROTOCOL - fails on Windows < 8.1 so we need to disable ALPN on these OS versions. + The SHA-256 checksumming is also an SSL backend-specific function. + Let's include it in the struct declaring the functionality of SSL + backends. - Inspiration provide by: Daniel Seither + In contrast to MD5, there is no fall-back code. To indicate this, the + respective entries are NULL for those backends that offer no support for + SHA-256 checksumming. - Closes #848 - Fixes #840 + Signed-off-by: Johannes Schindelin -Jay Satiro (5 Jun 2016) -- checksrc: Add LoadLibrary to the banned functions list - - LoadLibrary was supplanted by Curl_load_library for security - reasons in 6df916d. +- [Johannes Schindelin brought this change] -- http: Fix HTTP/2 connection reuse + vtls: move md5sum into the Curl_ssl struct - - Change the parser to not require a minor version for HTTP/2. + The MD5 summing is also an SSL backend-specific function. So let's + include it, offering the previous fall-back code as a separate function + now: Curl_none_md5sum(). To allow for that, the signature had to be + changed so that an error could be returned from the implementation + (Curl_none_md5sum() can run out of memory). - HTTP/2 connection reuse broke when we changed from HTTP/2.0 to HTTP/2 - in 8243a95 because the parser still expected a minor version. - - Bug: https://github.com/curl/curl/issues/855 - Reported-by: Andrew Robbins, Frank Gevaerts + Signed-off-by: Johannes Schindelin -Steve Holme (4 Jun 2016) -- connect.c: Fixed compilation warning from commit 332e8d6164 - - connect.c:952:5: warning: suggest explicit braces to avoid ambiguous 'else' +- [Johannes Schindelin brought this change] -- win32: Used centralised verify windows version function + vtls: use the Curl_ssl struct to access all SSL backends' functionality - Closes #845 - -- win32: Added verify windows version functionality + This is the first step to unify the SSL backend handling. Now all the + SSL backend-specific functionality is accessed via a global instance of + the Curl_ssl struct. + + Signed-off-by: Johannes Schindelin -- win32: Introduced centralised verify windows version function +- [Johannes Schindelin brought this change] -Kamil Dudka (3 Jun 2016) -- tool_urlglob: fix off-by-one error in glob_parse() + vtls: declare Curl_ssl structs for every SSL backend - ... causing SIGSEGV while parsing URL with too many globs. - Minimal example: + The idea of introducing the Curl_ssl struct was to unify how the SSL + backends are declared and called. To this end, we now provide an + instance of the Curl_ssl struct for each and every SSL backend. - $ curl $(for i in $(seq 101); do printf '{a}'; done) - - Reported-by: Romain Coltel - Bug: https://bugzilla.redhat.com/1340757 + Signed-off-by: Johannes Schindelin -Daniel Stenberg (1 Jun 2016) -- [Benjamin Kircher brought this change] +- [Johannes Schindelin brought this change] - libcurl-multi.3: fix small typo + vtls: introduce a new struct for SSL backends + + This new struct is similar in nature to Curl_handler: it will define the + functions and capabilities of all the SSL backends (where Curl_handler + defines the functions and capabilities of protocol handlers). - Closes #850 + Signed-off-by: Johannes Schindelin -- [Viktor Szakats brought this change] +- [Johannes Schindelin brought this change] - makefile.m32: add crypt32 for winssl builds + vtls: make sure every _sha256sum()'s first arg is const - Dependency added by 6cabd78 + This patch makes the signature of the _sha256sum() functions consistent + among the SSL backends, in preparation for unifying the way all SSL + backends are accessed. - Closes #849 + Signed-off-by: Johannes Schindelin -- [Ivan Avdeev brought this change] +- [Johannes Schindelin brought this change] - vtls: fix ssl session cache race condition + vtls: make sure all _data_pending() functions return bool - Sessionid cache management is inseparable from managing individual - session lifetimes. E.g. for reference-counted sessions (like those in - SChannel and OpenSSL engines) every session addition and removal - should be accompanied with refcount increment and decrement - respectively. Failing to do so synchronously leads to a race condition - that causes symptoms like use-after-free and memory corruption. - This commit: - - makes existing session cache locking explicit, thus allowing - individual engines to manage lock's scope. - - fixes OpenSSL and SChannel engines by putting refcount management - inside this lock's scope in relevant places. - - adds these explicit locking calls to other engines that use - sessionid cache to accommodate for this change. Note, however, - that it is unknown whether any of these engines could also have - this race. + This patch makes the signature of the _data_pending() functions + consistent among the SSL backends, in preparation for unifying the way + all SSL backends are accessed. - Bug: https://github.com/curl/curl/issues/815 - Fixes #815 - Closes #847 + Signed-off-by: Johannes Schindelin -- [Andrew Kurushin brought this change] +- [Johannes Schindelin brought this change] - schannel: add CURLOPT_CERTINFO support + vtls: make sure all _cleanup() functions return void + + This patch makes the signature of the _cleanup() functions consistent + among the SSL backends, in preparation for unifying the way all SSL + backends are accessed. - Closes #822 + Signed-off-by: Johannes Schindelin -- RELEASE-NOTES: synced with 142ee9fa15002315 +- [Johannes Schindelin brought this change] -- openssl: rename the private SSL_strerror + vtls: use consistent signature for _random() implementations - ... to make it not look like an OpenSSL function - -- [Michael Kaufmann brought this change] - - openssl: Use correct buffer sizes for error messages + This will make the upcoming multissl backend much easier to implement. - Closes #844 + Signed-off-by: Johannes Schindelin -- curl: fix -q [regression] +- strtooff: fix build for systems with long long but no strtoll option - This broke in 7.49.0 with commit e200034425a7625 + Closes #1829 - Fixes #842 + Reported-by: Dan Fandrich + Bug: https://github.com/curl/curl/pull/1758#issuecomment-324861615 -- URL parser: allow URLs to use one, two or three slashes +- darwinssl: handle long strings in TLS certs - Mostly in order to support broken web sites that redirect to broken URLs - that are accepted by browsers. + ... as the previous fixed length 128 bytes buffer was sometimes too + small. - Browsers are typically even more leniant than this as the WHATWG URL - spec they should allow an _infinite_ amount. I tested 8000 slashes with - Firefox and it just worked. + Fixes #1823 + Closes #1831 - Added test case 1141, 1142 and 1143 to verify the new parser. - - Closes #791 + Reported-by: Benjamin Sergeant + Assisted-by: Bill Pyne, Ray Satiro, Nick Zitzmann -- [Renaud Lehoux brought this change] +- system.h: include sys/poll.h for AIX + + ... to get the event/revent defines that might be used for the poll + struct. + + Reported-by: Michael Smith + Fixes #1828 + Closes #1833 - cmake: Added missing mbedTLS support +Dan Fandrich (26 Aug 2017) +- tests: Make sure libtests & unittests call curl_global_cleanup() - Closes #837 + These were missed in commit c468c27b. -- [Renaud Lehoux brought this change] +Jay Satiro (26 Aug 2017) +- [theantigod brought this change] - mbedtls: removed unused variables + winbuild: fix embedded manifest option - Closes #838 + Embedded manifest option didn't work due to incorrect path. + + Fixes https://github.com/curl/curl/issues/1832 + +Daniel Stenberg (25 Aug 2017) +- fuzz/Makefile.am: remove curlbuild.h leftovers -- [Frank Gevaerts brought this change] +- examples/threaded-ssl: mention that this is for openssl before 1.1 - http: add CURLINFO_HTTP_VERSION and %{http_version} +- imap: use defined names for response codes - Adds access to the effectively used http version to both libcurl and - curl. + When working on this code I found the previous setup a bit weird while + using proper defines increases readability. - Closes #799 + Closes #1824 -- bump: start the journey toward 7.50.0 +- CURLOPT_USERPWD.3: see also CURLOPT_PROXYUSERPWD -- [Marcel Raad brought this change] +- imap: support PREAUTH + + It is a defined possible greeting at server startup that means the + connection is already authenticated. See + https://tools.ietf.org/html/rfc3501#section-7.1.4 + + Test 846 added to verify. + + Fixes #1818 + Closes #1820 - openssl: fix build with OPENSSL_NO_COMP +Jay Satiro (23 Aug 2017) +- config-tpf: define SIZEOF_LONG - With OPENSSL_NO_COMP defined, there is no function - SSL_COMP_free_compression_methods + Recent changes that replaced CURL_SIZEOF_LONG in the source with + SIZEOF_LONG broke builds that use the premade configuration files and + don't have SIZEOF_LONG defined. - Closes #836 + Bug: https://github.com/curl/curl/issues/1816 + +Dan Fandrich (23 Aug 2017) +- test1453: Fixed +Daniel Stenberg (22 Aug 2017) - [Gisle Vanem brought this change] - memdebug: fix MSVC crash with -DMEMDEBUG_LOG_SYNC + config-dos: add missing defines, SIZEOF_* and two others - Fixes #828 + Bug: #1816 -- [Jonathan brought this change] - - README.md: polish +- curl: shorten and clean up CA cert verification error message + + The previous message was just too long for ordinary people and it was + encouraging users to use `--insecure` a little too easy. - Closes #834 + Based-on-work-by: Frank Denis + + Closes #1810 + Closes #1817 -- RELEASE-NOTES: fix vuln link +- request-target.d: mention added in 7.55.0 -Version 7.49.1 (30 May 2016) +Marcel Raad (22 Aug 2017) +- tool_main: turn off MinGW CRT's globbing + + By default, the MinGW CRT globs command-line arguments. This prevents + getting a single asterisk into an argument as test 1299 does. Turn off + globbing by setting the global variable _CRT_glob to 0 for MinGW. + + Fixes https://github.com/curl/curl/issues/1751 + Closes https://github.com/curl/curl/pull/1813 -Daniel Stenberg (30 May 2016) -- RELEASE-NOTES: 7.49.1 +Viktor Szakats (22 Aug 2017) +- makefile.m32: add support for libidn2 + + libidn was replaced with libidn2 last year in configure. + Caveat: libidn2 may depend on a list of further libs. + These can be manually specified via CURL_LDFLAG_EXTRAS. + + Closes https://github.com/curl/curl/pull/1815 -- [Steve Holme brought this change] +Jay Satiro (22 Aug 2017) +- [Viktor Szakats brought this change] - loadlibrary: Only load system DLLs from the system directory + config-win32: define SIZEOF_LONG + + Recent changes that replaced CURL_SIZEOF_LONG in the source with + SIZEOF_LONG broke builds that use the premade configuration files and + don't have SIZEOF_LONG defined. - Inspiration provided by: Daniel Stenberg and Ray Satiro + Closes https://github.com/curl/curl/pull/1814 + +Daniel Stenberg (20 Aug 2017) +- cmake: enable picky compiler options with clang and gcc - Bug: https://curl.haxx.se/docs/adv_20160530.html + closes #1799 + +- curl/system.h: fix build for hppa - Ref: Windows DLL hijacking with curl, CVE-2016-4802 + Reported-by: John David Anglin + Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872502#10 -- ssh: fix version number check typo +- [Even Rouault brought this change] -Jay Satiro (29 May 2016) -- curl_share_setopt.3: Add min ver needed for ssl session lock + tftp: fix memory leak on too long filename + + Fixes + + $ valgrind --leak-check=full ~/install-curl-git/bin/curl tftp://localhost/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz - Bug: https://github.com/curl/curl/issues/826 - Reported-by: Michael Wallner + ==9752== Memcheck, a memory error detector + ==9752== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. + ==9752== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info + ==9752== Command: /home/even/install-curl-git/bin/curl tftp://localhost/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz + ==9752== + curl: (71) TFTP file name too long + + ==9752== + ==9752== HEAP SUMMARY: + ==9752== 505 bytes in 1 blocks are definitely lost in loss record 11 of 11 + ==9752== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + ==9752== by 0x4E61CED: Curl_urldecode (in /home/even/install-curl-git/lib/libcurl.so.4.4.0) + ==9752== by 0x4E75868: tftp_state_machine (in /home/even/install-curl-git/lib/libcurl.so.4.4.0) + ==9752== by 0x4E761B6: tftp_do (in /home/even/install-curl-git/lib/libcurl.so.4.4.0) + ==9752== by 0x4E711B6: multi_runsingle (in /home/even/install-curl-git/lib/libcurl.so.4.4.0) + ==9752== by 0x4E71D00: curl_multi_perform (in /home/even/install-curl-git/lib/libcurl.so.4.4.0) + ==9752== by 0x4E6950D: curl_easy_perform (in /home/even/install-curl-git/lib/libcurl.so.4.4.0) + ==9752== by 0x40E0B7: operate_do (in /home/even/install-curl-git/bin/curl) + ==9752== by 0x40E849: operate (in /home/even/install-curl-git/bin/curl) + ==9752== by 0x402693: main (in /home/even/install-curl-git/bin/curl) + + Fixes https://oss-fuzz.com/v2/testcase-detail/5232311106797568 + Credit to OSS Fuzz + + Closes #1808 -Daniel Stenberg (29 May 2016) -- ssh: fix build for libssh2 before 1.2.6 +Dan Fandrich (19 Aug 2017) +- runtests: fixed case insensitive matching of keywords - The statvfs functionality was added to libssh2 in that version, so we - switch off that functionality when built with older libraries. + Commit 5c2aac71 didn't work in the case of mixed-case keywords given on + the command-line. + +- tests: Make sure libtests call curl_global_cleanup() - Fixes #831 + This ensures that global data allocations are freed so Valgrind stays + happy. This was a problem with at least PolarSSL and mbedTLS. + +Daniel Stenberg (18 Aug 2017) +- RELEASE-NOTES: synced with 8baead425 + +- scripts/contri*sh: use "git log --use-mailmap" + +- mailmap: de-duplify some git authors -- mbedtls: fix includes so snprintf() works +- http2_recv: return error better on fatal h2 errors - Regression from the previous *printf() rearrangements, this file missed to - include the correct header to make sure snprintf() works universally. + Ref #1012 + Figured-out-by: Tatsuhiro Tsujikawa + +- KNOWN_BUGS: HTTP test server 'connection-monitor' problems - Reported-by: Moti Avrahami - Bug: https://curl.haxx.se/mail/lib-2016-05/0196.html + Closes #868 -Steve Holme (23 May 2016) -- checksrc.pl: Added variants of strcat() & strncat() to banned function list +- curl/system.h: check for __ppc__ as well + + ... regression since issue #1774 (commit 10b3df10596a) since obviously + some older gcc doesn't know __powerpc__ while some newer doesn't know + __ppc__ ... - Added support for checking the tchar, unicode and mbcs variants of - strcat() and strncat() in the banned function list. + Fixes #1797 + Closes #1798 + Reported-by: Ryan Schmidt -Daniel Stenberg (23 May 2016) -- smtp: minor ident (white space) fixes +- [Jan Alexander Steffens (heftig) brought this change] -- THANKS: updated after script fixes + http: Don't wait on CONNECT when there is no proxy + + Since curl 7.55.0, NetworkManager almost always failed its connectivity + check by timeout. I bisected this to 5113ad04 (http-proxy: do the HTTP + CONNECT process entirely non-blocking). - Now giving credit properly to github user names, fixed some UTF-8 issues - and added names discovered when contrithanks was improved. + This patch replaces !Curl_connect_complete with Curl_connect_ongoing, + which returns false if the CONNECT state was left uninitialized and lets + the connection continue. + + Closes #1803 + Fixes #1804 + + Also-fixed-by: Gergely Nagy -- THANKS-filter: more name cleanups +- [Johannes Schindelin brought this change] -- contrithanks.sh: exclude existing names case insensitively + metalink: adjust source code style + + Signed-off-by: Johannes Schindelin -- contrithanks.sh: use same grep pattern and -a flag as contributors.sh +- CURL_SIZEOF_LONG: removed, use only SIZEOF_LONG -- contributors.sh: better grep pattern, use grep -a +- lib557: no longer use CURL_SIZEOF_* defines -- THANKS-filter: fix more names +- config-win32: define SIZEOF_CURL_OFF_T -- contrithanks.sh: do the same github fix as contributors.sh - - from 1577bfa35ba +- cmake: sizeof curl_off_t, remove unused detections -Jay Satiro (23 May 2016) -- contributors: Show GitHub username if real name unknown +- system.h: remove all CURL_SIZEOF_* defines - Prior to this change if a GitHub contributor's real name was unknown - they would be omitted from the list. + ... as they're not used externally and internally we check for the sizes + already in configure etc. - Bug: https://github.com/curl/curl/issues/824 - -Daniel Stenberg (21 May 2016) -- RELEASE-NOTES: synced with 3caaeffbe8ded4 + Closes #1767 -Jay Satiro (20 May 2016) -- openssl: cleanup must free compression methods +- ftp: fix CWD when doing multicwd then nocwd on same connection - - Free compression methods if OpenSSL 1.0.2 to avoid a memory leak. + Fixes #1782 + Closes #1787 + Reported-by: Peter Lamare + +- CURLOPT_SSH_COMPRESSION.3: enable with 1L - Bug: https://github.com/curl/curl/issues/817 - Reported-by: jveazey@users.noreply.github.com + (leaves other values reserved for the future) -Daniel Stenberg (20 May 2016) -- [Gisle Vanem brought this change] +- compressed-ssh.d: "Added: 7.56.0" + +- curl/system.h: checksrc compliance + +Jay Satiro (17 Aug 2017) +- [Viktor Szakats brought this change] - curl_multibyte: fix compiler error + ssh: add the ability to enable compression (for SCP/SFTP) + + The required low-level logic was already available as part of + `libssh2` (via `LIBSSH2_FLAG_COMPRESS` `libssh2_session_flag()`[1] + option.) - While compiling lib/curl_multibyte.c with '-DUSE_WIN32_IDN' etc. I was - getting: + This patch adds the new `libcurl` option `CURLOPT_SSH_COMPRESSION` + (boolean) and the new `curl` command-line option `--compressed-ssh` + to request this `libssh2` feature. To have compression enabled, it + is required that the SSH server supports a (zlib) compatible + compression method and that `libssh2` was built with `zlib` support + enabled. - f:\mingw32\src\inet\curl\lib\memdebug.h(38): error C2054: expected '(' - to follow 'CURL_EXTERN' + [1] https://www.libssh2.org/libssh2_session_flag.html - f:\mingw32\src\inet\curl\lib\memdebug.h(38): error C2085: - 'curl_domalloc': not in formal parameter list + Ref: https://github.com/curl/curl/issues/1732 + Closes https://github.com/curl/curl/pull/1735 -- THANKS-filter: make Jan-E get proper credit +- examples/ftpuploadresume: checksrc compliance -- [Jan-E brought this change] +- [Maksim Stsepanenka brought this change] - winbuild/Makefile.vc: Fix check on SSL, MBEDTLS, WINSSL exclusivity + http_proxy: fix build error for CURL_DOES_CONVERSIONS - Closes #818 + Closes https://github.com/curl/curl/pull/1793 -- [Alexander Traud brought this change] +GitHub (16 Aug 2017) +- [Nick Zitzmann brought this change] - libcurl.m4: Avoid obsolete warning + configure: check for __builtin_available() availability (#1788) - Closes #821 + This change does two things: + 1. It un-breaks the build in Xcode 9.0. (Xcode 9.0 is currently + failing trying to compile connectx() in lib/connect.c.) + 2. It finally weak-links the connectx() function, and falls back on + connect() when run on older operating systems. -Jay Satiro (20 May 2016) -- [Michael Kaufmann brought this change] +Daniel Stenberg (16 Aug 2017) +- travis: add metalink to some osx builds + + Closes #1790 + +- [Max Dymond brought this change] - CURLOPT_CONNECT_TO.3: user must not free the list prematurely + coverage: Use two coveralls commands to get lib/vtls results - The connect-to list isn't copied so as long as the handle may be used - for a transfer the list must be valid. + closes #1747 + +- darwinssi: fix error: variable length array used + +- m4/curl-compilers.m4: use proper quotes around string, not backticks - Bug: https://github.com/curl/curl/pull/819 - Reported-by: Michael Kaufmann + ... when setting clang version to assume 3.7 + + Caused a lot of "integer expression expected" warnings by configure. -Daniel Stenberg (19 May 2016) -- RELEASE-NOTES: synced with 48114a8634242c +- [Benbuck Nason brought this change] -- openssl: ERR_remove_thread_state() is deprecated in latest 1.1.0 + cmake: remove dead code for DISABLED_THREADSAFE - See OpenSSL commit 21e001747d4a + Closes #1786 -- http2: use HTTP/2 in the HTTP/1.1-alike header +Jay Satiro (15 Aug 2017) +- [Jakub Zakrzewski brought this change] + + curl-confopts.m4: fix --disable-threaded-resolver - ... when generating them, not "2.0" as the protocol is called just - HTTP/2 and nothing else. + Closes https://github.com/curl/curl/issues/1784 + +Daniel Stenberg (15 Aug 2017) +- [Ryan Winograd brought this change] -Jay Satiro (19 May 2016) -- dist: include curl_multi_socket_all.3 + progress: Track total times following redirects + + Update the progress timers `t_nslookup`, `t_connect`, `t_appconnect`, + `t_pretransfer`, and `t_starttransfer` to track the total times for + these activities when a redirect is followed. Previously, only the times + for the most recent request would be tracked. - Closes https://github.com/curl/curl/pull/816 + Related changes: + + - Rename `Curl_pgrsResetTimesSizes` to `Curl_pgrsResetTransferSizes` + now that the function only resets transfer sizes and no longer + modifies any of the progress timers. + + - Add a bool to the `Progress` struct that is used to prevent + double-counting `t_starttransfer` times. + + Added test case 1399. + + Fixes #522 and Known Bug 1.8 + Closes #1602 + Reported-by: joshhe on github + +- [Benbuck Nason brought this change] -Steve Holme (18 May 2016) -- bump: Start work on 7.49.1 + cmake: remove dead code for CURL_DISABLE_RTMP + + Closes #1785 -Daniel Stenberg (18 May 2016) -- curlbuild.h.dist: check __LP64__ as well to fix MIPS build +Kamil Dudka (15 Aug 2017) +- zsh.pl: produce a working completion script again - The preprocessor check that sets up the 32bit defines for non-configure - builds didn't work properly for MIPS systems as __mips__ is defined for - both 32bit and 64bit. Now __LP64__ is also checked and indicates 64bit. + Commit curl-7_54_0-118-g8b2f22e changed the output format of curl --help + to use and instead of FILE and DIR, which caused zsh.pl to + produce a broken completion script: - Reported-by: Tomas Jakobsson - Fixes #813 + % curl -- + _curl:10: no such file or directory: seconds + + Closes #1779 + +Daniel Stenberg (15 Aug 2017) +- curlver: toward 7.56.0? -- [Marcel Raad brought this change] +- RELEASE-NOTES: synced with 91c46dc44 - schannel: fix compile break with MSVC XP toolset +- test1449: FTP download range with an too large size + +- strtoofft: reduce integer overflow risks globally - For the Windows XP toolset of Visual C++ 2013/2015, the old Windows SDK - 7.1 is used. In this case, _USING_V110_SDK71_ is defined. + ... make sure we bail out on overflows. - Closes #812 + Reported-by: Brian Carpenter + Closes #1758 -- dist: include CHECKSRC.md +- travis: build the examples too + + to make sure they keep building warning-free - Reported-by: Paul Howarth - Bug: https://curl.haxx.se/mail/lib-2016-05/0116.html + Closes #1777 -- test/Makefile.am: include manpage-scan.pl and nroff-scan.pl in dist +- runtests: match keywords case insensitively + +- examples/ftpuploadresume.c: use portable code - Reported-by: Ray Satiro - Bug: https://curl.haxx.se/mail/lib-2016-05/0113.html + ... converted from the MS specific _snscanf() + +Version 7.55.1 (13 Aug 2017) -Version 7.49.0 (17 May 2016) +Daniel Stenberg (13 Aug 2017) +- RELEASE-NOTES/THANKS: curl 7.55.1 release time -Daniel Stenberg (17 May 2016) -- THANKS: 24 new names from 7.49.0 release notes +- gitignore: ignore .xz now instead of .lzma -- RELEASE-NOTES: 7.49.0 +- [Sergei Nikulov brought this change] -- mbedtls/polarssl: set "hostname" unconditionally + cmake: Threads detection update. ref: #1702 - ...as otherwise the TLS libs will skip the CN/SAN check and just allow - connection to any server. curl previously skipped this function when SNI - wasn't used or when connecting to an IP address specified host. + Closes #1719 + +- ipv6_scope: support unique local addresses + + Fixes #1764 + Closes #1773 + Reported-by: James Slaughter + +- [Alex Potapenko brought this change] + + curl/system.h: GCC doesn't define __ppc__ on PowerPC, uses __powerpc__ - CVE-2016-3739 + Closes #1774 + +- test1448: verify redirect to IDN using URL - Bug: https://curl.haxx.se/docs/adv_20160518A.html - Reported-by: Moti Avrahami + Closes #1772 -- [Frank Gevaerts brought this change] +- [Salah-Eddin Shaban brought this change] - CURLOPT_RESOLVE.3: fix typo + redirect: skip URL encoding for host names + + This fixes redirects to IDN URLs - Closes #811 + Fixes #1441 + Closes #1762 + Reported by: David Lord -- docs: CURLOPT_RESOLVE overrides CURLOPT_IPRESOLVE +- test2032: mark as flaky (again) -- KNOWN_BUGS: GnuTLS backend skips really long certificate fields +- travis: test cmake build on tarball too - Closes #762 + Could've prevented #1755 -- CURLOPT_HTTPPOST.3: the data needs to be around while in use +- [Simon Warta brought this change] -- openssl: get_cert_chain: fix NULL dereference + cmake: allow user to override CMAKE_DEBUG_POSTFIX - CID 1361815: Explicit null dereferenced (FORWARD_NULL) + Closes #1763 + +- connect-to.d: better language -- openssl: get_cert_chain: avoid NULL dereference +- connect-to.d: clarified + +- bagder/Curl_tvdiff_us: fix the math + + Regression since adef394ac5 (released in 7.55.0) - CID 1361811: Explicit null dereferenced (FORWARD_NULL) + Reported-by: Han Qiao + Fixes #1769 + Closes #1771 -- dprintf_formatf: fix (false?) Coverity warning +- curl/system.h: add Oracle Solaris Studio - CID 1024412: Memory - illegal accesses (OVERRUN). Claimed to happen when - we run over 'workend' but the condition says <= workend and for all I - can see it should be safe. Compensating for the warning by adding a byte - margin in the buffer. + Fixes #1752 + +- [Alessandro Ghedini brought this change] + + docs: fix typo funtion -> function - Also, removed the extra brace level indentation in the code and made it - so that 'workend' is only assigned once within the function. + Closes #1770 -- RELEASE-NOTES: synced with 2dcb5adc72d6 +Alessandro Ghedini (12 Aug 2017) +- docs: fix grammar in CURL_SSLVERSION_MAX_DEFAULT description -- THANKS-filter: fixed Jonathan Cardoso +- docs: fix typo stuct -> struct -Jay Satiro (15 May 2016) -- ftp: fix incorrect out-of-memory code in Curl_pretransfer +Dan Fandrich (12 Aug 2017) +- test1447: require a curl with http support + +Daniel Stenberg (11 Aug 2017) +- [Thomas Petazzoni brought this change] + + curl/system.h: support more architectures - - Return value type must match function type. + The long list of architectures in include/curl/system.h is annoying to + maintain, and needs to be extended for each and every architecture to + support. - s/CURLM_OUT_OF_MEMORY/CURLE_OUT_OF_MEMORY/ + Instead, let's rely on the __SIZEOF_LONG__ define of the gcc compiler + (we are in the GNUC condition anyway), which tells us if long is 4 + bytes or 8 bytes. - Caught by Travis CI - -Daniel Stenberg (15 May 2016) -- ftp wildcard: segfault due to init only in multi_perform + This fixes the build of libcurl 7.55.0 on architectures such as + OpenRISC or ARC. - The proper FTP wildcard init is now more properly done in Curl_pretransfer() - and the corresponding cleanup in Curl_close(). + Closes #1766 - The previous place of init/cleanup code made the internal pointer to be NULL - when this feature was used with the multi_socket() API, as it was made within - the curl_multi_perform() function. + Signed-off-by: Thomas Petazzoni + +- test2033: this went flaky again - Reported-by: Jonathan Cardoso Machado - Fixes #800 + Suspicion: when we enabled the threaded resolver by default. + +- test1447: verifies the parse proxy fix in 6e0e152ce5c + +- [Even Rouault brought this change] -Jay Satiro (13 May 2016) -- libcurl-tlibcurl-thread: Update OpenSSL links + parse_proxy(): fix memory leak in case of invalid proxy server name - Because the old OpenSSL link now redirects to their master documentation - (currently 1.1.0), which does not document the required actions for - OpenSSL <= 1.0.2. + Fixes the below leak: + + $ valgrind --leak-check=full ~/install-curl-git/bin/curl --proxy "http://a:b@/x" http://127.0.0.1 + curl: (5) Couldn't resolve proxy name + ==5048== + ==5048== HEAP SUMMARY: + ==5048== in use at exit: 532 bytes in 12 blocks + ==5048== total heap usage: 5,288 allocs, 5,276 frees, 445,271 bytes allocated + ==5048== + ==5048== 2 bytes in 1 blocks are definitely lost in loss record 1 of 12 + ==5048== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + ==5048== by 0x4E6CB79: parse_login_details (url.c:5614) + ==5048== by 0x4E6BA82: parse_proxy (url.c:5091) + ==5048== by 0x4E6C46D: create_conn_helper_init_proxy (url.c:5346) + ==5048== by 0x4E6EA18: create_conn (url.c:6498) + ==5048== by 0x4E6F9B4: Curl_connect (url.c:6967) + ==5048== by 0x4E86D05: multi_runsingle (multi.c:1436) + ==5048== by 0x4E88432: curl_multi_perform (multi.c:2160) + ==5048== by 0x4E7C515: easy_transfer (easy.c:708) + ==5048== by 0x4E7C74A: easy_perform (easy.c:794) + ==5048== by 0x4E7C7B1: curl_easy_perform (easy.c:813) + ==5048== by 0x414025: operate_do (tool_operate.c:1563) + ==5048== + ==5048== 2 bytes in 1 blocks are definitely lost in loss record 2 of 12 + ==5048== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + ==5048== by 0x4E6CBB6: parse_login_details (url.c:5621) + ==5048== by 0x4E6BA82: parse_proxy (url.c:5091) + ==5048== by 0x4E6C46D: create_conn_helper_init_proxy (url.c:5346) + ==5048== by 0x4E6EA18: create_conn (url.c:6498) + ==5048== by 0x4E6F9B4: Curl_connect (url.c:6967) + ==5048== by 0x4E86D05: multi_runsingle (multi.c:1436) + ==5048== by 0x4E88432: curl_multi_perform (multi.c:2160) + ==5048== by 0x4E7C515: easy_transfer (easy.c:708) + ==5048== by 0x4E7C74A: easy_perform (easy.c:794) + ==5048== by 0x4E7C7B1: curl_easy_perform (easy.c:813) + ==5048== by 0x414025: operate_do (tool_operate.c:1563) + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2984 + Credit to OSS Fuzz for discovery + + Closes #1761 -Daniel Stenberg (13 May 2016) -- [Viktor Szakats brought this change] +- RELEASE-NOTES: synced with 37f2195a9 - darwinssl.c: fix OS X codename typo in comment +- curlver: bump to 7.55.1 -- RELEASE-NOTES: synced with 68701e51c1f7 +- openssl: fix "error: this statement may fall through" - Added 8 bug fixes and 5 more contrbutors + A gcc7 warning. -- [Jay Satiro brought this change] +- [David Benjamin brought this change] - mprintf: Fix processing of width and prec args + openssl: remove CONST_ASN1_BIT_STRING. + + Just making the pointer as const works for the pre-1.1.0 path too. - Prior to this change a width arg could be erroneously output, and also - width and precision args could not be used together without crashing. + Closes #1759 + +- maketgz: remove old *.dist files before making the tarball - "%0*d%s", 2, 9, "foo" + To avoid "old crap" unintentionally getting shipped. - Before: "092" - After: "09foo" + Bug: https://curl.haxx.se/mail/lib-2017-08/0050.html + Reported-by: Christian Weisgerber + +Jay Satiro (10 Aug 2017) +- mkhelp.pl: allow executing this script directly - "%*.*s", 5, 2, "foo" + - Enable execute permission (chmod +x) - Before: crash - After: " fo" + - Change interpreter to /usr/bin/env perl - Test 557 is updated to verify this and more + Ref: https://github.com/curl/curl/issues/1743 -- [Michael Kaufmann brought this change] +Daniel Stenberg (10 Aug 2017) +- configure: use the threaded resolver backend by default if possible + + Closes #1647 - ConnectionExists: follow-up fix for proxy re-use +- cmake: move cmake_uninstall.cmake to CMake/ - Follow-up commit to 5823179 + Closes #1756 + +- metalink: fix error: ‘*’ in boolean context, suggest ‘&&’ instead + +- dist: fix the cmake build by shipping cmake_uninstall.cmake.in too - Closes #648 + Fixes #1755 -- [Per Malmberg brought this change] +- travis: verify "make install" + + Help-by: Jay Satiro + Closes #1753 - darwinssl: fix certificate verification disable on OS X 10.8 +Marcel Raad (10 Aug 2017) +- build: check out *.sln files with Windows line endings - The new way of disabling certificate verification doesn't work on - Mountain Lion (OS X 10.8) so we need to use the old way in that version - too. I've tested this solution on versions 10.7.5, 10.8, 10.9, 10.10.2 - and 10.11. + Visual Studio doesn't like LF line endings in solution files and always + converts them to CRLF when doing changes to the solution. Notably, this + affects the solutions in the release archive. - Closes #802 + Closes https://github.com/curl/curl/pull/1746 -- [Cory Benfield brought this change] +- gitignore: ignore top-level .vs folder + + This folder is generated when using the CMake build system from within + Visual Studio. + + Closes https://github.com/curl/curl/pull/1746 - http2: Add space between colon and header value +Jay Satiro (10 Aug 2017) +- digest_sspi: Don't reuse context if the user/passwd has changed - curl's representation of HTTP/2 responses involves transforming the - response to a format that is similar to HTTP/1.1. Prior to this change, - curl would do this by separating header names and values with only a - colon, without introducing a space after the colon. + Bug: https://github.com/curl/curl/issues/1685 + Reported-by: paulharris@users.noreply.github.com - While this is technically a valid way to represent a HTTP/1.1 header - block, it is much more common to see a space following the colon. This - change introduces that space, to ensure that incautious tools are safely - able to parse the header block. + Assisted-by: Isaac Boukris - This also ensures that the difference between the HTTP/1.1 and HTTP/2 - response layout is as minimal as possible. + Closes https://github.com/curl/curl/pull/1742 + +Daniel Stenberg (9 Aug 2017) +- [Adam Sampson brought this change] + + dist: Add dictserver.py/negtelnetserver.py to EXTRA_DIST - Bug: https://github.com/curl/curl/issues/797 + These weren't included in the 7.55.0 release, but are required in order + to run the full test suite. - Closes #798 - Fixes #797 + Closes #1744 + +- [Adam Sampson brought this change] -Kamil Dudka (12 May 2016) -- openssl: fix compile-time warning in Curl_ossl_check_cxn() + curl: do bounds check using a double comparison + + The fix for this in 8661a0aacc01492e0436275ff36a21734f2541bb wasn't + complete: if the parsed number in num is larger than will fit in a long, + the conversion is undefined behaviour (causing test1427 to fail for me + on IA32 with GCC 7.1, although it passes on AMD64 and ARMv7). Getting + rid of the cast means the comparison will be done using doubles. - ... introduced in curl-7_48_0-293-g2968c83: + It might make more sense for the max argument to also be a double... - Error: COMPILER_WARNING: - lib/vtls/openssl.c: scope_hint: In function ‘Curl_ossl_check_cxn’ - lib/vtls/openssl.c:767:15: warning: conversion to ‘int’ from ‘ssize_t’ - may alter its value [-Wconversion] + Fixes #1750 + Closes #1749 -Jay Satiro (11 May 2016) -- openssl: stricter connection check function +- make install: add 8 missing man pages to the installation + +- build: fix 'make install' with configure, install docs/libcurl/* too - - In the case of recv error, limit returning 'connection still in place' - to EINPROGRESS, EAGAIN and EWOULDBLOCK. + Broken since d24838d4da9faa - This is an improvement on the parent commit which changed the openssl - connection check to use recv MSG_PEEK instead of SSL_peek. + Reported-by: Bernard Spil + +Version 7.55.0 (9 Aug 2017) + +Daniel Stenberg (9 Aug 2017) +- RELEASE-NOTES: curl 7.55.0 + +- THANKS: 20 new contributors in 7.55.0 + +- [Viktor Szakats brought this change] + + docs/comments: Update to secure URL versions - Ref: https://github.com/curl/curl/commit/856baf5#comments + Closes #1741 -Daniel Stenberg (11 May 2016) -- [Anders Bakken brought this change] +- configure: fix recv/send/select detection on Android + + ... since they now provide several functions as + __attribute__((overloadable)), the argument detection logic need + updates. + + Patched-by: destman at github + + Fixes #1738 + Closes #1739 - TLS: SSL_peek is not a const operation +Marcel Raad (8 Aug 2017) +- ax_code_coverage.m4: update to latest version - Calling SSL_peek can cause bytes to be read from the raw socket which in - turn can upset the select machinery that determines whether there's data - available on the socket. + This updates the script to aad5ad5fedb306b39f901a899b7bd305b66c418d + from August 01, 2017. Notably, this removes the lconv version whitelist. - Since Curl_ossl_check_cxn only tries to determine whether the socket is - alive and doesn't actually need to see the bytes SSL_peek seems like - the wrong function to call. + Closes https://github.com/curl/curl/pull/1716 + +Daniel Stenberg (7 Aug 2017) +- test1427: verify command line parser integer overflow detection + +- curl: detect and bail out early on parameter integer overflows - We're able to occasionally reproduce a connect timeout due to this - bug. What happens is that Curl doesn't know to call SSL_connect again - after the peek happens since data is buffered in the SSL buffer and thus - select won't fire for this socket. + Make the number parser aware of the maximum limit curl accepts for a + value and return an error immediately if larger, instead of running an + integer overflow later. - Closes #795 + Fixes #1730 + Closes #1736 -Jay Satiro (9 May 2016) -- [Daniel Stenberg brought this change] +- glob: do not continue parsing after a strtoul() overflow range + + Added test 1289 to verify. + + CVE-2017-1000101 + + Bug: https://curl.haxx.se/docs/adv_20170809A.html + Reported-by: Brian Carpenter - TLS: move the ALPN/NPN enable bits to the connection +- tftp: reject file name lengths that don't fit - Only protocols that actually have a protocol registered for ALPN and NPN - should try to get that negotiated in the TLS handshake. That is only - HTTPS (well, http/1.1 and http/2) right now. Previously ALPN and NPN - would wrongly be used in all handshakes if libcurl was built with it - enabled. + ... and thereby avoid telling send() to send off more bytes than the + size of the buffer! - Reported-by: Jay Satiro + CVE-2017-1000100 + + Bug: https://curl.haxx.se/docs/adv_20170809B.html + Reported-by: Even Rouault - Fixes #789 + Credit to OSS-Fuzz for the discovery -Daniel Stenberg (8 May 2016) -- libcurl-thread.3: openssl 1.1.0 is safe, and so is boringssl +- [Even Rouault brought this change] -- [Antonio Larrosa brought this change] + file: output the correct buffer to the user + + Regression brought by 7c312f84ea930d8 (April 2017) + + CVE-2017-1000099 + + Bug: https://curl.haxx.se/docs/adv_20170809C.html + + Credit to OSS-Fuzz for the discovery - connect: fix invalid "Network is unreachable" errors +- easy_events: make event data static - Sometimes, in systems with both ipv4 and ipv6 addresses but where the - network doesn't support ipv6, Curl_is_connected returns an error - (intermittently) even if the ipv4 socket connects successfully. + First: this function is only used in debug-builds and not in + release/real builds. It is used to drive tests using the event-based + API. - This happens because there's a for-loop that iterates on the sockets but - the error variable is not resetted when the ipv4 is checked and is ok. + A pointer to the local struct is passed to CURLMOPT_TIMERDATA, but the + CURLMOPT_TIMERFUNCTION calback can in fact be called even after this + funtion returns, namely when curl_multi_remove_handle() is called. - This patch fixes this problem by setting error to 0 when checking the - second socket and not having a result yet. + Reported-by: Brian Carpenter + +- getparameter: avoid returning uninitialized 'usedarg' - Fixes #794 + Fixes #1728 -Jay Satiro (5 May 2016) -- FAQ: refer to thread safety guidelines +Marcel Raad (5 Aug 2017) +- [Isaac Boukris brought this change] -Daniel Stenberg (3 May 2016) -- connections: non-HTTP proxies on different ports aren't reused either + gssapi: fix memory leak of output token in multi round context - Reported-by: Oleg Pudeyev and fuchaoqun + When multiple rounds are needed to establish a security context + (usually ntlm), we overwrite old token with a new one without free. + Found by proposed gss tests using stub a gss implementation (by + valgrind error), though I have confirmed the leak with a real + gssapi implementation as well. - Fixes #648 + Closes https://github.com/curl/curl/pull/1733 -- http: make sure a blank header overrides accept_decoding +- darwinssl: fix compiler warning - Reported-by: rcanavan - Assisted-by: Isaac Boukris - Closes #785 + clang complains: + vtls/darwinssl.c:40:8: error: extra tokens at end of #endif directive + [-Werror,-Wextra-tokens] + + This breaks the darwinssl build on Travis. Fix it by making this token + a comment. + + Closes https://github.com/curl/curl/pull/1734 -- CHECKSRC.md: clarified, explained the whitelist file +- CMake: fix CURL_WERROR for MSVC + + When using CURL_WERROR in MSVC builds, the debug flags were overridden + by the release flags and /WX got added twice in debug mode. + + Closes https://github.com/curl/curl/pull/1715 + +Daniel Stenberg (4 Aug 2017) +- RELEASE-NOTES: synced with 561e9217c -- nroff-scan.pl: verify that references are made with \fI +- test1010: verify that #1718 is fixed + + ... by doing two transfers in nocwd mode and check that there's no + superfluous CWD command. -- docs: unified man page references to use \fI +- FTP: skip unnecessary CWD when in nocwd mode + + ... when reusing a connection. If it didn't do any CWD previously. + + Fixes #1718 -- TODO: 17.14 --fail without --location should treat 3xx as a failure +Marcel Raad (4 Aug 2017) +- travis: explicitly specify dist - Closes #727 + This makes the builds more reproducible as travis is currently rolling + out trusty as default dist [1]. Specifically, this avoids coverage + check failures when trusty is used as seen in [2] until we figure out + what's wrong. + + [1] https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming + [2] https://github.com/curl/curl/pull/1692 + + Closes https://github.com/curl/curl/pull/1725 -- RELEASE-NOTES: synced with 7987f5cb14d +Daniel Stenberg (4 Aug 2017) +- travis: BUILD_TYPE => T + + (to make the full line appear nicer on travis web UI) -- [Isaac Boukris brought this change] +- travis: add osx build with darwinssl + + Closes #1706 - CURLOPT_ACCEPT_ENCODING.3: Follow-up clarification +- darwin: silence compiler warnings - Mention possible content-length mismatch with sum of bytes reported - by write callbacks when auto decoding is enabled. + With a clang pragma and three type fixes - See #785 + Fixes #1722 -- test1140: run nroff-scan to verify man pages +- BUILD.WINDOWS: mention buildconf.bat for builds off git -- nroff-scan.pl: verify the .BR references as well +- darwinssl: fix curlssl_sha256sum() compiler warnings on first argument -- CURLOPT_CONV_TO_NETWORK_FUNCTION.3: fix bad man page reference +- test130: verify comments in .netrc -- CURLOPT_BUFFERSIZE.3: fix reference to CURLOPT_MAX_RECV_SPEED_LARGE +- [Gisle Vanem brought this change] -- curl_easy_pause.3: fix man page reference + netrc: skip lines starting with '#' + + Bug: https://curl.haxx.se/mail/lib-2017-08/0008.html -Jay Satiro (1 May 2016) -- tool_cb_hdr: Fix --remote-header-name with schemeless URL +Marcel Raad (3 Aug 2017) +- CMake: set MSVC warning level to 4 + + The MSVC warning level defaults to 3 in CMake. Change it to 4, which is + consistent with the Visual Studio and NMake builds. Disable level 4 + warning C4127 for the library and additionally C4306 for the test + servers to get a clean CURL_WERROR build as that warning is raised in + some macros in older Visual Studio versions. - - Move the existing scheme check from tool_operate. + Ref: https://github.com/curl/curl/pull/1667#issuecomment-314082794 + Closes https://github.com/curl/curl/pull/1711 + +Daniel Stenberg (2 Aug 2017) +- CURLOPT_NETRC.3: fix typo in 7e48aa386156f9c2 - In the case of --remote-header-name we want to parse Content-disposition - for a filename, but only if the scheme is http or https. A recent - adjustment 0dc4d8e was made to account for schemeless URLs however it's - not 100% accurate. To remedy that I've moved the scheme check to the - header callback, since at that point the library has already determined - the scheme. + Reported-by: Viktor Szakats + +- CURLOPT_NETRC.3: mention the file name on windows - Bug: https://github.com/curl/curl/issues/760 - Reported-by: Kai Noda + ... and CURLOPT_NETRC_FILE(3). + +- travis: build osx with libressl too + +- travis: build osx with openssl too + +- tests/server/util: fix curltime mistake from 4dee50b9c80f9 -Daniel Stenberg (1 May 2016) -- tls: make setting pinnedkey option fail if not supported +Marcel Raad (1 Aug 2017) +- curl_threads: fix MSVC compiler warning - to make it obvious to users trying to use the feature with TLS backends - not supporting it. + Use LongToHandle to convert from long to HANDLE in the Win32 + implementation. + This should fix the following warning when compiling with + MSVC 11 (2012) in 64-bit mode: + lib\curl_threads.c(113): warning C4306: + 'type cast' : conversion from 'long' to 'HANDLE' of greater size - Discussed in #781 - Reported-by: Travis Burtrum + Closes https://github.com/curl/curl/pull/1717 -- nroff-scan.pl: verifies nroff pages +Daniel Stenberg (1 Aug 2017) +- BUGS: improved phrasing about security bugs - ... not used by any test yet but can be used stand-alone. + Reported-by: Max Dymond -- opts: fix broken/bad references +- BUGS: clarify how to report security related bugs -- [Michael Kaufmann brought this change] +- [Brad Spencer brought this change] - docs: fix bugs in CURLOPT_HTTP_VERSION.3 and CURLOPT_PIPEWAIT.3 + multi: fix request timer management - Closes #786 - -- CURLOPT_ACCEPT_ENCODING.3: clarified + There are some bugs in how timers are managed for a single easy handle + that causes the wrong "next timeout" value to be reported to the + application when a new minimum needs to be recomputed and that new + minimum should be an existing timer that isn't currently set for the + easy handle. When the application drives a set of easy handles via the + `curl_multi_socket_action()` API (for example), it gets told to wait the + wrong amount of time before the next call, which causes requests to + linger for a long time (or, it is my guess, possibly forever). - As discussed in #785 + Bug: https://curl.haxx.se/mail/lib-2017-07/0033.html -- curl.1: --mail-rcpt can be used multiple times +Jay Satiro (1 Aug 2017) +- curl_setup: Define CURL_NO_OLDIES for building libcurl + + .. to catch accidental use of deprecated error codes. - Reported-by: mgendre - Closes #784 + Ref: https://github.com/curl/curl/issues/1688#issuecomment-316764237 -- [Karlson2k brought this change] +Daniel Stenberg (1 Aug 2017) +- [Jeremy Tan brought this change] - tests: Use 'pathhelp' for paths conversions in secureserver.pl + configure: fix the check for IdnToUnicode + + Fixes #1669 + Closes #1713 + +- http: fix response code parser to avoid integer overflow + + test 1429 and 1433 were updated to work with the stricter HTTP status line + parser. - Closes #675 + Closes #1714 + Reported-by: Brian Carpenter -- [Karlson2k brought this change] +Jay Satiro (31 Jul 2017) +- [Dwarakanath Yadavalli brought this change] - tests: Use 'pathhelp' for paths conversions in sshserver.pl + libcurl: Stop using error codes defined under CURL_NO_OLDIES + + Fixes https://github.com/curl/curl/issues/1688 + Closes https://github.com/curl/curl/pull/1712 -- [Karlson2k brought this change] +- include.d: clarify --include is only for response headers + + Follow-up to 171f8de and de6de94. + + Bug: https://github.com/curl/curl/commit/de6de94#commitcomment-23370851 + Reported-by: Daniel Stenberg - tests: Use 'pathhelp' for current path in runtests.pl +Daniel Stenberg (30 Jul 2017) +- [Jason Juang brought this change] -- [Karlson2k brought this change] + cmake: support make uninstall + + Closes #1674 - tests: pathhelp.pm to process paths on Msys/Cygwin +- RELEASE-NOTES: synced with 001701c47 -- lib: include curl_printf.h as one of the last headers +Marcel Raad (29 Jul 2017) +- AppVeyor: now really use CURL_WERROR - curl_printf.h defines printf to curl_mprintf, etc. This can cause - problems with external headers which may use - __attribute__((format(printf, ...))) markers etc. + It was misspelled as CURL_ERROR in commit + 2d86e8d1286e0fbe3d811e2e87fa0b5e53722db4. - To avoid that they cause problems with system includes, we include - curl_printf.h after any system headers. That makes the three last - headers to always be, and we keep them in this order: + Closes https://github.com/curl/curl/pull/1686 + +Jay Satiro (29 Jul 2017) +- tool_help: clarify --include is only for response headers - curl_printf.h - curl_memory.h - memdebug.h + Follow-up to 171f8de. - None of them include system headers, they all do funny #defines. + Ref: https://github.com/curl/curl/issues/1704 + +- splay: fix signed/unsigned mismatch warning - Reported-by: David Benjamin + Follow-up to 4dee50b. - Fixes #743 + Ref: https://github.com/curl/curl/pull/1693 -- memdebug.h: remove inclusion of other headers +Daniel Stenberg (28 Jul 2017) +- include.d: clarify that it concerns the response headers - Mostly because they're not needed, because memdebug.h is always included - last of all headers so the others already included the correct ones. - - But also, starting now we don't want this to accidentally include any - system headers, as the header included _before_ this header may add - defines and other fun stuff that we won't want used in system includes. + Reported-by: olesteban at github + Fixes #1704 -- [Jay Satiro brought this change] +- [Johannes Schindelin brought this change] - curl -J: make it work even without http:// scheme on URL - - It does open up a miniscule risk that one of the other protocols that - libcurl could use would send back a Content-Disposition header and then - curl would act on it even if not HTTP. + curl_rtmp: fix a compiler warning - A future mitigation for this risk would be to allow the callback to ask - libcurl which protocol is being used. + The headers of librtmp declare the socket as `int`, and on Windows, that + disagrees with curl_socket_t. - Verified with test 1312 + Bug: #1652 - Closes #760 + Signed-off-by: Johannes Schindelin -- manpage-scan.pl: also verify the command line option docs +- test1323: verify curlx_tvdiff + +- timeval: struct curltime is a struct timeval replacement + + ... to make all libcurl internals able to use the same data types for + the struct members. The timeval struct differs subtly on several + platforms so it makes it cumbersome to use everywhere. - This script now also scans src/tool_getparam.c, docs/curl.1 and - src/tool_help.c and will warn if any of them lists a command line option - not mentioned in one of the other places. + Ref: #1652 + Closes #1693 -- curl: show the long option version of -q in the -h list +- darwinssl: fix variable type mistake (regression) + + ... which made --tlsv1.2 not work because it would blank the max tls + version variable. + + Reported-by: Nick Miyake + Bug: #1703 -- curl: remove "--socks" as "--socks5" turned 8 +- multi: mention integer overflow risk if using > 500 million sockets + + Reported-by: ovidiu-benea@users.noreply.github.com - In commit 2e42b0a2524 (Jan 2008) we made the option "--socks" deprecated - and it has not been documented since. The more explicit socks options - (like --socks4 or --socks5) should be used. + Closes #1675 + Closes #1683 -- curl.1: document the deprecated --ftp-ssl option +- checksrc: escape open brace in regex + + ... to silence warning. -- curl: remove --http-request +Kamil Dudka (20 Jul 2017) +- nss: fix a possible use-after-free in SelectClientCert() + + ... causing a SIGSEGV in showit() in case the handle used to initiate + the connection has already been freed. - It was mentioned as deprecated already in commit ae1912cb0d4 from - 1999. It has not been documented in this millennium. + This commit fixes a bug introduced in curl-7_19_5-204-g5f0cae803. + + Reported-by: Rob Sanders + Bug: https://bugzilla.redhat.com/1436158 -- curl: mention --ntlm-wb in -h list +- nss: unify the coding style of nss_send() and nss_recv() + + No changes in behavior intended by this commit. -- curl: -h output lacked --proxy-header +Marcel Raad (18 Jul 2017) +- tests/server/resolve.c: fix deprecation warning + + MSVC warns that gethostbyname is deprecated. Always use getaddrinfo + instead to fix this when IPv6 is enabled, also for IPv4 resolves. This + is also consistent with what libcurl does. + + Closes https://github.com/curl/curl/pull/1682 -- curl.1: document --ntlm-wb +Jay Satiro (17 Jul 2017) +- darwinssl: fix pinnedpubkey build error + + - s/SessionHandle/Curl_easy/ + + Bug: https://github.com/curl/curl/commit/eb16305#commitcomment-23035670 + Reported-by: Gisle Vanem -- curl.1: document the long format of -q: --disable +Marcel Raad (16 Jul 2017) +- rtspd: fix GCC warning after MSVC warning fix + + Older GCC warns: + /tests/server/rtspd.c:1194:10: warning: missing braces around + initializer [-Wmissing-braces] + + Fix this by using memset instead of an initializer. -- curl.1: mention the deprecated --krb4 option +- libtest: fix MSVC warning C4706 + + With warning level 4, MSVC warns about assignments within conditional + expressions. Change the while loop to a do-while loop to fix this. This + change is also consistent with CODE_STYLE.md. -- curl.1: document --ftp-ssl-reqd +- sockfilt: suppress conversion warning with explicit cast - Even if deprecated, document it so that people will find it as old - scripts may still use it. + MSVC warns when implicitly casting -1 to unsigned long. -- curl: use --telnet-option as documented +- rtspd: fix MSVC level 4 warning - The code said "telnet-options" but no documentation ever said so. It - worked fine since the code is fine with a unique match of the first - part. + warning C4701: potentially uninitialized local variable 'req' used -- getparam: remove support for --ftpport +- winbuild: re-enable warning C4127 for curl tool - It has been deprecated and undocumented since commit ad5ead8bed7 (Dec - 2003). --ftp-port is the proper long option name. + Disabled in cda19a345f6970e22fe8b7a808aeb8f086a21eac. It only needs to + be disabled for libcurl. -- curl: make --disable work as long form of -q +- winbuild: build with warning level 4 + + This is consistent with 7bc64561a2e63ca93e4b0b31d350773ba80955c2, which + changed the warning level from 3 to 4 for the Visual Studio project + files. But disable the level 4 warning C4127 "conditional expression is + constant", as that one is issued by older versions of the Windows SDK + as well as curl itself under some circumstances. - To make the aliases list reflect reality. + Closes https://github.com/curl/curl/pull/1667 -- aliases: remove trailing space from capath string +Jay Satiro (12 Jul 2017) +- [Max Dymond brought this change] -- cmdline parse: only single letter options have single-letter strings + travis: install libidn2 + + Install libidn2 to increase test coverage (IDN tests) - ... moved around options so that parsing the code to find all - single-letter options easier. + Closes https://github.com/curl/curl/pull/1673 -Jay Satiro (28 Apr 2016) -- CURLINFO_TLS_SSL_PTR.3: Clarify SSL pointer availability +Marcel Raad (12 Jul 2017) +- travis: enable warnings also in release mode - Bug: https://curl.haxx.se/mail/lib-2016-04/0126.html - Reported-by: Bru Rom + ... to get warnings also on Linux/GCC and OSX/clang. + + Closes https://github.com/curl/curl/pull/1666 -Daniel Stenberg (28 Apr 2016) -- curl_easy_getinfo.3: remove superfluous blank lines +Daniel Stenberg (12 Jul 2017) +- [Max Dymond brought this change] -- test1139: verifies libcurl option man page presence + travis: install libssh2 - - checks that each option has its own man page present + Install libssh2 to increase test coverage (SFTP, SCP) + +Marcel Raad (12 Jul 2017) +- system.h: include winsock2.h before windows.h - - checks that each option is mentioned in its corresponding index man - page + ... to avoid compiler warnings if the user doesn't want + WIN32_LEAN_AND_MEAN. -- curl_easy_getinfo.3: added missing mention of CURLINFO_TLS_SESSION +- build: remove WIN32_LEAN_AND_MEAN from individual build systems + + It's defined for all build systems in curl_setup.h since commit + beb08481d01a07a8b10938b1078a5e298b1c2912. This caused macro + redefinition warnings in the configure builds. - ... although it is deprecated. + Closes https://github.com/curl/curl/pull/1677 -Jay Satiro (28 Apr 2016) -- mbedtls: Fix session resume +Jay Satiro (11 Jul 2017) +- ISSUE_TEMPLATE: Add a comment not to file security issues on github + +Marcel Raad (11 Jul 2017) +- curl_setup: always define WIN32_LEAN_AND_MEAN on Windows - This also fixes PolarSSL session resume. + Make sure to always define WIN32_LEAN_AND_MEAN before including any + Windows headers to avoid pulling in unnecessary headers. This avoids + unnecessary macro clashes and compiler warnings. - Prior to this change the TLS session information wasn't properly - saved and restored for PolarSSL and mbedTLS. + Ref: https://github.com/curl/curl/issues/1562 + Closes https://github.com/curl/curl/pull/1672 + +Jay Satiro (11 Jul 2017) +- strerror: Preserve Windows error code in some functions - Bug: https://curl.haxx.se/mail/lib-2016-01/0070.html - Reported-by: Thomas Glanzmann + This is a follow-up to af02162 which removed (SET_)ERRNO macros. That + commit was an earlier draft that I committed by mistake, which was then + remedied by a5834e5 and e909de6, and now this commit. With this commit + there is now no difference between the current code and the changes that + were approved in the final draft. - Bug: https://curl.haxx.se/mail/lib-2016-04/0095.html - Reported-by: Moti Avrahami + Thanks-to: Max Dymond, Marcel Raad, Daniel Stenberg, Gisle Vanem + Ref: https://github.com/curl/curl/pull/1589 -Daniel Stenberg (27 Apr 2016) -- RELEASE-NOTES: synced with f4298fcc6d2 +Marcel Raad (10 Jul 2017) +- [Max Dymond brought this change] -- [Michael Kaufmann brought this change] + tests: Fix up issues with errno in test files + + Closes https://github.com/curl/curl/pull/1671 + +Daniel Stenberg (10 Jul 2017) +- errno: fix non-windows builds after af0216251b94e7 + +- [Ryan Winograd brought this change] - opts: Fix some syntax errors in example code fragments + make: fix docs build on OpenBSD - Fixes #779 + Ref: #1591 -- openssl: avoid BN_print a NULL bignum +Marcel Raad (10 Jul 2017) +- ldap: fix MinGW compiler warning - OpenSSL 1.1.0-pre seems to return NULL(?) for a whole lot of those - numbers so make sure the function handles this. + ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with + the latest original MinGW, resulting in compiler warnings since commit + f0fe66f13c93d3d0af45d9fb1231c9164e0f9dc8. Fix this for the non-SSPI + case by using ldap_simple_bind_s again instead of ldap_bind_s with + LDAP_AUTH_SIMPLE. - Reported-by: Linus Nordberg + Closes https://github.com/curl/curl/pull/1664 -- [Marcel Raad brought this change] - - CONNECT_ONLY: don't close connection on GSS 401/407 reponses +- curl-compilers.m4: disable warning spam with Cygwin's clang - Previously, connections were closed immediately before the user had a - chance to extract the socket when the proxy required Negotiate - authentication. + When building with Cygwin or MinGW, libtool uses a wrapper executable + instead of a wrapper script [1], which is written in C and throws + missing-variable-declarations warnings. Don't enable these warnings on + Cygwin and MinGW in order to avoid warnings for every executable built, + which spams the test suite output when using Cygwin's clang. - This regression was brought in with the security fix in commit - 79b9d5f1a42578f + [1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html - Closes #655 + Closes https://github.com/curl/curl/pull/1665 -- CURLINFO_TLS_SESSION.3: clarify TLS library support before 7.48.0 +Jay Satiro (10 Jul 2017) +- curl_setup_once: Remove ERRNO/SET_ERRNO macros + + Prior to this change (SET_)ERRNO mapped to GetLastError/SetLastError + for Win32 and regular errno otherwise. + + I reviewed the code and found no justifiable reason for conflating errno + on WIN32 with GetLastError/SetLastError. All Win32 CRTs support errno, + and any Win32 multithreaded CRT supports thread-local errno. + + Fixes https://github.com/curl/curl/issues/895 + Closes https://github.com/curl/curl/pull/1589 -- mbedtls.c: silly spellfix of a comment +- tool_getparam: fix potentially uninitialized err -- KNOWN_BUGS: 1.10 Strips trailing dot from host name +Marcel Raad (9 Jul 2017) +- smb: rename variable to fix shadowing warning - Closes #716 - -- test1322: verify stripping of trailing dot from host name + GCC 4.6.3 on travis complains: + smb.c: In function ‘get_posix_time’: + smb.c:725:13: error: declaration of ‘time’ shadows a global declaration + [-Werror=shadow] - While being debated (in #716) and a violation of RFC 7230 section 5.4, - this test verifies that the existing functionality works as intended. It - strips the dot from the host name and uses the host without dot - throughout the internals. + Fix this by renaming the variable. -- multi: accidentally used resolved host name instead of proxy +- tool_cb_wrt: fix variable shadowing warning + + GCC 4.4 complains: + tool_cb_wrt.c:81: error: declaration of ‘isatty’ shadows a global + declaration + /usr/include/unistd.h:782: error: shadowed declaration is here - Regression introduced in 09b5a998 + Fix this by renaming the variable. - Bug: https://curl.haxx.se/mail/lib-2016-04/0084.html - Reported-by: BoBo + Closes https://github.com/curl/curl/pull/1661 + +Daniel Stenberg (8 Jul 2017) +- RELEASE-NOTES: synced with be2c999b8 -- symbols-in-versions: added new CURLSSLBACKEND_ symbols +- travis: install stunnel -- test148: fixed after the --ftp-create-dirs retry change +- valgrind.supp: supress OpenSSL false positive seen on travis + +- travis: detect and use valgrind for normal builds - follow-up commit to 3c1e84f569 as it made curl try a little harder + Closes #1653 -- curl.h: clarify curl_sslbackend for openssl clones and renames +- travis: add SMB, DICT, TELNET torture to coverage test -- [Karlson2k brought this change] +- [Paul Harris brought this change] - url.c: fixed DEBUGASSERT() for WinSock workaround + cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC - If buffer is allocated, but nothing is received during prereceive - stage, than number of processed bytes must be zero. + Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere. - Closes #778 + Closes #1649 + +- CURLOPT_POSTFIELDS.3: explain the 100-continue magic better + +- [Max Dymond brought this change] -- KNOWN_BUGS: --interface for ipv6 binds to unusable IP address + test1452: add telnet negotiation - Closes #686 for now. + Add a basic telnet server for negotiating some telnet options before + echoing back any data that's sent to it. + + Closes #1645 -- TODO: 1.17 Add support for IRIs +- travis: do more tests in the coverage run - Adding support for IRIs is a mouthful, but is probably interesting at - least for areas and countries where the use of such "URLs" are growing - popularity. + I added a selection of torture and event tests that run "fast enough" + +- curl_easy_escape.3: mention the (lack of) encoding - Closes #776 + Fixes #1612 + Reported-by: Jeroen Ooms -- THANKS-filter: Travis Burtrum +- [Gisle Vanem brought this change] + + memdebug: don't setbuf() if the file open failed + + Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151 -- lib1517: checksrc compliance +- appveyor: enable CURL_WERROR on all builds -- [moparisthebest brought this change] +- cmake: add CURL_WERROR for enabling "warning as errors" - PolarSSL: Implement public key pinning +- [Hannes Magnusson brought this change] -Patrick Monnerat (22 Apr 2016) -- os400: upgrade ILE/RPG binding + cmake: remove spurious "-l" from linker flags + + Fixes #1552 -- curl.h: CURLOPT_CONNECT_TO sets a struct slist *, not a string +- test506: skip if threaded-resolver -Daniel Stenberg (22 Apr 2016) -- contributors.sh: make --releasenotes implied +- runtests: support "threaded-resolver" as a feature - It got too annoying to type =) + ... to let tests require it or skip if present -- RELEASE-NOTES: synced with 3c1e84f5693d8093 +- asyn-thread.c: fix unused variable warnings on macOS -- curl: make --ftp-create-dirs retry on failure +- http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD - The underlying libcurl option used for this feature is - CURLOPT_FTP_CREATE_MISSING_DIRS which has the ability to retry the dir - creation, but it was never set to do that by the command line tool. + Make the name reflect its use better, and add a short comment describing + what it's for. + +- cmake: if inet_pton is used, bump _WIN32_WINNT - Now it does. + ... and make sure inet_pton is always checked for when *not* using Windows, + which is a regression from 4fc6ebe18. - Bug: https://curl.haxx.se/mail/archive-2016-04/0021.html - Reported-by: John Wanghui - Help-by: Leif W + Idea-by: Sergei Nikulov -- [Henrik Gaßmann brought this change] +- select.h: avoid macro redefinition harder + + ... by checking the POLLIN define, as the header file checks don't work + on Windows. - winbuild: add mbedtls support +- inet_pton: fix include on windows to get prototype - Add WITH_MBEDTLS option. Make WITH_SSL, WITH_MBEDTLS and ENABLE_WINSSL - options mutual exclusive. + inet_pton() exists on Windows and gets used by our cmake builds. Make + sure the correct header file is included to avoid compiler warnings. - Closes #606 + Closes #1639 -- KNOWN_BUGS: fixed "5.6 Improper use of Autoconf cache variables" +- TODO: 1.10 auto-detect proxy - As of commit d9f3b365a3 + Closes #1572 -- [Irfan Adilovic brought this change] +- TODO: HTTP proxy CONNECT is non-blocking now - configure: ac_cv_ -> curl_cv_ for write-only vars +- cmake: fix send/recv argument scanner for windows - These configure vars are modified in a curl-specific way but never - evaluated or loaded from cache, even though they are designated as - _cv_. We could either implement proper AC_CACHE_CHECKs for them, or - remove them completely. + ... by simply trying the Windows argument types first. - Fixes #603 as ac_cv_func_gethostbyname is no longer clobbered, and - AC_CHECK_FUNC(gethostbyname...) will no longer spuriously succeed after - the first configure run with caching. + Fixes #1640 + +- RELEASE-NOTES: synced with 596cfb6c0 + +- [Gisle Vanem brought this change] + + smb: add support for CURLOPT_FILETIME - `ac_cv_func_strcasecmp` is curious, see #770. + Bug: https://curl.haxx.se/mail/lib-2017-07/0005.html - `eval "ac_cv_func_$func=yes"` can still cause problems as it works in - tandem with AC_CHECK_FUNCS and then potentially modifies its result. It - would be best to rewrite this test to use a new CURL_CHECK_FUNCS macro, - which works the same as AC_CHECK_FUNCS but relies on caching the values - of curl_cv_func_* variables, without modifiying ac_cv_func_*. + Closes #1643 -- [Irfan Adilovic brought this change] +- travis: install nghttp2 on linux builds + + Closes #1642 + +- [Gisle Vanem brought this change] - configure: ac_cv_ -> curl_cv_ for r/w vars + smb: fix build for djgpp/MSDOS - These configure vars are modified in a curl-specific way and modified by - the configure process, but are never loaded from cache, even though they - are designated as _cv_. We should implement proper AC_CACHE_CHECKs for - them eventually. + bug: https://curl.haxx.se/mail/lib-2017-07/0005.html -- [Irfan Adilovic brought this change] +- configure: try ldap/lber in reversed order first + + When scanning for which LDAP libraries to use, try the -lldap -llber + combination before the reversed order since it has a greater chance of + working when linking with libcurl statically. + + Fixes #1619 + Closes #1634 + Reported-by: David E. Narváez - configure: ac_cv_func_clock_gettime -> curl_... +- configure: remove checks for 5 functions never used - This variable must not be cached in its current form, as any cached - information will prevent the next configure run from determining the - correct LIBS needed for the function. Thus, rename prefix `ac_cv_` to - just `curl_`. + fork, getprotobyname, inet_addr, perror, uname + + closes #1638 + +- dist: add SMB python deps into the tarball -- [Irfan Adilovic brought this change] +- [Max Dymond brought this change] - configure: ac_cv_ -> curl_cv_ for all cached vars + test1451: add SMB support to the testbed - This was automated by: + Add test 1451 which does some very basic SMB testing using the impacket + SMB server. + + Closes #1630 + +- [Max Dymond brought this change] + + test: add impacket for SMB testing - sed -b -i -f <(ack -A1 AC_CACHE_CHECK | \ - ack -o 'ac_cv_.*?\b' | \ - sort -u | xargs -n1 bash -c \ - 'echo "s/$0/curl_cv_${0#ac_cv_}/g"') \ - $(git ls-files) + Import impacket 0.9.15 for use in SMB testing. This was generated by + doing "pip2.7 install -t . impacket" - This only changed the prefix for 16 variables actually checked with - AC_CACHE_CHECK. + Unnecessary files for current testing were deleted. -- openssl: builds with OpenSSL 1.1.0-pre5 +- travis.yml: use --enable-werror on debug builds - The RSA, DSA and DH structs are now opaque and require use of new APIs + ... to better detect and fault on compiler warnings/errors - Fixes #763 + Closes #1637 -Steve Holme (20 Apr 2016) -- url.c: Prefer we don't use explicit NULLs in conditions +- tool_sleep: typecast to avoid macos compiler warning - Fixed commit fa5fa65a30 to not use NULLs in if condition. + tool_sleep.c:54:24: error: implicit conversion loses integer precision: + 'long' to '__darwin_suseconds_t' (aka 'int') + [-Werror,-Wshorten-64-to-32] -Daniel Stenberg (20 Apr 2016) -- [Isaac Boukris brought this change] +- [Martin Kepplinger brought this change] - NTLM: check for NULL pointer before deferencing + timeval.c: Use long long constant type for timeval assignment - At ConnectionExists, both check->proxyuser and check->proxypasswd - could be NULL, so make sure to check first. + On a 64 bit host, sparse says: - Fixes #765 - -- [Karlson2k brought this change] + timeval.c:148:15: warning: constant 0x7fffffffffffffff is so big it is long + timeval.c:149:12: warning: constant 0x7fffffffffffffff is so big it is long + + so let's use long long constant types in order to prevent undesired overflow + failures. + + Bug: https://curl.haxx.se/mail/lib-2017-07/0003.html + + Closes #1636 + + Signed-off-by: Martin Kepplinger - tests: added test1517 +- url: make the original string get used on subsequent transfers - ... for checking ability to receive full HTTP response when POST request - is used with slow read callback function. + ... since CURLOPT_URL should follow the same rules as other options: + they remain set until changed or cleared. - This test checks for bug #657 and verifies the work-around from - 72d5e144fbc6. + Added test 1551 to verify. - Closes #720 + Fixes #1631 + Closes #1632 + Reported-by: Pavel Rochnyak -- [Karlson2k brought this change] +- [Johannes Schindelin brought this change] - sendf.c: added ability to call recv() before send() as workaround + gtls: fix build when sizeof(long) < sizeof(void *) - WinSock destroys recv() buffer if send() is failed. As result - server - response may be lost if server sent it while curl is still sending - request. This behavior noticeable on HTTP server short replies if - libcurl use several send() for request (usually for POST request). - To workaround this problem, libcurl use recv() before every send() and - keeps received data in intermediate buffer for further processing. + - Change gnutls pointer/int macros to pointer/curl_socket_t. + Prior to this change they used long type as well. - Fixes: #657 - Closes: #668 - -Kamil Dudka (19 Apr 2016) -- connect: make sure that rc is initialized in singleipconnect() + The size of the `long` data type can be shorter than that of pointer + types. This is the case most notably on Windows. + + If C99 were acceptable, we could simply use `intptr_t` here. But we + want to retain C89 compatibility. + + Simply use the trick of performing pointer arithmetic with the NULL + pointer: to convert an integer `i` to a pointer, simply take the + address of the `i`th element of a hypothetical character array + starting at address NULL. To convert back, simply cast the pointer + difference. - This commit fixes a Clang warning introduced in curl-7_48_0-190-g8f72b13: + Thanks to Jay Satiro for the initial modification to use curl_socket_t + instead of int/long. - Error: CLANG_WARNING: - lib/connect.c:1120:11: warning: The right operand of '==' is a garbage value - 1118| } - 1119| - 1120|-> if(-1 == rc) - 1121| error = SOCKERRNO; - 1122| } + Closes #1617 + + Signed-off-by: Johannes Schindelin -Daniel Stenberg (19 Apr 2016) -- make/checksrc: use $srcdir, not $top_srcdir +- [Ryan Winograd brought this change] -- src/checksrc.whitelist: removed + unit1399: fix integer overflow + + Bug: #1616 + Closes #1633 -- tool_operate: switch to inline checksrc ignore +- [Per Malmberg brought this change] -- lib/checksrc.whitelist: not needed anymore + cmake: Added compatibility options for older Windows versions - ... as checksrc now skips comments - -- vtls.h: remove a space before semicolon + CURL_STATIC_CRT and ENABLE_INET_PTON - ... that the new checksrc detected + Closes #1621 -- darwinssl: removed commented out code +- unit1399: add logging to time comparison + + ... to enable tracking down why autobuilds fail on this + + Bug: #1616 -- http_chunks: removed checksrc disable +- make: build the docs subdir only from within src - ... since checksrc now skips comments + ... and don't build at all in include + + Prompted-by-work-by: Simon Warta + Ref: #1590 + Closes #1591 -- imap: inlined checksrc disable instead of whitelist edit +- [Max Dymond brought this change] -- checksrc: taught to skip comments + test1450: fix up DICT server in torture mode - ... but output non-stripped version of the line, even if that then can - make the script identify the wrong position in the line at - times. Showing the line stripped (ie without comments) is just too - surprising. - -- opts/Makefile.am: list all docs file one by one + As per https://github.com/curl/curl/pull/1615, the DICT server is a + little spammy in torture mode due to the sockets being torn down + unexpectedly. Fix this by adding some error handling to the handling + function. - ... to make it easier to add lines in patches that won't just break all - other patches trying to add lines too. + Closes #1629 -- curl_easy_setopt.3: mention CURLOPT_TCP_FASTOPEN +- [Max Dymond brought this change] -- RELEASE-NOTES: synced with 03de4e4b219 + test1450: add simple testing for DICT + + Add a new server which provides a DICT interface. This is intended to + begin coverage testing for lib/dict.c - (since we just merged two major features) + Closes #1615 -- [Alessandro Ghedini brought this change] +- [Dan Fandrich brought this change] - connect: implement TCP Fast Open for Linux + test1521: fix out-of-tree builds, broken with 467da3af + + The test.h file is no longer in the same directory as the source file, + so that directory needs to be added to the include path. - Closes #660 + Fixes #1627 + Closes #1628 -- [Alessandro Ghedini brought this change] +- [Max Dymond brought this change] - tool: add --tcp-fastopen option + http2: handle PING frames + + Add a connection check function to HTTP2 based off RTSP. This causes + PINGs to be handled the next time the connection is reused. + + Closes #1521 -- [Alessandro Ghedini brought this change] +- [Max Dymond brought this change] - connect: implement TCP Fast Open for OS X + handler: refactor connection checking + + Add a new type of callback to Curl_handler which performs checks on + the connection. Alter RTSP so that it uses this callback to do its + own check on connection health. -- [Alessandro Ghedini brought this change] +- [Dmitry Kostjuchenko brought this change] - url: add CURLOPT_TCP_FASTOPEN option + openssl: improve fallback seed of PRNG with a time based hash + + Fixes #1620 -- checksrc: pass on -D so the whitelists are found correctly +- [Ryan Winograd brought this change] -- configure: remove check for libresolve + progress: prevent resetting t_starttransfer + + Prevent `Curl_pgrsTime` from modifying `t_starttransfer` when invoked + with `TIMER_STARTTRANSFER` more than once during a single request. - 'strncasecmp' was once provided by libresolv (no trailing e) for SunOS, - but this check is broken and most likely adds nothing useful. Removing - now. + When a redirect occurs, this is considered a new request and + `t_starttransfer` can be updated to reflect the `t_starttransfer` time + of the redirect request. - Reported-by: Irfan Adilovic + Closes #1616 - Discussed in #770 + Bug: https://github.com/curl/curl/pull/1602#issuecomment-310267370 -- scripts/make: use $(EXEEXT) for executables +- curl_strequal.3: fix typo in SYNOPSIS - Reported-by: bodop + Reported-by: Jesse Chisholm - Fixes #771 + Fixes #1623 -- includes: avoid duplicate memory callback typdefs even harder +- RELEASE-NOTES: synced with ce2c3ebda -- checksrc/makefile.am: use $top_srcdir to find source files +Kamil Dudka (28 Jun 2017) +- curl --socks5-{basic,gssapi}: control socks5 auth - ... to properly support out of source tree builds. + Closes https://github.com/curl/curl/pull/1454 -- RELEASE-NOTES: synced with 26ec93dd6aeba8dfb5 +- CURLOPT_SOCKS5_AUTH: allowed methods for SOCKS5 proxy auth + + If libcurl was built with GSS-API support, it unconditionally advertised + GSS-API authentication while connecting to a SOCKS5 proxy. This caused + problems in environments with improperly configured Kerberos: a stock + libcurl failed to connect, despite libcurl built without GSS-API + connected fine using username and password. + + This commit introduces the CURLOPT_SOCKS5_AUTH option to control the + allowed methods for SOCKS5 authentication at run time. + + Note that a new option was preferred over reusing CURLOPT_PROXYAUTH + for compatibility reasons because the set of authentication methods + allowed by default was different for HTTP and SOCKS5 proxies. + + Bug: https://curl.haxx.se/mail/lib-2017-01/0005.html + Closes https://github.com/curl/curl/pull/1454 -- opts: fix option references missing (section) +- socks: deduplicate the code for auth request -- [Michael Kaufmann brought this change] +- socks: use proxy_user instead of proxy_name + + ... to make it obvious what the data is used for - news: CURLOPT_CONNECT_TO and --connect-to +Daniel Stenberg (27 Jun 2017) +- libtest/make: generate lib1521.c + + ... instead of having the generated code checked in. This saves space in + the tarball but primarily automatically adapts to newly added options. - Makes curl connect to the given host+port instead of the host+port found - in the URL. + Closes #1614 -- makefile.vc6: use d suffix on debug object +Jay Satiro (26 Jun 2017) +- tool_getparam: fix memory leak on test 1147 OOM (torture tests) - To allow both release and debug builds in parallel. + Bug: https://github.com/curl/curl/pull/1486#issuecomment-310926872 + Reported-by: Dan Fandrich + +Dan Fandrich (25 Jun 2017) +- test1537: fixed memory leak on OOM + +Marcel Raad (25 Jun 2017) +- test1521: fix compiler warnings - Reported-by: Rod Widdowson + The integer literal 3123123123 doesn't fit into a 32-bit signed + integer, so GCC with 32-bit long warns in C90 mode: + this decimal constant is unsigned only in ISO C90 [enabled by default] + Fix this by using ULONG_MAX, which should fit in any curl_off_t and has + the correct suffix to not issue any warnings. + Also adds the missing CURLOPT_REQUEST_TARGET from commit + 9b167fd090f596eac828817d48c247eeae53407f. - Fixes #769 + Closes https://github.com/curl/curl/pull/1611 -Jay Satiro (12 Apr 2016) -- http2: Use size_t type for data drain count +Daniel Stenberg (24 Jun 2017) +- curl/system.h: add check for XTENSA for 32bit gcc - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + Reported-by: Neil Kolban + Fixes: 1598 -- http2: Improve header parsing +- [Henrik S. Gaßmann brought this change] + + winbuild: fix boringssl build - - Error if a header line is larger than supported. + Compile with `WIN32_LEAN_AND_MEAN` which prevents `windows.h` from + including too much clutter including `wincrypt.h` which in turn contains + some preprocessor macros that clash with boringssl symbols. - - Warn if cumulative header line length may be larger than supported. + Detect boringssl by checking the existance of `is_boringssl.h` and set + the corresponding `HAVE_BORINGSSL` for compilation which is used in + `ldap.c` to undefine the evil macros. - - Allow spaces when parsing the path component. + Closes #1610 + +- progress: progress.timespent needs to be us - - Make sure each header line ends in \r\n. This fixes an out of bounds. + follow-up to 64ed44a815e4e to fix test 500 failures + +Marcel Raad (24 Jun 2017) +- curl-compilers.m4: fix unknown-warning-option on Apple clang - - Disallow header continuation lines until we decide what to do. + Since 5598b0bd63f690c151074494ce47ef872f004ab4, clang -v is used to + detect the clang version. The version number was expected to come after + the word "version". For Apple clang, this doesn't work as it has its + own versioning scheme. + The version number is now first searched after the string + "based on LLVM". This works for Apple clang before version 7, and also + for e.g. Ubuntu's clang up to version 3.7. If it's not found and the + version string contains "Apple LLVM version", clang version 3.7 is + assumed, which is the version that comes with Xcode 7. Otherwise, the + version number is still expected after the word "version", which works + for very old Apple clang versions. - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + Ref: https://trac.macports.org/wiki/XcodeVersionInfo + Fixes https://github.com/curl/curl/issues/1606 + Closes https://github.com/curl/curl/pull/1607 -- http2: Add Curl_http2_strerror for HTTP/2 error codes +Daniel Stenberg (24 Jun 2017) +- progress: fix "time spent", broke in adef394ac + +- CURLINFO_REDIRECT_URL.3: mention the CURLOPT_MAXREDIRS case - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + ... supported since 7.54.1 -- [Tatsuhiro Tsujikawa brought this change] +- maketgz: switch to -6e for xz + + To reduce the memory requirement for decompress, and still do almost as + good compression as with -9e. + + Pointed-out-by: Dan Fandrich - http2: Don't increment drain when one header field is received +- libtest/Makefile: remove unused lib1541 variables + +- CONTRIBUTE.md: mention the out-of-tree build test too + +- maketgz: switch to xz instead of lzma - Sicne we write header field in temporary location, not in the memory - that upper layer provides, incrementing drain should not happen. + The compressed output size seems to be a tad bit smaller, but generally + xz seems more preferred these days and is used directly by for example + gentoo instead of bz2. - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + "Users of LZMA Utils should move to XZ Utils" => + https://tukaani.org/lzma/ + + Closes #1604 -- [Tatsuhiro Tsujikawa brought this change] +- --request-target: instead of --strip-path-slash + + ... and CURLOPT_REQUEST_TARGET instead of CURLOPT_STRIP_PATH_SLASH. + + This option instead provides the full "alternative" target to use in the + request, instead of extracting the path from the URL. + + Test 1298 and 1299 updated accordingly. + + Idea-by: Evert Pot + Suggestion: https://daniel.haxx.se/blog/2017/06/19/options-with-curl/comment-page-1/#comment-18373 + + Closes #1593 + +Marcel Raad (21 Jun 2017) +- lib1521: fix missing-variable-declarations clang warnings + + Declare TU-local variables static. - http2: Ensure that http2_handle_stream_close is called +- travis: enable typecheck-gcc warnings - This commit ensures that streams which was closed in on_stream_close - callback gets passed to http2_handle_stream_close. Previously, this - might not happen. To achieve this, we increment drain property to - forcibly call recv function for that stream. + - switch debug and release configurations so that we get an optimized + build with GCC 4.3+ as required by typecheck-gcc + - enable warnings-as-errors for release builds + (which have warnings disabled) - To more accurately check that we have no pending event before shutting - down HTTP/2 session, we sum up drain property into - http_conn.drain_total. We only shutdown session if that value is 0. + Closes https://github.com/curl/curl/pull/1595 + +- typecheck-gcc: add support for CURLINFO_OFF_T - With this commit, when stream was closed before reading response - header fields, error code CURLE_HTTP2_STREAM is returned even if - HTTP/2 level error is NO_ERROR. This signals the upper layer that - stream was closed by error just like TCP connection close in HTTP/1. + typecheck-gcc expected curl_socket_t instead of curl_off_t arguments + for CURLINFO_OFF_T. Detected by test1521, unfortunately only when run + locally. - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + Closes https://github.com/curl/curl/pull/1592 + +Daniel Stenberg (21 Jun 2017) +- [Simon Warta brought this change] -- [Tatsuhiro Tsujikawa brought this change] + ci: whitelist branches to avoid testing feature branches twice - http2: Process paused data first before tear down http2 session +- [Gisle Vanem brought this change] + + lib: fix the djgpp build + + Bug: https://github.com/curl/curl/commit/73a2fcea0b4adea6ba342cd7ed1149782c214ae3#commitcomment-22655993 + +Marcel Raad (20 Jun 2017) +- if2ip: fix compiler warning in ISO C90 mode + + remote_scope_id is only used when both HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID + and ENABLE_IPV6 are defined instead of only one of them. + +Daniel Stenberg (20 Jun 2017) +- travis: do the distcheck test build out-of-tree as well + +- http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASH + + ... to enable sending "OPTIONS *" which wasn't possible previously. - This commit ensures that data from network are processed before HTTP/2 - session is terminated. This is achieved by pausing nghttp2 whenever - different stream than current easy handle receives data. + This option currently only works for HTTP. - This commit also fixes the bug that sometimes processing hangs when - multiple HTTP/2 streams are multiplexed. + Added test cases 1298 + 1299 to verify - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + Fixes #1280 + Closes #1462 -- [Tatsuhiro Tsujikawa brought this change] +- test1521: test getinfo's OFF_T types too + + Closes #1588 - http2: Check session closure early in http2_recv +- lib1521: add curl_easy_getinfo calls to the test set - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + Also added return value checks to make sure no unexpected return codes + are used. -- [Tatsuhiro Tsujikawa brought this change] +- [Simon Warta brought this change] - http2: Add handling stream level error + automake: use $(MKHELP) variable instead if constant mkhelp.pl - Previously, when a stream was closed with other than NGHTTP2_NO_ERROR - by RST_STREAM, underlying TCP connection was dropped. This is - undesirable since there may be other streams multiplexed and they are - very much fine. This change introduce new error code - CURLE_HTTP2_STREAM, which indicates stream error that only affects the - relevant stream, and connection should be kept open. The existing - CURLE_HTTP2 means connection error in general. + this improves symmetry with the rule above + +- [Simon Warta brought this change] + + mkhelp.pl: fix script name in usage text + +- RELEASE-NOTES: synced with 3b80d3ca4 + +- getinfo: return sizes as curl_off_t + + This change introduces new alternatives for the existing six + curl_easy_getinfo() options that return sizes or speeds as doubles. The + new versions are named like the old ones but with an appended '_T': - Ref: https://github.com/curl/curl/issues/659 - Ref: https://github.com/curl/curl/pull/663 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T + CURLINFO_CONTENT_LENGTH_UPLOAD_T + CURLINFO_SIZE_DOWNLOAD_T + CURLINFO_SIZE_UPLOAD_T + CURLINFO_SPEED_DOWNLOAD_T + CURLINFO_SPEED_UPLOAD_T + + Closes #1511 -Daniel Stenberg (11 Apr 2016) -- http2: drain the socket better... +- PIPELINING_SERVER_BL: cleanup the internal list use - ... but ignore EAGAIN if the stream has ended so that we don't end up in - a loop. This is a follow-up to c8ab613 in order to avoid the problem - d261652 was made to fix. + The list was freed incorrectly since the llist refactor of + cbae73e1dd959. Added test 1550 to verify that it works and avoid future + regressions. - Reported-by: Jay Satiro - Clues-provided-by: Tatsuhiro Tsujikawa + Reported-by: Pascal Terjan - Discussed in #750 + Fixes #1584 + Closes #1585 -- KNOWN_BUGS: added info for "Hangs with PolarSSL" +- http2: fix OOM crash + + torture mode with test 1021 found it -- KNOWN_BUGS: 1.9 HTTP/2 frames while in the connection pool kill reuse +- CURLOPT_PREQUOTE.3: spellfix man page reference + +Marcel Raad (18 Jun 2017) +- http_proxy: fix build with http and proxy + + After deff7de0eb0e22d2d142b96b9cc84cd8db5d2a48, the build without + CURL_DISABLE_PROXY and CURL_DISABLE_HTTP was failing because of missing + includes. + +- http_proxy: fix compiler warning - Closes #750 + With CURL_DISABLE_PROXY or CURL_DISABLE_HTTP, GCC complained about a + missing prototype for Curl_connect_free. -- build: include scripts/ in the dist +Daniel Stenberg (18 Jun 2017) +- TODO: update the TOC too -Steve Holme (9 Apr 2016) -- CURLOPT_SOCKS5_GSSAPI_SERVICE: Merged with CURLOPT_PROXY_SERVICE_NAME +- TODO: implement support for CURLOPT_PREQUOTE with SFTP - As these two options provide identical functionality, the former for - SOCK5 proxies and the latter for HTTP proxies, merged the two options - together. + ... also updated the CURLOPT_PREQUOTE.3 man page to mention the correct + protocol support. - As such CURLOPT_SOCKS5_GSSAPI_SERVICE is marked as deprecated as of - 7.49.0. + Closes #1514 -- urldata: Use bool for socks5_gssapi_nec as it is a flag +- tool_wrte_cb: remove check for config == NULL - This value is set to TRUE or FALSE so should be a bool and not a long. + ... as it really cannot have reached this far with config being NULL, + thus this is unnecesary and misleading. + + Bug: https://news.ycombinator.com/item?id=14577585 and + https://daniel.haxx.se/blog/2017/06/17/curl-doesnt-spew-binary-anymore/comment-page-1/#comment-18356 + + Forwarded-to-us-by: Jakub Wilk -- url: Ternary operator code style changes +- curl: prevent binary output spewed to terminal + + ... unless "--output -" is used. Binary detection is done by simply + checking for a binary zero in early data. + + Added test 1425 1426 to verify. + + Closes #1512 -- CODE_STYLE: Added ternary operator example to 'Space around operators' +Marcel Raad (16 Jun 2017) +- Makefile.m32: enable -W for MinGW32 build - Following conversation on the libcurl mailing list. + The configure-based build also has this in addition to -Wall. + + Closes https://github.com/curl/curl/pull/1578 -- sasl: Fixed compilation errors from commit 9d89a0387 +- curl-compilers.m4: enable comma clang warning + + It usually warns when using commas instead of semicolons or other + operators by accident. - ...when GSS-API or Windows SSPI are not used. + Closes https://github.com/curl/curl/pull/1578 -- url: Corrected comments following 9d89a0387 +- curl-compilers.m4: enable missing-variable-declarations clang warning + + It usually warns when forgetting to declare TU-local variables static. + + Closes https://github.com/curl/curl/pull/1578 -- docs: Added clarification following commit 9d89a0387 +- curl-compilers.m4: enable double-promotion warning + + Enable -Wdouble-promotion for both GCC and clang. It warns on implicit + promotion from float to double. + + Closes https://github.com/curl/curl/pull/1578 -- Makefile: Fixed echo of checksrc check +- curl-compilers.m4: enable vla warning for clang + + Previously, that warning was only implicitly active in C90 mode. + Enable it unconditionally as already done for GCC. + + Closes https://github.com/curl/curl/pull/1578 -- checksrc: Fix issue with the autobuilds not picking up the whitelist +Daniel Stenberg (16 Jun 2017) +- http-proxy: fix chunked-encoded CONNECT responses + + Regression since 5113ad0424. + + ... and remove 'flaky' from test 1061 again + + Closes #1579 -- checksrc: Added missing vauth and vtls directories +- http-proxy: deal with EAGAIN + + ... the previous code would reset the header length wrongly (since + 5113ad0424). This makes test 1060 reliable again. + + Also: make sws send even smaller chunks of data to increase the + likeliness of this happening. -- ftp/imap/pop3/smtp: Allow the service name to be overridden +- libtest/libntlmconnect: fix compiler warnings from f94fcdb + +- [Jay Satiro brought this change] + + HTTPS-Proxy: don't offer h2 for https proxy connections + + Bug: https://github.com/curl/curl/issues/1254 - Allow the service name to be overridden for DIGIST-MD5 and Kerberos 5 - authentication in FTP, IMAP, POP3 and SMTP. + Closes #1546 -- http_negotiate: Calculate service name and proxy service name locally +- tests: stabilize test 2032 and 2033 + + Both these tests run the same underlying test code: libntlmconnect.c - + this test code made some assumptions about socket ordering when it used + curl_easy_fdset() and when we changed timing or got accidental changes + in libcurl the tests would fail. - Calculate the service name and proxy service names locally, rather than - in url.c which will allow for us to support overriding the service name - for other protocols such as FTP, IMAP, POP3 and SMTP. + The tests verify that the different transfers keep using the same + connections, which I now instead made sure by adding the number of bytes + each transfer gets and then verifies that they always get the same + amount as when these tests worked. + + Closes #1576 -- ROADMAP: Updated following the move of the authentication code +- test1148: verify the -# progressbar + + Closes #1569 -Patrick Monnerat (8 Apr 2016) -- KNOWN_BUGS: openldap hangs. TODO: binary SASL. +- test1061: mark as flaky + + Fails intermittently on travis builds since a few days. Likely due to + 5113ad0424. -Daniel Stenberg (8 Apr 2016) -- KNOWN_BUGS: 5.6 Improper use of Autoconf cache variables +Jay Satiro (16 Jun 2017) +- url: refactor the check for Windows drive letter in path - Closes #603 + - Move the logic to detect a Windows drive letter prefix + (eg c: in c:foo) into a function-like macro. + + Closes https://github.com/curl/curl/pull/1571 -- KNOWN_BUGS: 11.2 error buffer not set... +- mk-ca-bundle.pl: Check curl's exit code after certdata download + + - No longer allow partial downloads of certdata. + + Prior to this change partial downloads were (erroneously?) allowed since + only the server code was checked to be 200. - Closes #544 + Bug: https://github.com/curl/curl/pull/1577 + Reported-by: Matteo B. -- KNOWN_BUGS: 11.1 Curl leaks .onion hostnames in DNS +Daniel Stenberg (16 Jun 2017) +- dist: add the fuzz dir to the tarball + +- configure: disable nghttp2 too if HTTP has been disabled + +- http-proxy: fix build with --disable-proxy or --disable-http - Closes #543 + Reported-by: Dan Fandrich -- KNOWN_BUGS: 1.8 DNS timing is wrong for HTTP redirects +- fuzz/README: document how to build - Closes #522 + Fixes #1476 -- TODO: HTTP/2 "prior knowledge" is implemented! +- [Frederik B brought this change] -- [Damien Vielpeau brought this change] + fuzz: corpora file structure, initial commit - mbedtls: fix MBEDTLS_DEBUG builds +- [Frederik B brought this change] -- mbedtls: implement and provide *_data_pending() + fuzz: bring oss-fuzz initial code converted to C89 + +- http-proxy: only attempt FTP over HTTP proxy - ... as otherwise we might get stuck thinking there's no more data to - handle. + ... all other non-HTTP protocol schemes are now defaulting to "tunnel + trough" mode if a HTTP proxy is specified. In reality there are no HTTP + proxies out there that allow those other schemes. - Reported-by: Damien Vielpeau + Assisted-by: Ray Satiro, Michael Kaufmann - Fixes #737 + Closes #1505 -- mbedtls: follow-up for the previous commit +- TODO: the generated include file is gone + + ... since commit 73a2fcea0b -- mbedtls.c: name space pollution fix, Use 'Curl_' +- curl_setup.h: error out on CURL_WANTS_CA_BUNDLE_ENV use + + ... to make it really apparent if there's any user using this on purpose. + + Suggested-by: Jay Satiro + + Closes #1542 -- mbedtls.c: changed private prefix to mbed_ +- lib/curl_setup.h: remove CURL_WANTS_CA_BUNDLE_ENV - mbedtls_ is the prefix used by the mbedTLS library itself so we should - avoid using that for our private functions. + When this define was set, libcurl would check the environment variable + named CURL_CA_BUNDLE at run-time and use that CA cert bundle. This + feature was only defined by the watcom and m32 makefiles and caused + inconsistent behaviours among libcurls built on different platforms. + + The curl tool does already feature its own similar logic and the library + does not really need it, and it isn't documented libcurl behavior. So + this change removes it. + + Ref: #1538 -- mbedtls.h: fix compiler warnings +- test1147: verify -H on a file -- Revert "winbuild: trying to set some files eol=crlf for git" +- curl: allow --header and --proxy-header read from file - This reverts commit 9c08b4f1e7eced5a4d3782a3e0daa484c9d77d21. + So many headers can be provided as @filename. - Didn't help. Caused problems. + Suggested-by: Timothe Litt - Fixes #756 + Closes #1486 + +- RELEASE-NOTES: synced with 2ad80eec5 -- curl.1: use example.com more +- curl/curlver.h: start working on 7.55.0 + +- http-proxy: do the HTTP CONNECT process entirely non-blocking + + Mentioned as a problem since 2007 (8f87c15bdac63) and of course it + existed even before that. - Make (most) example snippets use the example.com domain instead of the - random ones picked and used before. Some of those were probably - legitimate sites and some not. example.com is designed for this purpose. + Closes #1547 -- [Michael Kaufmann brought this change] +- progress: let "current speed" be UL + DL speeds combined + + Bug #1556 + Reported-by: Paul Harris + Closes #1559 - HTTP2: Add a space character after the status code +Marcel Raad (14 Jun 2017) +- system.h: fix MinGW build + + CURLSYS_PULL_WS2TCPIP_H got renamed to CURL_PULL_WS2TCPIP_H in commit + 73a2fcea0b4adea6ba342cd7ed1149782c214ae3. + +Daniel Stenberg (14 Jun 2017) +- timers: store internal time stamps as time_t instead of doubles + + This gives us accurate precision and it allows us to avoid storing "no + time" for systems with too low timer resolution as we then bump the time + up to 1 microsecond. Should fix test 573 on windows. - The space character after the status code is mandatory, even if the - reason phrase is empty (see RFC 7230 section 3.1.2) + Remove the now unused curlx_tvdiff_secs() function. - Closes #755 + Maintains the external getinfo() API with using doubles. + + Fixes #1531 -- [Viktor Szakats brought this change] +- dist: make the hugehelp.c not get regenerated unnecessarily + + The maketgz script now makes sure the generated hugehelp.c file in the + tarball is newer than the generated curl.1 man page, so that it doesn't + have to get unnecessarily rebuilt first thing in a typical build. It + thus also removes the need for perl to build off a plain release + tarball. + + Fixes #1565 - URLs: change http to https in many places +- includes: remove curl/curlbuild.h and curl/curlrules.h + + Rely entirely on curl/system.h now. + + Introduced in Aug 2008 with commit 14240e9e109f. Now gone. - Closes #754 + Fixes #1456 -- winbuild: trying to set some files eol=crlf for git +Version 7.54.1 (14 Jun 2017) + +Daniel Stenberg (14 Jun 2017) +- release: 7.54.1 + +Dan Fandrich (13 Jun 2017) +- mk-lib1521.pl: updated to match the test changes in 916ec30a + +Daniel Stenberg (13 Jun 2017) +- [Stuart Henderson brought this change] + + libressl: OCSP and intermediate certs workaround no longer needed + + lib/vtls/openssl.c has a workaround for a bug with OCSP responses signed + by intermediate certs, this was fixed in LibreSSL in + https://github.com/libressl-portable/openbsd/commit/912c64f68f7ac4f225b7d1fdc8fbd43168912ba0 - Thinking it might help to apply patches etc with git. + Bug: https://curl.haxx.se/mail/lib-2017-06/0038.html -- [Theodore Dubois brought this change] +- url: fix buffer overwrite with file protocol (CVE-2017-9502) + + Bug: https://github.com/curl/curl/issues/1540 + Advisory: https://curl.haxx.se/docs/adv_20170614.html + + Assisted-by: Ray Satiro + Reported-by: Marcel Raad - curl.1: change example for -F +- urlglob: fix division by zero - It's a bad idea to send your passwords anywhere, especially over HTTP. - Modified example to send a picture instead. + The multiply() function that is used to avoid integer overflows, was + itself reason for a possible division by zero error when passed a + specially formatted glob. - Fixes #752 + Reported-by: GwanYeong Kim + +- configure: update the copyright year in the output -- KNOWN_BUGS: reorganized and cleaned up +- [ygrek brought this change] + + BINDINGS: update SP-Forth and OCaml urls + +Michael Kaufmann (11 Jun 2017) +- FindWin32CACert: Use a temporary buffer on the stack + + Don't malloc() the temporary buffer, and use the correct type: + SearchPath() works with TCHAR, but SearchPathA() works with char. + Set the buffer size to MAX_PATH, because the terminating null byte + is already included in MAX_PATH. - Now sorted into categories and organized in the same style we do the - TODO document. It will make each issue linked properly on the - https://curl.haxx.se/docs/knownbugs.html web page. + Reviewed-by: Daniel Stenberg + Reviewed-by: Marcel Raad - The sections should make it easier to find issues and issues related to - areas of the reader's specific interest. + Closes #1548 -Jay Satiro (6 Apr 2016) -- KNOWN_BUGS: #95 curl in Windows can't handle Unicode arguments +Dan Fandrich (11 Jun 2017) +- test1521: fixed OOM handling -Steve Holme (6 Apr 2016) -- KNOWN_BUGS: Use https://curl.haxx.se URL for github based issues +Daniel Stenberg (9 Jun 2017) +- RELEASE-PROCEDURE: updated future release dates -- CHECKSRC.md: Corrected some typos +- [Paul Harris brought this change] -- RELEASE-NOTES: Corrected last updated + gitignore: ignore all vim swap files - Included a summary of the checksrc.bat updates and combined two krb5 - changes as they should have been implemented at the same time. + Closes #1561 -- vauth: Corrected a number of typos in comments +- lib1521: fix compiler warnings on the use of bad 'long' values - Reported-by: Michael Osipov + Reported-by: Marcel Raad + Bug: https://github.com/curl/curl/commit/cccac4fb2b20d6ed87da7978408c3ecacc464fe4#commitcomment-22453387 -Jay Satiro (5 Apr 2016) -- KNOWN_BUGS: #94 IMAP custom requests use the LIST handler +- setopt: check CURLOPT_ADDRESS_SCOPE option range - Bug: https://github.com/curl/curl/issues/536 - Reported-by: eXeC64@users.noreply.github.com + ... and return error instead of triggering an assert() when being way + out of range. + +Jay Satiro (8 Jun 2017) +- [TheAssassin brought this change] -Daniel Stenberg (5 Apr 2016) -- KNOWN_BUGS: remove 68, 70 and 72. + cmake: Fix inconsistency regarding mbed TLS include directory - Due to their age (we don't fully know if they actually remain) and lack - of detail - very few people will bother to find out what they're about - or work on them. If people truly still suffer from any of these, I - assume they will be reported again and then we'll deal with them. + Previously, one had to set MBEDTLS_INCLUDE_DIR to make CMake find the + headers, but the system complained that mbed TLS wasn't found due to + MBEDTLS_INCLUDE_DIRS (note the trailing s) was not set. This commit + attempts to fix that. - 72. "Pausing pipeline problems." - https://curl.haxx.se/mail/lib-2009-07/0214.html + Closes https://github.com/curl/curl/pull/1541 + +Daniel Stenberg (8 Jun 2017) +- [Ryuichi KAWAMATA brought this change] + + examples/multi-uv.c: fix deprecated symbol + + Closes #1557 + +- asyn-ares: s/Curl_expire_latest/Curl_expire + +- expire: remove Curl_expire_latest() - 70. Problem re-using easy handle after call to curl_multi_remove_handle - https://curl.haxx.se/mail/lib-2009-07/0249.html + With the introduction of expire IDs and the fact that existing timers + can be removed now and thus never expire, the concept with adding a + "latest" timer is not working anymore as it risks to not expire at all. - 68. "More questions about ares behavior". - https://curl.haxx.se/mail/lib-2009-08/0012.html + So, to be certain the timers actually are in line and will expire, the + plain Curl_expire() needs to be used. The _latest() function was added + as a sort of shortcut in the past that's quite simply not necessary + anymore. + + Follow-up to 31b39c40cf90 + + Reported-by: Paul Harris + + Closes #1555 -- KNOWN_BUGS: remove 92 and 88, fixed +- [Chris Carlmar brought this change] -- http2: fix connection reuse when PING comes after last DATA + configure: fix link with librtmp when specifying path - It turns out the google GFE HTTP/2 servers send a PING frame immediately - after a stream ends and its last DATA has been received by curl. So if - we don't drain that from the socket, it makes the socket readable in - subsequent checks and libcurl then (wrongly) assumes the connection is - dead when trying to reuse the connection. + Bug: https://curl.haxx.se/mail/lib-2017-06/0017.html + +- file: make speedcheck use current time for checks - Reported-by: Joonas Kuorilehto + ... as it would previously just get the "now" timestamp before the + transfer starts and then not update it again. - Discussed in #750 + Closes #1550 -- multi: remove trailing space in debug output +- metalink: remove unused printf() argument -- RELEASE-NOTES: synced with 86e97b642fb +- travis: let some builds *not* use --enable-debug + + typecheck-gcc and other things require optimized builds + + Closes #1544 -- CHECKSRC.md: mention cmdline options, fix the bullet list +- README.md: show the coverall coverage on github -- docs/CHECKSRC.md: initial version +- lib1521: fix compiler warnings -Steve Holme (3 Apr 2016) -- checksrc.bat: Added support for the examples +- test1521: make the code < 80 columns wide -Daniel Stenberg (3 Apr 2016) -- lib/src: fix the checksrc invoke +- test1121: use stricter types to work with typcheck-gcc + +- typecheck-gcc: allow CURLOPT_STDERR to be NULL too + +- test1521: test *all* curl_easy_setopt options + + mk-lib1521.pl generates a test program (lib1521.c) that calls + curl_easy_setopt() for every known option with a few typical values to + make sure they work (ignoring the return codes). + + Some small changes were necessary to avoid asserts and NULL accesses + when doing this. + + The perl script needs to be manually rerun when we add new options. + + Closes #1543 + +Dan Fandrich (5 Jun 2017) +- test1538: added "verbose logs" keyword + + These error messages are not displayed with --disable-verbose + +Daniel Stenberg (5 Jun 2017) +- test1262: verify ftp download with -z for "if older than this" + +Marcel Raad (5 Jun 2017) +- curl_ntlm_core: use Curl_raw_toupper instead of toupper + + This was the only remaining use of toupper in the entire source code. - ... now works correctly when invoke from the root makefile + Suggested-by: Daniel Stenberg + +Daniel Stenberg (4 Jun 2017) +- RELEASE-NOTES: synced with 65ba92650 diff --git a/CMake/FindGSS.cmake b/CMake/FindGSS.cmake index dfaeaf3..60dcb73 100644 --- a/CMake/FindGSS.cmake +++ b/CMake/FindGSS.cmake @@ -12,7 +12,7 @@ # GSS_LINKER_FLAGS - Additional linker flags # GSS_COMPILER_FLAGS - Additional compiler flags # GSS_VERSION - This is set to version advertised by pkg-config or read from manifest. -# In case the library is found but no version info availabe it'll be set to "unknown" +# In case the library is found but no version info available it'll be set to "unknown" set(_MIT_MODNAME mit-krb5-gssapi) set(_HEIMDAL_MODNAME heimdal-gssapi) diff --git a/CMake/FindMbedTLS.cmake b/CMake/FindMbedTLS.cmake new file mode 100644 index 0000000..a916395 --- /dev/null +++ b/CMake/FindMbedTLS.cmake @@ -0,0 +1,13 @@ +find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h) + +find_library(MBEDTLS_LIBRARY mbedtls) +find_library(MBEDX509_LIBRARY mbedx509) +find_library(MBEDCRYPTO_LIBRARY mbedcrypto) + +set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(MBEDTLS DEFAULT_MSG + MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY) + +mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY) diff --git a/CMake/Macros.cmake b/CMake/Macros.cmake index dab005f..82aadca 100644 --- a/CMake/Macros.cmake +++ b/CMake/Macros.cmake @@ -93,3 +93,32 @@ macro(CURL_INTERNAL_TEST_RUN CURL_TEST) endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) endif() endmacro(CURL_INTERNAL_TEST_RUN) + +macro(CURL_NROFF_CHECK) + find_program(NROFF NAMES gnroff nroff) + if(NROFF) + # Need a way to write to stdin, this will do + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test") + # Tests for a valid nroff option to generate a manpage + foreach(_MANOPT "-man" "-mandoc") + execute_process(COMMAND "${NROFF}" ${_MANOPT} + OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT + INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" + ERROR_QUIET) + # Save the option if it was valid + if(NROFF_MANOPT_OUTPUT) + message("Found *nroff option: -- ${_MANOPT}") + set(NROFF_MANOPT ${_MANOPT}) + set(NROFF_USEFUL ON) + break() + endif() + endforeach() + # No need for the temporary file + file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt") + if(NOT NROFF_USEFUL) + message(WARNING "Found no *nroff option to get plaintext from man pages") + endif() + else() + message(WARNING "Found no *nroff program") + endif() +endmacro(CURL_NROFF_CHECK) diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index 3b203c5..989f04e 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -32,9 +32,9 @@ int main(void) { if(curl_cv_recv) if(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown") foreach(recv_retv "int" "ssize_t" ) - foreach(recv_arg1 "int" "ssize_t" "SOCKET") - foreach(recv_arg2 "void *" "char *") - foreach(recv_arg3 "size_t" "int" "socklen_t" "unsigned int") + foreach(recv_arg1 "SOCKET" "int" ) + foreach(recv_arg2 "char *" "void *" ) + foreach(recv_arg3 "int" "size_t" "socklen_t" "unsigned int") foreach(recv_arg4 "int" "unsigned int") if(NOT curl_cv_func_recv_done) unset(curl_cv_func_recv_test CACHE) @@ -96,9 +96,9 @@ int main(void) { if(curl_cv_send) if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown") foreach(send_retv "int" "ssize_t" ) - foreach(send_arg1 "int" "ssize_t" "SOCKET") - foreach(send_arg2 "const void *" "void *" "char *" "const char *") - foreach(send_arg3 "size_t" "int" "socklen_t" "unsigned int") + foreach(send_arg1 "SOCKET" "int" "ssize_t" ) + foreach(send_arg2 "const char *" "const void *" "void *" "char *") + foreach(send_arg3 "int" "size_t" "socklen_t" "unsigned int") foreach(send_arg4 "int" "unsigned int") if(NOT curl_cv_func_send_done) unset(curl_cv_func_send_test CACHE) diff --git a/CMake/Utilities.cmake b/CMake/Utilities.cmake index 37cdfe3..005b166 100644 --- a/CMake/Utilities.cmake +++ b/CMake/Utilities.cmake @@ -19,7 +19,7 @@ function(LIST_SPACES_APPEND_ONCE LIST_NAME) set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE) endfunction() -# Convinience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value. +# Convenience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value. # Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND) function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL) list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS) @@ -29,3 +29,16 @@ function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL) set(${RETVAL} TRUE PARENT_SCOPE) endif() endfunction() + +# Returns a list of arguments that evaluate to true +function(collect_true output_var output_count_var) + set(${output_var}) + foreach(option_var IN LISTS ARGN) + if(${option_var}) + list(APPEND ${output_var} ${option_var}) + endif() + endforeach() + set(${output_var} ${${output_var}} PARENT_SCOPE) + list(LENGTH ${output_var} ${output_count_var}) + set(${output_count_var} ${${output_count_var}} PARENT_SCOPE) +endfunction() diff --git a/CMake/cmake_uninstall.cmake.in b/CMake/cmake_uninstall.cmake.in new file mode 100644 index 0000000..d00a516 --- /dev/null +++ b/CMake/cmake_uninstall.cmake.in @@ -0,0 +1,26 @@ +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +if (NOT DEFINED CMAKE_INSTALL_PREFIX) + set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") +endif () + message(${CMAKE_INSTALL_PREFIX}) + +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + message(STATUS "Uninstalling $ENV{DESTDIR}${file}") + if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + exec_program( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif(NOT "${rm_retval}" STREQUAL 0) + else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") +endforeach(file) diff --git a/CMake/curl-config.cmake b/CMake/curl-config.cmake new file mode 100644 index 0000000..119332c --- /dev/null +++ b/CMake/curl-config.cmake @@ -0,0 +1,59 @@ + +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT CURL_FIND_COMPONENTS) + set(CURL_FIND_COMPONENTS curl libcurl) + if(CURL_FIND_REQUIRED) + set(CURL_FIND_REQUIRED_curl TRUE) + set(CURL_FIND_REQUIRED_libcurl TRUE) + endif() +endif() + +set(_curl_missing_components) +foreach(_comp ${CURL_FIND_COMPONENTS}) + if(EXISTS "${_DIR}/${_comp}-target.cmake") + include("${_DIR}/${_comp}-target.cmake") + set(CURL_${_comp}_FOUND TRUE) + else() + set(CURL_${_comp}_FOUND FALSE) + if(CURL_FIND_REQUIRED_${_comp}) + set(CURL_FOUND FALSE) + list(APPEND _curl_missing_components ${_comp}) + endif() + endif() +endforeach() + +if(_curl_missing_components) + set(CURL_NOT_FOUND_MESSAGE "Following required components not found: " ${_curl_missing_components}) +else() + if(TARGET CURL::libcurl) + string(TOUPPER "${CMAKE_BUILD_TYPE}" _curl_current_config) + if(NOT _curl_current_config) + set(_curl_current_config "NOCONFIG") + endif() + get_target_property(_curl_configurations CURL::libcurl IMPORTED_CONFIGURATIONS) + list(FIND _curl_configurations "${_curl_current_config}" _i) + if(_i LESS 0) + set(_curl_config "RELEASE") + list(FIND _curl_configurations "${_curl_current_config}" _i) + if(_i LESS 0) + set(_curl_config "NOCONFIG") + list(FIND _curl_configurations "${_curl_current_config}" _i) + endif() + endif() + + if(_i LESS 0) + set(_curl_current_config "") # let CMake pick config at random + else() + set(_curl_current_config "_${_curl_current_config}") + endif() + + get_target_property(CURL_INCLUDE_DIRS CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(CURL_LIBRARIES CURL::libcurl "LOCATION${_curl_current_config}") + set(_curl_current_config) + set(_curl_configurations) + set(_i) + endif() +endif() + +unset(_curl_missing_components) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17606bf..490cc19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -38,11 +38,12 @@ # To check: # (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not. # (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options. -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}") include(Utilities) include(Macros) include(CMakeDependentOption) +include(CheckCCompilerFlag) project( CURL C ) @@ -72,20 +73,36 @@ set(OS "\"${CMAKE_SYSTEM_NAME}\"") include_directories(${PROJECT_BINARY_DIR}/include/curl) include_directories( ${CURL_SOURCE_DIR}/include ) +option(CURL_WERROR "Turn compiler warnings into errors" OFF) +option(PICKY_COMPILER "Enable picky compiler options" ON) option(BUILD_CURL_EXE "Set to ON to build curl executable." ON) option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF) option(ENABLE_ARES "Set to ON to enable c-ares support" OFF) if(WIN32) - CMAKE_DEPENDENT_OPTION(ENABLE_THREADED_RESOLVER - "Set to ON to enable threaded DNS lookup" - ON "NOT ENABLE_ARES" - OFF) -else() - option(ENABLE_THREADED_RESOLVER "Set to ON to enable POSIX threaded DNS lookup" OFF) + option(CURL_STATIC_CRT "Set to ON to build libcurl with static CRT on Windows (/MT)." OFF) + option(ENABLE_INET_PTON "Set to OFF to prevent usage of inet_pton when building against modern SDKs while still requiring compatibility with older Windows versions, such as Windows XP, Windows Server 2003 etc." ON) endif() + +CMAKE_DEPENDENT_OPTION(ENABLE_THREADED_RESOLVER "Set to ON to enable threaded DNS lookup" + ON "NOT ENABLE_ARES" + OFF) + option(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF) option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF) +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) + if (PICKY_COMPILER) + foreach (_CCOPT -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wundef -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -Wdouble-promotion -Wno-system-headers) + # surprisingly, CHECK_C_COMPILER_FLAG needs a new variable to store each new + # test result in. + CHECK_C_COMPILER_FLAG(${_CCOPT} OPT${_CCOPT}) + if(OPT${_CCOPT}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}") + endif() + endforeach() + endif(PICKY_COMPILER) +endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) + if (ENABLE_DEBUG) # DEBUGBUILD will be defined only for Debug builds if(NOT CMAKE_VERSION VERSION_LESS 3.0) @@ -100,13 +117,12 @@ if (ENABLE_CURLDEBUG) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS CURLDEBUG) endif() +# For debug libs and exes, add "-d" postfix +set(CMAKE_DEBUG_POSTFIX "-d" CACHE STRING "Set debug library postfix") + # initialize CURL_LIBS set(CURL_LIBS "") -if(ENABLE_THREADED_RESOLVER AND ENABLE_ARES) - message(FATAL_ERROR "Options ENABLE_THREADED_RESOLVER and ENABLE_ARES are mutually exclusive") -endif() - if(ENABLE_ARES) set(USE_ARES 1) find_package(CARES REQUIRED) @@ -114,11 +130,6 @@ if(ENABLE_ARES) set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY}) endif() -if(MSVC) - option(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF) - mark_as_advanced(BUILD_RELEASE_DEBUG_DIRS) -endif() - include(CurlSymbolHiding) option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF) @@ -176,8 +187,6 @@ option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF) mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH) option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF) mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS) -option(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF) -mark_as_advanced(DISABLED_THREADSAFE) option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON) mark_as_advanced(ENABLE_IPV6) if(ENABLE_IPV6 AND NOT WIN32) @@ -194,46 +203,45 @@ if(ENABLE_IPV6 AND NOT WIN32) endif() endif() -option(ENABLE_MANUAL "to provide the built-in manual" ON) -unset(USE_MANUAL CACHE) # TODO: cache NROFF/NROFF_MANOPT/USE_MANUAL vars? +CURL_NROFF_CHECK() +find_package(Perl) + +CMAKE_DEPENDENT_OPTION(ENABLE_MANUAL "to provide the built-in manual" + ON "NROFF_USEFUL;PERL_FOUND" + OFF) + +if(NOT PERL_FOUND) + message(STATUS "Perl not found, testing disabled.") + set(BUILD_TESTING OFF) +endif() if(ENABLE_MANUAL) - find_program(NROFF NAMES gnroff nroff) - if(NROFF) - # Need a way to write to stdin, this will do - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test") - # Tests for a valid nroff option to generate a manpage - foreach(_MANOPT "-man" "-mandoc") - execute_process(COMMAND "${NROFF}" ${_MANOPT} - OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT - INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" - ERROR_QUIET) - # Save the option if it was valid - if(NROFF_MANOPT_OUTPUT) - message("Found *nroff option: -- ${_MANOPT}") - set(NROFF_MANOPT ${_MANOPT}) - set(USE_MANUAL 1) - break() - endif() - endforeach() - # No need for the temporary file - file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt") - if(NOT USE_MANUAL) - message(WARNING "Found no *nroff option to get plaintext from man pages") - endif() - else() - message(WARNING "Found no *nroff program") - endif() + set(USE_MANUAL ON) endif() # We need ansi c-flags, especially on HP set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS}) +if(CURL_STATIC_CRT) + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") +endif() + # Disable warnings on Borland to avoid changing 3rd party code. if(BORLAND) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-") endif(BORLAND) +if(CURL_WERROR) + if(MSVC_VERSION) + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /WX") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX") + else() + # this assumes clang or gcc style options + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif() +endif(CURL_WERROR) + # If we are on AIX, do the _ALL_SOURCE magic if(${CMAKE_SYSTEM_NAME} MATCHES AIX) set(_ALL_SOURCE 1) @@ -256,19 +264,14 @@ if(WIN32) endif(WIN32) if(ENABLE_THREADED_RESOLVER) + find_package(Threads REQUIRED) if(WIN32) set(USE_THREADS_WIN32 ON) else() - check_include_file_concat("pthread.h" HAVE_PTHREAD_H) - if(HAVE_PTHREAD_H) - set(CMAKE_THREAD_PREFER_PTHREAD 1) - find_package(Threads) - if(CMAKE_USE_PTHREADS_INIT) - set(CURL_LIBS ${CURL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) - set(USE_THREADS_POSIX 1) - endif() - endif() + set(USE_THREADS_POSIX ${CMAKE_USE_PTHREADS_INIT}) + set(HAVE_PTHREAD_H ${CMAKE_USE_PTHREADS_INIT}) endif() + set(CURL_LIBS ${CURL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) endif() # Check for all needed libraries @@ -289,47 +292,95 @@ endif(NOT NOT_NEED_LIBNSL) check_function_exists(gethostname HAVE_GETHOSTNAME) -set(OPENSSL_DEFAULT ON) if(WIN32) - set(OPENSSL_DEFAULT OFF) check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32) check_library_exists_concat("winmm" getch HAVE_LIBWINMM) endif() -option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${OPENSSL_DEFAULT}) -mark_as_advanced(CMAKE_USE_OPENSSL) +# check SSL libraries +# TODO support GNUTLS, NSS, POLARSSL, AXTLS, CYASSL +if(APPLE) + option(CMAKE_USE_DARWINSSL "enable Apple OS native SSL/TLS" OFF) +endif() if(WIN32) - CMAKE_DEPENDENT_OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON - "NOT CMAKE_USE_OPENSSL" OFF) - mark_as_advanced(CURL_WINDOWS_SSPI) + option(CMAKE_USE_WINSSL "enable Windows native SSL/TLS" OFF) + cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON + CMAKE_USE_WINSSL OFF) endif() +option(CMAKE_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF) -set(USE_OPENSSL OFF) -set(HAVE_LIBCRYPTO OFF) -set(HAVE_LIBSSL OFF) +set(openssl_default ON) +if(WIN32 OR CMAKE_USE_DARWINSSL OR CMAKE_USE_WINSSL OR CMAKE_USE_MBEDTLS) + set(openssl_default OFF) +endif() +option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default}) + +collect_true(enabled_ssl_options enabled_ssl_options_count + CMAKE_USE_WINSSL + CMAKE_USE_DARWINSSL + CMAKE_USE_OPENSSL + CMAKE_USE_MBEDTLS +) +if(enabled_ssl_options_count GREATER 1) + message(FATAL_ERROR "Multiple SSL options specified: ${enabled_ssl_options}. Please pick at most one and disable the rest.") +endif() -if(CMAKE_USE_OPENSSL) - find_package(OpenSSL) - if(OPENSSL_FOUND) - list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) - set(USE_OPENSSL ON) - set(HAVE_LIBCRYPTO ON) - set(HAVE_LIBSSL ON) - include_directories(${OPENSSL_INCLUDE_DIR}) - set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) - check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) - check_include_file("openssl/engine.h" HAVE_OPENSSL_ENGINE_H) - check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H) - check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H) - check_include_file("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H) - check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H) - check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H) - check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H) - check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H) - elseif(WIN32) - set(CURL_WINDOWS_SSPI ON) +if(CMAKE_USE_WINSSL) + set(SSL_ENABLED ON) + set(USE_SCHANNEL ON) # Windows native SSL/TLS support + set(USE_WINDOWS_SSPI ON) # CMAKE_USE_WINSSL implies CURL_WINDOWS_SSPI + list(APPEND CURL_LIBS "crypt32") +endif() +if(CURL_WINDOWS_SSPI) + set(USE_WINDOWS_SSPI ON) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DSECURITY_WIN32") +endif() + +if(CMAKE_USE_DARWINSSL) + find_library(COREFOUNDATION_FRAMEWORK "CoreFoundation") + if(NOT COREFOUNDATION_FRAMEWORK) + message(FATAL_ERROR "CoreFoundation framework not found") + endif() + + find_library(SECURITY_FRAMEWORK "Security") + if(NOT SECURITY_FRAMEWORK) + message(FATAL_ERROR "Security framework not found") endif() + + set(SSL_ENABLED ON) + set(USE_DARWINSSL ON) + list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}" "${SECURITY_FRAMEWORK}") +endif() + +if(CMAKE_USE_OPENSSL) + find_package(OpenSSL REQUIRED) + set(SSL_ENABLED ON) + set(USE_OPENSSL ON) + set(HAVE_LIBCRYPTO ON) + set(HAVE_LIBSSL ON) + list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) + include_directories(${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) + check_include_file("openssl/engine.h" HAVE_OPENSSL_ENGINE_H) + check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H) + check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H) + check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H) + check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H) + check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H) + check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H) + check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS) + check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN) + check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD) +endif() + +if(CMAKE_USE_MBEDTLS) + find_package(MbedTLS REQUIRED) + set(SSL_ENABLED ON) + set(USE_MBEDTLS ON) + list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES}) + include_directories(${MBEDTLS_INCLUDE_DIRS}) endif() option(USE_NGHTTP2 "Use Nghttp2 library" OFF) @@ -572,25 +623,85 @@ else() endif() +# +# CA handling +# +set(CURL_CA_BUNDLE "auto" CACHE STRING + "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") +set(CURL_CA_FALLBACK OFF CACHE BOOL + "Set ON to use built-in CA store of TLS backend. Defaults to OFF") +set(CURL_CA_PATH "auto" CACHE STRING + "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") + +if("${CURL_CA_BUNDLE}" STREQUAL "") + message(FATAL_ERROR "Invalid value of CURL_CA_BUNDLE. Use 'none', 'auto' or file path.") +elseif("${CURL_CA_BUNDLE}" STREQUAL "none") + unset(CURL_CA_BUNDLE CACHE) +elseif("${CURL_CA_BUNDLE}" STREQUAL "auto") + unset(CURL_CA_BUNDLE CACHE) + set(CURL_CA_BUNDLE_AUTODETECT TRUE) +else() + set(CURL_CA_BUNDLE_SET TRUE) +endif() + +if("${CURL_CA_PATH}" STREQUAL "") + message(FATAL_ERROR "Invalid value of CURL_CA_PATH. Use 'none', 'auto' or directory path.") +elseif("${CURL_CA_PATH}" STREQUAL "none") + unset(CURL_CA_PATH CACHE) +elseif("${CURL_CA_PATH}" STREQUAL "auto") + unset(CURL_CA_PATH CACHE) + set(CURL_CA_PATH_AUTODETECT TRUE) +else() + set(CURL_CA_PATH_SET TRUE) +endif() + +if(CURL_CA_BUNDLE_SET AND CURL_CA_PATH_AUTODETECT) + # Skip autodetection of unset CA path because CA bundle is set explicitly +elseif(CURL_CA_PATH_SET AND CURL_CA_BUNDLE_AUTODETECT) + # Skip autodetection of unset CA bundle because CA path is set explicitly +elseif(CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT) + # first try autodetecting a CA bundle, then a CA path + + if(CURL_CA_BUNDLE_AUTODETECT) + set(SEARCH_CA_BUNDLE_PATHS + /etc/ssl/certs/ca-certificates.crt + /etc/pki/tls/certs/ca-bundle.crt + /usr/share/ssl/certs/ca-bundle.crt + /usr/local/share/certs/ca-root-nss.crt + /etc/ssl/cert.pem) + + foreach(SEARCH_CA_BUNDLE_PATH ${SEARCH_CA_BUNDLE_PATHS}) + if(EXISTS "${SEARCH_CA_BUNDLE_PATH}") + message(STATUS "Found CA bundle: ${SEARCH_CA_BUNDLE_PATH}") + set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}") + set(CURL_CA_BUNDLE_SET TRUE CACHE BOOL "Path to the CA bundle has been set") + break() + endif() + endforeach() + endif() + + if(CURL_CA_PATH_AUTODETECT AND (NOT CURL_CA_PATH_SET)) + if(EXISTS "/etc/ssl/certs") + set(CURL_CA_PATH "/etc/ssl/certs") + set(CURL_CA_PATH_SET TRUE CACHE BOOL "Path to the CA bundle has been set") + endif() + endif() +endif() + +if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS) + message(FATAL_ERROR + "CA path only supported by OpenSSL, GnuTLS or mbed TLS. " + "Set CURL_CA_PATH=none or enable one of those TLS backends.") +endif() + + # Check for header files if(NOT UNIX) check_include_file_concat("windows.h" HAVE_WINDOWS_H) check_include_file_concat("winsock.h" HAVE_WINSOCK_H) check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H) check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H) - if(CURL_WINDOWS_SSPI) - set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DSECURITY_WIN32") - check_include_file_concat("sspi.h" HAVE_SSPI_H) - if(HAVE_SSPI_H) - check_include_file_concat("schannel.h" HAVE_SCHANNEL_H) - set(USE_WINDOWS_SSPI ON) - if(HAVE_SCHANNEL_H) - set(USE_SCHANNEL ON) - set(SSL_ENABLED ON) - set(CURL_LIBS ${CURL_LIBS} "crypt32") - endif() - endif() - elseif(USE_OPENSSL) + if(NOT CURL_WINDOWS_SSPI AND USE_OPENSSL) set(CURL_LIBS ${CURL_LIBS} "crypt32") endif() endif(NOT UNIX) @@ -626,7 +737,6 @@ check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H) check_include_file_concat("io.h" HAVE_IO_H) check_include_file_concat("krb.h" HAVE_KRB_H) check_include_file_concat("libgen.h" HAVE_LIBGEN_H) -check_include_file_concat("limits.h" HAVE_LIMITS_H) check_include_file_concat("locale.h" HAVE_LOCALE_H) check_include_file_concat("net/if.h" HAVE_NET_IF_H) check_include_file_concat("netdb.h" HAVE_NETDB_H) @@ -684,50 +794,6 @@ if(NOT HAVE_SIZEOF_SSIZE_T) endif(NOT HAVE_SIZEOF_SSIZE_T) # off_t is sized later, after the HAVE_FILE_OFFSET_BITS test -# Different sizeofs, etc. - -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL - -set(CURL_SIZEOF_LONG ${SIZEOF_LONG}) - -if(SIZEOF_LONG EQUAL 8) - set(CURL_TYPEOF_CURL_OFF_T long) - set(CURL_SIZEOF_CURL_OFF_T 8) - set(CURL_FORMAT_CURL_OFF_T "ld") - set(CURL_FORMAT_CURL_OFF_TU "lu") - set(CURL_FORMAT_OFF_T "%ld") - set(CURL_SUFFIX_CURL_OFF_T L) - set(CURL_SUFFIX_CURL_OFF_TU UL) -endif(SIZEOF_LONG EQUAL 8) - -if(SIZEOF_LONG_LONG EQUAL 8) - set(CURL_TYPEOF_CURL_OFF_T "long long") - set(CURL_SIZEOF_CURL_OFF_T 8) - set(CURL_FORMAT_CURL_OFF_T "lld") - set(CURL_FORMAT_CURL_OFF_TU "llu") - set(CURL_FORMAT_OFF_T "%lld") - set(CURL_SUFFIX_CURL_OFF_T LL) - set(CURL_SUFFIX_CURL_OFF_TU ULL) -endif(SIZEOF_LONG_LONG EQUAL 8) - -if(NOT CURL_TYPEOF_CURL_OFF_T) - set(CURL_TYPEOF_CURL_OFF_T ${ssize_t}) - set(CURL_SIZEOF_CURL_OFF_T ${SIZEOF_SSIZE_T}) - # TODO: need adjustment here. - set(CURL_FORMAT_CURL_OFF_T "ld") - set(CURL_FORMAT_CURL_OFF_TU "lu") - set(CURL_FORMAT_OFF_T "%ld") - set(CURL_SUFFIX_CURL_OFF_T L) - set(CURL_SUFFIX_CURL_OFF_TU LU) -endif(NOT CURL_TYPEOF_CURL_OFF_T) - if(HAVE_SIZEOF_LONG_LONG) set(HAVE_LONGLONG 1) set(HAVE_LL 1) @@ -781,14 +847,6 @@ check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT) check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID) check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID) check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME) -if(CMAKE_USE_OPENSSL) - check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS) - check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN) - check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD) - if(HAVE_LIBCRYPTO AND HAVE_LIBSSL) - set(USE_OPENSSL 1) - endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL) -endif(CMAKE_USE_OPENSSL) check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R) check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R) @@ -815,13 +873,26 @@ check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE) check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME) check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT) check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE) +check_symbol_exists(setmode "${CURL_INCLUDES}" HAVE_SETMODE) check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT) check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL) check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL) check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) +check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) # symbol exists in win32, but function does not. -check_function_exists(inet_pton HAVE_INET_PTON) +if(WIN32) + if(ENABLE_INET_PTON) + check_function_exists(inet_pton HAVE_INET_PTON) + # _WIN32_WINNT_VISTA (0x0600) + add_definitions(-D_WIN32_WINNT=0x0600) + else() + # _WIN32_WINNT_WINXP (0x0501) + add_definitions(-D_WIN32_WINNT=0x0501) + endif() +else() + check_function_exists(inet_pton HAVE_INET_PTON) +endif() check_symbol_exists(fsetxattr "${CURL_INCLUDES}" HAVE_FSETXATTR) if(HAVE_FSETXATTR) @@ -893,6 +964,13 @@ if(HAVE_FILE_OFFSET_BITS) set(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64") endif(HAVE_FILE_OFFSET_BITS) check_type_size("off_t" SIZEOF_OFF_T) + +# include this header to get the type +set(CMAKE_REQUIRED_INCLUDES "${CURL_SOURCE_DIR}/include") +set(CMAKE_EXTRA_INCLUDE_FILES "curl/system.h") +check_type_size("curl_off_t" SIZEOF_CURL_OFF_T) +set(CMAKE_EXTRA_INCLUDE_FILES "") + set(CMAKE_REQUIRED_FLAGS) foreach(CURL_TEST @@ -1008,7 +1086,7 @@ else() set(CURL_SIZEOF_CURL_SOCKLEN_T ${SIZEOF_INT}) endif() -# TODO test which of these headers are required for the typedefs used in curlbuild.h +# TODO test which of these headers are required if(WIN32) set(CURL_PULL_WS2TCPIP_H ${HAVE_WS2TCPIP_H}) else() @@ -1023,11 +1101,6 @@ include(CMake/OtherTests.cmake) add_definitions(-DHAVE_CONFIG_H) -# For windows, do not allow the compiler to use default target (Vista). -if(WIN32) - add_definitions(-D_WIN32_WINNT=0x0501) -endif(WIN32) - # For windows, all compilers used by cmake should support large files if(WIN32) set(USE_WIN32_LARGE_FILES ON) @@ -1035,6 +1108,11 @@ endif(WIN32) if(MSVC) add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + if(CMAKE_C_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + else(CMAKE_C_FLAGS MATCHES "/W[0-4]") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") + endif(CMAKE_C_FLAGS MATCHES "/W[0-4]") endif(MSVC) # Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it). @@ -1043,9 +1121,9 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) string(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) - string(REGEX REPLACE "\\\\\n" "§!§" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REGEX REPLACE "\\\\\n" "!π!α!" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) - string(REPLACE "§!§" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REPLACE "!π!α!" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${} string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that may not be read by CMake scripts. @@ -1053,7 +1131,18 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) endfunction() +if(WIN32 AND NOT CYGWIN) + set(CURL_INSTALL_CMAKE_DIR CMake) +else() + set(CURL_INSTALL_CMAKE_DIR lib/cmake/curl) +endif() + +if(USE_MANUAL) + add_subdirectory(docs) +endif() + add_subdirectory(lib) + if(BUILD_CURL_EXE) add_subdirectory(src) endif() @@ -1063,11 +1152,6 @@ if(BUILD_TESTING) add_subdirectory(tests) endif() -# TODO support GNUTLS, NSS, POLARSSL, AXTLS, CYASSL, WINSSL, DARWINSSL -if(USE_OPENSSL) - set(SSL_ENABLED 1) -endif() - # Helper to populate a list (_items) with a label when conditions (the remaining # args) are satisfied function(_add_if label) @@ -1081,6 +1165,8 @@ endfunction() set(_items) _add_if("WinSSL" SSL_ENABLED AND USE_WINDOWS_SSPI) _add_if("OpenSSL" SSL_ENABLED AND USE_OPENSSL) +_add_if("DarwinSSL" SSL_ENABLED AND USE_DARWINSSL) +_add_if("mbedTLS" SSL_ENABLED AND USE_MBEDTLS) _add_if("IPv6" ENABLE_IPV6) _add_if("unix-sockets" USE_UNIX_SOCKETS) _add_if("libz" HAVE_LIBZ) @@ -1097,9 +1183,8 @@ _add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND _add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND (HAVE_GSSAPI OR USE_WINDOWS_SSPI)) # NTLM support requires crypto function adaptions from various SSL libs -# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS, DARWINSSL -if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR - USE_WINDOWS_SSPI OR GNUTLS_ENABLED OR NSS_ENABLED OR DARWINSSL_ENABLED)) +# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS +if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_WINDOWS_SSPI OR USE_DARWINSSL OR USE_MBEDTLS)) _add_if("NTLM" 1) # TODO missing option (autoconf: --enable-ntlm-wb) _add_if("NTLM_WB" NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED) @@ -1148,8 +1233,6 @@ set(CC "${CMAKE_C_COMPILER}") set(CONFIGURE_OPTIONS "") # TODO when to set "-DCURL_STATICLIB" for CPPFLAG_CURL_STATICLIB? set(CPPFLAG_CURL_STATICLIB "") -# TODO need to set this (see CURL_CHECK_CA_BUNDLE in acinclude.m4) -set(CURL_CA_BUNDLE "") set(CURLVERSION "${CURL_VERSION}") set(ENABLE_SHARED "yes") if(CURL_STATICLIB) @@ -1163,7 +1246,7 @@ set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") set(LIBCURL_LIBS "") set(libdir "${CMAKE_INSTALL_PREFIX}/lib") foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) - if(_lib MATCHES ".*/.*") + if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-") set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}") else() set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}") @@ -1199,16 +1282,29 @@ if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE) set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before") endif() -# Installation. -# First, install generated curlbuild.h -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/curl/curlbuild.h" - DESTINATION include/curl ) -# Next, install other headers excluding curlbuild.h +# install headers install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl" DESTINATION include - FILES_MATCHING PATTERN "*.h" - PATTERN "curlbuild.h" EXCLUDE) + FILES_MATCHING PATTERN "*.h") + +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${PROJECT_BINARY_DIR}/curl-config-version.cmake" + VERSION ${CURL_VERSION} + COMPATIBILITY SameMajorVersion +) + +configure_file(CMake/curl-config.cmake + "${PROJECT_BINARY_DIR}/curl-config.cmake" + COPYONLY +) + +install( + FILES ${PROJECT_BINARY_DIR}/curl-config.cmake + ${PROJECT_BINARY_DIR}/curl-config-version.cmake + DESTINATION ${CURL_INSTALL_CMAKE_DIR} +) # Workaround for MSVS10 to avoid the Dialog Hell # FIXME: This could be removed with future version of CMake. @@ -1218,3 +1314,14 @@ if(MSVC_VERSION EQUAL 1600) file(APPEND "${CURL_SLN_FILENAME}" "\n# This should be regenerated!\n") endif() endif() + +if(NOT TARGET uninstall) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/CMake/cmake_uninstall.cmake + IMMEDIATE @ONLY) + + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P + ${CMAKE_CURRENT_BINARY_DIR}/CMake/cmake_uninstall.cmake) +endif() diff --git a/COPYING b/COPYING index 1e45a5e..560a49d 100644 --- a/COPYING +++ b/COPYING @@ -1,6 +1,6 @@ COPYRIGHT AND PERMISSION NOTICE -Copyright (c) 1996 - 2017, Daniel Stenberg, , and many +Copyright (c) 1996 - 2018, Daniel Stenberg, , and many contributors, see the THANKS file. All rights reserved. diff --git a/MacOSX-Framework b/MacOSX-Framework index 19b338f..e6badcd 100755 --- a/MacOSX-Framework +++ b/MacOSX-Framework @@ -126,15 +126,6 @@ if test ! -z $SDK32; then pwd lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 - cp libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild32.h - cp include/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild64.h - cat >libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h < $(srcdir)/packages/Solaris/copyright ; \ cd $(srcdir)/packages/Solaris && $(MAKE) package @@ -267,11 +280,13 @@ cygwinbin: install-data-hook: cd include && $(MAKE) install cd docs && $(MAKE) install + cd docs/libcurl && $(MAKE) install # We extend the standard uninstall with a custom hook: uninstall-hook: cd include && $(MAKE) uninstall cd docs && $(MAKE) uninstall + cd docs/libcurl && $(MAKE) uninstall ca-bundle: lib/mk-ca-bundle.pl @echo "generating a fresh ca-bundle.crt" @@ -295,7 +310,8 @@ vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \ $(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \ $(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \ $(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \ - $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) + $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) \ + $(VC15_LIBVCXPROJ_DEPS) $(VC15_SRCVCXPROJ_DEPS) @(win32_lib_srcs='$(LIB_CFILES)'; \ win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \ win32_lib_rc='$(LIB_RCFILES)'; \ @@ -605,4 +621,24 @@ function gen_element(type, dir, file)\ -v src_rc="$$win32_src_rc" \ -v src_x_srcs="$$sorted_src_x_srcs" \ -v src_x_hdrs="$$sorted_src_x_hdrs" \ - "$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; };) + "$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_LIBTMPL) > $(VC15_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_SRCTMPL) > $(VC15_SRCVCXPROJ) || { exit 1; };) diff --git a/Makefile.in b/Makefile.in index 9d8c066..d83029e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -43,7 +43,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -144,7 +144,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -168,8 +169,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = curl-config libcurl.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -317,6 +317,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -342,7 +348,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -356,7 +364,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -368,6 +379,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -413,6 +425,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -425,6 +438,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -498,9 +512,11 @@ ACLOCAL_AMFLAGS = -I m4 CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \ CMake/CurlTests.c CMake/FindGSS.cmake CMake/OtherTests.cmake \ CMake/Platforms/WindowsCache.cmake CMake/Utilities.cmake \ - include/curl/curlbuild.h.cmake CMake/Macros.cmake \ + CMake/Macros.cmake \ CMake/CurlSymbolHiding.cmake CMake/FindCARES.cmake \ - CMake/FindLibSSH2.cmake CMake/FindNGHTTP2.cmake + CMake/FindLibSSH2.cmake CMake/FindNGHTTP2.cmake \ + CMake/FindMbedTLS.cmake CMake/cmake_uninstall.cmake.in \ + CMake/curl-config.cmake VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist @@ -556,6 +572,12 @@ VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc +VC15_LIBTMPL = projects/Windows/VC15/lib/libcurl.tmpl +VC15_LIBVCXPROJ = projects/Windows/VC15/lib/libcurl.vcxproj.dist +VC15_LIBVCXPROJ_DEPS = $(VC15_LIBTMPL) Makefile.am lib/Makefile.inc +VC15_SRCTMPL = projects/Windows/VC15/src/curl.tmpl +VC15_SRCVCXPROJ = projects/Windows/VC15/src/curl.vcxproj.dist +VC15_SRCVCXPROJ_DEPS = $(VC15_SRCTMPL) Makefile.am src/Makefile.inc VC_DIST = projects/README \ projects/build-openssl.bat \ projects/build-wolfssl.bat \ @@ -594,25 +616,33 @@ VC_DIST = projects/README \ projects/Windows/VC14/lib/libcurl.sln \ projects/Windows/VC14/lib/libcurl.vcxproj.filters \ projects/Windows/VC14/src/curl.sln \ - projects/Windows/VC14/src/curl.vcxproj.filters + projects/Windows/VC14/src/curl.vcxproj.filters \ + projects/Windows/VC15/curl-all.sln \ + projects/Windows/VC15/lib/libcurl.sln \ + projects/Windows/VC15/lib/libcurl.vcxproj.filters \ + projects/Windows/VC15/src/curl.sln \ + projects/Windows/VC15/src/curl.vcxproj.filters \ + projects/generate.bat \ + projects/wolfssl_options.h \ + projects/wolfssl_override.props WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \ winbuild/MakefileBuild.vc winbuild/Makefile.vc EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \ RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework scripts/zsh.pl \ - $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in \ - buildconf.bat + scripts/updatemanpages.pl $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) \ + lib/libcurl.vers.in buildconf.bat scripts/coverage.sh CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ $(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \ $(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \ $(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \ - $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) + $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) $(VC15_LIBVCXPROJ) $(VC15_SRCVCXPROJ) bin_SCRIPTS = curl-config -SUBDIRS = lib src include -DIST_SUBDIRS = $(SUBDIRS) tests packages docs scripts +SUBDIRS = lib src +DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcurl.pc LIB_VAUTH_CFILES = vauth/vauth.c vauth/cleartext.c vauth/cram.c \ @@ -640,14 +670,15 @@ LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ http_digest.c md4.c md5.c http_negotiate.c inet_pton.c strtoofft.c \ strerror.c amigaos.c hostasyn.c hostip4.c hostip6.c hostsyn.c \ inet_ntop.c parsedate.c select.c tftp.c splay.c strdup.c socks.c \ - ssh.c curl_addrinfo.c socks_gssapi.c socks_sspi.c \ + ssh.c ssh-libssh.c curl_addrinfo.c socks_gssapi.c socks_sspi.c \ curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c \ pingpong.c rtsp.c curl_threads.c warnless.c hmac.c curl_rtmp.c \ openldap.c curl_gethostname.c gopher.c idn_win32.c \ http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c \ http_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_sasl.c rand.c \ curl_multibyte.c hostcheck.c conncache.c pipeline.c dotdot.c \ - x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c + x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c \ + mime.c sha256.c setopt.c curl_path.c curl_ctype.c curl_range.c LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h if2ip.h \ @@ -666,7 +697,8 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ curl_sasl.h curl_multibyte.h hostcheck.h conncache.h \ curl_setup_once.h multihandle.h setup-vms.h pipeline.h dotdot.h \ x509asn1.h http2.h sigpipe.h smb.h curl_endian.h curl_des.h \ - curl_printf.h system_win32.h rand.h + curl_printf.h system_win32.h rand.h mime.h curl_sha256.h setopt.h \ + curl_path.h curl_ctype.h curl_range.h LIB_RCFILES = libcurl.rc CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) @@ -677,13 +709,15 @@ HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) CURLX_CFILES = \ ../lib/strtoofft.c \ ../lib/nonblock.c \ - ../lib/warnless.c + ../lib/warnless.c \ + ../lib/curl_ctype.c CURLX_HFILES = \ ../lib/curl_setup.h \ ../lib/strtoofft.h \ ../lib/nonblock.h \ - ../lib/warnless.h + ../lib/warnless.h \ + ../lib/curl_ctype.h CURL_CFILES = \ slist_wc.c \ @@ -700,6 +734,7 @@ CURL_CFILES = \ tool_dirhie.c \ tool_doswin.c \ tool_easysrc.c \ + tool_filetime.c \ tool_formparse.c \ tool_getparam.c \ tool_getpass.c \ @@ -710,7 +745,6 @@ CURL_CFILES = \ tool_libinfo.c \ tool_main.c \ tool_metalink.c \ - tool_mfiles.c \ tool_msgs.c \ tool_operate.c \ tool_operhlp.c \ @@ -723,7 +757,6 @@ CURL_CFILES = \ tool_urlglob.c \ tool_util.c \ tool_vms.c \ - tool_writeenv.c \ tool_writeout.c \ tool_xattr.c @@ -742,6 +775,7 @@ CURL_HFILES = \ tool_dirhie.h \ tool_doswin.h \ tool_easysrc.h \ + tool_filetime.h \ tool_formparse.h \ tool_getparam.h \ tool_getpass.h \ @@ -752,7 +786,6 @@ CURL_HFILES = \ tool_libinfo.h \ tool_main.h \ tool_metalink.h \ - tool_mfiles.h \ tool_msgs.h \ tool_operate.h \ tool_operhlp.h \ @@ -768,7 +801,6 @@ CURL_HFILES = \ tool_util.h \ tool_version.h \ tool_vms.h \ - tool_writeenv.h \ tool_writeout.h \ tool_xattr.h @@ -1057,7 +1089,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -1083,7 +1115,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -1101,7 +1133,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -1111,7 +1143,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -1221,7 +1253,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-generic clean-libtool clean-local mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -1292,9 +1324,9 @@ uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ - clean-libtool clean-local cscope cscopelist-am ctags ctags-am \ - dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-binSCRIPTS \ @@ -1320,14 +1352,14 @@ dist-hook: (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \ for file in $$distit; do \ strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \ - cp $$file $(distdir)$$strip; \ + cp -p $$file $(distdir)$$strip; \ done) html: - cd docs && make html + cd docs && $(MAKE) html pdf: - cd docs && make pdf + cd docs && $(MAKE) pdf check: test examples check-docs @@ -1343,9 +1375,15 @@ check: test examples check-docs @CROSSCOMPILING_FALSE@test-full: @CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all full-test) +@CROSSCOMPILING_FALSE@test-nonflaky: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all nonflaky-test) + @CROSSCOMPILING_FALSE@test-torture: @CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all torture-test) +@CROSSCOMPILING_FALSE@test-event: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all event-test) + @CROSSCOMPILING_FALSE@test-am: @CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all am-test) @@ -1355,15 +1393,6 @@ examples: check-docs: @(cd docs/libcurl; $(MAKE) check) -# This is a hook to have 'make clean' also clean up the docs and the tests -# dir. The extra check for the Makefiles being present is necessary because -# 'make distcheck' will make clean first in these directories _before_ it runs -# this hook. -clean-local: - @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi) - @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi) - -# # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros # must contain the following line: # %_topdir /home/loic/local/rpm @@ -1398,10 +1427,10 @@ rpm: # pkgadd -d ./HAXXcurl-* # -# gak - libtool requires an absoulte directory, hence the pwd below... +# gak - libtool requires an absolute directory, hence the pwd below... pkgadd: umask 022 ; \ - make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ + $(MAKE) install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ cat COPYING > $(srcdir)/packages/Solaris/copyright ; \ cd $(srcdir)/packages/Solaris && $(MAKE) package @@ -1415,11 +1444,13 @@ cygwinbin: install-data-hook: cd include && $(MAKE) install cd docs && $(MAKE) install + cd docs/libcurl && $(MAKE) install # We extend the standard uninstall with a custom hook: uninstall-hook: cd include && $(MAKE) uninstall cd docs && $(MAKE) uninstall + cd docs/libcurl && $(MAKE) uninstall ca-bundle: lib/mk-ca-bundle.pl @echo "generating a fresh ca-bundle.crt" @@ -1443,7 +1474,8 @@ vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \ $(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \ $(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \ $(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \ - $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) + $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) \ + $(VC15_LIBVCXPROJ_DEPS) $(VC15_SRCVCXPROJ_DEPS) @(win32_lib_srcs='$(LIB_CFILES)'; \ win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \ win32_lib_rc='$(LIB_RCFILES)'; \ @@ -1753,7 +1785,27 @@ function gen_element(type, dir, file)\ -v src_rc="$$win32_src_rc" \ -v src_x_srcs="$$sorted_src_x_srcs" \ -v src_x_hdrs="$$sorted_src_x_hdrs" \ - "$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; };) + "$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_LIBTMPL) > $(VC15_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_SRCTMPL) > $(VC15_SRCVCXPROJ) || { exit 1; };) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 27ca118..6cbfe48 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,20 +1,100 @@ -Curl and libcurl 7.53.1 +Curl and libcurl 7.59.0 - Public curl releases: 164 - Command line options: 205 - curl_easy_setopt() options: 244 - Public functions in libcurl: 61 - Contributors: 1507 + Public curl releases: 173 + Command line options: 213 + curl_easy_setopt() options: 253 + Public functions in libcurl: 74 + Contributors: 1705 + +This release includes the following changes: + + o curl: add --proxy-pinnedpubkey [10] + o added: CURLOPT_TIMEVALUE_LARGE and CURLINFO_FILETIME_T [13] + o CURLOPT_RESOLVE: Add support for multiple IP addresses per entry [37] + o Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS [37] + o Add new tool option --happy-eyeballs-timeout-ms [37] + o Add CURLOPT_RESOLVER_START_FUNCTION and CURLOPT_RESOLVER_START_DATA [39] This release includes the following bugfixes: - o cyassl: fix typo - o url: Improve CURLOPT_PROXY_CAPATH error handling [1] - o urldata: include curl_sspi.h when Windows SSPI is enabled [2] - o formdata: check for EOF when reading from stdin [3] - o tests: Set CHARSET & LANG to UTF-8 in 1035, 2046 and 2047 [4] - o url: Default the proxy CA bundle location to CURL_CA_BUNDLE [5] - o rand: added missing #ifdef HAVE_FCNTL_H around fcntl.h header [6] + o openldap: check ldap_get_attribute_ber() results for NULL before using [50] + o FTP: reject path components with control codes [51] + o readwrite: make sure excess reads don't go beyond buffer end [52] + o lib555: drop text conversion and encode data as ascii codes [1] + o lib517: make variable static to avoid compiler warning + o lib544: sync ascii code data with textual data [1] + o GSKit: restore pinnedpubkey functionality [2] + o darwinssl: Don't import client certificates into Keychain on macOS [3] + o parsedate: fix date parsing for systems with 32 bit long [4] + o openssl: fix pinned public key build error in FIPS mode [5] + o SChannel/WinSSL: Implement public key pinning [6] + o cookies: remove verbose "cookie size:" output + o progress-bar: don't use stderr explicitly, use bar->out [7] + o Fixes for MSDOS + o build: open VC15 projects with VS 2017 + o curl_ctype: private is*() type macros and functions [8] + o configure: set PATH_SEPARATOR to colon for PATH w/o separator [9] + o winbuild: make linker generate proper PDB [11] + o curl_easy_reset: clear digest auth state [12] + o curl/curl.h: fix comment typo for CURLOPT_DNS_LOCAL_IP6 [14] + o range: commonize FTP and FILE range handling [15] + o progress-bar docs: update to match implementation [16] + o fnmatch: do not match the empty string with a character set + o fnmatch: accept an alphanum to be followed by a non-alphanum in char set [17] + o build: fix termios issue on android cross-compile [18] + o getdate: return -1 for out of range [19] + o formdata: use the mime-content type function [20] + o time-cond: fix reading the file modification time on Windows [21] + o build-openssl.bat: Extend VC15 support to include Enterprise and Professional + o build-wolfssl.bat: Extend VC15 support to include Enterprise and Professional + o openssl: Don't add verify locations when verifypeer==0 + o fnmatch: optimize processing of consecutive *s and ?s pattern characters [22] + o schannel: fix compiler warnings [23] + o content_encoding: Add "none" alias to "identity" [24] + o get_posix_time: only check for overflows if they can happen + o http_chunks: don't write chunks twice with CURLOPT_HTTP_TRANSFER_DECODING [25] + o README: language fix [26] + o sha256: build with OpenSSL < 0.9.8 [27] + o smtp: fix processing of initial dot in data [28] + o --tlsauthtype: works only if libcurl is built with TLS-SRP support [29] + o tests: new tests for http raw mode [30] + o libcurl-security.3: man page discussion security concerns when using libcurl + o curl_gssapi: make sure this file too uses our *printf() + o BINDINGS: fix curb link (and remove ruby-curl-multi) + o nss: use PK11_CreateManagedGenericObject() if available [31] + o travis: add build with iconv enabled [32] + o ssh: add two missing state names [33] + o CURLOPT_HEADERFUNCTION.3: mention folded headers + o http: fix the max header length detection logic [34] + o header callback: don't chop headers into smaller pieces [35] + o CURLOPT_HEADER.3: clarify problems with different data sizes + o curl --version: show PSL if the run-time lib has it enabled + o examples/sftpuploadresume: resume upload via CURLOPT_APPEND [36] + o Return error if called recursively from within callbacks [38] + o sasl: prefer PLAIN mechanism over LOGIN + o winbuild: Use CALL to run batch scripts [40] + o curl_share_setopt.3: connection cache is shared within multi handles + o winbuild: Use macros for the names of some build utilities [41] + o projects/README: remove reference to dead IDN link/package [42] + o lib655: silence compiler warning [43] + o configure: Fix version check for OpenSSL 1.1.1 + o docs/MANUAL: formfind.pl is not accessible on the site anymore [44] + o unit1309: fix warning on Windows x64 [45] + o unit1307: proper cleanup on OOM to fix torture tests + o curl_ctype: fix macro redefinition warnings + o build: get CFLAGS (including -werror) used for examples and tests [46] + o NO_PROXY: fix for IPv6 numericals in the URL [47] + o krb5: use nondeprecated functions [48] + o winbuild: prefer documented zlib library names [49] + o http2: mark the connection for close on GOAWAY [53] + o limit-rate: kick in even before "limit" data has been received [54] + o HTTP: allow "header;" to replace an internal header with a blank one [55] + o http2: verbose output new MAX_CONCURRENT_STREAMS values + o SECURITY: distros' max embargo time is 14 days + o curl tool: accept --compressed also if Brotli is enabled and zlib is not + o WolfSSL: adding TLSv1.3 [56] + o checksrc.pl: add -i and -m options + o CURLOPT_COOKIEFILE.3: "-" as file name means stdin This release includes the following known bugs: @@ -23,17 +103,76 @@ This release includes the following known bugs: This release would not have looked like this without help, code, reports and advice from friends like these: - Dan Fandrich, Daniel Stenberg, Ä°smail Dönmez, jveazey on github, Ray Satiro, - Sergii Pylypenko, Shachaf Ben-Kiki, Viktor Szakáts, - (8 contributors) + Adam Marcionek, Alessandro Ghedini, Anders Bakken, Aron Bergman, Ben Greear, + Björn Stenberg, Bruno Grasselli, Dair Grant, Dan Fandrich, Daniel Stenberg, + Dario Weisser, Douglas Mencken, Duy Phan Thanh, Earnestly on github, + Erik Johansson, Francisco Sedano, Gisle Vanem, Guido Berhoerster, + Henry Roeland, Kamil Dudka, Klaus Stein, Łukasz Domeradzki, Marcel Raad, + Martin Dreher, Max Dymond, Michael Kaufmann, Michał Janiszewski, + Mohammad AlSaleh, Patrick Monnerat, Patrick Schlangen, Ray Satiro, + Richard Alcock, Richard Moore, Rod Widdowson, Ruurd Beerstra, + Sergii Kavunenko, Sergio Borghese, Somnath Kundu, steelman on github, + Stefan Kanthak, Steve Holme, Tim Mcdonough, Travis Burtrum, Viktor Szakats, + 刘佩东, + (45 contributors) Thanks! (and sorry if I forgot to mention someone) References to bug reports and discussions on issues: - [1] = https://curl.haxx.se/bug/?i=1257 - [2] = https://curl.haxx.se/bug/?i=1276 - [3] = https://curl.haxx.se/bug/?i=1281 - [4] = https://curl.haxx.se/bug/?i=1277 - [5] = https://curl.haxx.se/bug/?i=1257 - [6] = https://curl.haxx.se/bug/?i=1285 + [1] = https://curl.haxx.se/bug/?i=1872 + [2] = https://curl.haxx.se/bug/?i=2263 + [3] = https://curl.haxx.se/bug/?i=2085 + [4] = https://curl.haxx.se/bug/?i=2250 + [5] = https://curl.haxx.se/bug/?i=2258 + [6] = https://curl.haxx.se/bug/?i=1429 + [7] = https://github.com/curl/curl/commit/993dd5651a6c853bfe3870f6a69c7b329fa4e8ce#commitcomment-27070080 + [8] = https://curl.haxx.se/bug/?i=2269 + [9] = https://curl.haxx.se/bug/?i=2202 + [10] = https://curl.haxx.se/bug/?i=2268 + [11] = https://curl.haxx.se/bug/?i=2274 + [12] = https://curl.haxx.se/mail/lib-2018-01/0074.html + [13] = https://curl.haxx.se/bug/?i=2238 + [14] = https://curl.haxx.se/bug/?i=2275 + [15] = https://curl.haxx.se/bug/?i=2205 + [16] = https://curl.haxx.se/bug/?i=2271 + [17] = https://curl.haxx.se/mail/lib-2018-01/0114.html + [18] = https://curl.haxx.se/mail/lib-2018-01/0122.html + [19] = https://curl.haxx.se/bug/?i=2278 + [20] = https://curl.haxx.se/bug/?i=2282 + [21] = https://curl.haxx.se/bug/?i=2164 + [22] = https://curl.haxx.se/bug/?i=2291 + [23] = https://curl.haxx.se/bug/?i=2296 + [24] = https://curl.haxx.se/bug/?i=2298 + [25] = https://curl.haxx.se/bug/?i=2303 + [26] = https://curl.haxx.se/bug/?i=2300 + [27] = https://curl.haxx.se/bug/?i=2305 + [28] = https://curl.haxx.se/bug/?i=2304 + [29] = https://bugzilla.redhat.com/1542256 + [30] = https://curl.haxx.se/bug/?i=2303 + [31] = https://bugzilla.redhat.com/1510247 + [32] = https://curl.haxx.se/bug/?i=1872 + [33] = https://curl.haxx.se/bug/?i=2312 + [34] = https://curl.haxx.se/mail/lib-2018-02/0056.html + [35] = https://curl.haxx.se/bug/?i=2314 + [36] = https://curl.haxx.se/mail/lib-2018-02/0072.html + [37] = https://curl.haxx.se/bug/?i=2260 + [38] = https://curl.haxx.se/bug/?i=2302 + [39] = https://curl.haxx.se/bug/?i=2311 + [40] = https://curl.haxx.se/bug/?i=2330 + [41] = https://curl.haxx.se/bug/?i=2329 + [42] = https://curl.haxx.se/bug/?i=2325 + [43] = https://curl.haxx.se/bug/?i=2335 + [44] = https://curl.haxx.se/bug/?i=2342 + [45] = https://curl.haxx.se/bug/?i=2341 + [46] = https://curl.haxx.se/bug/?i=2337 + [47] = https://curl.haxx.se/bug/?i=2353 + [48] = https://curl.haxx.se/bug/?i=2356 + [49] = https://curl.haxx.se/bug/?i=2354 + [50] = https://curl.haxx.se/docs/adv_2018-97a2.html + [51] = https://curl.haxx.se/docs/adv_2018-9cd6.html + [52] = https://curl.haxx.se/docs/adv_2018-b047.html + [53] = https://curl.haxx.se/bug/?i=2365 + [54] = https://curl.haxx.se/bug/?i=2371 + [55] = https://curl.haxx.se/bug/?i=2357 + [56] = https://curl.haxx.se/bug/?i=2349 diff --git a/acinclude.m4 b/acinclude.m4 old mode 100644 new mode 100755 index 2abae8d..69bb6c0 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -199,8 +199,6 @@ AC_DEFUN([CURL_CHECK_HEADER_WINDOWS], [ yes) AC_DEFINE_UNQUOTED(HAVE_WINDOWS_H, 1, [Define to 1 if you have the windows.h header file.]) - AC_DEFINE_UNQUOTED(WIN32_LEAN_AND_MEAN, 1, - [Define to avoid automatic inclusion of winsock.h]) ;; esac ]) @@ -790,8 +788,8 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [ # for x_nlibs in '' "$u_libs" \ '-lldap' \ - '-llber -lldap' \ '-lldap -llber' \ + '-llber -lldap' \ '-lldapssl -lldapx -lldapsdk' \ '-lldapsdk -lldapx -lldapssl' ; do if test "$curl_cv_ldap_LIBS" = "unknown"; then @@ -1084,7 +1082,11 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [ #endif #define GNICALLCONV #endif - extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2, + extern int GNICALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif + getnameinfo($gni_arg1, $gni_arg2, char *, $gni_arg46, char *, $gni_arg46, $gni_arg7); @@ -1388,6 +1390,9 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [ #define RECVCALLCONV #endif extern $recv_retv RECVCALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4); ]],[[ $recv_arg1 s=0; @@ -1522,6 +1527,9 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ #define SENDCALLCONV #endif extern $send_retv SENDCALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif send($send_arg1, $send_arg2, $send_arg3, $send_arg4); ]],[[ $send_arg1 s=0; @@ -2076,29 +2084,8 @@ _EOF ]) -dnl CURL_CONFIGURE_LONG -dnl ------------------------------------------------- -dnl Find out the size of long as reported by sizeof() and define -dnl CURL_SIZEOF_LONG as appropriate to be used in template file -dnl include/curl/curlbuild.h.in to properly configure the library. -dnl The size of long is a build time characteristic and as such -dnl must be recorded in curlbuild.h - -AC_DEFUN([CURL_CONFIGURE_LONG], [ - if test -z "$ac_cv_sizeof_long" || - test "$ac_cv_sizeof_long" -eq "0"; then - AC_MSG_ERROR([cannot find out size of long.]) - fi - CURL_DEFINE_UNQUOTED([CURL_SIZEOF_LONG], [$ac_cv_sizeof_long]) -]) - - dnl CURL_CONFIGURE_CURL_SOCKLEN_T dnl ------------------------------------------------- -dnl Find out suitable curl_socklen_t data type definition and size, making -dnl appropriate definitions for template file include/curl/curlbuild.h.in -dnl to properly configure and use the library. -dnl dnl The need for the curl_socklen_t definition arises mainly to properly dnl interface HP-UX systems which on one hand have a typedef'ed socklen_t dnl data type which is 32 or 64-Bit wide depending on the data model being @@ -2222,10 +2209,6 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [ dnl CURL_CONFIGURE_PULL_SYS_POLL dnl ------------------------------------------------- -dnl Find out if system header file sys/poll.h must be included by the -dnl external interface, making appropriate definitions for template file -dnl include/curl/curlbuild.h.in to properly configure and use the library. -dnl dnl The need for the sys/poll.h inclusion arises mainly to properly dnl interface AIX systems which define macros 'events' and 'revents'. @@ -2378,11 +2361,15 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [ long tv_usec; }; #endif - extern $sel_retv SELECTCALLCONV select($sel_arg1, - $sel_arg234, - $sel_arg234, - $sel_arg234, - $sel_arg5); + extern $sel_retv SELECTCALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif + select($sel_arg1, + $sel_arg234, + $sel_arg234, + $sel_arg234, + $sel_arg5); ]],[[ $sel_arg1 nfds=0; $sel_arg234 rfds=0; @@ -2717,292 +2704,6 @@ AC_HELP_STRING([--without-ca-fallback], [Don't use the built in CA store of the fi ]) - -dnl DO_CURL_OFF_T_CHECK (TYPE, SIZE) -dnl ------------------------------------------------- -dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T - -AC_DEFUN([DO_CURL_OFF_T_CHECK], [ - AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl - if test "$curl_typeof_curl_off_t" = "unknown" && test ! -z "$1"; then - tmp_includes="" - tmp_source="" - tmp_fmt="" - case XC_SH_TR_SH([$1]) in - int64_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f@<:@@:>@ = PRId64;" - tmp_fmt="PRId64" - ;; - int32_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f@<:@@:>@ = PRId32;" - tmp_fmt="PRId32" - ;; - int16_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f@<:@@:>@ = PRId16;" - tmp_fmt="PRId16" - ;; - esac - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - $tmp_includes - typedef $1 curl_off_t; - typedef char dummy_arr[sizeof(curl_off_t) == $2 ? 1 : -1]; - ]],[[ - $tmp_source - curl_off_t dummy; - ]]) - ],[ - if test -z "$tmp_fmt"; then - curl_typeof_curl_off_t="$1" - curl_sizeof_curl_off_t="$2" - else - CURL_CHECK_DEF([$tmp_fmt], [$curl_includes_inttypes], [silent]) - AS_VAR_PUSHDEF([tmp_HaveFmtDef], [curl_cv_have_def_$tmp_fmt])dnl - AS_VAR_PUSHDEF([tmp_FmtDef], [curl_cv_def_$tmp_fmt])dnl - if test AS_VAR_GET(tmp_HaveFmtDef) = "yes"; then - curl_format_curl_off_t=AS_VAR_GET(tmp_FmtDef) - curl_typeof_curl_off_t="$1" - curl_sizeof_curl_off_t="$2" - fi - AS_VAR_POPDEF([tmp_FmtDef])dnl - AS_VAR_POPDEF([tmp_HaveFmtDef])dnl - fi - ]) - fi -]) - - -dnl DO_CURL_OFF_T_SUFFIX_CHECK (TYPE) -dnl ------------------------------------------------- -dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T - -AC_DEFUN([DO_CURL_OFF_T_SUFFIX_CHECK], [ - AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl - AC_MSG_CHECKING([constant suffix string for curl_off_t]) - # - curl_suffix_curl_off_t="unknown" - curl_suffix_curl_off_tu="unknown" - # - case XC_SH_TR_SH([$1]) in - long_long | __longlong | __longlong_t) - tst_suffixes="LL::" - ;; - long) - tst_suffixes="L::" - ;; - int) - tst_suffixes="::" - ;; - __int64 | int64_t) - tst_suffixes="LL:i64::" - ;; - __int32 | int32_t) - tst_suffixes="L:i32::" - ;; - __int16 | int16_t) - tst_suffixes="L:i16::" - ;; - *) - AC_MSG_ERROR([unexpected data type $1]) - ;; - esac - # - old_IFS=$IFS; IFS=':' - for tmp_ssuf in $tst_suffixes ; do - IFS=$old_IFS - if test "x$curl_suffix_curl_off_t" = "xunknown"; then - case $tmp_ssuf in - i64 | i32 | i16) - tmp_usuf="u$tmp_ssuf" - ;; - LL | L) - tmp_usuf="U$tmp_ssuf" - ;; - *) - tmp_usuf="" - ;; - esac - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - $curl_includes_inttypes - typedef $1 new_t; - ]],[[ - new_t s1; - new_t s2; - s1 = -10$tmp_ssuf ; - s2 = 20$tmp_ssuf ; - if(s1 > s2) - return 1; - ]]) - ],[ - curl_suffix_curl_off_t="$tmp_ssuf" - curl_suffix_curl_off_tu="$tmp_usuf" - ]) - fi - done - IFS=$old_IFS - # - if test "x$curl_suffix_curl_off_t" = "xunknown"; then - AC_MSG_ERROR([cannot find constant suffix string for curl_off_t.]) - else - AC_MSG_RESULT([$curl_suffix_curl_off_t]) - AC_MSG_CHECKING([constant suffix string for unsigned curl_off_t]) - AC_MSG_RESULT([$curl_suffix_curl_off_tu]) - fi - # -]) - - -dnl CURL_CONFIGURE_CURL_OFF_T -dnl ------------------------------------------------- -dnl Find out suitable curl_off_t data type definition and associated -dnl items, and make the appropriate definitions used in template file -dnl include/curl/curlbuild.h.in to properly configure the library. - -AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [ - AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl - # - AC_BEFORE([$0],[AC_SYS_LARGEFILE])dnl - AC_BEFORE([$0],[CURL_CONFIGURE_REENTRANT])dnl - AC_BEFORE([$0],[CURL_CHECK_AIX_ALL_SOURCE])dnl - # - if test -z "$SED"; then - AC_MSG_ERROR([SED not set. Cannot continue without SED being set.]) - fi - # - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(void*) - # - if test -z "$ac_cv_sizeof_long" || - test "$ac_cv_sizeof_long" -eq "0"; then - AC_MSG_ERROR([cannot find out size of long.]) - fi - if test -z "$ac_cv_sizeof_voidp" || - test "$ac_cv_sizeof_voidp" -eq "0"; then - AC_MSG_ERROR([cannot find out size of void*.]) - fi - # - x_LP64_long="" - x_LP32_long="" - # - if test "$ac_cv_sizeof_long" -eq "8" && - test "$ac_cv_sizeof_voidp" -ge "8"; then - x_LP64_long="long" - elif test "$ac_cv_sizeof_long" -eq "4" && - test "$ac_cv_sizeof_voidp" -ge "4"; then - x_LP32_long="long" - fi - # - dnl DO_CURL_OFF_T_CHECK results are stored in next 3 vars - # - curl_typeof_curl_off_t="unknown" - curl_sizeof_curl_off_t="unknown" - curl_format_curl_off_t="unknown" - curl_format_curl_off_tu="unknown" - # - if test "$curl_typeof_curl_off_t" = "unknown"; then - AC_MSG_CHECKING([for 64-bit curl_off_t data type]) - for t8 in \ - "$x_LP64_long" \ - 'int64_t' \ - '__int64' \ - 'long long' \ - '__longlong' \ - '__longlong_t' ; do - DO_CURL_OFF_T_CHECK([$t8], [8]) - done - AC_MSG_RESULT([$curl_typeof_curl_off_t]) - fi - if test "$curl_typeof_curl_off_t" = "unknown"; then - AC_MSG_CHECKING([for 32-bit curl_off_t data type]) - for t4 in \ - "$x_LP32_long" \ - 'int32_t' \ - '__int32' \ - 'int' ; do - DO_CURL_OFF_T_CHECK([$t4], [4]) - done - AC_MSG_RESULT([$curl_typeof_curl_off_t]) - fi - if test "$curl_typeof_curl_off_t" = "unknown"; then - AC_MSG_ERROR([cannot find data type for curl_off_t.]) - fi - # - AC_MSG_CHECKING([size of curl_off_t]) - AC_MSG_RESULT([$curl_sizeof_curl_off_t]) - # - AC_MSG_CHECKING([formatting string directive for curl_off_t]) - if test "$curl_format_curl_off_t" != "unknown"; then - x_pull_headers="yes" - curl_format_curl_off_t=`echo "$curl_format_curl_off_t" | "$SED" 's/[["]]//g'` - curl_format_curl_off_tu=`echo "$curl_format_curl_off_t" | "$SED" 's/i$/u/'` - curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/d$/u/'` - curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'` - else - x_pull_headers="no" - case XC_SH_TR_SH([$curl_typeof_curl_off_t]) in - long_long | __longlong | __longlong_t) - curl_format_curl_off_t="lld" - curl_format_curl_off_tu="llu" - ;; - long) - curl_format_curl_off_t="ld" - curl_format_curl_off_tu="lu" - ;; - int) - curl_format_curl_off_t="d" - curl_format_curl_off_tu="u" - ;; - __int64) - curl_format_curl_off_t="I64d" - curl_format_curl_off_tu="I64u" - ;; - __int32) - curl_format_curl_off_t="I32d" - curl_format_curl_off_tu="I32u" - ;; - __int16) - curl_format_curl_off_t="I16d" - curl_format_curl_off_tu="I16u" - ;; - *) - AC_MSG_ERROR([cannot find print format string for curl_off_t.]) - ;; - esac - fi - AC_MSG_RESULT(["$curl_format_curl_off_t"]) - # - AC_MSG_CHECKING([formatting string directive for unsigned curl_off_t]) - AC_MSG_RESULT(["$curl_format_curl_off_tu"]) - # - DO_CURL_OFF_T_SUFFIX_CHECK([$curl_typeof_curl_off_t]) - # - if test "$x_pull_headers" = "yes"; then - if test "x$ac_cv_header_sys_types_h" = "xyes"; then - CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_TYPES_H]) - fi - if test "x$ac_cv_header_stdint_h" = "xyes"; then - CURL_DEFINE_UNQUOTED([CURL_PULL_STDINT_H]) - fi - if test "x$ac_cv_header_inttypes_h" = "xyes"; then - CURL_DEFINE_UNQUOTED([CURL_PULL_INTTYPES_H]) - fi - fi - # - CURL_DEFINE_UNQUOTED([CURL_TYPEOF_CURL_OFF_T], [$curl_typeof_curl_off_t]) - CURL_DEFINE_UNQUOTED([CURL_FORMAT_CURL_OFF_T], ["$curl_format_curl_off_t"]) - CURL_DEFINE_UNQUOTED([CURL_FORMAT_CURL_OFF_TU], ["$curl_format_curl_off_tu"]) - CURL_DEFINE_UNQUOTED([CURL_FORMAT_OFF_T], ["%$curl_format_curl_off_t"]) - CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_OFF_T], [$curl_sizeof_curl_off_t]) - CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_T], [$curl_suffix_curl_off_t]) - CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_TU], [$curl_suffix_curl_off_tu]) - # -]) - - dnl CURL_CHECK_WIN32_LARGEFILE dnl ------------------------------------------------- dnl Check if curl's WIN32 large file will be used @@ -3243,3 +2944,29 @@ AC_DEFUN([CURL_MAC_CFLAGS], [ fi ]) + + +dnl CURL_SUPPORTS_BUILTIN_AVAILABLE +dnl +dnl Check to see if the compiler supports __builtin_available. This built-in +dnl compiler function first appeared in Apple LLVM 9.0.0. It's so new that, at +dnl the time this macro was written, the function was not yet documented. Its +dnl purpose is to return true if the code is running under a certain OS version +dnl or later. + +AC_DEFUN([CURL_SUPPORTS_BUILTIN_AVAILABLE], [ + AC_MSG_CHECKING([to see if the compiler supports __builtin_available()]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + if (__builtin_available(macOS 10.8, iOS 5.0, *)) {} + ]]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED(HAVE_BUILTIN_AVAILABLE, 1, + [Define to 1 if you have the __builtin_available function.]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) diff --git a/aclocal.m4 b/aclocal.m4 index 32d8994..c17bd61 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -408,7 +408,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -605,7 +605,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,7 +626,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -648,7 +648,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -683,7 +683,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,7 +733,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -772,7 +772,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -801,7 +801,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -848,7 +848,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -867,7 +867,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -948,7 +948,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1008,7 +1008,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1036,7 +1036,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1055,7 +1055,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1186,6 +1186,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_code_coverage.m4]) m4_include([m4/curl-compilers.m4]) m4_include([m4/curl-confopts.m4]) m4_include([m4/curl-functions.m4]) diff --git a/buildconf b/buildconf index 0d998c2..5095753 100755 --- a/buildconf +++ b/buildconf @@ -6,7 +6,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -255,7 +255,7 @@ echo "buildconf: libtoolize version $lt_version (ok)" #-------------------------------------------------------------------------- # m4 check # -m4=`(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1`; +m4=`(${M4:-m4} --version 0<&- || ${M4:-gm4} --version) 2>/dev/null 0<&- | head -n 1`; m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'` if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then @@ -306,7 +306,6 @@ for fname in .deps \ configure \ configurehelp.pm \ curl-config \ - curlbuild.h \ depcomp \ libcares.pc \ libcurl.pc \ diff --git a/buildconf.bat b/buildconf.bat index ad3fba6..da5c039 100644 --- a/buildconf.bat +++ b/buildconf.bat @@ -6,7 +6,7 @@ rem * / __| | | | |_) | | rem * | (__| |_| | _ <| |___ rem * \___|\___/|_| \_\_____| rem * -rem * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +rem * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. rem * rem * This software is licensed as described in the file COPYING, which rem * you should have received as part of this distribution. The terms @@ -73,7 +73,6 @@ rem echo Generating prerequisite files call :generate - if errorlevel 4 goto nogencurlbuild if errorlevel 3 goto nogenhugehelp if errorlevel 2 goto nogenmakefile if errorlevel 1 goto warning @@ -83,7 +82,6 @@ rem echo Removing prerequisite files call :clean - if errorlevel 3 goto nocleancurlbuild if errorlevel 2 goto nocleanhugehelp if errorlevel 1 goto nocleanmakefile ) @@ -98,7 +96,6 @@ rem 0 - success rem 1 - success with simplified tool_hugehelp.c rem 2 - failed to generate Makefile rem 3 - failed to generate tool_hugehelp.c -rem 4 - failed to generate curlbuild.h rem :generate if "%OS%" == "Windows_NT" setlocal @@ -126,16 +123,6 @@ rem ) cmd /c exit 0 - rem Create curlbuild.h - echo * %CD%\include\curl\curlbuild.h - if exist include\curl\curlbuild.h.dist ( - copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h 1>NUL 2>&1 - if errorlevel 1 ( - if "%OS%" == "Windows_NT" endlocal - exit /B 4 - ) - ) - rem Setup c-ares git tree if exist ares\buildconf.bat ( echo. @@ -160,7 +147,6 @@ rem rem 0 - success rem 1 - failed to clean Makefile rem 2 - failed to clean tool_hugehelp.c -rem 3 - failed to clean curlbuild.h rem :clean rem Remove Makefile @@ -181,15 +167,6 @@ rem ) ) - rem Remove curlbuild.h - echo * %CD%\include\curl\curlbuild.h - if exist include\curl\curlbuild.h ( - del include\curl\curlbuild.h 2>NUL - if exist include\curl\curlbuild.h ( - exit /B 3 - ) - ) - exit /B rem Function to generate src\tool_hugehelp.c @@ -304,11 +281,6 @@ rem echo Error: Unable to generate src\tool_hugehelp.c goto error -:nogencurlbuild - echo. - echo Error: Unable to generate include\curl\curlbuild.h - goto error - :nocleanmakefile echo. echo Error: Unable to clean Makefile @@ -319,11 +291,6 @@ rem echo Error: Unable to clean src\tool_hugehelp.c goto error -:nocleancurlbuild - echo. - echo Error: Unable to clean include\curl\curlbuild.h - goto error - :warning echo. echo Warning: The curl manual could not be integrated in the source. This means when diff --git a/config.guess b/config.guess index 2e9ad7f..31e01ef 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-10-02' +timestamp='2017-11-07' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2016-10-02' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ timestamp='2016-10-02' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -244,6 +244,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} exit ;; + *:MidnightBSD:*:*) + echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -259,6 +262,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; + *:Redox:*:*) + echo ${UNAME_MACHINE}-unknown-redox + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -315,15 +321,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; @@ -485,13 +482,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); @@ -614,7 +611,7 @@ EOF *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and @@ -635,8 +632,8 @@ EOF 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` @@ -749,7 +746,7 @@ EOF { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -758,7 +755,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -837,10 +834,11 @@ EOF UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -854,10 +852,6 @@ EOF *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; @@ -873,27 +867,12 @@ EOF echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; @@ -1096,7 +1075,7 @@ EOF i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + i*86:*:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} @@ -1303,14 +1282,21 @@ EOF if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1334,15 +1320,18 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; @@ -1414,16 +1403,28 @@ EOF exit ;; esac +echo "$0: unable to guess system type" >&2 + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 <. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,7 +33,7 @@ timestamp='2016-11-04' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -229,9 +229,6 @@ case $os in -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; -psos*) os=-psos ;; @@ -263,7 +260,7 @@ case $basic_machine in | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -315,7 +312,7 @@ case $basic_machine in | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ - | we32k \ + | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -388,7 +385,7 @@ case $basic_machine in | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -446,6 +443,7 @@ case $basic_machine in | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -641,7 +639,7 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; @@ -903,7 +901,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -948,6 +946,9 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -1243,6 +1244,9 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none @@ -1251,6 +1255,9 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1358,8 +1365,8 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1379,9 +1386,9 @@ case $os in -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ @@ -1397,7 +1404,7 @@ case $os in | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ @@ -1409,7 +1416,7 @@ case $os in | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1484,7 +1491,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1539,6 +1546,19 @@ case $os in -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; -ios) @@ -1638,6 +1658,9 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; @@ -1683,7 +1706,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1818,7 +1841,7 @@ echo $basic_machine$os exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/configure b/configure index b7030ff..9d38b94 100755 --- a/configure +++ b/configure @@ -11,7 +11,7 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # -# Copyright (c) 1998 - 2016 Daniel Stenberg, +# Copyright (c) 1998 - 2017 Daniel Stenberg, # This configure script may be copied, distributed and modified under the # terms of the curl license; see COPYING for more details @@ -233,9 +233,10 @@ if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then # When both counting methods give the same result we do not want to # chose one over the other, and consider auto-detection not possible. if test -z "$PATH_SEPARATOR"; then - # Stop dead until user provides 'PATH_SEPARATOR' definition. - echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2 - exit 1 + # User should provide the correct 'PATH_SEPARATOR' definition. + # Until then, guess that it is colon! + echo "$xc_msg_warn path separator not determined, guessing colon" >&2 + PATH_SEPARATOR=':' fi else # Separator with the greater directory count is the auto-detected one. @@ -875,6 +876,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +SSL_BACKENDS SUPPORT_PROTOCOLS SUPPORT_FEATURES ENABLE_STATIC @@ -885,8 +887,6 @@ BLANK_AT_MAKETIME CURL_NETWORK_AND_TIME_LIBS CURL_NETWORK_LIBS LIBCURL_LIBS -SONAME_BUMP_FALSE -SONAME_BUMP_TRUE CFLAG_CURL_SYMBOL_HIDING DOING_CURL_SYMBOL_HIDING_FALSE DOING_CURL_SYMBOL_HIDING_TRUE @@ -910,6 +910,7 @@ CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE CURL_LT_SHLIB_VERSIONED_FLAVOUR USE_LIBRTMP +USE_LIBSSH USE_LIBSSH2 LIBMETALINK_CPPFLAGS LIBMETALINK_LDFLAGS @@ -917,6 +918,7 @@ LIBMETALINK_LIBS USE_LIBPSL_FALSE USE_LIBPSL_TRUE CURL_CA_BUNDLE +CURL_WITH_MULTI_SSL SSL_ENABLED USE_AXTLS NSS_LIBS @@ -933,7 +935,11 @@ SSL_LIBS USE_DARWINSSL USE_WINDOWS_SSPI USE_SCHANNEL +DEFAULT_SSL_BACKEND +BUILD_STUB_GSS_FALSE +BUILD_STUB_GSS_TRUE USE_OPENLDAP +HAVE_BROTLI ZLIB_LIBS HAVE_LIBZ_FALSE HAVE_LIBZ_TRUE @@ -1035,6 +1041,18 @@ VERSION PACKAGE CYGPATH_W am__isrc +CODE_COVERAGE_RULES +CODE_COVERAGE_LDFLAGS +CODE_COVERAGE_LIBS +CODE_COVERAGE_CXXFLAGS +CODE_COVERAGE_CFLAGS +CODE_COVERAGE_CPPFLAGS +GENHTML +LCOV +GCOV +CODE_COVERAGE_ENABLED +CODE_COVERAGE_ENABLED_FALSE +CODE_COVERAGE_ENABLED_TRUE CPP OBJEXT EXEEXT @@ -1113,6 +1131,8 @@ enable_symbol_hiding enable_hidden_symbols enable_ares enable_rt +with_gcov +enable_code_coverage enable_dependency_tracking enable_largefile enable_shared @@ -1142,12 +1162,14 @@ enable_manual enable_libcurl_option enable_libgcc with_zlib +with_brotli with_ldap_lib with_lber_lib enable_ipv6 with_gssapi_includes with_gssapi_libs with_gssapi +with_default_ssl_backend with_winssl with_darwinssl with_ssl @@ -1165,6 +1187,7 @@ with_ca_fallback with_libpsl with_libmetalink with_libssh2 +with_libssh with_librtmp enable_versioned_symbols with_winidn @@ -1180,7 +1203,6 @@ enable_ntlm_wb enable_tls_srp enable_unix_sockets enable_cookies -enable_soname_bump ' ac_precious_vars='build_alias host_alias @@ -1844,6 +1866,7 @@ Optional Features: --enable-ares[=PATH] Enable c-ares for DNS lookups --disable-ares Disable c-ares for DNS lookups --disable-rt disable dependency on -lrt + --enable-code-coverage Whether to enable code coverage support --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking @@ -1919,12 +1942,11 @@ Optional Features: --disable-unix-sockets Disable Unix domain sockets --enable-cookies Enable cookies support --disable-cookies Disable cookies support - --enable-soname-bump Enable enforced SONAME bump - --disable-soname-bump Disable enforced SONAME bump Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both @@ -1935,12 +1957,20 @@ Optional Packages: compiler's sysroot if not specified). --with-zlib=PATH search for zlib in PATH --without-zlib disable use of zlib + --with-brotli=PATH Where to look for brotli, PATH points to the BROTLI + installation; when possible, set the PKG_CONFIG_PATH + environment variable instead of using this option + --without-brotli disable BROTLI --with-ldap-lib=libname Specify name of ldap lib file --with-lber-lib=libname Specify name of lber lib file --with-gssapi-includes=DIR Specify location of GSS-API headers --with-gssapi-libs=DIR Specify location of GSS-API libs --with-gssapi=DIR Where to look for GSS-API + --with-default-ssl-backend=NAME + Use NAME as default SSL backend + --without-default-ssl-backend + Use implicit default SSL backend --with-winssl enable Windows native SSL/TLS --without-winssl disable Windows native SSL/TLS --with-darwinssl enable Apple OS native SSL/TLS @@ -1991,7 +2021,11 @@ Optional Packages: LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option - --without-libssh2 disable LIBSSH2 + --with-libssh2 enable LIBSSH2 + --with-libssh=PATH Where to look for libssh, PATH points to the LIBSSH + installation; when possible, set the PKG_CONFIG_PATH + environment variable instead of using this option + --with-libssh enable LIBSSH --with-librtmp=PATH Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of @@ -2093,7 +2127,7 @@ Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1998 - 2016 Daniel Stenberg, +Copyright (c) 1998 - 2017 Daniel Stenberg, This configure script may be copied, distributed and modified under the terms of the curl license; see COPYING for more details _ACEOF @@ -2179,6 +2213,52 @@ fi } # ac_fn_c_try_cpp +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -2252,229 +2332,6 @@ fi } # ac_fn_c_try_run -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int main (void) -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int main (void) -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int main (void) -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int main (void) -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2617,6 +2474,183 @@ fi } # ac_fn_c_check_header_mongrel +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int main (void) +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &6; } $as_echo "no" >&6; } ;; esac - if test "$dontwant_rt" = "yes" && test "$want_thres" = "yes" ; then - as_fn_error $? "options --disable-rt and --enable-thread-resolver are mutually exclusive, at most one can be selected." "$LINENO" 5 - fi # @@ -3683,11 +3714,7 @@ fi -if test -f ${srcdir}/include/curl/curlbuild.h; then - rm -f ${srcdir}/include/curl/curlbuild.h -fi - -CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h` +CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h` xc_prog_cc_prev_IFS=$IFS xc_prog_cc_prev_LIBS=$LIBS @@ -4975,6 +5002,453 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +if test "$GCC" = "yes" ; then : + + + + # allow to override gcov location + +# Check whether --with-gcov was given. +if test "${with_gcov+set}" = set; then : + withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov +else + _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 +$as_echo_n "checking whether to build with code coverage support... " >&6; } + # Check whether --enable-code-coverage was given. +if test "${enable_code_coverage+set}" = set; then : + enableval=$enable_code_coverage; +else + enable_code_coverage=no +fi + + + if test x$enable_code_coverage = xyes; then + CODE_COVERAGE_ENABLED_TRUE= + CODE_COVERAGE_ENABLED_FALSE='#' +else + CODE_COVERAGE_ENABLED_TRUE='#' + CODE_COVERAGE_ENABLED_FALSE= +fi + + CODE_COVERAGE_ENABLED=$enable_code_coverage + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 +$as_echo "$enable_code_coverage" >&6; } + + if test "$enable_code_coverage" = "yes" ; then : + + # check for gcov + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GCOV"; then + ac_cv_prog_GCOV="$GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GCOV=$ac_cv_prog_GCOV +if test -n "$GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +$as_echo "$GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_GCOV"; then + ac_ct_GCOV=$GCOV + # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_GCOV"; then + ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV +if test -n "$ac_ct_GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +$as_echo "$ac_ct_GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_GCOV" = x; then + GCOV=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + GCOV=$ac_ct_GCOV + fi +else + GCOV="$ac_cv_prog_GCOV" +fi + + if test "X$GCOV" = "X:"; then : + as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 +fi + + + if test "$GCC" = "no" ; then : + + as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 + +fi + + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LCOV"; then + ac_cv_prog_LCOV="$LCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LCOV="lcov" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LCOV=$ac_cv_prog_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GENHTML+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GENHTML"; then + ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GENHTML="genhtml" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GENHTML=$ac_cv_prog_GENHTML +if test -n "$GENHTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 +$as_echo "$GENHTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test -z "$LCOV" ; then : + + as_fn_error $? "To enable code coverage reporting you must have lcov installed" "$LINENO" 5 + +fi + + if test -z "$GENHTML" ; then : + + as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 + +fi + + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LIBS="-lgcov" + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" + + + + + + + + CODE_COVERAGE_RULES_CHECK=' + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +' + CODE_COVERAGE_RULES_CAPTURE=' + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +' + CODE_COVERAGE_RULES_CLEAN=' +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +' + +else + + CODE_COVERAGE_RULES_CHECK=' + @echo "Need to reconfigure with --enable-code-coverage" +' + CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" + CODE_COVERAGE_RULES_CLEAN='' + +fi + +CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +CODE_COVERAGE_IGNORE_PATTERN ?= + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +'"$CODE_COVERAGE_RULES_CLEAN"' + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +' + + + + +else + # not using GCC so pass a test below - CODE_COVERAGE_ENABLED_TRUE is not zero length + CODE_COVERAGE_ENABLED_TRUE='#' + +fi + am__api_version='1.15' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 @@ -5626,7 +6100,7 @@ $as_echo "$CURLVERSION" >&6; } -VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h` +VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h` PKGADD_PKG="HAXXcurl" @@ -5639,6 +6113,7 @@ PKGADD_VENDOR="curl.haxx.se" curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,mbedtls,cyassl,axtls,winssl,darwinssl} )" curl_ssh_msg="no (--with-libssh2)" curl_zlib_msg="no (--with-zlib)" + curl_brotli_msg="no (--with-brotli)" curl_gss_msg="no (--with-gssapi)" curl_tls_srp_msg="no (--enable-tls-srp)" curl_res_msg="default (--enable-ares / --enable-threaded-resolver)" @@ -5656,7 +6131,7 @@ curl_verbose_msg="enabled (--disable-verbose)" curl_mtlnk_msg="no (--with-libmetalink)" curl_psl_msg="no (--with-libpsl)" - init_ssl_msg=${curl_ssl_msg} + ssl_backends= INITIAL_LDFLAGS=$LDFLAGS INITIAL_LIBS=$LIBS @@ -5742,39 +6217,6 @@ _ACEOF -curl_includes_inttypes="\ -/* includes start */ -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -/* includes end */" - case $host_os in - irix*) - ac_cv_header_stdint_h="no" - ;; - esac - for ac_header in sys/types.h stdint.h inttypes.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_inttypes -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : @@ -5905,742 +6347,6 @@ $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cpp -P is needed" >&5 -$as_echo_n "checking if cpp -P is needed... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -TEST EINVAL TEST - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "TEST.*TEST" >/dev/null 2>&1; then : - cpp=no -else - cpp=yes -fi -rm -f conftest* - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp" >&5 -$as_echo "$cpp" >&6; } - - if test "x$cpp" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cpp -P works" >&5 -$as_echo_n "checking if cpp -P works... " >&6; } - OLDCPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -P" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -TEST EINVAL TEST - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "TEST.*TEST" >/dev/null 2>&1; then : - cpp_p=yes -else - cpp_p=no -fi -rm -f conftest* - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp_p" >&5 -$as_echo "$cpp_p" >&6; } - - if test "x$cpp_p" = "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed to figure out cpp -P alternative" >&5 -$as_echo "$as_me: WARNING: failed to figure out cpp -P alternative" >&2;} - # without -P - CPPPFLAG="" - else - # with -P - CPPPFLAG="-P" - fi - CPPFLAGS=$OLDCPPFLAGS - else - # without -P - CPPPFLAG="" - fi - - - # - # - if test -z "$SED"; then - as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 - fi - # - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5 -$as_echo_n "checking size of void*... " >&6; } -if ${ac_cv_sizeof_voidp+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_voidp" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void*) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_voidp=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5 -$as_echo "$ac_cv_sizeof_voidp" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOIDP $ac_cv_sizeof_voidp -_ACEOF - - - # - if test -z "$ac_cv_sizeof_long" || - test "$ac_cv_sizeof_long" -eq "0"; then - as_fn_error $? "cannot find out size of long." "$LINENO" 5 - fi - if test -z "$ac_cv_sizeof_voidp" || - test "$ac_cv_sizeof_voidp" -eq "0"; then - as_fn_error $? "cannot find out size of void*." "$LINENO" 5 - fi - # - x_LP64_long="" - x_LP32_long="" - # - if test "$ac_cv_sizeof_long" -eq "8" && - test "$ac_cv_sizeof_voidp" -ge "8"; then - x_LP64_long="long" - elif test "$ac_cv_sizeof_long" -eq "4" && - test "$ac_cv_sizeof_voidp" -ge "4"; then - x_LP32_long="long" - fi - # - # - curl_typeof_curl_off_t="unknown" - curl_sizeof_curl_off_t="unknown" - curl_format_curl_off_t="unknown" - curl_format_curl_off_tu="unknown" - # - if test "$curl_typeof_curl_off_t" = "unknown"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit curl_off_t data type" >&5 -$as_echo_n "checking for 64-bit curl_off_t data type... " >&6; } - for t8 in \ - "$x_LP64_long" \ - 'int64_t' \ - '__int64' \ - 'long long' \ - '__longlong' \ - '__longlong_t' ; do - - if test "$curl_typeof_curl_off_t" = "unknown" && test ! -z "$t8"; then - tmp_includes="" - tmp_source="" - tmp_fmt="" - case `echo "$t8" | sed 's/[^a-zA-Z0-9_]/_/g'` in - int64_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f[] = PRId64;" - tmp_fmt="PRId64" - ;; - int32_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f[] = PRId32;" - tmp_fmt="PRId32" - ;; - int16_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f[] = PRId16;" - tmp_fmt="PRId16" - ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - $tmp_includes - typedef $t8 curl_off_t; - typedef char dummy_arr[sizeof(curl_off_t) == 8 ? 1 : -1]; - -int main (void) -{ - - $tmp_source - curl_off_t dummy; - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - if test -z "$tmp_fmt"; then - curl_typeof_curl_off_t="$t8" - curl_sizeof_curl_off_t="8" - else - - OLDCPPFLAGS=$CPPFLAGS - # CPPPFLAG comes from CURL_CPP_P - CPPFLAGS="$CPPFLAGS $CPPPFLAG" - as_ac_HaveDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh` - as_ac_Def=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh` - if test -z "$SED"; then - as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 - fi - if test -z "$GREP"; then - as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 - fi - - tmp_exp="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - $curl_includes_inttypes -#ifdef $tmp_fmt -CURL_DEF_TOKEN $tmp_fmt -#endif - - -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - - tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ - "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ - "$SED" 's/["][ ]*["]//g' 2>/dev/null` - if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then - tmp_exp="" - fi - -fi -rm -f conftest.err conftest.i conftest.$ac_ext - if test -z "$tmp_exp"; then - eval "$as_ac_HaveDef=no" - - else - eval "$as_ac_HaveDef=yes" - eval "$as_ac_Def=\$tmp_exp" - - fi - CPPFLAGS=$OLDCPPFLAGS - - as_tmp_HaveFmtDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh` - as_tmp_FmtDef=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh` - if test `eval 'as_val=${'$as_tmp_HaveFmtDef'};$as_echo "$as_val"'` = "yes"; then - curl_format_curl_off_t=`eval 'as_val=${'$as_tmp_FmtDef'};$as_echo "$as_val"'` - curl_typeof_curl_off_t="$t8" - curl_sizeof_curl_off_t="8" - fi - fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_typeof_curl_off_t" >&5 -$as_echo "$curl_typeof_curl_off_t" >&6; } - fi - if test "$curl_typeof_curl_off_t" = "unknown"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit curl_off_t data type" >&5 -$as_echo_n "checking for 32-bit curl_off_t data type... " >&6; } - for t4 in \ - "$x_LP32_long" \ - 'int32_t' \ - '__int32' \ - 'int' ; do - - if test "$curl_typeof_curl_off_t" = "unknown" && test ! -z "$t4"; then - tmp_includes="" - tmp_source="" - tmp_fmt="" - case `echo "$t4" | sed 's/[^a-zA-Z0-9_]/_/g'` in - int64_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f[] = PRId64;" - tmp_fmt="PRId64" - ;; - int32_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f[] = PRId32;" - tmp_fmt="PRId32" - ;; - int16_t) - tmp_includes="$curl_includes_inttypes" - tmp_source="char f[] = PRId16;" - tmp_fmt="PRId16" - ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - $tmp_includes - typedef $t4 curl_off_t; - typedef char dummy_arr[sizeof(curl_off_t) == 4 ? 1 : -1]; - -int main (void) -{ - - $tmp_source - curl_off_t dummy; - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - if test -z "$tmp_fmt"; then - curl_typeof_curl_off_t="$t4" - curl_sizeof_curl_off_t="4" - else - - OLDCPPFLAGS=$CPPFLAGS - # CPPPFLAG comes from CURL_CPP_P - CPPFLAGS="$CPPFLAGS $CPPPFLAG" - as_ac_HaveDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh` - as_ac_Def=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh` - if test -z "$SED"; then - as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 - fi - if test -z "$GREP"; then - as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 - fi - - tmp_exp="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - $curl_includes_inttypes -#ifdef $tmp_fmt -CURL_DEF_TOKEN $tmp_fmt -#endif - - -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - - tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ - "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ - "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ - "$SED" 's/["][ ]*["]//g' 2>/dev/null` - if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then - tmp_exp="" - fi - -fi -rm -f conftest.err conftest.i conftest.$ac_ext - if test -z "$tmp_exp"; then - eval "$as_ac_HaveDef=no" - - else - eval "$as_ac_HaveDef=yes" - eval "$as_ac_Def=\$tmp_exp" - - fi - CPPFLAGS=$OLDCPPFLAGS - - as_tmp_HaveFmtDef=`$as_echo "curl_cv_have_def_$tmp_fmt" | $as_tr_sh` - as_tmp_FmtDef=`$as_echo "curl_cv_def_$tmp_fmt" | $as_tr_sh` - if test `eval 'as_val=${'$as_tmp_HaveFmtDef'};$as_echo "$as_val"'` = "yes"; then - curl_format_curl_off_t=`eval 'as_val=${'$as_tmp_FmtDef'};$as_echo "$as_val"'` - curl_typeof_curl_off_t="$t4" - curl_sizeof_curl_off_t="4" - fi - fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_typeof_curl_off_t" >&5 -$as_echo "$curl_typeof_curl_off_t" >&6; } - fi - if test "$curl_typeof_curl_off_t" = "unknown"; then - as_fn_error $? "cannot find data type for curl_off_t." "$LINENO" 5 - fi - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of curl_off_t" >&5 -$as_echo_n "checking size of curl_off_t... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_sizeof_curl_off_t" >&5 -$as_echo "$curl_sizeof_curl_off_t" >&6; } - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking formatting string directive for curl_off_t" >&5 -$as_echo_n "checking formatting string directive for curl_off_t... " >&6; } - if test "$curl_format_curl_off_t" != "unknown"; then - x_pull_headers="yes" - curl_format_curl_off_t=`echo "$curl_format_curl_off_t" | "$SED" 's/["]//g'` - curl_format_curl_off_tu=`echo "$curl_format_curl_off_t" | "$SED" 's/i$/u/'` - curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/d$/u/'` - curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'` - else - x_pull_headers="no" - case `echo "$curl_typeof_curl_off_t" | sed 's/[^a-zA-Z0-9_]/_/g'` in - long_long | __longlong | __longlong_t) - curl_format_curl_off_t="lld" - curl_format_curl_off_tu="llu" - ;; - long) - curl_format_curl_off_t="ld" - curl_format_curl_off_tu="lu" - ;; - int) - curl_format_curl_off_t="d" - curl_format_curl_off_tu="u" - ;; - __int64) - curl_format_curl_off_t="I64d" - curl_format_curl_off_tu="I64u" - ;; - __int32) - curl_format_curl_off_t="I32d" - curl_format_curl_off_tu="I32u" - ;; - __int16) - curl_format_curl_off_t="I16d" - curl_format_curl_off_tu="I16u" - ;; - *) - as_fn_error $? "cannot find print format string for curl_off_t." "$LINENO" 5 - ;; - esac - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$curl_format_curl_off_t\"" >&5 -$as_echo "\"$curl_format_curl_off_t\"" >&6; } - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking formatting string directive for unsigned curl_off_t" >&5 -$as_echo_n "checking formatting string directive for unsigned curl_off_t... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$curl_format_curl_off_tu\"" >&5 -$as_echo "\"$curl_format_curl_off_tu\"" >&6; } - # - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking constant suffix string for curl_off_t" >&5 -$as_echo_n "checking constant suffix string for curl_off_t... " >&6; } - # - curl_suffix_curl_off_t="unknown" - curl_suffix_curl_off_tu="unknown" - # - case `echo "$curl_typeof_curl_off_t" | sed 's/[^a-zA-Z0-9_]/_/g'` in - long_long | __longlong | __longlong_t) - tst_suffixes="LL::" - ;; - long) - tst_suffixes="L::" - ;; - int) - tst_suffixes="::" - ;; - __int64 | int64_t) - tst_suffixes="LL:i64::" - ;; - __int32 | int32_t) - tst_suffixes="L:i32::" - ;; - __int16 | int16_t) - tst_suffixes="L:i16::" - ;; - *) - as_fn_error $? "unexpected data type $curl_typeof_curl_off_t" "$LINENO" 5 - ;; - esac - # - old_IFS=$IFS; IFS=':' - for tmp_ssuf in $tst_suffixes ; do - IFS=$old_IFS - if test "x$curl_suffix_curl_off_t" = "xunknown"; then - case $tmp_ssuf in - i64 | i32 | i16) - tmp_usuf="u$tmp_ssuf" - ;; - LL | L) - tmp_usuf="U$tmp_ssuf" - ;; - *) - tmp_usuf="" - ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - $curl_includes_inttypes - typedef $curl_typeof_curl_off_t new_t; - -int main (void) -{ - - new_t s1; - new_t s2; - s1 = -10$tmp_ssuf ; - s2 = 20$tmp_ssuf ; - if(s1 > s2) - return 1; - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - curl_suffix_curl_off_t="$tmp_ssuf" - curl_suffix_curl_off_tu="$tmp_usuf" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - done - IFS=$old_IFS - # - if test "x$curl_suffix_curl_off_t" = "xunknown"; then - as_fn_error $? "cannot find constant suffix string for curl_off_t." "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_suffix_curl_off_t" >&5 -$as_echo "$curl_suffix_curl_off_t" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking constant suffix string for unsigned curl_off_t" >&5 -$as_echo_n "checking constant suffix string for unsigned curl_off_t... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_suffix_curl_off_tu" >&5 -$as_echo "$curl_suffix_curl_off_tu" >&6; } - fi - # - - # - if test "$x_pull_headers" = "yes"; then - if test "x$ac_cv_header_sys_types_h" = "xyes"; then - -cat >>confdefs.h <<_EOF -#define CURL_PULL_SYS_TYPES_H 1 -_EOF - - fi - if test "x$ac_cv_header_stdint_h" = "xyes"; then - -cat >>confdefs.h <<_EOF -#define CURL_PULL_STDINT_H 1 -_EOF - - fi - if test "x$ac_cv_header_inttypes_h" = "xyes"; then - -cat >>confdefs.h <<_EOF -#define CURL_PULL_INTTYPES_H 1 -_EOF - - fi - fi - # - -cat >>confdefs.h <<_EOF -#define CURL_TYPEOF_CURL_OFF_T $curl_typeof_curl_off_t -_EOF - - -cat >>confdefs.h <<_EOF -#define CURL_FORMAT_CURL_OFF_T "$curl_format_curl_off_t" -_EOF - - -cat >>confdefs.h <<_EOF -#define CURL_FORMAT_CURL_OFF_TU "$curl_format_curl_off_tu" -_EOF - - -cat >>confdefs.h <<_EOF -#define CURL_FORMAT_OFF_T "%$curl_format_curl_off_t" -_EOF - - -cat >>confdefs.h <<_EOF -#define CURL_SIZEOF_CURL_OFF_T $curl_sizeof_curl_off_t -_EOF - - -cat >>confdefs.h <<_EOF -#define CURL_SUFFIX_CURL_OFF_T $curl_suffix_curl_off_t -_EOF - - -cat >>confdefs.h <<_EOF -#define CURL_SUFFIX_CURL_OFF_TU $curl_suffix_curl_off_tu -_EOF - - # - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OS is AIX (to define _ALL_SOURCE)" >&5 @@ -11122,6 +10828,134 @@ func_munge_path_list () esac } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default @@ -11216,7 +11050,7 @@ esac # of non-PIC compiled objects will fail with following linker error # "relocation R_X86_64_32 can not be used when making a shared object" # is to build PIC objects even for static libraries. This behavior may -# be overriden using 'configure --disable-shared --without-pic'. +# be overridden using 'configure --disable-shared --without-pic'. # if test "x$xc_lt_want_with_pic" = 'xdefault'; then @@ -15924,7 +15758,7 @@ esac $as_echo "$xc_lt_shlib_use_mimpure_text" >&6; } # -# Find out wether libtool libraries would be built wit PIC +# Find out whether libtool libraries would be built wit PIC # case "x$pic_mode" in # (((( @@ -16118,6 +15952,65 @@ esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cpp -P is needed" >&5 +$as_echo_n "checking if cpp -P is needed... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +TEST EINVAL TEST + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "TEST.*TEST" >/dev/null 2>&1; then : + cpp=no +else + cpp=yes +fi +rm -f conftest* + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp" >&5 +$as_echo "$cpp" >&6; } + + if test "x$cpp" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cpp -P works" >&5 +$as_echo_n "checking if cpp -P works... " >&6; } + OLDCPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -P" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +TEST EINVAL TEST + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "TEST.*TEST" >/dev/null 2>&1; then : + cpp_p=yes +else + cpp_p=no +fi +rm -f conftest* + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp_p" >&5 +$as_echo "$cpp_p" >&6; } + + if test "x$cpp_p" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed to figure out cpp -P alternative" >&5 +$as_echo "$as_me: WARNING: failed to figure out cpp -P alternative" >&2;} + # without -P + CPPPFLAG="" + else + # with -P + CPPPFLAG="-P" + fi + CPPFLAGS=$OLDCPPFLAGS + else + # without -P + CPPPFLAG="" + fi + + # compiler_id="unknown" compiler_num="0" @@ -16545,7 +16438,15 @@ rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } compiler_id="CLANG" - clangver=`$CC -dumpversion` + fullclangver=`$CC -v 2>&1 | grep version` + clangver=`echo $fullclangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \([0-9]*\.[0-9]*\).*)/\1/'` + if test -z "$clangver"; then + if echo $fullclangver | grep "Apple LLVM version " >/dev/null; then + clangver="3.7" + else + clangver=`echo $fullclangver | "$SED" 's/.*version \([0-9]*\.[0-9]*\).*/\1/'` + fi + fi clangvhi=`echo $clangver | cut -d . -f1` clangvlo=`echo $clangver | cut -d . -f2` compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null` @@ -16633,7 +16534,7 @@ $as_echo "yes" >&6; } flags_dbg_all="$flags_dbg_all -gvms" flags_dbg_yes="-g" flags_dbg_off="" - flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" + flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -17344,7 +17245,9 @@ squeeze() { # GNU_C) # - tmp_CFLAGS="$tmp_CFLAGS" + if test "$compiler_num" -ge "295"; then + tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration" + fi ;; # HP_UX_C) @@ -18020,6 +17923,37 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;} if test "$compiler_num" -ge "101"; then tmp_CFLAGS="$tmp_CFLAGS -Wunused" fi + # + if test "$compiler_num" -ge "208"; then + tmp_CFLAGS="$tmp_CFLAGS -Wvla" + fi + # + if test "$compiler_num" -ge "209"; then + tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow" + fi + # + if test "$compiler_num" -ge "302"; then + case $host_os in + cygwin* | mingw*) + ;; + *) + tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations" + ;; + esac + fi + # + if test "$compiler_num" -ge "306"; then + tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion" + fi + # + if test "$compiler_num" -ge "309"; then + tmp_CFLAGS="$tmp_CFLAGS -Wcomma" + # avoid the varargs warning, fixed in 4.0 + # https://bugs.llvm.org/show_bug.cgi?id=29140 + if test "$compiler_num" -lt "400"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs" + fi + fi fi ;; # @@ -18105,6 +18039,10 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;} fi fi # + if test "$compiler_num" -ge "406"; then + tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion" + fi + # fi # if test "$compiler_num" -ge "300"; then @@ -18757,11 +18695,6 @@ cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF - -cat >>confdefs.h <<_ACEOF -#define WIN32_LEAN_AND_MEAN 1 -_ACEOF - ;; esac @@ -19264,6 +19197,43 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if the compiler supports __builtin_available()" >&5 +$as_echo_n "checking to see if the compiler supports __builtin_available()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + if (__builtin_available(macOS 10.8, iOS 5.0, *)) {} + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_BUILTIN_AVAILABLE 1 +_ACEOF + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support http" >&5 $as_echo_n "checking whether to support http... " >&6; } # Check whether --enable-http was given. @@ -19275,6 +19245,7 @@ $as_echo "no" >&6; } $as_echo "#define CURL_DISABLE_HTTP 1" >>confdefs.h + disable_http="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disable HTTP disables FTP over proxy and RTSP" >&5 $as_echo "$as_me: WARNING: disable HTTP disables FTP over proxy and RTSP" >&2;} CURL_DISABLE_HTTP=1 @@ -20265,11 +20236,6 @@ cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF - -cat >>confdefs.h <<_ACEOF -#define WIN32_LEAN_AND_MEAN 1 -_ACEOF - ;; esac @@ -20728,6 +20694,314 @@ else OPT_ZLIB="" fi + if test -z "$OPT_ZLIB" ; then + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib options with pkg-config" >&5 +$as_echo_n "checking for zlib options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists zlib >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS" + LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`" + CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`" + OPT_ZLIB="" + HAVE_LIBZ="1" + fi + + if test -z "$HAVE_LIBZ"; then + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5 +$as_echo_n "checking for inflateEnd in -lz... " >&6; } +if ${ac_cv_lib_z_inflateEnd+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char inflateEnd (); +int main (void) +{ +return inflateEnd (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_inflateEnd=yes +else + ac_cv_lib_z_inflateEnd=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5 +$as_echo "$ac_cv_lib_z_inflateEnd" >&6; } +if test "x$ac_cv_lib_z_inflateEnd" = xyes; then : + HAVE_LIBZ="1" + LIBS="-lz $LIBS" +else + OPT_ZLIB="/usr/local" +fi + + fi + fi + + if test -n "$OPT_ZLIB"; then + CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" + LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" + fi + + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = xyes; then : + + HAVE_ZLIB_H="1" + if test "$HAVE_LIBZ" != "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 +$as_echo_n "checking for gzread in -lz... " >&6; } +if ${ac_cv_lib_z_gzread+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gzread (); +int main (void) +{ +return gzread (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_gzread=yes +else + ac_cv_lib_z_gzread=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 +$as_echo "$ac_cv_lib_z_gzread" >&6; } +if test "x$ac_cv_lib_z_gzread" = xyes; then : + + HAVE_LIBZ="1" + LIBS="-lz $LIBS" + +else + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS +fi + + fi + +else + + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + +fi + + + + if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" + then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz lib, not the header file!" >&5 +$as_echo "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;} + HAVE_LIBZ="" + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + LIBS=$clean_LIBS + elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" + then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5 +$as_echo "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;} + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + LIBS=$clean_LIBS + elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" + then + + +$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h + + +$as_echo "#define HAVE_LIBZ 1" >>confdefs.h + + + ZLIB_LIBS="-lz" + LIBS="-lz $clean_LIBS" + + AMFIXLIB="1" + { $as_echo "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5 +$as_echo "$as_me: found both libz and libz.h header" >&6;} + curl_zlib_msg="enabled" + fi +fi + + if test x"$AMFIXLIB" = x1; then + HAVE_LIBZ_TRUE= + HAVE_LIBZ_FALSE='#' +else + HAVE_LIBZ_TRUE='#' + HAVE_LIBZ_FALSE= +fi + + + + + +OPT_BROTLI=off + +# Check whether --with-brotli was given. +if test "${with_brotli+set}" = set; then : + withval=$with_brotli; OPT_BROTLI=$withval +fi + + +if test X"$OPT_BROTLI" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_BROTLI" in + yes) if test -n "$PKG_CONFIG"; then PKGCONFIG="$PKG_CONFIG" @@ -20835,14 +21109,14 @@ fi fi if test "x$PKGCONFIG" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib options with pkg-config" >&5 -$as_echo_n "checking for zlib options with pkg-config... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbrotlidec options with pkg-config" >&5 +$as_echo_n "checking for libbrotlidec options with pkg-config... " >&6; } itexists=` if test -n ""; then PKG_CONFIG_LIBDIR="" export PKG_CONFIG_LIBDIR fi - $PKGCONFIG --exists zlib >/dev/null 2>&1 && echo 1` + $PKGCONFIG --exists libbrotlidec >/dev/null 2>&1 && echo 1` if test -z "$itexists"; then PKGCONFIG="no" @@ -20855,79 +21129,40 @@ $as_echo "found" >&6; } fi - if test "$PKGCONFIG" != "no" ; then - LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS" - LDFLAGS="`$PKGCONFIG --libs-only-L zlib` $LDFLAGS" - CPPFLAGS="`$PKGCONFIG --cflags-only-I zlib` $CPPFLAGS" - OPT_ZLIB="" - HAVE_LIBZ="1" - fi - - if test -z "$OPT_ZLIB" ; then - - if test -z "$HAVE_LIBZ"; then - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5 -$as_echo_n "checking for inflateEnd in -lz... " >&6; } -if ${ac_cv_lib_z_inflateEnd+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#ifdef __cplusplus -extern "C" -#endif -char inflateEnd (); -int main (void) -{ -return inflateEnd (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflateEnd=yes -else - ac_cv_lib_z_inflateEnd=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5 -$as_echo "$ac_cv_lib_z_inflateEnd" >&6; } -if test "x$ac_cv_lib_z_inflateEnd" = xyes; then : - HAVE_LIBZ="1" - LIBS="-lz $LIBS" -else - OPT_ZLIB="/usr/local" -fi - + if test "$PKGCONFIG" != "no" ; then + LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec` + LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec` + CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec` + version=`$PKGCONFIG --modversion libbrotlidec` + DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/-L//'` fi - fi - if test -n "$OPT_ZLIB"; then - CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" - LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" + ;; + off) + ;; + *) + PREFIX_BROTLI=$OPT_BROTLI + ;; + esac + + if test -n "$PREFIX_BROTLI"; then + LIB_BROTLI="-lbrotlidec" + LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff + CPP_BROTLI=-I${PREFIX_BROTLI}/include + DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff fi - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : + LDFLAGS="$LDFLAGS $LD_BROTLI" + CPPFLAGS="$CPPFLAGS $CPP_BROTLI" + LIBS="$LIB_BROTLI $LIBS" - HAVE_ZLIB_H="1" - if test "$HAVE_LIBZ" != "1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 -$as_echo_n "checking for gzread in -lz... " >&6; } -if ${ac_cv_lib_z_gzread+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BrotliDecoderDecompress in -lbrotlidec" >&5 +$as_echo_n "checking for BrotliDecoderDecompress in -lbrotlidec... " >&6; } +if ${ac_cv_lib_brotlidec_BrotliDecoderDecompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" +LIBS="-lbrotlidec $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20935,91 +21170,77 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char gzread (); +char BrotliDecoderDecompress (); int main (void) { -return gzread (); +return BrotliDecoderDecompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_gzread=yes + ac_cv_lib_brotlidec_BrotliDecoderDecompress=yes else - ac_cv_lib_z_gzread=no + ac_cv_lib_brotlidec_BrotliDecoderDecompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 -$as_echo "$ac_cv_lib_z_gzread" >&6; } -if test "x$ac_cv_lib_z_gzread" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_brotlidec_BrotliDecoderDecompress" >&5 +$as_echo "$ac_cv_lib_brotlidec_BrotliDecoderDecompress" >&6; } +if test "x$ac_cv_lib_brotlidec_BrotliDecoderDecompress" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBROTLIDEC 1 +_ACEOF - HAVE_LIBZ="1" - LIBS="-lz $LIBS" + LIBS="-lbrotlidec $LIBS" -else - CPPFLAGS=$clean_CPPFLAGS - LDFLAGS=$clean_LDFLAGS fi - fi - -else - - CPPFLAGS=$clean_CPPFLAGS - LDFLAGS=$clean_LDFLAGS - -fi + for ac_header in brotli/decode.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "brotli/decode.h" "ac_cv_header_brotli_decode_h" "$ac_includes_default" +if test "x$ac_cv_header_brotli_decode_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BROTLI_DECODE_H 1 +_ACEOF + curl_brotli_msg="enabled (libbrotlidec)" + HAVE_BROTLI=1 +$as_echo "#define HAVE_BROTLI 1" >>confdefs.h - if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" - then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz lib, not the header file!" >&5 -$as_echo "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;} - HAVE_LIBZ="" - CPPFLAGS=$clean_CPPFLAGS - LDFLAGS=$clean_LDFLAGS - LIBS=$clean_LIBS - elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" - then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5 -$as_echo "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;} - CPPFLAGS=$clean_CPPFLAGS - LDFLAGS=$clean_LDFLAGS - LIBS=$clean_LIBS - elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" - then + HAVE_BROTLI=1 -$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h +fi +done -$as_echo "#define HAVE_LIBZ 1" >>confdefs.h + if test X"$OPT_BROTLI" != Xoff && + test "$HAVE_BROTLI" != "1"; then + as_fn_error $? "BROTLI libs and/or directories were not found where specified!" "$LINENO" 5 + fi - ZLIB_LIBS="-lz" - LIBS="-lz $clean_LIBS" + if test "$HAVE_BROTLI" = "1"; then + if test -n "$DIR_BROTLI"; then - AMFIXLIB="1" - { $as_echo "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5 -$as_echo "$as_me: found both libz and libz.h header" >&6;} - curl_zlib_msg="enabled" + if test "x$cross_compiling" != "xyes"; then + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_BROTLI" + export LD_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_BROTLI to LD_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_BROTLI to LD_LIBRARY_PATH" >&6;} + fi + fi + else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS fi fi - if test x"$AMFIXLIB" = x1; then - HAVE_LIBZ_TRUE= - HAVE_LIBZ_FALSE='#' -else - HAVE_LIBZ_TRUE='#' - HAVE_LIBZ_FALSE= -fi - - - LDAPLIBNAME="" @@ -21441,8 +21662,8 @@ $as_echo_n "checking for LDAP libraries... " >&6; } # for x_nlibs in '' "$u_libs" \ '-lldap' \ - '-llber -lldap' \ '-lldap -llber' \ + '-llber -lldap' \ '-lldapssl -lldapx -lldapsdk' \ '-lldapsdk -lldapx -lldapssl' ; do if test "$curl_cv_ldap_LIBS" = "unknown"; then @@ -21721,6 +21942,9 @@ $as_echo_n "checking if struct sockaddr_in6 has sin6_scope_id member... " >&6; } #include #else #include +#if defined (__TANDEM) +# include +#endif #endif int main (void) { @@ -22027,6 +22251,42 @@ else CPPFLAGS="$save_CPPFLAGS" fi +build_libstubgss=no +if test x"$want_gss" = "xyes"; then + build_libstubgss=yes +fi + + if test "x$build_libstubgss" = "xyes"; then + BUILD_STUB_GSS_TRUE= + BUILD_STUB_GSS_FALSE='#' +else + BUILD_STUB_GSS_TRUE='#' + BUILD_STUB_GSS_FALSE= +fi + + + +DEFAULT_SSL_BACKEND=no +VALID_DEFAULT_SSL_BACKEND= + +# Check whether --with-default-ssl-backend was given. +if test "${with_default_ssl_backend+set}" = set; then : + withval=$with_default_ssl_backend; DEFAULT_SSL_BACKEND=$withval +fi + +case "$DEFAULT_SSL_BACKEND" in + no) + ;; + default|yes) + as_fn_error $? "The name of the default SSL backend is required." "$LINENO" 5 + ;; + *) + + VALID_DEFAULT_SSL_BACKEND=no + ;; +esac + + OPT_WINSSL=no @@ -22038,7 +22298,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS (Windows native builds only)" >&5 $as_echo_n "checking whether to enable Windows native SSL/TLS (Windows native builds only)... " >&6; } -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_WINSSL" != xno; then + ssl_msg= if test "x$OPT_WINSSL" != "xno" && test "x$curl_cv_native_windows" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -22048,7 +22309,8 @@ $as_echo "#define USE_SCHANNEL 1" >>confdefs.h USE_SCHANNEL=1 - curl_ssl_msg="enabled (Windows-native)" + ssl_msg="Windows-native" + test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes WINSSL_ENABLED=1 # --with-winssl implies --enable-sspi @@ -22062,6 +22324,7 @@ $as_echo "#define USE_WINDOWS_SSPI 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -22077,7 +22340,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Apple OS native SSL/TLS" >&5 $as_echo_n "checking whether to enable Apple OS native SSL/TLS... " >&6; } -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_DARWINSSL" != xno; then if test "x$OPT_DARWINSSL" != "xno" && test -d "/System/Library/Frameworks/Security.framework"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -22087,13 +22350,15 @@ $as_echo "#define USE_DARWINSSL 1" >>confdefs.h USE_DARWINSSL=1 - curl_ssl_msg="enabled (Apple OS-native)" + ssl_msg="Apple OS-native" + test darwinssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes DARWINSSL_ENABLED=1 LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -22109,7 +22374,10 @@ if test "${with_ssl+set}" = set; then : fi -if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then +if test -z "$ssl_backends" -o "x$OPT_SSL" != xno && + test X"$OPT_SSL" != Xno; then + ssl_msg= + CLEANLDFLAGS="$LDFLAGS" CLEANCPPFLAGS="$CPPFLAGS" CLEANLIBS="$LIBS" @@ -22428,30 +22696,19 @@ if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes; then : LIBS="-lcrypto $LIBS" else - LDFLAGS="$CLEANLDFLAGS" - CPPFLAGS="$CLEANCPPFLAGS" - LIBS="$CLEANLIBS" - -fi - - -fi - - - if test X"$HAVECRYPTO" = X"yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking without -ldl" >&5 -$as_echo_n "checking OpenSSL linking without -ldl... " >&6; } - saved_libs=$LIBS - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl" >&5 +$as_echo_n "checking OpenSSL linking with -ldl... " >&6; } + LIBS="$LIBS -ldl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main (void) { - SSLeay_add_all_algorithms(); + ERR_clear_error(); ; return 0; @@ -22459,26 +22716,27 @@ int main (void) _ACEOF if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - LIBS="$saved_libs" + HAVECRYPTO="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl" >&5 -$as_echo_n "checking OpenSSL linking with -ldl... " >&6; } - LIBS="-ldl $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl and -lpthread" >&5 +$as_echo_n "checking OpenSSL linking with -ldl and -lpthread... " >&6; } + LIBS="$LIBS -lpthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main (void) { - SSLeay_add_all_algorithms(); + ERR_clear_error(); ; return 0; @@ -22486,15 +22744,17 @@ int main (void) _ACEOF if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - LIBS="$saved_libs -ldl" + HAVECRYPTO="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - LIBS="$saved_libs" + LDFLAGS="$CLEANLDFLAGS" + CPPFLAGS="$CLEANCPPFLAGS" + LIBS="$CLEANLIBS" fi @@ -22502,12 +22762,16 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - fi + +fi + + +fi + if test X"$HAVECRYPTO" = X"yes"; then @@ -22621,7 +22885,8 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - curl_ssl_msg="enabled (OpenSSL)" + ssl_msg="OpenSSL" + test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes OPENSSL_ENABLED=1 $as_echo "#define USE_OPENSSL 1" >>confdefs.h @@ -22649,26 +22914,13 @@ done if test $ac_cv_header_x509_h = yes && test $ac_cv_header_crypto_h = yes && test $ac_cv_header_ssl_h = yes; then - curl_ssl_msg="enabled (OpenSSL)" + ssl_msg="OpenSSL" OPENSSL_ENABLED=1 fi fi fi - if test X"$OPENSSL_ENABLED" = X"1"; then - for ac_header in openssl/pkcs12.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/pkcs12.h" "ac_cv_header_openssl_pkcs12_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_pkcs12_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_PKCS12_H 1 -_ACEOF - -fi - -done - - else + if test X"$OPENSSL_ENABLED" != X"1"; then LIBS="$CLEANLIBS" fi @@ -22756,7 +23008,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_BORINGSSL 1 _ACEOF - curl_ssl_msg="enabled (BoringSSL)" + ssl_msg="BoringSSL" else @@ -22793,7 +23045,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESSL 1 _ACEOF - curl_ssl_msg="enabled (libressl)" + ssl_msg="libressl" else @@ -22891,6 +23143,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext ;; esac case $tst_api in + 0x111) tst_show="1.1.1" ;; 0x110) tst_show="1.1.0" ;; 0x102) tst_show="1.0.2" ;; 0x101) tst_show="1.0.1" ;; @@ -22922,6 +23175,42 @@ $as_echo "$tst_show" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL library version" >&5 $as_echo_n "checking for OpenSSL library version... " >&6; } if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define ERR_clear_last_mark innocuous_ERR_clear_last_mark +#ifdef __STDC__ +# include +#else +# include +#endif +#undef ERR_clear_last_mark +#ifdef __cplusplus +extern "C" +#endif +char ERR_clear_last_mark (); +#if defined __stub_ERR_clear_last_mark || defined __stub___ERR_clear_last_mark +choke me +#endif + +int main (void) +{ +return ERR_clear_last_mark (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x111" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then case $host in *-*-vms*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23394,6 +23683,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi case $tst_api in + 0x111) tst_show="1.1.1" ;; 0x110) tst_show="1.1.0" ;; 0x102) tst_show="1.0.2" ;; 0x101) tst_show="1.0.1" ;; @@ -23436,6 +23726,7 @@ $as_echo "$as_me: WARNING: $tst_warns" >&2;} fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi @@ -23557,7 +23848,8 @@ if test "${with_gnutls+set}" = set; then : fi -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_GNUTLS" != xno; then + ssl_msg= if test X"$OPT_GNUTLS" != Xno; then @@ -23785,7 +24077,8 @@ $as_echo "#define USE_GNUTLS 1" >>confdefs.h GNUTLS_ENABLED=1 USE_GNUTLS="yes" - curl_ssl_msg="enabled (GnuTLS)" + ssl_msg="GnuTLS" + test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes else @@ -23824,6 +24117,7 @@ done fi fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi @@ -24058,7 +24352,8 @@ if test "${with_polarssl+set}" = set; then : fi -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_POLARSSL" != xno; then + ssl_msg= if test X"$OPT_POLARSSL" != Xno; then @@ -24110,7 +24405,8 @@ $as_echo "#define USE_POLARSSL 1" >>confdefs.h POLARSSL_ENABLED=1 USE_POLARSSL="yes" - curl_ssl_msg="enabled (PolarSSL)" + ssl_msg="PolarSSL" + test polarssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes fi @@ -24173,7 +24469,8 @@ $as_echo "#define USE_POLARSSL 1" >>confdefs.h POLARSSL_ENABLED=1 USE_POLARSSL="yes" - curl_ssl_msg="enabled (PolarSSL)" + ssl_msg="PolarSSL" + test polarssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes else @@ -24201,6 +24498,7 @@ $as_echo "$as_me: Added $polarssllib to LD_LIBRARY_PATH" >&6;} fi fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi @@ -24215,7 +24513,8 @@ if test "${with_mbedtls+set}" = set; then : fi -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_MBEDTLS" != xno; then + ssl_msg= if test X"$OPT_MBEDTLS" != Xno; then @@ -24267,7 +24566,8 @@ $as_echo "#define USE_MBEDTLS 1" >>confdefs.h MBEDTLS_ENABLED=1 USE_MBEDTLS="yes" - curl_ssl_msg="enabled (mbedTLS)" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes fi @@ -24330,7 +24630,8 @@ $as_echo "#define USE_MBEDTLS 1" >>confdefs.h MBEDTLS_ENABLED=1 USE_MBEDTLS="yes" - curl_ssl_msg="enabled (mbedTLS)" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes else @@ -24358,6 +24659,7 @@ $as_echo "$as_me: Added $mbedtlslib to LD_LIBRARY_PATH" >&6;} fi fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi @@ -24372,7 +24674,8 @@ if test "${with_cyassl+set}" = set; then : fi -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_CYASSL" != xno; then + ssl_msg= if test X"$OPT_CYASSL" != Xno; then @@ -24427,7 +24730,8 @@ $as_echo "#define USE_CYASSL 1" >>confdefs.h CYASSL_ENABLED=1 USE_CYASSL="yes" - curl_ssl_msg="enabled (CyaSSL)" + ssl_msg="CyaSSL" + test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes fi @@ -24490,7 +24794,8 @@ $as_echo "#define USE_CYASSL 1" >>confdefs.h CYASSL_ENABLED=1 USE_CYASSL="yes" - curl_ssl_msg="enabled (CyaSSL)" + ssl_msg="CyaSSL" + test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes else @@ -24553,7 +24858,8 @@ $as_echo "#define USE_CYASSL 1" >>confdefs.h CYASSL_ENABLED=1 USE_CYASSL="yes" - curl_ssl_msg="enabled (WolfSSL)" + ssl_msg="WolfSSL" + test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes else @@ -24679,6 +24985,7 @@ $as_echo "$as_me: Added $cyassllib to LD_LIBRARY_PATH" >&6;} fi fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi @@ -24691,7 +24998,8 @@ if test "${with_nss+set}" = set; then : fi -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then + ssl_msg= if test X"$OPT_NSS" != Xno; then @@ -25076,7 +25384,8 @@ $as_echo "#define USE_NSS 1" >>confdefs.h USE_NSS="yes" NSS_ENABLED=1 - curl_ssl_msg="enabled (NSS)" + ssl_msg="NSS" + test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes else @@ -25091,6 +25400,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5 $as_echo "$as_me: detected NSS version $version" >&6;} + ac_fn_c_check_func "$LINENO" "PK11_CreateManagedGenericObject" "ac_cv_func_PK11_CreateManagedGenericObject" +if test "x$ac_cv_func_PK11_CreateManagedGenericObject" = xyes; then : + + +$as_echo "#define HAVE_PK11_CREATEMANAGEDGENERICOBJECT 1" >>confdefs.h + + +fi + + NSS_LIBS=$addlib @@ -25103,7 +25422,9 @@ $as_echo "$as_me: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&6;} fi fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi + OPT_AXTLS=off @@ -25113,7 +25434,8 @@ if test "${with_axtls+set}" = set; then : fi -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_AXTLS" != xno; then + ssl_msg= if test X"$OPT_AXTLS" != Xno; then CLEANLDFLAGS="$LDFLAGS" CLEANCPPFLAGS="$CPPFLAGS" @@ -25180,7 +25502,8 @@ $as_echo "#define USE_AXTLS 1" >>confdefs.h AXTLS_ENABLED=1 USE_AXTLS="yes" - curl_ssl_msg="enabled (axTLS)" + ssl_msg="axTLS" + test axtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes if test "x$cross_compiling" != "xyes"; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS" @@ -25198,17 +25521,56 @@ else fi fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi -if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$MBEDTLS_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then +case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$MBEDTLS_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" in +x) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&5 $as_echo "$as_me: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this." >&5 $as_echo "$as_me: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this." >&2;} -else - # SSL is enabled, genericly + ;; +x1) + # one SSL backend is enabled SSL_ENABLED="1" + { $as_echo "$as_me:${as_lineno-$LINENO}: built with one SSL backend" >&5 +$as_echo "$as_me: built with one SSL backend" >&6;} + ;; +*) + # more than one SSL backend is enabled + + SSL_ENABLED="1" + + CURL_WITH_MULTI_SSL="1" + +$as_echo "#define CURL_WITH_MULTI_SSL 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: built with multiple SSL backends" >&5 +$as_echo "$as_me: built with multiple SSL backends" >&6;} + ;; +esac + +if test -n "$ssl_backends"; then + curl_ssl_msg="enabled ($ssl_backends)" +fi + +if test no = "$VALID_DEFAULT_SSL_BACKEND" +then + if test -n "$SSL_ENABLED" + then + as_fn_error $? "Default SSL backend $DEFAULT_SSL_BACKEND not enabled!" "$LINENO" 5 + else + as_fn_error $? "Default SSL backend requires SSL!" "$LINENO" 5 + fi +elif test yes = "$VALID_DEFAULT_SSL_BACKEND" +then + +cat >>confdefs.h <<_ACEOF +#define CURL_DEFAULT_SSL_BACKEND "$DEFAULT_SSL_BACKEND" +_ACEOF + fi @@ -25770,8 +26132,8 @@ $as_echo "found" >&6; } clean_CPPFLAGS="$CPPFLAGS" clean_LDFLAGS="$LDFLAGS" clean_LIBS="$LIBS" - CPPFLAGS="$addcflags $clean_CPPFLAGS" - LDFLAGS="$addld $clean_LDFLAGS" + CPPFLAGS="$clean_CPPFLAGS $addcflags" + LDFLAGS="$clean_LDFLAGS $addld" LIBS="$addlib $clean_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmetalink is recent enough" >&5 $as_echo_n "checking if libmetalink is recent enough... " >&6; } @@ -25834,6 +26196,19 @@ OPT_LIBSSH2=off # Check whether --with-libssh2 was given. if test "${with_libssh2+set}" = set; then : withval=$with_libssh2; OPT_LIBSSH2=$withval +else + OPT_LIBSSH2=no +fi + + + +OPT_LIBSSH=off + +# Check whether --with-libssh was given. +if test "${with_libssh+set}" = set; then : + withval=$with_libssh; OPT_LIBSSH=$withval +else + OPT_LIBSSH=no fi @@ -25994,7 +26369,7 @@ $as_echo "found" >&6; } DIR_SSH2=${PREFIX_SSH2}/lib$libsuff fi - LDFLAGS="$LD_SSH2 $LDFLAGS" + LDFLAGS="$LDFLAGS $LD_SSH2" CPPFLAGS="$CPPFLAGS $CPP_SSH2" LIBS="$LIB_SSH2 $LIBS" @@ -26081,6 +26456,250 @@ $as_echo "$as_me: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&6;} CPPFLAGS=$CLEANCPPFLAGS LIBS=$CLEANLIBS fi +elif test X"$OPT_LIBSSH" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBSSH" in + yes) + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh options with pkg-config" >&5 +$as_echo_n "checking for libssh options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libssh >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_SSH=`$PKGCONFIG --libs-only-l libssh` + LD_SSH=`$PKGCONFIG --libs-only-L libssh` + CPP_SSH=`$PKGCONFIG --cflags-only-I libssh` + version=`$PKGCONFIG --modversion libssh` + DIR_SSH=`echo $LD_SSH | $SED -e 's/-L//'` + fi + + ;; + off) + ;; + *) + PREFIX_SSH=$OPT_LIBSSH + ;; + esac + + if test -n "$PREFIX_SSH"; then + LIB_SSH="-lssh" + LD_SSH=-L${PREFIX_SSH}/lib$libsuff + CPP_SSH=-I${PREFIX_SSH}/include + DIR_SSH=${PREFIX_SSH}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_SSH" + CPPFLAGS="$CPPFLAGS $CPP_SSH" + LIBS="$LIB_SSH $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssh_new in -lssh" >&5 +$as_echo_n "checking for ssh_new in -lssh... " >&6; } +if ${ac_cv_lib_ssh_ssh_new+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssh $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ssh_new (); +int main (void) +{ +return ssh_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssh_ssh_new=yes +else + ac_cv_lib_ssh_ssh_new=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh_ssh_new" >&5 +$as_echo "$ac_cv_lib_ssh_ssh_new" >&6; } +if test "x$ac_cv_lib_ssh_ssh_new" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSH 1 +_ACEOF + + LIBS="-lssh $LIBS" + +fi + + + for ac_header in libssh/libssh.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libssh/libssh.h" "ac_cv_header_libssh_libssh_h" "$ac_includes_default" +if test "x$ac_cv_header_libssh_libssh_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSH_LIBSSH_H 1 +_ACEOF + curl_ssh_msg="enabled (libSSH)" + LIBSSH_ENABLED=1 + +$as_echo "#define USE_LIBSSH 1" >>confdefs.h + + USE_LIBSSH=1 + + +fi + +done + + + if test X"$OPT_LIBSSH" != Xoff && + test "$LIBSSH_ENABLED" != "1"; then + as_fn_error $? "libSSH libs and/or directories were not found where specified!" "$LINENO" 5 + fi + + if test "$LIBSSH_ENABLED" = "1"; then + if test -n "$DIR_SSH"; then + + if test "x$cross_compiling" != "xyes"; then + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH" + export LD_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH to LD_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_SSH to LD_LIBRARY_PATH" >&6;} + fi + fi + else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi fi @@ -26241,7 +26860,8 @@ $as_echo "found" >&6; } LIB_RTMP="-lrtmp" ;; *) - PREFIX_RTMP=$OPT_LIBRTMP + LIB_RTMP="-lrtmp" + PREFIX_RTMP=$OPT_LIBRTMP ;; esac @@ -26345,7 +26965,9 @@ $as_echo "$as_me: WARNING: You need an ld version supporting the --version-scrip else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - if test "x$OPENSSL_ENABLED" = "x1"; then + if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + versioned_symbols_flavour="MULTISSL_" + elif test "x$OPENSSL_ENABLED" = "x1"; then versioned_symbols_flavour="OPENSSL_" elif test "x$GNUTLS_ENABLED" = "x1"; then versioned_symbols_flavour="GNUTLS_" @@ -26428,6 +27050,7 @@ if test "$want_winidn" = "yes"; then clean_LDFLAGS="$LDFLAGS" clean_LIBS="$LIBS" WINIDN_LIBS="-lnormaliz" + WINIDN_CPPFLAGS="-DWINVER=0x0600" # if test "$want_winidn_path" != "default"; then WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff" @@ -26435,8 +27058,8 @@ if test "$want_winidn" = "yes"; then WINIDN_DIR="$want_winidn_path/lib$libsuff" fi # - CPPFLAGS="$WINIDN_CPPFLAGS $CPPFLAGS" - LDFLAGS="$WINIDN_LDFLAGS $LDFLAGS" + CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS" LIBS="$WINIDN_LIBS $LIBS" # { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IdnToUnicode can be linked" >&5 @@ -26445,24 +27068,13 @@ $as_echo_n "checking if IdnToUnicode can be linked... " >&6; } /* end confdefs.h. */ -#define IdnToUnicode innocuous_IdnToUnicode -#ifdef __STDC__ -# include -#else -# include -#endif -#undef IdnToUnicode -#ifdef __cplusplus -extern "C" -#endif -char IdnToUnicode (); -#if defined __stub_IdnToUnicode || defined __stub___IdnToUnicode -choke me -#endif + #include int main (void) { -return IdnToUnicode (); + + IdnToUnicode(0, NULL, 0, NULL, 0); + ; return 0; } @@ -26856,8 +27468,8 @@ $as_echo "$as_me: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&6;} $as_echo "$as_me: IDN_DIR: \"$IDN_DIR\"" >&6;} fi # - CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS" - LDFLAGS="$IDN_LDFLAGS $LDFLAGS" + CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $IDN_LDFLAGS" LIBS="$IDN_LIBS $LIBS" # { $as_echo "$as_me:${as_lineno-$LINENO}: checking if idn2_lookup_ul can be linked" >&5 @@ -26948,6 +27560,12 @@ fi OPT_H2="yes" +if test "x$disable_http" = "xyes"; then + # without HTTP, nghttp2 is no use + OPT_H2="no" +fi + + # Check whether --with-nghttp2 was given. if test "${with_nghttp2+set}" = set; then : withval=$with_nghttp2; OPT_H2=$withval @@ -27527,11 +28145,12 @@ for ac_header in sys/types.h \ assert.h \ unistd.h \ stdlib.h \ - limits.h \ arpa/inet.h \ net/if.h \ netinet/in.h \ + netinet/in6.h \ sys/un.h \ + linux/tcp.h \ netinet/tcp.h \ netdb.h \ sys/sockio.h \ @@ -27577,6 +28196,9 @@ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_NETINET_IN6_H +#include +#endif #ifdef HAVE_SYS_UN_H #include #endif @@ -28087,17 +28709,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF - - if test -z "$ac_cv_sizeof_long" || - test "$ac_cv_sizeof_long" -eq "0"; then - as_fn_error $? "cannot find out size of long." "$LINENO" 5 - fi - -cat >>confdefs.h <<_EOF -#define CURL_SIZEOF_LONG $ac_cv_sizeof_long -_EOF - - # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -28165,17 +28776,46 @@ _ACEOF -soname_bump=no -if test x"$curl_cv_native_windows" != "xyes" && - test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This libcurl built is probably not ABI compatible with previous" >&5 -$as_echo "$as_me: WARNING: This libcurl built is probably not ABI compatible with previous" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: builds! You MUST read lib/README.curl_off_t to figure it out." >&5 -$as_echo "$as_me: WARNING: builds! You MUST read lib/README.curl_off_t to figure it out." >&2;} - soname_bump=yes +o=$CPPFLAGS +CPPFLAGS="-I$srcdir/include $CPPFLAGS" +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of curl_off_t" >&5 +$as_echo_n "checking size of curl_off_t... " >&6; } +if ${ac_cv_sizeof_curl_off_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (curl_off_t))" "ac_cv_sizeof_curl_off_t" " +#include + +"; then : + +else + if test "$ac_cv_type_curl_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (curl_off_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_curl_off_t=0 + fi +fi + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_curl_off_t" >&5 +$as_echo "$ac_cv_sizeof_curl_off_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CURL_OFF_T $ac_cv_sizeof_curl_off_t +_ACEOF +CPPFLAGS=$o + ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = xyes; then : @@ -28252,6 +28892,43 @@ $as_echo "#define HAVE_BOOL_T 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if time_t is unsigned" >&5 +$as_echo_n "checking if time_t is unsigned... " >&6; } +if test "$cross_compiling" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #include + time_t t = -1; + return (t > 0); + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_TIME_T_UNSIGNED 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + curl_includes_ws2tcpip="\ /* includes start */ @@ -28320,11 +28997,6 @@ cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF - -cat >>confdefs.h <<_ACEOF -#define WIN32_LEAN_AND_MEAN 1 -_ACEOF - ;; esac @@ -29131,11 +29803,15 @@ else long tv_usec; }; #endif - extern $sel_retv SELECTCALLCONV select($sel_arg1, - $sel_arg234, - $sel_arg234, - $sel_arg234, - $sel_arg5); + extern $sel_retv SELECTCALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif + select($sel_arg1, + $sel_arg234, + $sel_arg234, + $sel_arg234, + $sel_arg5); int main (void) { @@ -29356,6 +30032,9 @@ else #define RECVCALLCONV #endif extern $recv_retv RECVCALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4); int main (void) @@ -29544,6 +30223,9 @@ else #define SENDCALLCONV #endif extern $send_retv SENDCALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif send($send_arg1, $send_arg2, $send_arg3, $send_arg4); int main (void) @@ -39345,24 +40027,21 @@ $as_echo "$as_me: skip check for pipe on msdosdjgpp" >&6;} ;; esac -for ac_func in fork \ - geteuid \ +for ac_func in geteuid \ getpass_r \ getppid \ - getprotobyname \ getpwuid \ getpwuid_r \ getrlimit \ gettimeofday \ if_nametoindex \ - inet_addr \ - perror \ + mach_absolute_time \ pipe \ setlocale \ setmode \ setrlimit \ - uname \ - utime + utime \ + utimes do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -39619,7 +40298,11 @@ else #endif #define GNICALLCONV #endif - extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2, + extern int GNICALLCONV +#ifdef __ANDROID__ +__attribute__((overloadable)) +#endif + getnameinfo($gni_arg1, $gni_arg2, char *, $gni_arg46, char *, $gni_arg46, $gni_arg7); @@ -40087,8 +40770,8 @@ fi fi fi # - CPPFLAGS="$ares_CPPFLAGS $clean_CPPFLAGS" - LDFLAGS="$ares_LDFLAGS $clean_LDFLAGS" + CPPFLAGS="$clean_CPPFLAGS $ares_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS" LIBS="$ares_LIBS $clean_LIBS" # if test "$embedded_ares" != "yes"; then @@ -40173,6 +40856,7 @@ else fi +if test "x$want_ares" != xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the threaded resolver" >&5 $as_echo_n "checking whether to enable the threaded resolver... " >&6; } @@ -40183,19 +40867,16 @@ if test "${enable_threaded_resolver+set}" = set; then : fi case "$OPT_THRES" in - yes) - want_thres="yes" + no) + want_thres="no" ;; *) - want_thres="no" + want_thres="yes" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_thres" >&5 $as_echo "$want_thres" >&6; } - -if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then - as_fn_error $? "Options --enable-threaded-resolver and --enable-ares are mutually exclusive" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use POSIX threads for threaded resolver" >&5 @@ -40221,8 +40902,25 @@ $as_echo "auto" >&6; } fi -if test "$want_thres" = "yes" && test "$dontwant_rt" = "no" && \ - test "$want_pthreads" != "no"; then + +if test "$want_pthreads" != "no"; then + if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then + as_fn_error $? "options --enable-pthreads and --disable-rt are mutually exclusive" "$LINENO" 5 + fi + if test "$dontwant_rt" != "no"; then + if test "$want_pthreads" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-pthreads Ignored since librt is disabled." >&5 +$as_echo "$as_me: WARNING: --enable-pthreads Ignored since librt is disabled." >&2;} + fi + want_pthreads=no + fi +fi + +if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then + want_pthreads=no +fi + +if test "$want_pthreads" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : @@ -40292,24 +40990,22 @@ fi fi -if test "x$USE_THREADS_POSIX" != "x1"; then + +if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then if test "$want_pthreads" = "yes"; then as_fn_error $? "--enable-pthreads but pthreads was not found" "$LINENO" 5 fi - if test "$want_thres" = "yes"; then - if test "$curl_cv_native_windows" = "yes"; then - USE_THREADS_WIN32=1 + if test "$curl_cv_native_windows" = "yes"; then + USE_THREADS_WIN32=1 $as_echo "#define USE_THREADS_WIN32 1" >>confdefs.h - curl_res_msg="Win32 threaded" - else - as_fn_error $? "Threaded resolver enabled but no thread library found" "$LINENO" 5 - fi + curl_res_msg="Win32 threaded" + else + as_fn_error $? "Threaded resolver enabled but no thread library found" "$LINENO" 5 fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable verbose strings" >&5 $as_echo_n "checking whether to enable verbose strings... " >&6; } # Check whether --enable-verbose was given. @@ -40587,36 +41283,6 @@ fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enforce SONAME bump" >&5 -$as_echo_n "checking whether to enforce SONAME bump... " >&6; } -# Check whether --enable-soname-bump was given. -if test "${enable_soname_bump+set}" = set; then : - enableval=$enable_soname_bump; case "$enableval" in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - soname_bump=yes - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $soname_bump" >&5 -$as_echo "$soname_bump" >&6; } - -fi - - if test x$soname_bump = xyes; then - SONAME_BUMP_TRUE= - SONAME_BUMP_FALSE='#' -else - SONAME_BUMP_TRUE='#' - SONAME_BUMP_FALSE= -fi - - LIBCURL_LIBS=$LIBS @@ -40657,6 +41323,9 @@ fi if test "x$HAVE_LIBZ" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES libz" fi +if test "x$HAVE_BROTLI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES brotli" +fi if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \ -o "x$USE_THREADS_WIN32" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" @@ -40707,6 +41376,10 @@ if test "x$USE_NGHTTP2" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2" fi +if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL" +fi + if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \ -o "x$NSS_ENABLED" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy" @@ -40782,6 +41455,10 @@ if test "x$USE_LIBSSH2" = "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" fi +if test "x$USE_LIBSSH" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi if test "x$CURL_DISABLE_RTSP" != "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP" fi @@ -40975,6 +41652,9 @@ $as_echo "$as_me: WARNING: Continuing even with errors mentioned immediately abo fi +SSL_BACKENDS=${ssl_backends} + + if test "x$want_curldebug_assumed" = "xyes" && test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then ac_configure_args="$ac_configure_args --enable-curldebug" @@ -41095,6 +41775,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then + as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then @@ -41155,6 +41839,10 @@ if test -z "${HAVE_LIBZ_TRUE}" && test -z "${HAVE_LIBZ_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBZ\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_STUB_GSS_TRUE}" && test -z "${BUILD_STUB_GSS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_STUB_GSS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${USE_LIBPSL_TRUE}" && test -z "${USE_LIBPSL_FALSE}"; then as_fn_error $? "conditional \"USE_LIBPSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -41179,10 +41867,6 @@ if test -z "${DOING_CURL_SYMBOL_HIDING_TRUE}" && test -z "${DOING_CURL_SYMBOL_HI as_fn_error $? "conditional \"DOING_CURL_SYMBOL_HIDING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${SONAME_BUMP_TRUE}" && test -z "${SONAME_BUMP_FALSE}"; then - as_fn_error $? "conditional \"SONAME_BUMP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${CROSSCOMPILING_TRUE}" && test -z "${CROSSCOMPILING_FALSE}"; then as_fn_error $? "conditional \"CROSSCOMPILING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -42057,7 +42741,6 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "lib/curl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/curl_config.h" ;; - "include/curl/curlbuild.h") CONFIG_HEADERS="$CONFIG_HEADERS include/curl/curlbuild.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -43658,6 +44341,7 @@ done SSL support: ${curl_ssl_msg} SSH support: ${curl_ssh_msg} zlib support: ${curl_zlib_msg} + brotli support: ${curl_brotli_msg} GSS-API support: ${curl_gss_msg} TLS-SRP support: ${curl_tls_srp_msg} resolver: ${curl_res_msg} @@ -43690,6 +44374,7 @@ $as_echo "$as_me: Configured to build curl/libcurl: SSL support: ${curl_ssl_msg} SSH support: ${curl_ssh_msg} zlib support: ${curl_zlib_msg} + brotli support: ${curl_brotli_msg} GSS-API support: ${curl_gss_msg} TLS-SRP support: ${curl_tls_srp_msg} resolver: ${curl_res_msg} @@ -43713,14 +44398,3 @@ $as_echo "$as_me: Configured to build curl/libcurl: HTTP2 support: ${curl_h2_msg} Protocols: ${SUPPORT_PROTOCOLS} " >&6;} - -if test "x$soname_bump" = "xyes"; then - -cat <, et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -31,12 +31,12 @@ XC_OVR_ZZ60 CURL_OVERRIDE_AUTOCONF dnl configure script copyright -AC_COPYRIGHT([Copyright (c) 1998 - 2016 Daniel Stenberg, +AC_COPYRIGHT([Copyright (c) 1998 - 2017 Daniel Stenberg, This configure script may be copied, distributed and modified under the terms of the curl license; see COPYING for more details]) AC_CONFIG_SRCDIR([lib/urldata.h]) -AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h) +AC_CONFIG_HEADERS(lib/curl_config.h) AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -120,14 +120,16 @@ AC_SUBST([AR]) AC_SUBST(libext) -dnl Remove non-configure distributed curlbuild.h -if test -f ${srcdir}/include/curl/curlbuild.h; then - rm -f ${srcdir}/include/curl/curlbuild.h -fi - dnl figure out the libcurl version -CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h` +CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h` XC_CHECK_PROG_CC + +dnl Check if gcc is being used before adding AX_CODE_COVERAGE +AS_IF([ test "$GCC" = "yes" ], [AX_CODE_COVERAGE], + # not using GCC so pass a test below - CODE_COVERAGE_ENABLED_TRUE is not zero length + CODE_COVERAGE_ENABLED_TRUE='#' +) + XC_AUTOMAKE AC_MSG_CHECKING([curl version]) AC_MSG_RESULT($CURLVERSION) @@ -136,7 +138,7 @@ AC_SUBST(CURLVERSION) dnl dnl we extract the numerical version for curl-config only -VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h` +VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h` AC_SUBST(VERSIONNUM) dnl Solaris pkgadd support definitions @@ -152,6 +154,7 @@ dnl initialize all the info variables curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,mbedtls,cyassl,axtls,winssl,darwinssl} )" curl_ssh_msg="no (--with-libssh2)" curl_zlib_msg="no (--with-zlib)" + curl_brotli_msg="no (--with-brotli)" curl_gss_msg="no (--with-gssapi)" curl_tls_srp_msg="no (--enable-tls-srp)" curl_res_msg="default (--enable-ares / --enable-threaded-resolver)" @@ -169,7 +172,7 @@ curl_verbose_msg="enabled (--disable-verbose)" curl_mtlnk_msg="no (--with-libmetalink)" curl_psl_msg="no (--with-libpsl)" - init_ssl_msg=${curl_ssl_msg} + ssl_backends= dnl dnl Save some initial values the user might have provided @@ -187,9 +190,6 @@ AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) dnl Checks for programs. -dnl Our curl_off_t internal and external configure settings -CURL_CONFIGURE_CURL_OFF_T - dnl This defines _ALL_SOURCE for AIX CURL_CHECK_AIX_ALL_SOURCE @@ -358,6 +358,7 @@ esac CURL_CHECK_WIN32_LARGEFILE CURL_MAC_CFLAGS +CURL_SUPPORTS_BUILTIN_AVAILABLE dnl ************************************************************ dnl switch off particular protocols @@ -370,6 +371,7 @@ AC_HELP_STRING([--disable-http],[Disable HTTP support]), no) AC_MSG_RESULT(no) AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP]) + disable_http="yes" AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP]) AC_SUBST(CURL_DISABLE_HTTP, [1]) AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) @@ -893,17 +895,16 @@ else OPT_ZLIB="" fi - CURL_CHECK_PKGCONFIG(zlib) - - if test "$PKGCONFIG" != "no" ; then - LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS" - LDFLAGS="`$PKGCONFIG --libs-only-L zlib` $LDFLAGS" - CPPFLAGS="`$PKGCONFIG --cflags-only-I zlib` $CPPFLAGS" - OPT_ZLIB="" - HAVE_LIBZ="1" - fi - if test -z "$OPT_ZLIB" ; then + CURL_CHECK_PKGCONFIG(zlib) + + if test "$PKGCONFIG" != "no" ; then + LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS" + LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`" + CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`" + OPT_ZLIB="" + HAVE_LIBZ="1" + fi if test -z "$HAVE_LIBZ"; then @@ -982,6 +983,94 @@ AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1) AC_SUBST(ZLIB_LIBS) dnl ********************************************************************** +dnl Check for the presence of BROTLI decoder libraries and headers +dnl ********************************************************************** + +dnl Brotli project home page: https://github.com/google/brotli + +dnl Default to compiler & linker defaults for BROTLI files & libraries. +OPT_BROTLI=off +AC_ARG_WITH(brotli,dnl +AC_HELP_STRING([--with-brotli=PATH],[Where to look for brotli, PATH points to the BROTLI installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--without-brotli], [disable BROTLI]), + OPT_BROTLI=$withval) + +if test X"$OPT_BROTLI" != Xno; then + dnl backup the pre-brotli variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_BROTLI" in + yes) + dnl --with-brotli (without path) used + CURL_CHECK_PKGCONFIG(libbrotlidec) + + if test "$PKGCONFIG" != "no" ; then + LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec` + LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec` + CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec` + version=`$PKGCONFIG --modversion libbrotlidec` + DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/-L//'` + fi + + ;; + off) + dnl no --with-brotli option given, just check default places + ;; + *) + dnl use the given --with-brotli spot + PREFIX_BROTLI=$OPT_BROTLI + ;; + esac + + dnl if given with a prefix, we set -L and -I based on that + if test -n "$PREFIX_BROTLI"; then + LIB_BROTLI="-lbrotlidec" + LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff + CPP_BROTLI=-I${PREFIX_BROTLI}/include + DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_BROTLI" + CPPFLAGS="$CPPFLAGS $CPP_BROTLI" + LIBS="$LIB_BROTLI $LIBS" + + AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress) + + AC_CHECK_HEADERS(brotli/decode.h, + curl_brotli_msg="enabled (libbrotlidec)" + HAVE_BROTLI=1 + AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use]) + AC_SUBST(HAVE_BROTLI, [1]) + ) + + if test X"$OPT_BROTLI" != Xoff && + test "$HAVE_BROTLI" != "1"; then + AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!]) + fi + + if test "$HAVE_BROTLI" = "1"; then + if test -n "$DIR_BROTLI"; then + dnl when the brotli shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH + dnl to prevent further configure tests to fail due to this + + if test "x$cross_compiling" != "xyes"; then + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_BROTLI" + export LD_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_BROTLI to LD_LIBRARY_PATH]) + fi + fi + else + dnl no brotli, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +fi + +dnl ********************************************************************** dnl Check for LDAP dnl ********************************************************************** @@ -1123,6 +1212,9 @@ if test "$ipv6" = yes; then #include #else #include +#if defined (__TANDEM) +# include +#endif #endif] , struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes) if test "$have_sin6_scope_id" = yes; then @@ -1340,6 +1432,41 @@ else CPPFLAGS="$save_CPPFLAGS" fi +build_libstubgss=no +if test x"$want_gss" = "xyes"; then + build_libstubgss=yes +fi + +AM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes") + +dnl ------------------------------------------------------------- +dnl parse --with-default-ssl-backend so it can be validated below +dnl ------------------------------------------------------------- + +DEFAULT_SSL_BACKEND=no +VALID_DEFAULT_SSL_BACKEND= +AC_ARG_WITH(default-ssl-backend, +AC_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend]) +AC_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]), + [DEFAULT_SSL_BACKEND=$withval]) +case "$DEFAULT_SSL_BACKEND" in + no) + dnl --without-default-ssl-backend option used + ;; + default|yes) + dnl --with-default-ssl-backend option used without name + AC_MSG_ERROR([The name of the default SSL backend is required.]) + ;; + *) + dnl --with-default-ssl-backend option used with name + AC_SUBST(DEFAULT_SSL_BACKEND) + dnl needs to be validated below + VALID_DEFAULT_SSL_BACKEND=no + ;; +esac + +dnl ********************************************************************** + dnl ------------------------------------------------- dnl check winssl option before other SSL libraries dnl ------------------------------------------------- @@ -1351,13 +1478,15 @@ AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]), OPT_WINSSL=$withval) AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)]) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_WINSSL" != xno; then + ssl_msg= if test "x$OPT_WINSSL" != "xno" && test "x$curl_cv_native_windows" = "xyes"; then AC_MSG_RESULT(yes) AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support]) AC_SUBST(USE_SCHANNEL, [1]) - curl_ssl_msg="enabled (Windows-native)" + ssl_msg="Windows-native" + test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes WINSSL_ENABLED=1 # --with-winssl implies --enable-sspi AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support]) @@ -1367,6 +1496,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then else AC_MSG_RESULT(no) fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" else AC_MSG_RESULT(no) fi @@ -1378,18 +1508,20 @@ AC_HELP_STRING([--without-darwinssl], [disable Apple OS native SSL/TLS]), OPT_DARWINSSL=$withval) AC_MSG_CHECKING([whether to enable Apple OS native SSL/TLS]) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_DARWINSSL" != xno; then if test "x$OPT_DARWINSSL" != "xno" && test -d "/System/Library/Frameworks/Security.framework"; then AC_MSG_RESULT(yes) AC_DEFINE(USE_DARWINSSL, 1, [to enable Apple OS native SSL/TLS support]) AC_SUBST(USE_DARWINSSL, [1]) - curl_ssl_msg="enabled (Apple OS-native)" + ssl_msg="Apple OS-native" + test darwinssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes DARWINSSL_ENABLED=1 LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security" else AC_MSG_RESULT(no) fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" else AC_MSG_RESULT(no) fi @@ -1407,7 +1539,10 @@ AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the AC_HELP_STRING([--without-ssl], [disable OpenSSL]), OPT_SSL=$withval) -if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then +if test -z "$ssl_backends" -o "x$OPT_SSL" != xno && + test X"$OPT_SSL" != Xno; then + ssl_msg= + dnl backup the pre-ssl variables CLEANLDFLAGS="$LDFLAGS" CLEANCPPFLAGS="$CPPFLAGS" @@ -1518,52 +1653,50 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then AC_CHECK_LIB(crypto, HMAC_Init_ex,[ HAVECRYPTO="yes" LIBS="-lcrypto $LIBS"], [ - LDFLAGS="$CLEANLDFLAGS" - CPPFLAGS="$CLEANCPPFLAGS" - LIBS="$CLEANLIBS" - ]) - ]) - - if test X"$HAVECRYPTO" = X"yes"; then - AC_MSG_CHECKING([OpenSSL linking without -ldl]) - saved_libs=$LIBS - AC_TRY_LINK( - [ - #include - ], - [ - SSLeay_add_all_algorithms(); - ], - [ - AC_MSG_RESULT(yes) - LIBS="$saved_libs" - ], - [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING([OpenSSL linking with -ldl]) - LIBS="-ldl $LIBS" - AC_TRY_LINK( - [ - #include - ], - [ - SSLeay_add_all_algorithms(); - ], - [ - AC_MSG_RESULT(yes) - LIBS="$saved_libs -ldl" - ], - [ - AC_MSG_RESULT(no) - LIBS="$saved_libs" - ] - ) + dnl still no, but what about with -ldl? + AC_MSG_CHECKING([OpenSSL linking with -ldl]) + LIBS="$LIBS -ldl" + AC_TRY_LINK( + [ + #include + ], + [ + ERR_clear_error(); + ], + [ + AC_MSG_RESULT(yes) + HAVECRYPTO="yes" + ], + [ + AC_MSG_RESULT(no) + dnl ok, so what about bouth -ldl and -lpthread? + + AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread]) + LIBS="$LIBS -lpthread" + AC_TRY_LINK( + [ + #include + ], + [ + ERR_clear_error(); + ], + [ + AC_MSG_RESULT(yes) + HAVECRYPTO="yes" + ], + [ + AC_MSG_RESULT(no) + LDFLAGS="$CLEANLDFLAGS" + CPPFLAGS="$CLEANCPPFLAGS" + LIBS="$CLEANLIBS" + + ]) - ] - ) + ]) - fi + ]) + ]) if test X"$HAVECRYPTO" = X"yes"; then dnl This is only reasonable to do if crypto actually is there: check for @@ -1590,7 +1723,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then dnl Have the libraries--check for OpenSSL headers AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ openssl/pem.h openssl/ssl.h openssl/err.h, - curl_ssl_msg="enabled (OpenSSL)" + ssl_msg="OpenSSL" + test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes OPENSSL_ENABLED=1 AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])) @@ -1604,16 +1738,13 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then test $ac_cv_header_crypto_h = yes && test $ac_cv_header_ssl_h = yes; then dnl three matches - curl_ssl_msg="enabled (OpenSSL)" + ssl_msg="OpenSSL" OPENSSL_ENABLED=1 fi fi fi - if test X"$OPENSSL_ENABLED" = X"1"; then - dnl is there a pkcs12.h header present? - AC_CHECK_HEADERS(openssl/pkcs12.h) - else + if test X"$OPENSSL_ENABLED" != X"1"; then LIBS="$CLEANLIBS" fi @@ -1655,7 +1786,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then AC_MSG_RESULT([yes]) AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1, [Define to 1 if using BoringSSL.]) - curl_ssl_msg="enabled (BoringSSL)" + ssl_msg="BoringSSL" ],[ AC_MSG_RESULT([no]) ]) @@ -1671,7 +1802,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then AC_MSG_RESULT([yes]) AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1, [Define to 1 if using libressl.]) - curl_ssl_msg="enabled (libressl)" + ssl_msg="libressl" ],[ AC_MSG_RESULT([no]) ]) @@ -1691,6 +1822,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then CURL_CHECK_OPENSSL_API fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi dnl ********************************************************************** @@ -1752,7 +1884,8 @@ AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to th AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]), OPT_GNUTLS=$withval) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_GNUTLS" != xno; then + ssl_msg= if test X"$OPT_GNUTLS" != Xno; then @@ -1826,7 +1959,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_GNUTLS, [1]) GNUTLS_ENABLED=1 USE_GNUTLS="yes" - curl_ssl_msg="enabled (GnuTLS)" + ssl_msg="GnuTLS" + test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [ LIBS="$CLEANLIBS" @@ -1841,7 +1975,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then dnl linker doesn't search through, we need to add it to dnl LD_LIBRARY_PATH to prevent further configure tests to fail dnl due to this - if test "x$cross_compiling" != "xyes"; then + if test "x$cross_compiling" != "xyes"; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib" export LD_LIBRARY_PATH AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH]) @@ -1854,6 +1988,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then fi dnl GNUTLS not disabled + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi dnl --- @@ -1911,7 +2046,8 @@ AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points t AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]), OPT_POLARSSL=$withval) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_POLARSSL" != xno; then + ssl_msg= if test X"$OPT_POLARSSL" != Xno; then @@ -1929,7 +2065,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_POLARSSL, [1]) POLARSSL_ENABLED=1 USE_POLARSSL="yes" - curl_ssl_msg="enabled (PolarSSL)" + ssl_msg="PolarSSL" + test polarssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ]) fi @@ -1955,7 +2092,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_POLARSSL, [1]) POLARSSL_ENABLED=1 USE_POLARSSL="yes" - curl_ssl_msg="enabled (PolarSSL)" + ssl_msg="PolarSSL" + test polarssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [ CPPFLAGS=$_cppflags @@ -1983,6 +2121,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then fi dnl PolarSSL not disabled + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi dnl ---------------------------------------------------- @@ -1998,7 +2137,8 @@ AC_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to AC_HELP_STRING([--without-mbedtls], [disable mbedTLS detection]), OPT_MBEDTLS=$withval) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_MBEDTLS" != xno; then + ssl_msg= if test X"$OPT_MBEDTLS" != Xno; then @@ -2016,7 +2156,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_MBEDTLS, [1]) MBEDTLS_ENABLED=1 USE_MBEDTLS="yes" - curl_ssl_msg="enabled (mbedTLS)" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [], -lmbedx509 -lmbedcrypto) fi @@ -2042,7 +2183,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_MBEDTLS, [1]) MBEDTLS_ENABLED=1 USE_MBEDTLS="yes" - curl_ssl_msg="enabled (mbedTLS)" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [ CPPFLAGS=$_cppflags @@ -2070,6 +2212,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then fi dnl mbedTLS not disabled + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi dnl ---------------------------------------------------- @@ -2086,7 +2229,8 @@ AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to th AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]), OPT_CYASSL=$withval) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_CYASSL" != xno; then + ssl_msg= if test X"$OPT_CYASSL" != Xno; then @@ -2108,7 +2252,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_CYASSL, [1]) CYASSL_ENABLED=1 USE_CYASSL="yes" - curl_ssl_msg="enabled (CyaSSL)" + ssl_msg="CyaSSL" + test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ]) fi @@ -2134,7 +2279,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_CYASSL, [1]) CYASSL_ENABLED=1 USE_CYASSL="yes" - curl_ssl_msg="enabled (CyaSSL)" + ssl_msg="CyaSSL" + test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [ CPPFLAGS=$_cppflags @@ -2179,7 +2325,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_CYASSL, [1]) CYASSL_ENABLED=1 USE_CYASSL="yes" - curl_ssl_msg="enabled (WolfSSL)" + ssl_msg="WolfSSL" + test cyassl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [ AC_MSG_RESULT(no) @@ -2233,6 +2380,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then fi dnl CyaSSL not disabled + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi dnl ---------------------------------------------------- @@ -2247,7 +2395,8 @@ AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the inst AC_HELP_STRING([--without-nss], [disable NSS detection]), OPT_NSS=$withval) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then + ssl_msg= if test X"$OPT_NSS" != Xno; then @@ -2322,7 +2471,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_NSS, [1]) USE_NSS="yes" NSS_ENABLED=1 - curl_ssl_msg="enabled (NSS)" + ssl_msg="NSS" + test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes ], [ LDFLAGS="$CLEANLDFLAGS" @@ -2333,6 +2483,15 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then if test "x$USE_NSS" = "xyes"; then AC_MSG_NOTICE([detected NSS version $version]) + dnl PK11_CreateManagedGenericObject() was introduced in NSS 3.34 because + dnl PK11_DestroyGenericObject() does not release resources allocated by + dnl PK11_CreateGenericObject() early enough. + AC_CHECK_FUNC(PK11_CreateManagedGenericObject, + [ + AC_DEFINE(HAVE_PK11_CREATEMANAGEDGENERICOBJECT, 1, + [if you have the PK11_CreateManagedGenericObject function]) + ]) + dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS NSS_LIBS=$addlib AC_SUBST([NSS_LIBS]) @@ -2351,7 +2510,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then fi dnl NSS not disabled -fi dnl curl_ssl_msg = init_ssl_msg + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi OPT_AXTLS=off @@ -2360,7 +2520,8 @@ AC_HELP_STRING([--with-axtls=PATH],[Where to look for axTLS, PATH points to the AC_HELP_STRING([--without-axtls], [disable axTLS]), OPT_AXTLS=$withval) -if test "$curl_ssl_msg" = "$init_ssl_msg"; then +if test -z "$ssl_backends" -o "x$OPT_AXTLS" != xno; then + ssl_msg= if test X"$OPT_AXTLS" != Xno; then dnl backup the pre-axtls variables CLEANLDFLAGS="$LDFLAGS" @@ -2394,7 +2555,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then AC_SUBST(USE_AXTLS, [1]) AXTLS_ENABLED=1 USE_AXTLS="yes" - curl_ssl_msg="enabled (axTLS)" + ssl_msg="axTLS" + test axtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes if test "x$cross_compiling" != "xyes"; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS" @@ -2407,15 +2569,46 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then LIBS="$CLEANLIBS" ]) fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" fi -if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$MBEDTLS_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then +case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$MBEDTLS_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" in +x) AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.]) AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this.]) -else - # SSL is enabled, genericly + ;; +x1) + # one SSL backend is enabled AC_SUBST(SSL_ENABLED) SSL_ENABLED="1" + AC_MSG_NOTICE([built with one SSL backend]) + ;; +*) + # more than one SSL backend is enabled + AC_SUBST(SSL_ENABLED) + SSL_ENABLED="1" + AC_SUBST(CURL_WITH_MULTI_SSL) + CURL_WITH_MULTI_SSL="1" + AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends]) + AC_MSG_NOTICE([built with multiple SSL backends]) + ;; +esac + +if test -n "$ssl_backends"; then + curl_ssl_msg="enabled ($ssl_backends)" +fi + +if test no = "$VALID_DEFAULT_SSL_BACKEND" +then + if test -n "$SSL_ENABLED" + then + AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!]) + else + AC_MSG_ERROR([Default SSL backend requires SSL!]) + fi +elif test yes = "$VALID_DEFAULT_SSL_BACKEND" +then + AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend]) fi dnl ********************************************************************** @@ -2496,8 +2689,8 @@ if test X"$OPT_LIBMETALINK" != Xno; then clean_CPPFLAGS="$CPPFLAGS" clean_LDFLAGS="$LDFLAGS" clean_LIBS="$LIBS" - CPPFLAGS="$addcflags $clean_CPPFLAGS" - LDFLAGS="$addld $clean_LDFLAGS" + CPPFLAGS="$clean_CPPFLAGS $addcflags" + LDFLAGS="$clean_LDFLAGS $addld" LIBS="$addlib $clean_LIBS" AC_MSG_CHECKING([if libmetalink is recent enough]) AC_LINK_IFELSE([ @@ -2541,8 +2734,15 @@ dnl Default to compiler & linker defaults for LIBSSH2 files & libraries. OPT_LIBSSH2=off AC_ARG_WITH(libssh2,dnl AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) -AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]), - OPT_LIBSSH2=$withval) +AC_HELP_STRING([--with-libssh2], [enable LIBSSH2]), + OPT_LIBSSH2=$withval, OPT_LIBSSH2=no) + + +OPT_LIBSSH=off +AC_ARG_WITH(libssh,dnl +AC_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the LIBSSH installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--with-libssh], [enable LIBSSH]), + OPT_LIBSSH=$withval, OPT_LIBSSH=no) if test X"$OPT_LIBSSH2" != Xno; then dnl backup the pre-libssh2 variables @@ -2581,7 +2781,7 @@ if test X"$OPT_LIBSSH2" != Xno; then DIR_SSH2=${PREFIX_SSH2}/lib$libsuff fi - LDFLAGS="$LD_SSH2 $LDFLAGS" + LDFLAGS="$LDFLAGS $LD_SSH2" CPPFLAGS="$CPPFLAGS $CPP_SSH2" LIBS="$LIB_SSH2 $LIBS" @@ -2617,6 +2817,79 @@ if test X"$OPT_LIBSSH2" != Xno; then CPPFLAGS=$CLEANCPPFLAGS LIBS=$CLEANLIBS fi +elif test X"$OPT_LIBSSH" != Xno; then + dnl backup the pre-libssh variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBSSH" in + yes) + dnl --with-libssh (without path) used + CURL_CHECK_PKGCONFIG(libssh) + + if test "$PKGCONFIG" != "no" ; then + LIB_SSH=`$PKGCONFIG --libs-only-l libssh` + LD_SSH=`$PKGCONFIG --libs-only-L libssh` + CPP_SSH=`$PKGCONFIG --cflags-only-I libssh` + version=`$PKGCONFIG --modversion libssh` + DIR_SSH=`echo $LD_SSH | $SED -e 's/-L//'` + fi + + ;; + off) + dnl no --with-libssh option given, just check default places + ;; + *) + dnl use the given --with-libssh spot + PREFIX_SSH=$OPT_LIBSSH + ;; + esac + + dnl if given with a prefix, we set -L and -I based on that + if test -n "$PREFIX_SSH"; then + LIB_SSH="-lssh" + LD_SSH=-L${PREFIX_SSH}/lib$libsuff + CPP_SSH=-I${PREFIX_SSH}/include + DIR_SSH=${PREFIX_SSH}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_SSH" + CPPFLAGS="$CPPFLAGS $CPP_SSH" + LIBS="$LIB_SSH $LIBS" + + AC_CHECK_LIB(ssh, ssh_new) + + AC_CHECK_HEADERS(libssh/libssh.h, + curl_ssh_msg="enabled (libSSH)" + LIBSSH_ENABLED=1 + AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use]) + AC_SUBST(USE_LIBSSH, [1]) + ) + + if test X"$OPT_LIBSSH" != Xoff && + test "$LIBSSH_ENABLED" != "1"; then + AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!]) + fi + + if test "$LIBSSH_ENABLED" = "1"; then + if test -n "$DIR_SSH"; then + dnl when the libssh shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH + dnl to prevent further configure tests to fail due to this + + if test "x$cross_compiling" != "xyes"; then + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH" + export LD_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_SSH to LD_LIBRARY_PATH]) + fi + fi + else + dnl no libssh, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi fi dnl ********************************************************************** @@ -2660,6 +2933,7 @@ if test X"$OPT_LIBRTMP" != Xno; then ;; *) dnl use the given --with-librtmp spot + LIB_RTMP="-lrtmp" PREFIX_RTMP=$OPT_LIBRTMP ;; esac @@ -2715,7 +2989,9 @@ AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shar AC_MSG_WARN([You need an ld version supporting the --version-script option]) else AC_MSG_RESULT(yes) - if test "x$OPENSSL_ENABLED" = "x1"; then + if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + versioned_symbols_flavour="MULTISSL_" + elif test "x$OPENSSL_ENABLED" = "x1"; then versioned_symbols_flavour="OPENSSL_" elif test "x$GNUTLS_ENABLED" = "x1"; then versioned_symbols_flavour="GNUTLS_" @@ -2787,6 +3063,7 @@ if test "$want_winidn" = "yes"; then clean_LDFLAGS="$LDFLAGS" clean_LIBS="$LIBS" WINIDN_LIBS="-lnormaliz" + WINIDN_CPPFLAGS="-DWINVER=0x0600" # if test "$want_winidn_path" != "default"; then dnl path has been specified @@ -2796,13 +3073,17 @@ if test "$want_winidn" = "yes"; then WINIDN_DIR="$want_winidn_path/lib$libsuff" fi # - CPPFLAGS="$WINIDN_CPPFLAGS $CPPFLAGS" - LDFLAGS="$WINIDN_LDFLAGS $LDFLAGS" + CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS" LIBS="$WINIDN_LIBS $LIBS" # AC_MSG_CHECKING([if IdnToUnicode can be linked]) AC_LINK_IFELSE([ - AC_LANG_FUNC_LINK_TRY([IdnToUnicode]) + AC_LANG_PROGRAM([[ + #include + ]],[[ + IdnToUnicode(0, NULL, 0, NULL, 0); + ]]) ],[ AC_MSG_RESULT([yes]) tst_links_winidn="yes" @@ -2912,8 +3193,8 @@ if test "$want_idn" = "yes"; then AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"]) fi # - CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS" - LDFLAGS="$IDN_LDFLAGS $LDFLAGS" + CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $IDN_LDFLAGS" LIBS="$IDN_LIBS $LIBS" # AC_MSG_CHECKING([if idn2_lookup_ul can be linked]) @@ -2959,6 +3240,12 @@ dnl Check for nghttp2 dnl ********************************************************************** OPT_H2="yes" + +if test "x$disable_http" = "xyes"; then + # without HTTP, nghttp2 is no use + OPT_H2="no" +fi + AC_ARG_WITH(nghttp2, AC_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage]) AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]), @@ -3081,11 +3368,12 @@ AC_CHECK_HEADERS( assert.h \ unistd.h \ stdlib.h \ - limits.h \ arpa/inet.h \ net/if.h \ netinet/in.h \ + netinet/in6.h \ sys/un.h \ + linux/tcp.h \ netinet/tcp.h \ netdb.h \ sys/sockio.h \ @@ -3134,6 +3422,9 @@ dnl default includes #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_NETINET_IN6_H +#include +#endif #ifdef HAVE_SYS_UN_H #include #endif @@ -3152,18 +3443,15 @@ AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(short) -CURL_CONFIGURE_LONG AC_CHECK_SIZEOF(time_t) AC_CHECK_SIZEOF(off_t) -soname_bump=no -if test x"$curl_cv_native_windows" != "xyes" && - test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then - AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous]) - AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.]) - soname_bump=yes -fi - +o=$CPPFLAGS +CPPFLAGS="-I$srcdir/include $CPPFLAGS" +AC_CHECK_SIZEOF(curl_off_t, unused , [ +#include +]) +CPPFLAGS=$o AC_CHECK_TYPE(long long, [AC_DEFINE(HAVE_LONGLONG, 1, @@ -3204,6 +3492,23 @@ AC_CHECK_TYPE([bool],[ #endif ]) +AC_MSG_CHECKING([if time_t is unsigned]) +AC_RUN_IFELSE([ + AC_LANG_SOURCE([[ + #include + #include + time_t t = -1; + return (t > 0); + ]])] ,[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned]) +],[ + AC_MSG_RESULT([no]) +],[ + dnl cross-compiling, most systems are unsigned + AC_MSG_RESULT([no]) +]) + CURL_CONFIGURE_CURL_SOCKLEN_T CURL_CONFIGURE_PULL_SYS_POLL @@ -3280,24 +3585,21 @@ case $host in ;; esac -AC_CHECK_FUNCS([fork \ - geteuid \ +AC_CHECK_FUNCS([geteuid \ getpass_r \ getppid \ - getprotobyname \ getpwuid \ getpwuid_r \ getrlimit \ gettimeofday \ if_nametoindex \ - inet_addr \ - perror \ + mach_absolute_time \ pipe \ setlocale \ setmode \ setrlimit \ - uname \ - utime + utime \ + utimes ],[ ],[ func="$ac_func" @@ -3400,11 +3702,8 @@ else fi AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes) -CURL_CHECK_OPTION_THREADED_RESOLVER - -if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then - AC_MSG_ERROR( -[Options --enable-threaded-resolver and --enable-ares are mutually exclusive]) +if test "x$want_ares" != xyes; then + CURL_CHECK_OPTION_THREADED_RESOLVER fi dnl ************************************************************ @@ -3427,8 +3726,28 @@ AC_HELP_STRING([--disable-pthreads],[Disable POSIX threads]), want_pthreads=auto ] ) -if test "$want_thres" = "yes" && test "$dontwant_rt" = "no" && \ - test "$want_pthreads" != "no"; then + +dnl turn off pthreads if rt is disabled +if test "$want_pthreads" != "no"; then + if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then + AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive]) + fi + if test "$dontwant_rt" != "no"; then + dnl if --enable-pthreads was explicit then warn it's being ignored + if test "$want_pthreads" = "yes"; then + AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.]) + fi + want_pthreads=no + fi +fi + +dnl turn off pthreads if no threaded resolver +if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then + want_pthreads=no +fi + +dnl detect pthreads +if test "$want_pthreads" != "no"; then AC_CHECK_HEADER(pthread.h, [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have ]) save_CFLAGS="$CFLAGS" @@ -3452,23 +3771,22 @@ if test "$want_thres" = "yes" && test "$dontwant_rt" = "no" && \ fi ]) fi -if test "x$USE_THREADS_POSIX" != "x1"; then + +dnl threaded resolver check +if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then if test "$want_pthreads" = "yes"; then AC_MSG_ERROR([--enable-pthreads but pthreads was not found]) fi - if test "$want_thres" = "yes"; then - dnl If native Windows fallback on Win32 threads since no POSIX threads - if test "$curl_cv_native_windows" = "yes"; then - USE_THREADS_WIN32=1 - AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup]) - curl_res_msg="Win32 threaded" - else - AC_MSG_ERROR([Threaded resolver enabled but no thread library found]) - fi + dnl If native Windows fallback on Win32 threads since no POSIX threads + if test "$curl_cv_native_windows" = "yes"; then + USE_THREADS_WIN32=1 + AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup]) + curl_res_msg="Win32 threaded" + else + AC_MSG_ERROR([Threaded resolver enabled but no thread library found]) fi fi - dnl ************************************************************ dnl disable verbose text strings dnl @@ -3630,26 +3948,6 @@ dnl hiding of library internal symbols dnl CURL_CONFIGURE_SYMBOL_HIDING -dnl ************************************************************ -dnl enforce SONAME bump -dnl - -AC_MSG_CHECKING([whether to enforce SONAME bump]) -AC_ARG_ENABLE(soname-bump, -AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump]) -AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]), -[ case "$enableval" in - yes) AC_MSG_RESULT(yes) - soname_bump=yes - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT($soname_bump) -) -AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes) - dnl dnl All the library dependencies put into $LIB apply to libcurl only. dnl @@ -3696,6 +3994,9 @@ fi if test "x$HAVE_LIBZ" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES libz" fi +if test "x$HAVE_BROTLI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES brotli" +fi if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \ -o "x$USE_THREADS_WIN32" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" @@ -3746,6 +4047,10 @@ if test "x$USE_NGHTTP2" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2" fi +if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL" +fi + if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \ -o "x$NSS_ENABLED" = "x1"; then SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy" @@ -3822,6 +4127,10 @@ if test "x$USE_LIBSSH2" = "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" fi +if test "x$USE_LIBSSH" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi if test "x$CURL_DISABLE_RTSP" != "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP" fi @@ -3853,6 +4162,9 @@ squeeze SUPPORT_PROTOCOLS XC_CHECK_BUILD_FLAGS +SSL_BACKENDS=${ssl_backends} +AC_SUBST(SSL_BACKENDS) + if test "x$want_curldebug_assumed" = "xyes" && test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then ac_configure_args="$ac_configure_args --enable-curldebug" @@ -3909,6 +4221,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl: SSL support: ${curl_ssl_msg} SSH support: ${curl_ssh_msg} zlib support: ${curl_zlib_msg} + brotli support: ${curl_brotli_msg} GSS-API support: ${curl_gss_msg} TLS-SRP support: ${curl_tls_srp_msg} resolver: ${curl_res_msg} @@ -3932,14 +4245,3 @@ AC_MSG_NOTICE([Configured to build curl/libcurl: HTTP2 support: ${curl_h2_msg} Protocols: ${SUPPORT_PROTOCOLS} ]) - -if test "x$soname_bump" = "xyes"; then - -cat <, et al. +# Copyright (C) 2001 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -44,6 +44,7 @@ Available values for OPTION include: --libs library linking information --prefix curl install prefix --protocols newline separated list of enabled protocols + --ssl-backends output the SSL backends libcurl was built to support --static-libs static libcurl library linking information --version output version information --vernum output the version information as a number (hexadecimal) @@ -153,6 +154,9 @@ while test $# -gt 0; do echo ${CURLLIBDIR}-lcurl fi ;; + --ssl-backends) + echo "@SSL_BACKENDS@" + ;; --static-libs) if test "X@ENABLE_STATIC@" != "Xno" ; then diff --git a/depcomp b/depcomp index fc98710..b39f98f 100755 --- a/depcomp +++ b/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -786,6 +786,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/docs/BINDINGS.md b/docs/BINDINGS.md index a11cb4c..024f169 100644 --- a/docs/BINDINGS.md +++ b/docs/BINDINGS.md @@ -14,7 +14,9 @@ libcurl bindings [Basic](http://scriptbasic.com/) ScriptBasic bindings written by Peter Verhas -[C++](http://curlpp.org/) Written by Jean-Philippe Barrette-LaPierre +C++: [curlpp](http://curlpp.org/) Written by Jean-Philippe Barrette-LaPierre, +[curlcpp](https://github.com/JosephP91/curlcpp) by Giuseppe Persico and [C++ +Requests](https://github.com/whoshuu/cpr) by Huu Nguyen [Ch](https://chcurl.sourceforge.io/) Written by Stephen Nestinger and Jonathan Rogado @@ -23,6 +25,8 @@ Cocoa: [BBHTTP](https://github.com/brunodecarvalho/BBHTTP) written by Bruno de C [D](https://dlang.org/library/std/net/curl.html) Written by Kenneth Bogert +[Delphi](https://github.com/Mercury13/curl4delphi) Written by Mikhail Merkuryev + [Dylan](https://dylanlibs.sourceforge.io/) Written by Chris Double [Eiffel](https://room.eiffel.com/library/curl) Written by Eiffel Software @@ -37,6 +41,8 @@ Cocoa: [BBHTTP](https://github.com/brunodecarvalho/BBHTTP) written by Bruno de C [glib/GTK+](http://atterer.net/glibcurl/) Written by Richard Atterer +Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang + [Guile](http://www.lonelycactus.com/guile-curl.html) Written by Michael L. Gran [Harbour](https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl) Written by Viktor Szakáts @@ -49,7 +55,7 @@ Cocoa: [BBHTTP](https://github.com/brunodecarvalho/BBHTTP) written by Bruno de C [Lisp](https://common-lisp.net/project/cl-curl/) Written by Liam Healy -Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](http://luaforge.net/projects/lua-curl/) by Jürgen Hötzel +Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel [Mono](https://forge.novell.com/modules/xfmod/project/?libcurl-mono) Written by Jeffrey Phillips @@ -59,15 +65,17 @@ Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](ht [Object-Pascal](http://www.tekool.com/opcurl) Free Pascal, Delphi and Kylix binding written by Christophe Espern. -[O'Caml](https://sourceforge.net/projects/ocurl/) Written by Lars Nilsson +[OCaml](https://opam.ocaml.org/packages/ocurl/) Written by Lars Nilsson and ygrek [Pascal](http://houston.quik.com/jkp/curlpas/) Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer. -[Perl](https://github.com/szbalint/WWW--Curl) Maintained by Cris Bailiff and Bálint Szilakszi +Perl: [WWW--Curl](https://github.com/szbalint/WWW--Curl) Maintained by Cris +Bailiff and Bálint Szilakszi, +[perl6-net-curl](https://github.com/azawawi/perl6-net-curl) by Ahmad M. Zawawi [PHP](https://php.net/curl) Originally written by Sterling Hughes -[PostgreSQL](http://gborg.postgresql.org/project/pgcurl/projdisplay.php) Written by Gian Paolo Ciceri +[PostgreSQL](https://github.com/pramsey/pgsql-http) - HTTP client for PostgreSQL [Python](http://pycurl.io/) PycURL by Kjetil Jacobsen @@ -75,19 +83,23 @@ Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](ht [Rexx](https://rexxcurl.sourceforge.io/) Written Mark Hessling +[Ring](https://ring-lang.sourceforge.io/doc1.3/libcurl.html) RingLibCurl by Mahmoud Fayed + RPG, support for ILE/RPG on OS/400 is included in source distribution -Ruby: [curb](http://curb.rubyforge.org/) written by Ross Bamford, [ruby-curl-multi](http://curl-multi.rubyforge.org/) written by Kristjan Petursson and Keith Rarick +Ruby: [curb](https://github.com/taf2/curb) written by Ross Bamford [Rust](https://github.com/carllerche/curl-rust) curl-rust - by Carl Lerche [Scheme](https://www.metapaper.net/lisovsky/web/curl/) Bigloo binding by Kirill Lisovsky -[S-Lang](http://www.jedsoft.org/slang/modules/curl.html) by John E Davis +[Scilab](https://help.scilab.org/docs/current/fr_FR/getURL.html) binding by Sylvestre Ledru + +[S-Lang](https://www.jedsoft.org/slang/modules/curl.html) by John E Davis [Smalltalk](http://www.squeaksource.com/CurlPlugin/) Written by Danil Osipchuk -[SP-Forth](http://www.forth.org.ru/~ac/lib/lin/curl/) Written by ygrek +[SP-Forth](https://sourceforge.net/p/spf/spf/ci/master/tree/devel/~ac/lib/lin/curl/) Written by Andrey Cherezov [SPL](http://www.clifford.at/spl/) Written by Clifford Wolf diff --git a/docs/BUGS b/docs/BUGS index 8cabbd2..7322d9b 100644 --- a/docs/BUGS +++ b/docs/BUGS @@ -9,11 +9,13 @@ BUGS 1. Bugs 1.1 There are still bugs 1.2 Where to report - 1.3 What to report - 1.4 libcurl problems - 1.5 Who will fix the problems - 1.6 How to get a stack trace - 1.7 Bugs in libcurl bindings + 1.3 Security bugs + 1.4 What to report + 1.5 libcurl problems + 1.6 Who will fix the problems + 1.7 How to get a stack trace + 1.8 Bugs in libcurl bindings + 1.9 Bugs in old versions 2. Bug fixing procedure 2.1 What happens on first filing @@ -29,9 +31,8 @@ BUGS 1.1 There are still bugs - Curl and libcurl have grown substantially since the beginning. At the time - of writing (January 2013), there are about 83,000 lines of source code, and - by the time you read this it has probably grown even more. + Curl and libcurl keep being developed. Adding features and changing code + means that bugs will sneak in, no matter how hard we try not to. Of course there are lots of bugs left. And lots of misfeatures. @@ -52,7 +53,24 @@ BUGS If you feel you need to ask around first, find a suitable mailing list and post there. The lists are available on https://curl.haxx.se/mail/ -1.3 What to report +1.3 Security bugs + + If you find a bug or problem in curl or libcurl that you think has a + security impact, for example a bug that can put users in danger or make them + vulnerable if the bug becomes public knowledge, then please report that bug + using our security development process. + + Security related bugs or bugs that are suspected to have a security impact, + should be reported by email to curl-security@haxx.se so that they first can + be dealt with away from the public to minimize the harm and impact it will + have on existing users out there who might be using the vulnerable versions. + + The curl project's process for handling security related issues is + documented here: + + https://curl.haxx.se/dev/secprocess.html + +1.4 What to report When reporting a bug, you should include all information that will help us understand what's wrong, what you expected to happen and how to repeat the @@ -84,7 +102,7 @@ BUGS The address and how to subscribe to the mailing lists are detailed in the MANUAL file. -1.4 libcurl problems +1.5 libcurl problems When you've written your own application with libcurl to perform transfers, it is even more important to be specific and detailed when reporting bugs. @@ -104,7 +122,7 @@ BUGS valgrind or similar before you post memory-related or "crashing" problems to us. -1.5 Who will fix the problems +1.6 Who will fix the problems If the problems or bugs you describe are considered to be bugs, we want to have the problems fixed. @@ -123,7 +141,7 @@ BUGS We get reports from many people every month and each report can take a considerable amount of time to really go to the bottom with. -1.6 How to get a stack trace +1.7 How to get a stack trace First, you must make sure that you compile all sources with -g and that you don't 'strip' the final executable. Try to avoid optimizing the code as @@ -143,7 +161,7 @@ BUGS crashed. Include the stack trace with your detailed bug report. It'll help a lot. -1.7 Bugs in libcurl bindings +1.8 Bugs in libcurl bindings There will of course pop up bugs in libcurl bindings. You should then primarily approach the team that works on that particular binding and see @@ -153,6 +171,38 @@ BUGS please convert your program over to plain C and follow the steps outlined above. +1.9 Bugs in old versions + + The curl project typically releases new versions every other month, and we + fix several hundred bugs per year. For a huge table of releases, number of + bug fixes and more, see: https://curl.haxx.se/docs/releases.html + + The developers in the curl project do not have bandwidth or energy enough to + maintain several branches or to spend much time on hunting down problems in + old versions when chances are we already fixed them or at least that they've + changed nature and appearance in later versions. + + When you experience a problem and want to report it, you really SHOULD + include the version number of the curl you're using when you experience the + issue. If that version number shows us that you're using an out-of-date + curl, you should also try out a modern curl version to see if the problem + persists or how/if it has changed in appearance. + + Even if you cannot immediately upgrade your application/system to run the + latest curl version, you can most often at least run a test version or + experimental build or similar, to get this confirmed or not. + + At times people insist that they cannot upgrade to a modern curl version, + but instead they "just want the bug fixed". That's fine, just don't count on + us spending many cycles on trying to identify which single commit, if that's + even possible, that at some point in the past fixed the problem you're now + experiencing. + + Security wise, it is almost always a bad idea to lag behind the current curl + versions by a lot. We keeping discovering and reporting security problems + over time see you can see in this table: + https://curl.haxx.se/docs/vulnerabilities.html + 2. Bug fixing procedure 2.1 What happens on first filing @@ -210,7 +260,7 @@ BUGS This is a list of known bugs. Bugs we know exist and that have been pointed out but that haven't yet been fixed. The reasons for why they haven't been fixed can involve anything really, but the primary reason is that nobody has - considered these problems to be important enough to spend the necesary time + considered these problems to be important enough to spend the necessary time and effort to have them fixed. The KNOWN_BUGS are always up for grabs and we will always love the ones who @@ -238,10 +288,10 @@ BUGS 2.8 Closing off stalled bugs The issue and pull request trackers on https://github.com/curl/curl will - only hold "active" entries (using a non-precise defintion of what active + only hold "active" entries (using a non-precise definition of what active actually is, but they're at least not completely dead). Those that are - abandonded or in other ways dormant will be closed and sometimes added to + abandoned or in other ways dormant will be closed and sometimes added to TODO and KNOWN_BUGS instead. This way, we only have "active" issues open on github. Irrelevant issues and - pull requests will not distract developes or casual visitors. + pull requests will not distract developers or casual visitors. diff --git a/docs/CIPHERS.md b/docs/CIPHERS.md new file mode 100644 index 0000000..e09533b --- /dev/null +++ b/docs/CIPHERS.md @@ -0,0 +1,426 @@ +# Ciphers + +With curl's options `CURLOPT_SSL_CIPHER_LIST` and `--ciphers` users can +control which ciphers to consider when negotiating TLS connections. + +The names of the known ciphers differ depending on which TLS backend that +libcurl was built to use. This is an attempt to list known cipher names. + +## OpenSSL + +(based on [OpenSSL docs](https://www.openssl.org/docs/man1.1.0/apps/ciphers.html)) + +### SSL3 cipher suites + +`NULL-MD5` +`NULL-SHA` +`RC4-MD5` +`RC4-SHA` +`IDEA-CBC-SHA` +`DES-CBC3-SHA` +`DH-DSS-DES-CBC3-SHA` +`DH-RSA-DES-CBC3-SHA` +`DHE-DSS-DES-CBC3-SHA` +`DHE-RSA-DES-CBC3-SHA` +`ADH-RC4-MD5` +`ADH-DES-CBC3-SHA` + +### TLS v1.0 cipher suites + +`NULL-MD5` +`NULL-SHA` +`RC4-MD5` +`RC4-SHA` +`IDEA-CBC-SHA` +`DES-CBC3-SHA` +`DHE-DSS-DES-CBC3-SHA` +`DHE-RSA-DES-CBC3-SHA` +`ADH-RC4-MD5` +`ADH-DES-CBC3-SHA` + +### AES ciphersuites from RFC3268, extending TLS v1.0 + +`AES128-SHA` +`AES256-SHA` +`DH-DSS-AES128-SHA` +`DH-DSS-AES256-SHA` +`DH-RSA-AES128-SHA` +`DH-RSA-AES256-SHA` +`DHE-DSS-AES128-SHA` +`DHE-DSS-AES256-SHA` +`DHE-RSA-AES128-SHA` +`DHE-RSA-AES256-SHA` +`ADH-AES128-SHA` +`ADH-AES256-SHA` + +### SEED ciphersuites from RFC4162, extending TLS v1.0 + +`SEED-SHA` +`DH-DSS-SEED-SHA` +`DH-RSA-SEED-SHA` +`DHE-DSS-SEED-SHA` +`DHE-RSA-SEED-SHA` +`ADH-SEED-SHA` + +### GOST ciphersuites, extending TLS v1.0 + +`GOST94-GOST89-GOST89` +`GOST2001-GOST89-GOST89` +`GOST94-NULL-GOST94` +`GOST2001-NULL-GOST94` + +### Elliptic curve cipher suites + +`ECDHE-RSA-NULL-SHA` +`ECDHE-RSA-RC4-SHA` +`ECDHE-RSA-DES-CBC3-SHA` +`ECDHE-RSA-AES128-SHA` +`ECDHE-RSA-AES256-SHA` +`ECDHE-ECDSA-NULL-SHA` +`ECDHE-ECDSA-RC4-SHA` +`ECDHE-ECDSA-DES-CBC3-SHA` +`ECDHE-ECDSA-AES128-SHA` +`ECDHE-ECDSA-AES256-SHA` +`AECDH-NULL-SHA` +`AECDH-RC4-SHA` +`AECDH-DES-CBC3-SHA` +`AECDH-AES128-SHA` +`AECDH-AES256-SHA` + +### TLS v1.2 cipher suites + +`NULL-SHA256` +`AES128-SHA256` +`AES256-SHA256` +`AES128-GCM-SHA256` +`AES256-GCM-SHA384` +`DH-RSA-AES128-SHA256` +`DH-RSA-AES256-SHA256` +`DH-RSA-AES128-GCM-SHA256` +`DH-RSA-AES256-GCM-SHA384` +`DH-DSS-AES128-SHA256` +`DH-DSS-AES256-SHA256` +`DH-DSS-AES128-GCM-SHA256` +`DH-DSS-AES256-GCM-SHA384` +`DHE-RSA-AES128-SHA256` +`DHE-RSA-AES256-SHA256` +`DHE-RSA-AES128-GCM-SHA256` +`DHE-RSA-AES256-GCM-SHA384` +`DHE-DSS-AES128-SHA256` +`DHE-DSS-AES256-SHA256` +`DHE-DSS-AES128-GCM-SHA256` +`DHE-DSS-AES256-GCM-SHA384` +`ECDHE-RSA-AES128-SHA256` +`ECDHE-RSA-AES256-SHA384` +`ECDHE-RSA-AES128-GCM-SHA256` +`ECDHE-RSA-AES256-GCM-SHA384` +`ECDHE-ECDSA-AES128-SHA256` +`ECDHE-ECDSA-AES256-SHA384` +`ECDHE-ECDSA-AES128-GCM-SHA256` +`ECDHE-ECDSA-AES256-GCM-SHA384` +`ADH-AES128-SHA256` +`ADH-AES256-SHA256` +`ADH-AES128-GCM-SHA256` +`ADH-AES256-GCM-SHA384` +`AES128-CCM` +`AES256-CCM` +`DHE-RSA-AES128-CCM` +`DHE-RSA-AES256-CCM` +`AES128-CCM8` +`AES256-CCM8` +`DHE-RSA-AES128-CCM8` +`DHE-RSA-AES256-CCM8` +`ECDHE-ECDSA-AES128-CCM` +`ECDHE-ECDSA-AES256-CCM` +`ECDHE-ECDSA-AES128-CCM8` +`ECDHE-ECDSA-AES256-CCM8` + +### Camellia HMAC-Based ciphersuites from RFC6367, extending TLS v1.2 + +`ECDHE-ECDSA-CAMELLIA128-SHA256` +`ECDHE-ECDSA-CAMELLIA256-SHA384` +`ECDHE-RSA-CAMELLIA128-SHA256` +`ECDHE-RSA-CAMELLIA256-SHA384` + +## NSS + +### Totally insecure + +`rc4` +`rc4-md5` +`rc4export` +`rc2` +`rc2export` +`des` +`desede3` + +### SSL3/TLS cipher suites + +`rsa_rc4_128_md5` +`rsa_rc4_128_sha` +`rsa_3des_sha` +`rsa_des_sha` +`rsa_rc4_40_md5` +`rsa_rc2_40_md5` +`rsa_null_md5` +`rsa_null_sha` +`fips_3des_sha` +`fips_des_sha` +`fortezza` +`fortezza_rc4_128_sha` +`fortezza_null` + +### TLS 1.0 Exportable 56-bit Cipher Suites + +`rsa_des_56_sha` +`rsa_rc4_56_sha` + +### AES ciphers + +`dhe_dss_aes_128_cbc_sha` +`dhe_dss_aes_256_cbc_sha` +`dhe_rsa_aes_128_cbc_sha` +`dhe_rsa_aes_256_cbc_sha` +`rsa_aes_128_sha` +`rsa_aes_256_sha` + +### ECC ciphers + +`ecdh_ecdsa_null_sha` +`ecdh_ecdsa_rc4_128_sha` +`ecdh_ecdsa_3des_sha` +`ecdh_ecdsa_aes_128_sha` +`ecdh_ecdsa_aes_256_sha` +`ecdhe_ecdsa_null_sha` +`ecdhe_ecdsa_rc4_128_sha` +`ecdhe_ecdsa_3des_sha` +`ecdhe_ecdsa_aes_128_sha` +`ecdhe_ecdsa_aes_256_sha` +`ecdh_rsa_null_sha` +`ecdh_rsa_128_sha` +`ecdh_rsa_3des_sha` +`ecdh_rsa_aes_128_sha` +`ecdh_rsa_aes_256_sha` +`ecdhe_rsa_null` +`ecdhe_rsa_rc4_128_sha` +`ecdhe_rsa_3des_sha` +`ecdhe_rsa_aes_128_sha` +`ecdhe_rsa_aes_256_sha` +`ecdh_anon_null_sha` +`ecdh_anon_rc4_128sha` +`ecdh_anon_3des_sha` +`ecdh_anon_aes_128_sha` +`ecdh_anon_aes_256_sha` + +### HMAC-SHA256 cipher suites + +`rsa_null_sha_256` +`rsa_aes_128_cbc_sha_256` +`rsa_aes_256_cbc_sha_256` +`dhe_rsa_aes_128_cbc_sha_256` +`dhe_rsa_aes_256_cbc_sha_256` +`ecdhe_ecdsa_aes_128_cbc_sha_256` +`ecdhe_rsa_aes_128_cbc_sha_256` + +### AES GCM cipher suites in RFC 5288 and RFC 5289 + +`rsa_aes_128_gcm_sha_256` +`dhe_rsa_aes_128_gcm_sha_256` +`dhe_dss_aes_128_gcm_sha_256` +`ecdhe_ecdsa_aes_128_gcm_sha_256` +`ecdh_ecdsa_aes_128_gcm_sha_256` +`ecdhe_rsa_aes_128_gcm_sha_256` +`ecdh_rsa_aes_128_gcm_sha_256` + +### cipher suites using SHA384 + +`rsa_aes_256_gcm_sha_384` +`dhe_rsa_aes_256_gcm_sha_384` +`dhe_dss_aes_256_gcm_sha_384` +`ecdhe_ecdsa_aes_256_sha_384` +`ecdhe_rsa_aes_256_sha_384` +`ecdhe_ecdsa_aes_256_gcm_sha_384` +`ecdhe_rsa_aes_256_gcm_sha_384` + +### chacha20-poly1305 cipher suites + +`ecdhe_rsa_chacha20_poly1305_sha_256` +`ecdhe_ecdsa_chacha20_poly1305_sha_256` +`dhe_rsa_chacha20_poly1305_sha_256` + +## GSKit + +Ciphers are internally defined as numeric codes (https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/gsk_attribute_set_buffer.htm), +but libcurl maps them to the following case-insensitive names. + +### SSL2 cipher suites (insecure: disabled by default) + +`rc2-md5` +`rc4-md5` +`exp-rc2-md5` +`exp-rc4-md5` +`des-cbc-md5` +`des-cbc3-md5` + +### SSL3 cipher suites + +`null-md5` +`null-sha` +`rc4-md5` +`rc4-sha` +`exp-rc2-cbc-md5` +`exp-rc4-md5` +`exp-des-cbc-sha` +`des-cbc3-sha` + +### TLS v1.0 cipher suites + +`null-md5` +`null-sha` +`rc4-md5` +`rc4-sha` +`exp-rc2-cbc-md5` +`exp-rc4-md5` +`exp-des-cbc-sha` +`des-cbc3-sha` +`aes128-sha` +`aes256-sha` + +### TLS v1.1 cipher suites + +`null-md5` +`null-sha` +`rc4-md5` +`rc4-sha` +`exp-des-cbc-sha` +`des-cbc3-sha` +`aes128-sha` +`aes256-sha` + +### TLS v1.2 cipher suites + +`null-md5` +`null-sha` +`null-sha256` +`rc4-md5` +`rc4-sha` +`des-cbc3-sha` +`aes128-sha` +`aes256-sha` +`aes128-sha256` +`aes256-sha256` +`aes128-gcm-sha256` +`aes256-gcm-sha384` + +## WolfSSL + +`RC4-SHA`, +`RC4-MD5`, +`DES-CBC3-SHA`, +`AES128-SHA`, +`AES256-SHA`, +`NULL-SHA`, +`NULL-SHA256`, +`DHE-RSA-AES128-SHA`, +`DHE-RSA-AES256-SHA`, +`DHE-PSK-AES256-GCM-SHA384`, +`DHE-PSK-AES128-GCM-SHA256`, +`PSK-AES256-GCM-SHA384`, +`PSK-AES128-GCM-SHA256`, +`DHE-PSK-AES256-CBC-SHA384`, +`DHE-PSK-AES128-CBC-SHA256`, +`PSK-AES256-CBC-SHA384`, +`PSK-AES128-CBC-SHA256`, +`PSK-AES128-CBC-SHA`, +`PSK-AES256-CBC-SHA`, +`DHE-PSK-AES128-CCM`, +`DHE-PSK-AES256-CCM`, +`PSK-AES128-CCM`, +`PSK-AES256-CCM`, +`PSK-AES128-CCM-8`, +`PSK-AES256-CCM-8`, +`DHE-PSK-NULL-SHA384`, +`DHE-PSK-NULL-SHA256`, +`PSK-NULL-SHA384`, +`PSK-NULL-SHA256`, +`PSK-NULL-SHA`, +`HC128-MD5`, +`HC128-SHA`, +`HC128-B2B256`, +`AES128-B2B256`, +`AES256-B2B256`, +`RABBIT-SHA`, +`NTRU-RC4-SHA`, +`NTRU-DES-CBC3-SHA`, +`NTRU-AES128-SHA`, +`NTRU-AES256-SHA`, +`AES128-CCM-8`, +`AES256-CCM-8`, +`ECDHE-ECDSA-AES128-CCM`, +`ECDHE-ECDSA-AES128-CCM-8`, +`ECDHE-ECDSA-AES256-CCM-8`, +`ECDHE-RSA-AES128-SHA`, +`ECDHE-RSA-AES256-SHA`, +`ECDHE-ECDSA-AES128-SHA`, +`ECDHE-ECDSA-AES256-SHA`, +`ECDHE-RSA-RC4-SHA`, +`ECDHE-RSA-DES-CBC3-SHA`, +`ECDHE-ECDSA-RC4-SHA`, +`ECDHE-ECDSA-DES-CBC3-SHA`, +`AES128-SHA256`, +`AES256-SHA256`, +`DHE-RSA-AES128-SHA256`, +`DHE-RSA-AES256-SHA256`, +`ECDH-RSA-AES128-SHA`, +`ECDH-RSA-AES256-SHA`, +`ECDH-ECDSA-AES128-SHA`, +`ECDH-ECDSA-AES256-SHA`, +`ECDH-RSA-RC4-SHA`, +`ECDH-RSA-DES-CBC3-SHA`, +`ECDH-ECDSA-RC4-SHA`, +`ECDH-ECDSA-DES-CBC3-SHA`, +`AES128-GCM-SHA256`, +`AES256-GCM-SHA384`, +`DHE-RSA-AES128-GCM-SHA256`, +`DHE-RSA-AES256-GCM-SHA384`, +`ECDHE-RSA-AES128-GCM-SHA256`, +`ECDHE-RSA-AES256-GCM-SHA384`, +`ECDHE-ECDSA-AES128-GCM-SHA256`, +`ECDHE-ECDSA-AES256-GCM-SHA384`, +`ECDH-RSA-AES128-GCM-SHA256`, +`ECDH-RSA-AES256-GCM-SHA384`, +`ECDH-ECDSA-AES128-GCM-SHA256`, +`ECDH-ECDSA-AES256-GCM-SHA384`, +`CAMELLIA128-SHA`, +`DHE-RSA-CAMELLIA128-SHA`, +`CAMELLIA256-SHA`, +`DHE-RSA-CAMELLIA256-SHA`, +`CAMELLIA128-SHA256`, +`DHE-RSA-CAMELLIA128-SHA256`, +`CAMELLIA256-SHA256`, +`DHE-RSA-CAMELLIA256-SHA256`, +`ECDHE-RSA-AES128-SHA256`, +`ECDHE-ECDSA-AES128-SHA256`, +`ECDH-RSA-AES128-SHA256`, +`ECDH-ECDSA-AES128-SHA256`, +`ECDHE-RSA-AES256-SHA384`, +`ECDHE-ECDSA-AES256-SHA384`, +`ECDH-RSA-AES256-SHA384`, +`ECDH-ECDSA-AES256-SHA384`, +`ECDHE-RSA-CHACHA20-POLY1305`, +`ECDHE-ECDSA-CHACHA20-POLY1305`, +`DHE-RSA-CHACHA20-POLY1305`, +`ECDHE-RSA-CHACHA20-POLY1305-OLD`, +`ECDHE-ECDSA-CHACHA20-POLY1305-OLD`, +`DHE-RSA-CHACHA20-POLY1305-OLD`, +`ADH-AES128-SHA`, +`QSH`, +`RENEGOTIATION-INFO`, +`IDEA-CBC-SHA`, +`ECDHE-ECDSA-NULL-SHA`, +`ECDHE-PSK-NULL-SHA256`, +`ECDHE-PSK-AES128-CBC-SHA256`, +`PSK-CHACHA20-POLY1305`, +`ECDHE-PSK-CHACHA20-POLY1305`, +`DHE-PSK-CHACHA20-POLY1305`, +`EDH-RSA-DES-CBC3-SHA`, diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 0000000..6948617 --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,3 @@ +#add_subdirectory(examples) +add_subdirectory(libcurl) +add_subdirectory(cmdline-opts) diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md index 04ea66e..1f71c38 100644 --- a/docs/CODE_OF_CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -28,5 +28,5 @@ reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the [Contributor -Covenant](http://contributor-covenant.org), version 1.1.0, available at -[http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/) +Covenant](https://contributor-covenant.org/), version 1.1.0, available at +[https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/) diff --git a/docs/CONTRIBUTE.md b/docs/CONTRIBUTE.md index e77c365..536a9ce 100644 --- a/docs/CONTRIBUTE.md +++ b/docs/CONTRIBUTE.md @@ -103,7 +103,7 @@ release archive is quite OK as well! ### Documentation Writing docs is dead boring and one of the big problems with many open source -projects. But someone's gotta do it! It makes things a lot easier if you +projects. But someone's gotta do it! It makes things a lot easier if you submit a small description of your fix or your new features with every contribution so that it can be swiftly added to the package documentation. @@ -134,7 +134,7 @@ patch to [the curl-library mailing list](https://curl.haxx.se/mail/list.cgi?list=curl-library). Either way, your change will be reviewed and discussed there and you will be -expected to correct flaws pointed out and update accordingly, or the change +expected to correct flaws pointed out and update accordingly, or the change risks stalling and eventually just getting deleted without action. As a submitter of a change, you are the owner of that change until it has been merged. @@ -149,9 +149,28 @@ With github it is easy to send a [pull request](https://github.com/curl/curl/pulls) to the curl project to have changes merged. -We prefer pull requests to mailed patches, as it makes it a proper git commit -that is easy to merge and they are easy to track and not that easy to loose -in the flood of many emails, like they sometimes do on the mailing lists. +We strongly prefer pull requests to mailed patches, as it makes it a proper +git commit that is easy to merge and they are easy to track and not that easy +to loose in the flood of many emails, like they sometimes do on the mailing +lists. + +Every pull request submitted will automatically be tested in several different +ways. Every pull request is verfied that: + + - ... it still builds, warning-free, on Linux and macOS, with both + clang and gcc + - ... it still builds fine on Windows with several MSVC versions + - ... it still builds with cmake on Linux, with gcc and clang + - ... it follows rudimentary code style rules + - ... the test suite still runs 100% fine + - ... the release tarball (the "dist") still works + - ... it builds fine in-tree as well as out-of-tree + - ... code coverage doesn't shrink drastically + +If the pull-request fails one of these tests, it will show up as a red X and +you are expected to fix the problem. If you don't understand whan the issue is +or have other problems to fix the complaint, just ask and other project +members will likely be able to help out. When you adjust your pull requests after review, consider squashing the commits so that we can review the full updated version more easily. @@ -161,8 +180,8 @@ commits so that we can review the full updated version more easily. Make the patch against as recent source versions as possible. If you've followed the tips in this document and your patch still hasn't been -incorporated or responded to after some weeks, consider resubmitting it to -the list or better yet: change it to a pull request. +incorporated or responded to after some weeks, consider resubmitting it to the +list or better yet: change it to a pull request. ### Write good commit messages @@ -175,14 +194,15 @@ A short guide to how to write commit messages in the curl project. possible as to why this change is made, and possibly what things it fixes and everything else that is related] -- empty line -- + [Closes/Fixes #1234 - if this closes or fixes a github issue] [Bug: URL to source of the report or more related discussion] [Reported-by: John Doe - credit the reporter] [whatever-else-by: credit all helpers, finders, doers] ---- stop ---- -Don't forget to use commit --author="" if you commit someone else's work, -and make sure that you have your own user and email setup correctly in git -before you commit +Don't forget to use commit --author="" if you commit someone else's work, and +make sure that you have your own user and email setup correctly in git before +you commit ### Write Access to git Repository diff --git a/docs/FAQ b/docs/FAQ index f8cb644..cb28c2a 100644 --- a/docs/FAQ +++ b/docs/FAQ @@ -30,7 +30,6 @@ FAQ 2.2 Does curl work/build with other SSL libraries? 2.3 Where can I find a copy of LIBEAY32.DLL? 2.4 Does curl support SOCKS (RFC 1928) ? - 2.5 Install libcurl for both 32bit and 64bit? 3. Usage Problems 3.1 curl: (1) SSL is disabled, https: not supported @@ -118,6 +117,7 @@ FAQ 7.1 What is PHP/CURL? 7.2 Who wrote PHP/CURL? 7.3 Can I perform multiple requests using the same handle? + 7.4 Does PHP/CURL have dependencies? ============================================================================== @@ -162,7 +162,7 @@ FAQ We pronounce curl with an initial k sound. It rhymes with words like girl and earl. This is a short WAV file to help you: - http://media.merriam-webster.com/soundc11/c/curl0001.wav + https://media.merriam-webster.com/soundc11/c/curl0001.wav There are numerous sub-projects and related projects that also use the word curl in the project names in various combinations, but you should take @@ -218,9 +218,9 @@ FAQ very well at the side. Curl's output can be piped into another program or redirected to another file for the next program to interpret. - We focus on protocol related issues and improvements. If you wanna do more + We focus on protocol related issues and improvements. If you want to do more magic with the supported protocols than curl currently does, chances are good - we will agree. If you wanna add more protocols, we may very well agree. + we will agree. If you want to add more protocols, we may very well agree. If you want someone else to do all the work while you wait for us to implement it for you, that is not a very friendly attitude. We spend a @@ -324,7 +324,7 @@ FAQ 1.11 Why don't you update ca-bundle.crt - The ca cert bundle that used to be shipped with curl was very outdated and + The ca cert bundle that used to be shipped with curl was very outdated and must be replaced with an up-to-date version by anyone who wants to verify peers. It is no longer provided by curl. The last curl release that ever shipped a ca cert bundle was curl 7.18.0. @@ -366,8 +366,8 @@ FAQ Comprehensible explanations of the meaning of such numbers and how to obtain them (resp.) are here - http://www.bis.doc.gov/licensing/exportingbasics.htm - http://www.bis.doc.gov/licensing/do_i_needaneccn.html + https://www.bis.doc.gov/licensing/exportingbasics.htm + https://www.bis.doc.gov/licensing/do_i_needaneccn.html An incomprehensible description of the two numbers above is here http://www.access.gpo.gov/bis/ear/pdf/ccl5-pt2.pdf @@ -465,32 +465,6 @@ FAQ Yes, SOCKS 4 and 5 are supported. - 2.5 Install libcurl for both 32bit and 64bit? - - In curl's configure procedure one of the regular include files gets created - with platform specific information. The file 'curl/curlbuild.h' in the - installed libcurl file tree is therefore somewhat tied to that particular - platform. - - To allow applications to get built for either 32bit or 64bit you need to - install libcurl headers for both setups and unfortunately curl doesn't do - this automatically. - - A commonly used procedure is this: - - $ ./configure [32bit platform] - $ mv curl/curlbuild.h curl/curlbuild-32bit.h - $ ./configure [64bit platform] - $ mv curl/curlbuild.h curl/curlbuild-64bit.h - - Then you make a toplevel curl/curlbuild.h replacement that only does this: - - #ifdef IS_32BIT - #include "curlbuild-32bit.h" - else - #include "curlbuild-64bit.h" - #endif - 3. Usage problems @@ -520,13 +494,13 @@ FAQ 3.3 Why doesn't my posting using -F work? - You can't arbitrarily use -F or -d, the choice between -F or -d depends on the - HTTP operation you need curl to do and what the web server that will receive - your post expects. + You can't arbitrarily use -F or -d, the choice between -F or -d depends on the + HTTP operation you need curl to do and what the web server that will receive + your post expects. - If the form you're trying to submit uses the type 'multipart/form-data', then - and only then you must use the -F type. In all the most common cases, you - should use -d which then causes a posting with the type + If the form you're trying to submit uses the type 'multipart/form-data', then + and only then you must use the -F type. In all the most common cases, you + should use -d which then causes a posting with the type 'application/x-www-form-urlencoded'. This is described in some detail in the MANUAL and TheArtOfHttpScripting @@ -602,7 +576,7 @@ FAQ In October 2009, there were interfaces available for the following languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria, Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET, - Object-Pascal, O'Caml, Pascal, Perl, PHP, PostgreSQL, Python, R, Rexx, Ruby, + Object-Pascal, OCaml, Pascal, Perl, PHP, PostgreSQL, Python, R, Rexx, Ruby, Scheme, S-Lang, Smalltalk, SP-Forth, SPL, Tcl, Visual Basic, Visual FoxPro, Q, wxwidgets and XBLite. By the time you read this, additional ones may have appeared! @@ -699,8 +673,8 @@ FAQ CLIENT CERTIFICATE - The server you communicate with may require that you can provide this in - order to prove that you actually are who you claim to be. If the server + The server you communicate with may require that you can provide this in + order to prove that you actually are who you claim to be. If the server doesn't require this, you don't need a client certificate. A client certificate is always used together with a private key, and the @@ -1024,7 +998,7 @@ FAQ compilers or prior curl versions it may set a time that appears one hour off. This happens due to a flaw in how Windows stores and uses file modification times and it is not easily worked around. For more details read this: - http://www.codeproject.com/datetime/dstbugs.asp + https://www.codeproject.com/Articles/1144/Beating-the-Daylight-Savings-Time-bug-and-getting 4.14 Redirects work in browser but not with curl! @@ -1176,7 +1150,7 @@ FAQ The reason for this is that we first generate the request to send using the old 1.1 style and show that request in the verbose output, and then we convert it over to the binary header-compressed HTTP/2 style. The actual - "1.1" part from that request is then not actually used in the transfer. + "1.1" part from that request is then not actually used in the transfer. The binary HTTP/2 headers are not human readable. 5. libcurl Issues @@ -1259,9 +1233,9 @@ FAQ libcurl will reuse connections for all transfers that are made using the same libcurl handle. - When you use the easy interface the connection cache is kept within the easy - handle. If you instead use the multi interface, the connection cache will be - kept within the multi handle and will be shared among all the easy handles + When you use the easy interface the connection cache is kept within the easy + handle. If you instead use the multi interface, the connection cache will be + kept within the multi handle and will be shared among all the easy handles that are used within the same multi handle. 5.7 Link errors when building libcurl on Windows! @@ -1321,7 +1295,7 @@ FAQ you want to change name resolver function you must rebuild libcurl and tell it to use a different function. - - The non-IPv6 resolver that can use one of four different host name resolve + - The non-IPv6 resolver that can use one of four different host name resolve calls (depending on what your system supports): A - gethostbyname() @@ -1444,7 +1418,7 @@ FAQ timed out. The most flexible way is by writing your own time-out logic and using - CURLOPT_PROGRESSFUNCTION (perhaps in combination with other callbacks) and + CURLOPT_XFERINFOFUNCTION (perhaps in combination with other callbacks) and use that to figure out exactly when the right condition is met when the transfer should get stopped. diff --git a/docs/FEATURES b/docs/FEATURES index 24fa56d..39ac390 100644 --- a/docs/FEATURES +++ b/docs/FEATURES @@ -185,7 +185,7 @@ FOOTNOTES *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, WinSSL (native Windows), Secure Transport (native iOS/OS X) or GSKit (native IBM i) - *2 = requires OpenLDAP + *2 = requires OpenLDAP or WinLDAP *3 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or SSPI (native Windows) *4 = requires a GSS-API implementation, however, only Windows SSPI is diff --git a/docs/HELP-US.md b/docs/HELP-US.md new file mode 100644 index 0000000..aae2b9f --- /dev/null +++ b/docs/HELP-US.md @@ -0,0 +1,70 @@ +# How to get started helping out in the curl project + +We are always in need of more help. If you are new to the project and are +looking for ways to contribute and help out, this document aims to give a few +good starting points. + +A good idea is to start by subscribing to the [curl-library mailing +list](https://cool.haxx.se/mailman/listinfo/curl-library) to keep track of the +current discussion topics. + +## Scratch your own itch + +One of the best ways is to start working on any problems or issues you have +found yourself or perhaps got annoyed at in the past. It can be a spelling +error in an error text or a weirdly phrased section in a man page. Hunt it +down and report the bug. Or make your first pull request with a fix for that. + +## Help wanted + +In the issue tracker we occasionally mark bugs with [help +wanted](https://github.com/curl/curl/labels/help%20wanted), as a sign that the +bug is acknowledged to exist and that there's nobody known to work on this +issue for the moment. Those are bugs that are fine to "grab" and provide a +pull request for. The complexity level of these will of course vary, so pick +one that piques your interest. + +## Work on known bugs + +Some bugs are known and haven't yet received attention and work enough to get +fixed. We collect such known existing flaws in the +[KNOWN_BUGS](https://curl.haxx.se/docs/knownbugs.html) page. Many of them link +to the original bug report with some additional details, but some may also +have aged a bit and may require some verification that the bug still exists in +the same way and that what was said about it in the past is still valid. + +## Fix autobuild problems + +On the [autobuilds page](https://curl.haxx.se/dev/builds.html) we show a +collection of test results from the automatic curl build and tests that are +performed by volunteers. Fixing compiler warnings and errors shown there is +something we value greatly. Also, if you own or run systems or architectures +that aren't already tested in the autobuilds, we also appreciate more +volunteers running builds automatically to help us keep curl portable. + +## TODO items + +Ideas for features and functions that we have considered worthwhile to +implement and provide are kept in the +[TODO](https://curl.haxx.se/docs/todo.html) file. Some of the ideas are +rough. Some are well thought out. Some probably aren't really suitable +anymore. + +Before you invest a lot of time on a TODO item, do bring it up for discussion +on the mailing list. For discussion on applicability but also for ideas and +brainstorming on specific ways to do the implementation etc. + +## You decide + +You can also come up with a completely new thing you think we should do. Or +not do. Or fix. Or add to the project. You then either bring it to the mailing +list first to see if people will shoot down the idea at once, or you bring a +first draft of the idea as a pull request and take the discussion there around +the specific implementation. Either way is fine. + +## CONTRIBUTE + +We offer [guidelines](https://curl.haxx.se/dev/contribute.html) that are +suitable to be familiar with before you decide to contribute to curl. If +you're used to open source development, you'll probably not find many +surprises in there. diff --git a/docs/HISTORY.md b/docs/HISTORY.md index 551e7d2..a84ad8f 100644 --- a/docs/HISTORY.md +++ b/docs/HISTORY.md @@ -275,3 +275,21 @@ August: March: first real release supporting HTTP/2 September: Web site had 245,000 unique visitors and served 236GB data + +2016 +---- + + December: curl 7.52.0 introduced support for HTTPS-proxy! + +2017 +---- + + September: Added Multi-SSL support + + The web site serves 3100 GB/month + + Public curl releases: 169 + Command line options: 211 + curl_easy_setopt() options: 249 + Public functions in libcurl: 74 + Contributors: 1609 diff --git a/docs/INSTALL.cmake b/docs/INSTALL.cmake new file mode 100644 index 0000000..abdfb46 --- /dev/null +++ b/docs/INSTALL.cmake @@ -0,0 +1,91 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + How To Compile with CMake + +Building with CMake +========================== + This document describes how to compile, build and install curl and libcurl + from source code using the CMake build tool. To build with CMake, you will + of course have to first install CMake. The minimum required version of + CMake is specified in the file CMakeLists.txt found in the top of the curl + source tree. Once the correct version of CMake is installed you can follow + the instructions below for the platform you are building on. + + CMake builds can be configured either from the command line, or from one + of CMake's GUI's. + +Current flaws in the curl CMake build +===================================== + + Missing features in the cmake build: + + - Builds libcurl without large file support + - Does not support all SSL libraries (only OpenSSL, WinSSL, DarwinSSL, and + mbed TLS) + - Doesn't build with SCP and SFTP support (libssh2) (see issue #1155) + - Doesn't allow different resolver backends (no c-ares build support) + - No RTMP support built + - Doesn't allow build curl and libcurl debug enabled + - Doesn't allow a custom CA bundle path + - Doesn't allow you to disable specific protocols from the build + - Doesn't find or use krb4 or GSS + - Rebuilds test files too eagerly, but still can't run the tests + - Does't detect the correct strerror_r flavor when cross-compiling (issue #1123) + + +Command Line CMake +================== + A CMake build of curl is similar to the autotools build of curl. It + consists of the following steps after you have unpacked the source. + + 1. Create an out of source build tree parallel to the curl source + tree and change into that directory + + $ mkdir curl-build + $ cd curl-build + + 2. Run CMake from the build tree, giving it the path to the top of + the curl source tree. CMake will pick a compiler for you. If you + want to specify the compile, you can set the CC environment + variable prior to running CMake. + + $ cmake ../curl + $ make + + 3. Install to default location: + + $ make install + + (The test suite does not work with the cmake build) + +ccmake +========= + CMake comes with a curses based interface called ccmake. To run ccmake on + a curl use the instructions for the command line cmake, but substitute + ccmake ../curl for cmake ../curl. This will bring up a curses interface + with instructions on the bottom of the screen. You can press the "c" key + to configure the project, and the "g" key to generate the project. After + the project is generated, you can run make. + +cmake-gui +========= + CMake also comes with a Qt based GUI called cmake-gui. To configure with + cmake-gui, you run cmake-gui and follow these steps: + 1. Fill in the "Where is the source code" combo box with the path to + the curl source tree. + 2. Fill in the "Where to build the binaries" combo box with the path + to the directory for your build tree, ideally this should not be the + same as the source tree, but a parallel directory called curl-build or + something similar. + 3. Once the source and binary directories are specified, press the + "Configure" button. + 4. Select the native build tool that you want to use. + 5. At this point you can change any of the options presented in the + GUI. Once you have selected all the options you want, click the + "Generate" button. + 6. Run the native build tool that you used CMake to generate. + diff --git a/docs/INSTALL.md b/docs/INSTALL.md index ff56600..67a9378 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -108,7 +108,7 @@ libressl. - mbedTLS: `--without-ssl --with-mbedtls` - axTLS: `--without-ssl --with-axtls` - schannel: `--without-ssl --with-winssl` - - secure transport: `--with-winssl --with-darwinssl` + - secure transport: `--without-ssl --with-darwinssl` # Windows @@ -222,6 +222,9 @@ subdirectory run following command from mentioned subdirectory: In order to build sample program simplessl.c an SSL enabled libcurl is required, as well as the OpenSSL libeay32.lib and ssleay32.lib libraries. +In order to build sample program `sslbackend.c`, an SSL enabled libcurl +is required. + ## Disabling Specific Protocols in Windows builds The configure utility, unfortunately, is not available for the Windows @@ -278,8 +281,8 @@ before including any libcurl header. Your program does not need the `USE_LWIPSOCK` preprocessor definition which is for libcurl internals only. Compilation has been verified with [lwIP -1.4.0](http://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip) and -[contrib-1.4.0](http://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip). +1.4.0](https://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip) and +[contrib-1.4.0](https://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip). This BSD-style lwIP TCP/IP stack support must be considered experimental given that it has been verified that lwIP 1.4.0 still needs some polish, and libcurl diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md index a733e1f..459684b 100644 --- a/docs/INTERNALS.md +++ b/docs/INTERNALS.md @@ -82,7 +82,7 @@ Dependencies - zlib 1.1.4 - libssh2 0.16 - c-ares 1.6.0 - - libidn 0.4.1 + - libidn2 2.0.0 - cyassl 2.0.0 - openldap 2.0 - MIT Kerberos 1.2.4 @@ -612,20 +612,6 @@ curlx strtoll() (or equivalent) function exist on your platform. If `curl_off_t` is only a 32 bit number on your platform, this macro uses strtol(). -`curlx_tvnow()` ---------------- - returns a struct timeval for the current time. - -`curlx_tvdiff()` --------------- - returns the difference between two timeval structs, in number of - milliseconds. - -`curlx_tvdiff_secs()` ---------------------- - returns the same as `curlx_tvdiff` but with full usec resolution (as a - double) - Future ------ @@ -656,29 +642,29 @@ Content Encoding ## About content encodings [HTTP/1.1][4] specifies that a client may request that a server encode its - response. This is usually used to compress a response using one of a set of - commonly available compression techniques. These schemes are 'deflate' (the - zlib algorithm), 'gzip' and 'compress'. A client requests that the server - perform an encoding by including an Accept-Encoding header in the request - document. The value of the header should be one of the recognized tokens - 'deflate', ... (there's a way to register new schemes/tokens, see sec 3.5 of - the spec). A server MAY honor the client's encoding request. When a response - is encoded, the server includes a Content-Encoding header in the - response. The value of the Content-Encoding header indicates which scheme was - used to encode the data. - - A client may tell a server that it can understand several different encoding - schemes. In this case the server may choose any one of those and use it to - encode the response (indicating which one using the Content-Encoding header). + response. This is usually used to compress a response using one (or more) + encodings from a set of commonly available compression techniques. These + schemes include 'deflate' (the zlib algorithm), 'gzip' 'br' (brotli) and + 'compress'. A client requests that the server perform an encoding by including + an Accept-Encoding header in the request document. The value of the header + should be one of the recognized tokens 'deflate', ... (there's a way to + register new schemes/tokens, see sec 3.5 of the spec). A server MAY honor + the client's encoding request. When a response is encoded, the server + includes a Content-Encoding header in the response. The value of the + Content-Encoding header indicates which encodings were used to encode the + data, in the order in which they were applied. + It's also possible for a client to attach priorities to different schemes so that the server knows which it prefers. See sec 14.3 of RFC 2616 for more - information on the Accept-Encoding header. + information on the Accept-Encoding header. See sec [3.1.2.2 of RFC 7231][15] + for more information on the Content-Encoding header. ## Supported content encodings - The 'deflate' and 'gzip' content encoding are supported by libcurl. Both - regular and chunked transfers work fine. The zlib library is required for - this feature. + The 'deflate', 'gzip' and 'br' content encodings are supported by libcurl. + Both regular and chunked transfers work fine. The zlib library is required + for the 'deflate' and 'gzip' encodings, while the brotli decoding library is + for the 'br' encoding. ## The libcurl interface @@ -688,14 +674,15 @@ Content Encoding where string is the intended value of the Accept-Encoding header. - Currently, libcurl only understands how to process responses that use the - "deflate" or "gzip" Content-Encoding, so the only values for - [`CURLOPT_ACCEPT_ENCODING`][5] that will work (besides "identity," which does - nothing) are "deflate" and "gzip" If a response is encoded using the - "compress" or methods, libcurl will return an error indicating that the - response could not be decoded. If is NULL no Accept-Encoding header - is generated. If is a zero-length string, then an Accept-Encoding - header containing all supported encodings will be generated. + Currently, libcurl does support multiple encodings but only + understands how to process responses that use the "deflate", "gzip" and/or + "br" content encodings, so the only values for [`CURLOPT_ACCEPT_ENCODING`][5] + that will work (besides "identity," which does nothing) are "deflate", + "gzip" and "br". If a response is encoded using the "compress" or methods, + libcurl will return an error indicating that the response could + not be decoded. If is NULL no Accept-Encoding header is generated. + If is a zero-length string, then an Accept-Encoding header + containing all supported encodings will be generated. The [`CURLOPT_ACCEPT_ENCODING`][5] must be set to any non-NULL value for content to be automatically decoded. If it is not set and the server still @@ -1079,7 +1066,7 @@ for older and later versions as things don't change drastically that often. [1]: https://curl.haxx.se/libcurl/c/curl_easy_setopt.html [2]: https://curl.haxx.se/libcurl/c/curl_easy_init.html -[3]: http://c-ares.haxx.se/ +[3]: https://c-ares.haxx.se/ [4]: https://tools.ietf.org/html/rfc7230 "RFC 7230" [5]: https://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html [6]: https://curl.haxx.se/docs/manpage.html#--compressed @@ -1091,3 +1078,4 @@ for older and later versions as things don't change drastically that often. [12]: https://curl.haxx.se/libcurl/c/curl_multi_fdset.html [13]: https://curl.haxx.se/libcurl/c/curl_multi_add_handle.html [14]: https://curl.haxx.se/libcurl/c/curl_multi_info_read.html +[15]: https://tools.ietf.org/html/rfc7231#section-3.1.2.2 diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS index 12eeedd..280edd0 100644 --- a/docs/KNOWN_BUGS +++ b/docs/KNOWN_BUGS @@ -18,7 +18,6 @@ problems may have been fixed or changed somewhat since this was written! 1.4 multipart formposts file name encoding 1.5 Expect-100 meets 417 1.6 Unnecessary close when 401 received waiting for 100 - 1.8 DNS timing is wrong for HTTP redirects 1.9 HTTP/2 frames while in the connection pool kill reuse 1.10 Strips trailing dot from host name 1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM @@ -27,6 +26,7 @@ problems may have been fixed or changed somewhat since this was written! 2.1 CURLINFO_SSL_VERIFYRESULT has limited support 2.2 DER in keychain 2.3 GnuTLS backend skips really long certificate fields + 2.4 DarwinSSL won't import PKCS#12 client certificates without a password 3. Email protocols 3.1 IMAP SEARCH ALL truncated response @@ -42,14 +42,12 @@ problems may have been fixed or changed somewhat since this was written! 5. Build and portability issues 5.1 Windows Borland compiler 5.2 curl-config --libs contains private details - 5.3 libidn and old iconv 5.4 AIX shared build with c-ares fails 5.5 can't handle Unicode arguments in Windows 5.6 cmake support gaps 5.7 Visual Studio project gaps 5.8 configure finding libs in wrong directory 5.9 Utilize Requires.private directives in libcurl.pc - 5.10 Fix the gcc typechecks 6. Authentication 6.1 NTLM authentication and unicode @@ -84,6 +82,7 @@ problems may have been fixed or changed somewhat since this was written! 11.1 Curl leaks .onion hostnames in DNS 11.2 error buffer not set if connection to multiple addresses fails 11.3 c-ares deviates from stock resolver on http://1346569778 + 11.4 HTTP test server 'connection-monitor' problems 12. LDAP and OpenLDAP 12.1 OpenLDAP hangs after returning results @@ -91,6 +90,8 @@ problems may have been fixed or changed somewhat since this was written! 13. TCP/IP 13.1 --interface for ipv6 binds to unusable IP address + 14 DICT + 14.1 DICT responses show the underlying protocol ============================================================================== @@ -141,12 +142,6 @@ problems may have been fixed or changed somewhat since this was written! waiting for the the 100-continue response. https://curl.haxx.se/mail/lib-2008-08/0462.html -1.8 DNS timing is wrong for HTTP redirects - - When extracting timing information after HTTP redirects, only the last - transfer's results are returned and not the totals: - https://github.com/curl/curl/issues/522 - 1.9 HTTP/2 frames while in the connection pool kill reuse If the server sends HTTP/2 frames (like for example an HTTP/2 PING frame) to @@ -159,7 +154,7 @@ problems may have been fixed or changed somewhat since this was written! 1.10 Strips trailing dot from host name - When given a URL wit a trailing dot for the host name part: + When given a URL with a trailing dot for the host name part: "https://example.com./", libcurl will strip off the dot and use the name without a dot internally and send it dot-less in HTTP Host: headers and in the TLS SNI field. @@ -184,7 +179,7 @@ problems may have been fixed or changed somewhat since this was written! It can also be noted that while adding a trailing dot to the host name in most (all?) cases will make the name resolve to the same set of IP addresses, many HTTP servers will not happily accept the trailing dot there unless that - has been specificly configured to be a fine virtual host. + has been specifically configured to be a fine virtual host. If URLs with trailing dots for host names become more popular or even just used more than for just plain fun experiments, I'm sure we will have reason @@ -222,6 +217,12 @@ problems may have been fixed or changed somewhat since this was written! field is too long in the cert, it'll just return an error and the field will be displayed blank. +2.4 DarwinSSL won't import PKCS#12 client certificates without a password + + libcurl calls SecPKCS12Import with the PKCS#12 client certificate, but that + function rejects certificates that do not have a password. + https://github.com/curl/curl/issues/1308 + 3. Email protocols @@ -296,14 +297,6 @@ problems may have been fixed or changed somewhat since this was written! run that might be needed only for building libcurl. Further, curl-config --cflags suffers from the same effects with CFLAGS/CPPFLAGS. -5.3 libidn and old iconv - - Test case 165 might fail on a system which has libidn present, but with an - old iconv version (2.1.3 is a known bad version), since it doesn't recognize - the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the - test pass, but instead makes it fail on Solaris hosts that use its native - iconv. - 5.4 AIX shared build with c-ares fails curl version 7.12.2 fails on AIX if compiled with --enable-ares. The @@ -325,7 +318,6 @@ problems may have been fixed or changed somewhat since this was written! The cmake build setup lacks several features that the autoconf build offers. This includes: - - symbol hiding when the shared library is built - use of correct soname for the shared library build - support for several TLS backends are missing - the unit tests cause link failures in regular non-static builds @@ -366,14 +358,6 @@ problems may have been fixed or changed somewhat since this was written! https://github.com/curl/curl/issues/864 -5.10 Fix the gcc typechecks - - Issue #846 identifies a problem with the gcc-typechecks and how the types are - documented and checked for CURLINFO_CERTINFO but our attempts to fix the - issue were futile and needs more attention. - - https://github.com/curl/curl/issues/846 - 6. Authentication 6.1 NTLM authentication and unicode @@ -391,7 +375,7 @@ problems may have been fixed or changed somewhat since this was written! libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's library header files exporting symbols/macros that should be kept private to - the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/ + the KfW library. See ticket #5601 at https://krbdev.mit.edu/rt/ 6.3 NTLM in system context uses wrong name @@ -570,6 +554,13 @@ problems may have been fixed or changed somewhat since this was written! See https://github.com/curl/curl/issues/893 +11.4 HTTP test server 'connection-monitor' problems + + The 'connection-monitor' feature of the sws HTTP test server doesn't work + properly if some tests are run in unexpected order. Like 1509 and then 1525. + + See https://github.com/curl/curl/issues/868 + 12. LDAP and OpenLDAP @@ -602,3 +593,12 @@ problems may have been fixed or changed somewhat since this was written! locally scoped address as that is bound to fail. https://github.com/curl/curl/issues/686 + +14. DICT + +14.1 DICT responses show the underlying protocol + + When getting a DICT response, the protocol parts of DICT aren't stripped off + from the output. + + https://github.com/curl/curl/issues/1809 diff --git a/docs/MAIL-ETIQUETTE b/docs/MAIL-ETIQUETTE index 897fc9f..effdcce 100644 --- a/docs/MAIL-ETIQUETTE +++ b/docs/MAIL-ETIQUETTE @@ -15,6 +15,7 @@ MAIL ETIQUETTE 1.6 Handling trolls and spam 1.7 How to unsubscribe 1.8 I posted, now what? + 1.9 Your emails are public 2. Sending mail 2.1 Reply or New Mail @@ -118,9 +119,9 @@ MAIL ETIQUETTE to the page for the particular mailing list you're subscribed to and you enter your email address and password and press the unsubscribe button. - Also, the instructions to unsubscribe are included in the headers of every - mail that is sent out to all curl related mailing lists and there's a footer - in each mail that links to the "admin" page on which you can unsubscribe and + Also, the instructions to unsubscribe are included in the headers of every + mail that is sent out to all curl related mailing lists and there's a footer + in each mail that links to the "admin" page on which you can unsubscribe and change other options. You NEVER EVER email the mailing list requesting someone else to take you off @@ -151,7 +152,7 @@ MAIL ETIQUETTE or repeat the same steps in their locations. Failing to include details will only delay responses and make people respond - and ask for more details and you will have to send a follow-up email that + and ask for more details and you will have to send a follow-up email that includes them. Expect the responses to primarily help YOU debug the issue, or ask YOU @@ -162,6 +163,27 @@ MAIL ETIQUETTE chances are that people will ignore you at will and your chances to get responses in the future will greatly diminish. + 1.9 Your emails are public + + Your email, its contents and all its headers and the details in those + headers will be received by every subscriber of the mailing list that you + send your email to. + + Your email as sent to a curl mailing list will end up in mail archives, on + the curl web site and elsewhere, for others to see and read. Today and in + the future. In addition to the archives, the mail is sent out to thousands + of individuals. There is no way to undo a sent email. + + When sending emails to a curl mailing list, do not include sensitive + information such as user names and passwords; use fake ones, temporary ones + or just remove them completely from the mail. Note that this includes base64 + encoded HTTP Basic auth headers. + + This public nature of the curl mailing lists makes automatically inserted mail + footers about mails being "private" or "only meant for the receipient" or + similar even more silly than usual. Because they are absolutely not private + when sent to a public mailing list. + 2. Sending mail @@ -261,4 +283,3 @@ MAIL ETIQUETTE Getting the solution posted also helps other users that experience the same problem(s). They get to see (possibly in the web archives) that the suggested fixes actually has helped at least one person. - diff --git a/docs/MANUAL b/docs/MANUAL index 0ea3e61..5df37e4 100644 --- a/docs/MANUAL +++ b/docs/MANUAL @@ -298,8 +298,7 @@ POST (HTTP) How to post a form with curl, lesson #1: - Dig out all the tags in the form that you want to fill in. (There's - a perl program called formfind.pl on the curl site that helps with this). + Dig out all the tags in the form that you want to fill in. If there's a "normal" post, you use -d to post. -d takes a full "post string", which is in the format @@ -815,6 +814,10 @@ LDAP If you have installed the OpenLDAP library, curl can take advantage of it and offer ldap:// support. + On Windows, curl will use WinLDAP from Platform SDK by default. + + Default protocol version used by curl is LDAPv3. LDAPv2 will be used as + fallback mechanism in case if LDAPv3 will fail to connect. LDAP is a complex thing and writing an LDAP query is not an easy task. I do advise you to dig up the syntax description for that elsewhere. One such @@ -830,6 +833,20 @@ LDAP If I want the same info in HTML format, I can get it by not using the -B (enforce ASCII) flag. + You also can use authentication when accessing LDAP catalog: + + curl -u user:passwd "ldap://ldap.frontec.se/o=frontec??sub?mail=*" + curl "ldap://user:passwd@ldap.frontec.se/o=frontec??sub?mail=*" + + By default, if user and password provided, OpenLDAP/WinLDAP will use basic + authentication. On Windows you can control this behavior by providing + one of --basic, --ntlm or --digest option in curl command line + + curl --ntlm "ldap://user:passwd@ldap.frontec.se/o=frontec??sub?mail=*" + + On Windows, if no user/password specified, auto-negotiation mechanism will + be used with current logon credentials (SSPI/SPNEGO). + ENVIRONMENT VARIABLES Curl reads and understands the following environment variables: @@ -848,8 +865,11 @@ ENVIRONMENT VARIABLES If the host name matches one of these strings, or the host is within the domain of one of these strings, transactions with that node will not be - proxied. - + proxied. When a domain is used, it needs to start with a period. A user can + specify that both www.example.com and foo.example.com should not uses a + proxy by setting NO_PROXY to ".example.com". By including the full name you + can exclude specific host names, so to make www.example.com not use a proxy + but still have foo.example.com do it, set NO_PROXY to "www.example.com" The usage of the -x/--proxy flag overrides the environment variables. diff --git a/docs/Makefile.am b/docs/Makefile.am index ee8f607..1cad062 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -22,36 +22,54 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -man_MANS = curl.1 curl-config.1 -noinst_man_MANS = mk-ca-bundle.1 +# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable +# but distribute it (using the relative file name) in the next variable +man_MANS = $(abs_builddir)/curl.1 +noinst_man_MANS = curl.1 mk-ca-bundle.1 +dist_man_MANS = curl-config.1 GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf +MANDISTPAGES = curl.1.dist curl-config.1.dist HTMLPAGES = $(GENHTMLPAGES) index.html -SUBDIRS = examples libcurl cmdline-opts +# Build targets in this file (.) before cmdline-opts to ensure that +# the curl.1 rule below runs first +SUBDIRS = . cmdline-opts +DIST_SUBDIRS = $(SUBDIRS) examples libcurl -CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) curl.1 +CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1 -EXTRA_DIST = MANUAL BUGS CONTRIBUTE.md FAQ FEATURES INTERNALS.md SSLCERTS.md \ - README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS KNOWN_BUGS \ - BINDINGS.md $(man_MANS) HISTORY.md INSTALL INSTALL.md LICENSE-MIXING.md \ - README.netware MAIL-ETIQUETTE HTTP-COOKIES.md SECURITY.md RELEASE-PROCEDURE \ - SSL-PROBLEMS.md HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md CODE_STYLE.md \ - CHECKSRC.md +EXTRA_DIST = MANUAL BUGS CONTRIBUTE.md FAQ FEATURES INTERNALS.md SSLCERTS.md \ + README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS KNOWN_BUGS \ + BINDINGS.md HISTORY.md INSTALL INSTALL.md LICENSE-MIXING.md \ + README.netware MAIL-ETIQUETTE HTTP-COOKIES.md SECURITY-PROCESS.md RELEASE-PROCEDURE \ + SSL-PROBLEMS.md HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md CODE_STYLE.md \ + CHECKSRC.md CMakeLists.txt README.md CIPHERS.md INSTALL.cmake README.cmake \ + $(noinst_man_MANS) HELP-US.md MAN2HTML= roffit $< >$@ SUFFIXES = .1 .html .pdf -curl.1: - cd cmdline-opts && make +# $(abs_builddir) is to disable VPATH when searching for this file, which +# would otherwise find the copy in $(srcdir) which breaks the $(HUGE) +# rule in src/Makefile.am in out-of-tree builds that references the file in the +# build directory. +# +# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree +# build), then run make recursively to rebuild it only if its dependencies +# have changed. +$(abs_builddir)/curl.1: + if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \ + cp -fp "$(srcdir)/curl.1" $@; fi + cd cmdline-opts && $(MAKE) html: $(HTMLPAGES) - cd libcurl && make html + cd libcurl && $(MAKE) html pdf: $(PDFPAGES) - cd libcurl && make pdf + cd libcurl && $(MAKE) pdf .1.html: $(MAN2HTML) @@ -63,3 +81,6 @@ pdf: $(PDFPAGES) rm $$foo.ps; \ echo "converted $< to $@") +distclean: + rm -f $(CLEANFILES) + diff --git a/docs/Makefile.in b/docs/Makefile.in index 90ee8a2..64a2fb2 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -111,7 +111,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -132,8 +133,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -194,7 +194,7 @@ am__uninstall_files_from_dir = { \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" -MANS = $(man_MANS) +MANS = $(dist_man_MANS) $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -222,8 +222,8 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in INSTALL THANKS TODO +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in INSTALL \ + THANKS TODO DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -264,6 +264,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -289,7 +295,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -303,7 +311,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -315,6 +326,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -360,6 +372,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -372,6 +385,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -441,19 +455,29 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -man_MANS = curl.1 curl-config.1 -noinst_man_MANS = mk-ca-bundle.1 + +# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable +# but distribute it (using the relative file name) in the next variable +man_MANS = $(abs_builddir)/curl.1 +noinst_man_MANS = curl.1 mk-ca-bundle.1 +dist_man_MANS = curl-config.1 GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf +MANDISTPAGES = curl.1.dist curl-config.1.dist HTMLPAGES = $(GENHTMLPAGES) index.html -SUBDIRS = examples libcurl cmdline-opts -CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) curl.1 -EXTRA_DIST = MANUAL BUGS CONTRIBUTE.md FAQ FEATURES INTERNALS.md SSLCERTS.md \ - README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS KNOWN_BUGS \ - BINDINGS.md $(man_MANS) HISTORY.md INSTALL INSTALL.md LICENSE-MIXING.md \ - README.netware MAIL-ETIQUETTE HTTP-COOKIES.md SECURITY.md RELEASE-PROCEDURE \ - SSL-PROBLEMS.md HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md CODE_STYLE.md \ - CHECKSRC.md + +# Build targets in this file (.) before cmdline-opts to ensure that +# the curl.1 rule below runs first +SUBDIRS = . cmdline-opts +DIST_SUBDIRS = $(SUBDIRS) examples libcurl +CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1 +EXTRA_DIST = MANUAL BUGS CONTRIBUTE.md FAQ FEATURES INTERNALS.md SSLCERTS.md \ + README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS KNOWN_BUGS \ + BINDINGS.md HISTORY.md INSTALL INSTALL.md LICENSE-MIXING.md \ + README.netware MAIL-ETIQUETTE HTTP-COOKIES.md SECURITY-PROCESS.md RELEASE-PROCEDURE \ + SSL-PROBLEMS.md HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md CODE_STYLE.md \ + CHECKSRC.md CMakeLists.txt README.md CIPHERS.md INSTALL.cmake README.cmake \ + $(noinst_man_MANS) HELP-US.md MAN2HTML = roffit $< >$@ SUFFIXES = .1 .html .pdf @@ -496,10 +520,10 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-man1: $(man_MANS) +install-man1: $(dist_man_MANS) $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ - list2='$(man_MANS)'; \ + list2='$(dist_man_MANS) $(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ @@ -534,7 +558,7 @@ uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ @@ -737,8 +761,6 @@ clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-recursive - -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive @@ -816,14 +838,24 @@ uninstall-man: uninstall-man1 .PRECIOUS: Makefile -curl.1: - cd cmdline-opts && make +# $(abs_builddir) is to disable VPATH when searching for this file, which +# would otherwise find the copy in $(srcdir) which breaks the $(HUGE) +# rule in src/Makefile.am in out-of-tree builds that references the file in the +# build directory. +# +# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree +# build), then run make recursively to rebuild it only if its dependencies +# have changed. +$(abs_builddir)/curl.1: + if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \ + cp -fp "$(srcdir)/curl.1" $@; fi + cd cmdline-opts && $(MAKE) html: $(HTMLPAGES) - cd libcurl && make html + cd libcurl && $(MAKE) html pdf: $(PDFPAGES) - cd libcurl && make pdf + cd libcurl && $(MAKE) pdf .1.html: $(MAN2HTML) @@ -835,6 +867,9 @@ pdf: $(PDFPAGES) rm $$foo.ps; \ echo "converted $< to $@") +distclean: + rm -f $(CLEANFILES) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/docs/README.cmake b/docs/README.cmake new file mode 100644 index 0000000..084c1de --- /dev/null +++ b/docs/README.cmake @@ -0,0 +1,16 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +README.cmake + Read the README file first. + + Curl contains CMake build files that provide a way to build Curl with the + CMake build tool (www.cmake.org). CMake is a cross platform meta build tool + that generates native makefiles and IDE project files. The CMake build + system can be used to build Curl on any of its supported platforms. + + Read the INSTALL.cmake file for instructions on how to compile curl with + CMake. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..56691fc --- /dev/null +++ b/docs/README.md @@ -0,0 +1,12 @@ +![curl logo](https://cdn.rawgit.com/curl/curl-www/master/logo/curl-logo.svg) + +# Documentation + +You'll find a mix of various documentation in this directory and +subdirectories, using several different formats. Some of them are not ideal +for reading directly in your browser. + +If you'd rather see the rendered version of the documentation, check out the +curl web site's [documentation section](https://curl.haxx.se/docs/) for +general curl stuff or the [libcurl section](https://curl.haxx.se/libcurl/) for +libcurl related documentation. diff --git a/docs/RELEASE-PROCEDURE b/docs/RELEASE-PROCEDURE index a7c7433..b7f8fcd 100644 --- a/docs/RELEASE-PROCEDURE +++ b/docs/RELEASE-PROCEDURE @@ -83,9 +83,13 @@ Coming dates Based on the description above, here are some planned release dates (at the time of this writing): -- February 22, 2017 (version 7.53.0) -- April 19, 2017 -- June 14, 2017 -- August 9, 2017 -- October 4, 2017 -- December 29, 2017 +- November 29, 2017 +- January 24, 2018 +- March 21, 2018 +- May 16, 2018 +- July 11, 2018 +- September 5, 2018 +- October 31, 2018 +- December 26, 2018 +- February 20, 2019 +- April 17, 2019 diff --git a/docs/RESOURCES b/docs/RESOURCES index 1ad8aac..55f75df 100644 --- a/docs/RESOURCES +++ b/docs/RESOURCES @@ -7,13 +7,13 @@ This document lists documents and standards used by curl. - RFC 959 - The FTP protocol + RFC 959 - FTP Protocol RFC 1635 - How to Use Anonymous FTP RFC 1738 - Uniform Resource Locators - RFC 1777 - defines the LDAP protocol + RFC 1777 - Lightweight Directory Access Protocol (LDAP) RFC 1808 - Relative Uniform Resource Locators @@ -23,9 +23,9 @@ This document lists documents and standards used by curl. RFC 1951 - DEFLATE Compressed Data Format Specification - RFC 1952 - gzip compression format + RFC 1952 - GZIP File Format Specification - RFC 1959 - LDAP URL syntax + RFC 1959 - LDAP URL Syntax RFC 2045-2049 - Everything you need to know about MIME! (needed for form based upload) @@ -40,11 +40,11 @@ This document lists documents and standards used by curl. RFC 2183 - The Content-Disposition Header Field - RFC 2195 - CRAM-MD5 authentication + RFC 2195 - CRAM-MD5 Authentication RFC 2229 - A Dictionary Server Protocol - RFC 2255 - Newer LDAP URL syntax document. + RFC 2255 - Newer LDAP URL Format RFC 2231 - MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations @@ -70,14 +70,16 @@ This document lists documents and standards used by curl. RFC 2818 - HTTP Over TLS (TLS is the successor to SSL) - RFC 2821 - SMTP protocol + RFC 2821 - Simple Mail Transfer Protocol (SMTP) RFC 2964 - Use of HTTP State Management RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109 - RFC 3207 - SMTP over TLS + RFC 3207 - SMTP Over TLS - RFC 4616 - PLAIN authentication + RFC 4616 - PLAIN Authentication RFC 4954 - SMTP Authentication + + RFC 7932 - Brotli Compressed Data Format diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 1007ccb..64989b1 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,20 +1,14 @@ curl the next few years - perhaps ================================= -Roadmap of things Daniel Stenberg and Steve Holme want to work on next. It is -intended to serve as a guideline for others for information, feedback and -possible participation. +Roadmap of things Daniel Stenberg wants to work on next. It is intended to +serve as a guideline for others for information, feedback and possible +participation. QUIC ---- -The standardization process of QUIC has been taken to the IETF and can be -followed on the [IETF QUIC Mailing -list](https://www.ietf.org/mailman/listinfo/quic). I'd like us to get on the -bandwagon. Ideally, this would be done with a separate library/project to -handle the binary/framing layer in a similar fashion to how HTTP/2 is -implemented. This, to allow other projects to benefit from the work and to -thus broaden the interest and chance of others to participate. + See the [QUIC wiki page](https://github.com/curl/curl/wiki/QUIC). HTTP cookies ------------ @@ -34,85 +28,15 @@ SRV records How to find services for specific domains/hosts. -curl_formadd() --------------- - -make sure there's an easy handle passed in to `curl_formadd()`, -`curl_formget()` and `curl_formfree()` by adding replacement functions and -deprecating the old ones to allow custom mallocs and more. - -Or perhaps even better: revamp the formpost API completely while we're at it -and making something that is easier to use and understand: - - https://github.com/curl/curl/wiki/formpost-API-redesigned - -Third-party SASL ----------------- - -Add support for third-party SASL libraries such as Cyrus SASL. - -SASL authentication in LDAP ---------------------------- - -... - -Simplify the SMTP email ------------------------ - -Simplify the SMTP email interface so that programmers don't have to -construct the body of an email that contains all the headers, alternative -content, images and attachments - maintain raw interface so that -programmers that want to do this can - -email capabilities ------------------- - -Allow the email protocols to return the capabilities before -authenticating. This will allow an application to decide on the best -authentication mechanism - -Win32 pthreads --------------- - -Allow Windows threading model to be replaced by Win32 pthreads port - -dynamic buffer size -------------------- - -Implement a dynamic buffer size to allow SFTP to use much larger buffers and -possibly allow the size to be customizable by applications. Use less memory -when handles are not in use? - -New stuff - curl ----------------- - -1. Embed a language interpreter (lua?). For that middle ground where curl - isn’t enough and a libcurl binding feels “too much”. Build-time conditional - of course. - -2. Simplify the SMTP command line so that the headers and multi-part content - don't have to be constructed before calling curl - Improve ------- -1. build for windows (considered hard by many users) - -2. curl -h output (considered overwhelming to users) +1. curl -h output (considered overwhelming to users). -3. we have > 200 command line options, is there a way to redo things to +2. We have > 200 command line options, is there a way to redo things to simplify or improve the situation as we are likely to keep adding - features/options in the future too - -4. authentication framework (consider merging HTTP and SASL authentication to - give one API for protocols to call) + features/options in the future too. -5. Perform some of the clean up from the TODO document, removing old +3. Perform some of the clean up from the TODO document, removing old definitions and such like that are currently earmarked to be removed years - ago - -Remove ------- - -1. makefile.vc files as there is no point in maintaining two sets of Windows - makefiles. Note: These are currently being used by the Windows autobuilds + ago. diff --git a/docs/SECURITY.md b/docs/SECURITY-PROCESS.md similarity index 95% rename from docs/SECURITY.md rename to docs/SECURITY-PROCESS.md index c88cc9c..d39c5a1 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY-PROCESS.md @@ -1,8 +1,8 @@ -curl security for developers -============================ +curl security process +===================== -This document is intended to provide guidance to curl developers on how -security vulnerabilities should be handled. +This document describes how security vulnerabilities should be handled in the +curl project. Publishing Information ---------------------- @@ -64,7 +64,7 @@ announcement. [distros@openwall](http://oss-security.openwall.org/wiki/mailing-lists/distros) when also informing and preparing them for the upcoming public security vulnerability announcement - attach the advisory draft for information. Note - that 'distros' won't accept an embargo longer than 19 days and they do not + that 'distros' won't accept an embargo longer than 14 days and they do not care for Windows-specific flaws. For windows-specific flaws, request CVE directly from MITRE. diff --git a/docs/SSLCERTS.md b/docs/SSLCERTS.md index 7755609..3fcd345 100644 --- a/docs/SSLCERTS.md +++ b/docs/SSLCERTS.md @@ -161,3 +161,13 @@ disabled. Secure Transport on iOS will run OCSP checks on certificates unless peer verification is disabled. Secure Transport on OS X will run either OCSP or CRL checks on certificates if those features are enabled, and this behavior can be adjusted in the preferences of Keychain Access. + +HTTPS proxy +----------- + +Since version 7.52.0, curl can do HTTPS to the proxy separately from the +connection to the server. This TLS connection is handled separately from the +server connection so instead of `--insecure` and `--cacert` to control the +certificate verification, you use `--proxy-insecure` and `--proxy-cacert`. +With these options, you make sure that the TLS connection and the trust of the +proxy can be kept totally separate from the TLS connection to the server. diff --git a/docs/THANKS b/docs/THANKS index 0336e29..f51c9f7 100644 --- a/docs/THANKS +++ b/docs/THANKS @@ -13,16 +13,19 @@ Abram Pousada Adam D. Moss Adam Langley Adam Light +Adam Marcionek Adam Piggott Adam Sampson Adam Tkac Adrian Schuur Adriano Meirelles Ajit Dhumale +Akhil Kedia Aki Koskinen Akos Pasztory Akshay Vernekar Alain Danteny +Alan Jenkins Alan Pinstein Albert Chin-A-Young Albert Choy @@ -30,6 +33,7 @@ Ale Vesely Alejandro Alvarez Ayllon Aleksandar Milivojevic Aleksey Tulinov +Ales Mlakar Ales Novak Alessandro Ghedini Alessandro Vesely @@ -37,8 +41,11 @@ Alex Bligh Alex Chan Alex Fishman Alex Gruz +Alex Malinovich Alex McLellan Alex Neblett +Alex Nichols +Alex Potapenko Alex Rousskov Alex Suykov Alex Vinnik @@ -56,11 +63,13 @@ Alexander Sinditskiy Alexander Traud Alexander Zhuravlev Alexey Borzov +Alexey Melnichuk Alexey Pesternikov Alexey Simak Alexey Zakhlestin Alexis Carvalho Alexis La Goutte +Alfonso Martone Alfred Gebert Allen Pulsifer Alona Rossen @@ -71,6 +80,7 @@ Anatoli Tubman Anders Bakken Anders Gustafsson Anders Havn +Anders Roxell Andi Jahja Andre Guibert de Bruet Andre Heinecke @@ -82,11 +92,13 @@ Andreas Ntaflos Andreas Olsson Andreas Rieke Andreas Roth +Andreas Schneider Andreas Schuldei Andreas Streichardt Andreas Wurf Andrei Benea Andrei Cipu +Andrei Karas Andrei Kurushin Andrei Sedoi Andrej E Baranov @@ -95,7 +107,9 @@ Andrew Biggs Andrew Bushnell Andrew Francis Andrew Fuller +Andrew Krieger Andrew Kurushin +Andrew Lambert Andrew Moise Andrew Robbins Andrew Wansink @@ -118,10 +132,14 @@ Anton Kalmykov Anton Malov Anton Yabchinskiy Antonio Larrosa +Antony74 on github +Antti Hätälä Arkadiusz Miskiewicz Armel Asselin Arnaud Compan Arnaud Ebalard +Aron Bergman +Artak Galoyan Arthur Murray Arve Knudsen Arvid Norberg @@ -138,6 +156,7 @@ Balint Szilakszi Barry Abrahamson Bart Whiteley Bas Mevissen +Basuke Suzuki Ben Boeckel Ben Darnell Ben Greear @@ -150,10 +169,12 @@ Benjamin Gerard Benjamin Gilbert Benjamin Johnson Benjamin Kircher +Benjamin Sergeant Benoit Neil Benoit Sigoure Bernard Leak Bernard Spil +Bernhard M. Wiedemann Bernhard Reutner-Fischer Bert Huijben Bertrand Demiddelaer @@ -163,6 +184,7 @@ Bill Egert Bill Hoffman Bill Middlecamp Bill Nagel +Bill Pyne Bjoern Sikora Bjorn Augustsson Bjorn Reese @@ -184,6 +206,8 @@ Brandon Wang Brendan Jurd Brent Beardsley Brian Akins +Brian Carpenter +Brian Childs Brian Chrisman Brian Dessent Brian J. Murrell @@ -194,6 +218,7 @@ Brock Noland Bru Rom Bruce Mitchener Bruce Stephens +Bruno Grasselli Bruno Thomsen Bruno de Carvalho Bryan Henderson @@ -203,6 +228,8 @@ Cameron Kaiser Cameron MacMinn Camille Moncelier Caolan McNamara +Carlo Cannas +Carlo Teubner Carlo Wood Carsten Lange Casey O'Donnell @@ -212,12 +239,15 @@ Chandrakant Bagul Charles Kerr Charles Romestant Chen Prog +Chester Liu Chih-Chung Chang Chris "Bob Bob" Chris Araman +Chris Carlmar Chris Combes Chris Conlon Chris Deidun +Chris Faherty Chris Flerackers Chris Gaukroger Chris Maltby @@ -261,6 +291,7 @@ Cory Nelson Craig A West Craig Davison Craig Markwardt +Craig de Stigter Cris Bailiff Cristian Rodríguez Curt Bogmine @@ -271,6 +302,7 @@ D. Flinkmann Da-Yoon Chung Dag Ekengren Dagobert Michelsen +Dair Grant Dambaev Alexander Damian Dixon Damien Adant @@ -281,12 +313,14 @@ Dan Cristian Dan Donahue Dan Fandrich Dan Jacobson +Dan Johnson Dan Locks Dan McNulty Dan Nelson Dan Petitt Dan Torop Dan Zitter +Daniel Bankhead Daniel Black Daniel Cater Daniel Egger @@ -294,6 +328,7 @@ Daniel Gustafsson Daniel Hwang Daniel Johnson Daniel Kahn Gillmor +Daniel Krügler Daniel Lee Hwang Daniel Melani Daniel Mentz @@ -305,6 +340,8 @@ Daniel Steinberg Daniel Stenberg Daniel Theron Daniel at touchtunes +Daphne Luong +Dario Weisser Darryl House Darshan Mody Darío Hereñú @@ -322,6 +359,7 @@ David Binderman David Blaikie David Byron David Cohen +David E. Narváez David Eriksson David Houlder David Hull @@ -332,6 +370,7 @@ David Kierznowski David Kimdon David Lang David LeBlanc +David Lord David McCreedy David Meyer David Odin @@ -351,6 +390,7 @@ Dengminwen Denis Feklushkin Dennis Clarke Derek Higgins +Desmond O. Chang Detlef Schmier Didier Brisebourg Diego Bes @@ -360,16 +400,20 @@ Dima Barsky Dima Tisnek Dimitar Boevski Dimitre Dimitrov +Dimitrios Apostolou Dimitrios Siganos Dimitris Sarris Dinar Dirk Eddelbuettel +Dirk Feytons Dirk Manske Dmitri Shubin +Dmitri Tikhonov Dmitriy Sergeyev Dmitry Bartsevich Dmitry Eremin-Solenikov Dmitry Falko +Dmitry Kostjuchenko Dmitry Kurochkin Dmitry Popov Dmitry Rechkin @@ -384,6 +428,7 @@ Doug Porter Douglas Creager Douglas E. Wegscheid Douglas Kilpatrick +Douglas Mencken Douglas R. Horner Douglas Steinwand Dov Murik @@ -392,25 +437,33 @@ Duane Cathey Duncan Mac-Vicar Prett Dustin Boswell Dusty Mabe +Duy Phan Thanh +Dwarakanath Yadavalli Dylan Ellicott Dylan Salisbury +Dániel Bakai Early Ehlinger +Earnestly on github Ebenezer Ikonne Ed Morley Edin Kadribasic Eduard Bloch +Edward Kimmel Edward Rudd Edward Sheldrake +Edward Thomson Eelco Dolstra Eetu Ojanen Egon Eckert Eldar Zaitov +Elliot Saba Ellis Pritchard Elmira A Semenova Emanuele Bovisio Emil Lerner Emil Romanus Emiliano Ida +Emmanuel Tychon Enrico Scholz Enrik Berkhan Eramoto Masaya @@ -438,6 +491,8 @@ Erwin Authried Ethan Glasser Camp Eugene Kotlyarov Evan Jordan +Even Rouault +Evert Pot Evgeny Grin Evgeny Turnaev Eygene Ryabinkin @@ -449,6 +504,7 @@ Fabrizio Ammollo Fahim Chandurwala Fedor Karpelevitch Feist Josselin +Felix Kaiser Felix Yan Felix von Leitner Feng Tu @@ -456,8 +512,12 @@ Fernando Muñoz Flavio Medeiros Florian Schoppmann Florian Weimer +Florin Petriuc Forrest Cahoon Francisco Moraes +Francisco Sedano +Francois Petitjean +Frank Denis Frank Gevaerts Frank Hempel Frank Keeney @@ -472,6 +532,7 @@ Fred New Fred Noz Fred Stluka Frederic Lepied +Frederik B Fredrik Thulin Gabriel Kuri Gabriel Sjoberg @@ -502,6 +563,7 @@ Gilles Blanc Gisle Vanem Giuseppe Attardi Giuseppe D'Ambrosio +Giuseppe Persico Glen A Johnson Jr. Glen Nakamura Glen Scott @@ -516,6 +578,7 @@ Greg Hewgill Greg Morse Greg Onufer Greg Pratt +Greg Rowe Greg Zavertnik Gregory Szorc Grigory Entin @@ -526,12 +589,15 @@ Guillaume Arluison Gunter Knauf Gustaf Hui Gustavo Grieco +GwanYeong Kim Gwenole Beauchesne Gökhan Şengün Götz Babin-Ebell Hamish Mackenzie +Han Qiao Hang Kin Lau Hang Su +Hannes Magnusson Hanno Böck Hanno Kranzhoff Hans Steegers @@ -545,11 +611,13 @@ He Qin Heikki Korpela Heinrich Ko Heinrich Schaefer +Helmut K. C. Tessarek Helwing Lutz Hendrik Visage Henrik Gaßmann Henrik Storner Henry Ludemann +Henry Roeland Herve Amblard Hidemoto Nakada Ho-chi Chen @@ -559,6 +627,7 @@ Howard Chu Hubert Kario Hzhijun Ian D Allen +Ian Fette Ian Ford Ian Gulliver Ian Lynagh @@ -582,13 +651,16 @@ Ishan SinghLevett Ivan Avdeev Ivo Bellin Salarin Jack Zhang +Jackarain on github Jacky Lam Jacob Meuser Jacob Moshenko Jactry Zeng Jad Chamcham Jaime Fullaondo +Jakub Wilk Jakub Zakrzewski +James Atwill James Bursa James Cheng James Clancy @@ -598,24 +670,29 @@ James Gallagher James Griffiths James Housley James MacMillan +James Slaughter Jamie Lokier Jamie Newton Jamie Wilkinson +Jan Alexander Steffens Jan Ehrhardt Jan Koen Annot Jan Kunder Jan Schaumann +Jan Schmidt Jan Van Boghout Jared Jennings Jared Lundell Jari Aalto Jari Sundell Jason Glasgow +Jason Juang Jason Liu Jason McDonald Jason S. Priebe Javier Barroso Javier G. Sogo +Javier Sixto Jay Austin Jayesh A Shah Jaz Fresh @@ -642,6 +719,7 @@ Jeremy Friesner Jeremy Huddleston Jeremy Lin Jeremy Pearson +Jeremy Tan Jeroen Koekkoek Jeroen Ooms Jerome Muffat-Meridol @@ -651,6 +729,7 @@ Jerry Krinock Jerry Wu Jes Badwal Jesper Jensen +Jesse Chisholm Jesse Noller Jesse Tan Jie He @@ -679,10 +758,13 @@ Johannes Schindelin John Bradshaw John Coffey John Crow +John David Anglin +John DeHelian John Dennis John Dunn John E. Malmberg John Gardiner Myers +John Hascall John Janssen John Joseph Bachir John Kelly @@ -694,11 +776,13 @@ John Marino John Marshall John McGowan John P. McCaskey +John Starks John Suprock John Wanghui John Wilkinson John-Mark Bell Johnny Luong +Jon DeVree Jon Grubbs Jon Nelson Jon Sargeant @@ -724,6 +808,7 @@ Josef Wolf Josh Kapell Joshua Kwan Josue Andrade Gomes +Jozef Kralik Juan Barreto Juan F. Codagnone Juan Ignacio Hervás @@ -739,6 +824,8 @@ Julien Nabet Julien Royer Jun-ichiro itojun Hagino Jurij Smakov +Juro Bystricky +Justin Clift Justin Ehlert Justin Fletcher Justin Karneges @@ -757,6 +844,7 @@ Kang Lin Kang-Jin Lee Karl Moerder Karol Pietrzak +Kartik Mahajan Kaspar Brand Katie Wang Kazuho Oku @@ -771,15 +859,18 @@ Kent Boortz Keshav Krity Kevin Baughman Kevin Fisk +Kevin Ji Kevin Lussier Kevin Reed Kevin Roth +Kevin Smith Kim Minjoong Kim Rinnewitz Kim Vandry Kimmo Kinnunen Kjell Ericson Kjetil Jacobsen +Klaus Stein Klevtsov Vadim Konstantin Isakov Kris Kennaway @@ -787,6 +878,7 @@ Krishnendu Majumdar Krister Johansen Kristian Gunstone Kristian Köhntopp +Kristiyan Tsaklev Kurt Fankhauser Kyle J. McKay Kyle L. Huff @@ -796,6 +888,7 @@ Lachlan O'Dea Larry Campbell Larry Fahnoe Larry Lin +Larry Stefani Larry Stone Lars Buitinck Lars Gustafsson @@ -806,6 +899,7 @@ Lars Torben Wilson Lau Hang Kin Laurent Rabret Lauri Kasanen +Lawrence Wagerfield Legoff Vincent Lehel Bernadt Leif W @@ -826,11 +920,13 @@ Lior Kaplan Lisa Xu Liviu Chircu Liza Alenchery +Lloyd Fournier Lluís Batlle i Rossell Loic Dachary Loren Kirkby Luan Cestari Luca Altea +Luca Boccassi Lucas Adamski Lucas Pardue Ludek Finstrle @@ -848,6 +944,7 @@ Lyndon Hill Maciej Karpiuk Maciej Puzio Maciej W. Rozycki +Mahmoud Samir Fayed Maks Naumov Maksim Kuzevanov Maksim Stsepanenka @@ -855,6 +952,7 @@ Mamoru Tasaka Mandy Wu Manfred Schwarb Manuel Massing +Marc Aldorasi Marc Boucher Marc Deslauriers Marc Doughty @@ -862,6 +960,7 @@ Marc Hesse Marc Hörsken Marc Kleine-Budde Marc Renault +Marc-Antoine Perennou Marcel Raad Marcel Roelofs Marcelo Echeverria @@ -898,10 +997,13 @@ Marquis de Muesli Martijn Koster Martin C. Martin Martin Drasar +Martin Dreher Martin Frodl +Martin Galvan Martin Hager Martin Hedenfalk Martin Jansen +Martin Kepplinger Martin Lemke Martin Skinner Martin Storsjö @@ -919,14 +1021,18 @@ Matt Kraai Matt Veenstra Matt Witherspoon Matt Wixson +Matteo B. Matteo Rocco Matthew Blain Matthew Clarke Matthew Hall +Matthew Kerwin Matthias Bolte +Mattias Fornander Maurice Barnum Mauro Iorio Mauro Rappa +Max Dymond Max Katsev Max Khon Maxim Ivanov @@ -942,12 +1048,15 @@ Michael Calmer Michael Cronenworth Michael Curtis Michael Day +Michael Felt +Michael Gmelin Michael Goffioul Michael Jahn Michael Jerris Michael Kalinin Michael Kaufmann Michael König +Michael Maltese Michael Mealling Michael Mueller Michael Osipov @@ -959,6 +1068,7 @@ Michal Bonino Michal Marek Michał Fita Michał Górny +Michał Janiszewski Michał Kowalczyk Michał Piechowski Michel Promonet @@ -968,6 +1078,7 @@ Miguel Diaz Mihai Ionescu Mikael Johansson Mikael Sennerholm +Mikalai Ananenka Mike Bytnar Mike Crowe Mike Dobbs @@ -1000,19 +1111,23 @@ Nathaniel Waisbrot Naveen Chandran Naveen Noel Neal Poole +Nehal J Wani Neil Bowers Neil Dunbar +Neil Kolban Neil Spring Nic Roets Nicholas Maniscalco Nick Draffen Nick Gimbrone Nick Humfrey +Nick Miyake Nick Zitzmann Nico Baggus Nicolas Berloquin Nicolas Croiset Nicolas François +Nicolas Morey-Chaisemartin Niels van Tongeren Nikita Schmidt Nikitinskit Dmitriy @@ -1034,6 +1149,7 @@ Ola Mork Olaf Flebbe Olaf Stüben Oleg Pudeyev +Oli Kingshott Oliver Gondža Oliver Graute Oliver Kuckertz @@ -1048,8 +1164,10 @@ Ori Avtalion Oscar Koeroo Oscar Norlander P R Schaffner +Palo Markovic Paolo Piacentini Paras Sethia +Pascal Gaudette Pascal Terjan Pasha Kuznetsov Pasi Karkkainen @@ -1057,9 +1175,11 @@ Pat Ray Patrice Guerin Patricia Muscalu Patrick Bihan-Faou +Patrick Dawson Patrick McManus Patrick Monnerat Patrick Rapin +Patrick Schlangen Patrick Scott Patrick Smith Patrick Watson @@ -1067,6 +1187,7 @@ Patrik Thunstrom Pau Garcia i Quiles Paul Donohue Paul Harrington +Paul Harris Paul Howarth Paul Joyce Paul Marks @@ -1077,13 +1198,19 @@ Paul Oliver Paul Querna Paul Saab Pavel Cenek +Pavel Gushchin Pavel Orehov +Pavel Pavlov Pavel Raiskup +Pavel Rochnyak +Pavol Markovic Pawel A. Gajda Pawel Kierski Pedro Larroy Pedro Neves +Per Lundberg Per Malmberg +Pete Lomax Peter Bray Peter Forret Peter Frühberger @@ -1091,10 +1218,12 @@ Peter Gal Peter Heuchert Peter Hjalmarsson Peter Korsgaard +Peter Lamare Peter Lamberg Peter Laser Peter O'Gorman Peter Pentchev +Peter Piekarski Peter Silva Peter Su Peter Sylvester @@ -1107,7 +1236,9 @@ Peteris Krumins Petr Bahula Petr Novak Petr Pisar +Petr Voytsik Phil Blundell +Phil Crump Phil Karn Phil Lisiecki Phil Pellouchoud @@ -1122,6 +1253,7 @@ Pierre Brico Pierre Chapuis Pierre Joye Pierre Ynard +Piotr Dobrogost Pooyan McSporran Pramod Sharma Prash Dush @@ -1148,6 +1280,7 @@ Ralf S. Engelschall Ralph Beckmann Ralph Mitchell Ramana Mokkapati +Randall S. Becker Randy Armstrong Randy McMurchy Ravi Pratap @@ -1172,6 +1305,7 @@ Ricardo Cadime Rich Burridge Rich Gray Rich Rauenzahn +Richard Alcock Richard Archer Richard Atterer Richard Bramante @@ -1180,6 +1314,7 @@ Richard Cooper Richard Gorton Richard Gray Richard Hosking +Richard Hsu Richard Michael Richard Moore Richard Prescott @@ -1190,9 +1325,11 @@ Rick Jones Rick Richardson Ricki Hirner Rider Linden +Rob Cotrone Rob Crittenden Rob Davies Rob Jones +Rob Sanders Rob Stanzel Rob Ward Robert A. Monat @@ -1200,6 +1337,7 @@ Robert B. Harris Robert D. Young Robert Foreman Robert Iakobashvili +Robert Kolcun Robert Olson Robert Schumann Robert Weaver @@ -1221,6 +1359,7 @@ Romain Coltel Roman Koifman Roman Mamedov Romulo A. Ceccon +Ron Eldor Ron Parker Ron Zapp Ronnie Mose @@ -1229,13 +1368,18 @@ Roy Shan Rune Kleveland Ruslan Gazizov Rutger Hofman +Ruurd Beerstra Ryan Braud Ryan Chan Ryan Nelson Ryan Schmidt Ryan Scott +Ryan Winograd +Ryuichi KAWAMATA Rémy Léone S. Moonesamy +SBKarr on github +Salah-Eddin Shaban Salvador Dávila Salvatore Sorrentino Sam Deane @@ -1262,6 +1406,7 @@ Scott Davis Scott McCreary Sean Boudreau Sean Burford +Sean MacLennan Sebastian Mundry Sebastian Pohlschmidt Sebastian Rasmussen @@ -1269,8 +1414,10 @@ Senthil Raja Velu Sergei Kuzmin Sergei Nikulov Sergey Tatarincev +Sergii Kavunenko Sergii Pylypenko Sergio Ballestrero +Sergio Borghese Serj Kalichev Seshubabu Pasam Seth Mos @@ -1291,6 +1438,7 @@ Simon H. Simon Josefsson Simon Liu Simon Warta +Somnath Kundu Song Ma Sonia Subramanian Spacen Jasset @@ -1299,6 +1447,7 @@ Spork Schivago Stadler Stephan Stan van de Burgt Stanislav Ivochkin +Stanislav Zidek Stefan Bühler Stefan Eissing Stefan Esser @@ -1309,12 +1458,15 @@ Stefan Teleman Stefan Tomanek Stefan Ulrich Steinar H. Gunderson +Stepan Broz Stephan Bergmann Stephen Brokenshire Stephen Collyer Stephen Kick Stephen More +Stephen Toub Sterling Hughes +Steve Brokenshire Steve Green Steve H Truong Steve Havelka @@ -1330,11 +1482,13 @@ Steven Gu Steven M. Schweda Steven Parkes Stoned Elipot +Stuart Henderson Sune Ahlgren Sven Anders Sven Neuhaus Sven Wegener Svyatoslav Mishyn +Sylvestre Ledru Symeon Paraschoudis Sébastien Willemijns T. Bharath @@ -1346,6 +1500,7 @@ Tanguy Fautre Tatsuhiro Tsujikawa Temprimus Terri Oda +TheAssassin at github Theodore Dubois Thomas Braun Thomas Glanzmann @@ -1353,9 +1508,11 @@ Thomas J. Moore Thomas Klausner Thomas L. Shinnick Thomas Lopatic +Thomas Petazzoni Thomas Ruecker Thomas Schwinge Thomas Tonino +Thomas van Hesteren Thorsten Schöning Tiit Pikma Till Maas @@ -1366,6 +1523,7 @@ Tim Chen Tim Costello Tim Harder Tim Heckman +Tim Mcdonough Tim Newsome Tim Rühsen Tim Sneddon @@ -1373,6 +1531,7 @@ Tim Stack Tim Starling Timo Sirainen Timotej Lazar +Timothe Litt Timothy Polich Tinus van den Berg Tobias Markus @@ -1391,12 +1550,14 @@ Tom Mattison Tom Moers Tom Mueller Tom Regner +Tom Seddon Tom Sparrow Tom Wright Tom Zerucha Tomas Hoger Tomas Jakobsson Tomas Mlcoch +Tomas Mraz Tomas Pospisek Tomas Szepe Tomas Tomecek @@ -1415,6 +1576,7 @@ Toshio Kuratomi Toshiyuki Maezawa Traian Nicolescu Travis Burtrum +Travis Obenhaus Troels Walsted Hansen Troy Engel Tupone Alfredo @@ -1428,12 +1590,14 @@ Ulrich Zadow Valentin David Vasy Okhin Venkat Akella +Venkataramana Mokkapati Victor Snezhko Vijay Panghal Vikram Saxena -Viktor Szakáts +Viktor Szakats Ville Skyttä Vilmos Nebehaj +Vincas Razma Vincent Bronner Vincent Le Normand Vincent Penquerc'h @@ -1458,6 +1622,7 @@ Werner Koch Wesley Laxton Wesley Miaw Wez Furlong +Wham Bang Wilfredo Sanchez Will Dietz Willem Sparreboom @@ -1465,7 +1630,9 @@ William Ahern Wojciech Zwiefka Wouter Van Rooy Wu Yongzheng +Wyatt O'Day Xavier Bouchoux +XhstormR on github Xiangbin Li Yaakov Selkowitz Yamada Yasuharu @@ -1483,31 +1650,62 @@ Yun SangHo Yuriy Sosov Yves Arrouye Yves Lejeune +Zachary Seguin Zdenek Pavlas Zekun Ni +Zenju on github +Zhouyihai Ding Zmey Petroff Zvi Har'El afrind on github +ahodesuka on github +arainchik on github asavah on github baumanj on github bsammon on github +cbartl on github +cmfrolick on github +destman on github dkjjr89 on github +dpull on github eXeC64 on github +elelel on github +guitared on github +hsiao yi +imilli on github jonrumsey on github +joshhe on github +jungle-boogie on github jveazey on github +ka7 on github kreshano on github +lijian996 on github lukaszgn on github +madblobfish on github marc-groundctl on github +mccormickt12 on github +mkzero on github +moohoorama on github neex on github +neheb on github nk nopjmp on github +olesteban on github +omau on github +ovidiu-benea on github +paulharris on github silveja1 on github +steelman on github +stootill on github swalkaus at yahoo.com tarek112 on github tommink[at]post.pl vanillajonathan on github wmsch on github +wyattoday on github +youngchopin on github zelinchen on github Ä°smail Dönmez +Łukasz Domeradzki Å tefan Kremeň Никита Дорохин diff --git a/docs/TODO b/docs/TODO index 15c1b27..ea78d9f 100644 --- a/docs/TODO +++ b/docs/TODO @@ -17,16 +17,19 @@ All bugs documented in the KNOWN_BUGS document are subject for fixing! 1. libcurl + 1.1 Option to refuse usernames in URLs 1.2 More data sharing 1.3 struct lifreq 1.4 signal-based resolver timeouts 1.5 get rid of PATH_MAX 1.6 Modified buffer size approach - 1.7 Detect when called from within callbacks + 1.7 Support HTTP/2 for HTTP(S) proxies 1.8 CURLOPT_RESOLVE for any port number 1.9 Cache negative name resolves - 1.11 minimize dependencies with dynamicly loaded modules - 1.12 have form functions use CURL handle argument + 1.10 auto-detect proxy + 1.11 minimize dependencies with dynamically loaded modules + 1.12 updated DNS server while running + 1.13 DNS-over-HTTPS 1.14 Typesafe curl_easy_setopt() 1.15 Monitor connections in the connection pool 1.16 Try to URL encode given URL @@ -37,7 +40,9 @@ 1.21 API for URL parsing/splitting 1.23 Offer API to flush the connection pool 1.24 TCP Fast Open for windows - 1.25 Remove the generated include file + 1.25 Expose tried IP addresses that failed + 1.26 CURL_REFUSE_CLEARTEXT + 1.27 hardcode the "localhost" addresses 2. libcurl - multi interface 2.1 More non-blocking @@ -47,7 +52,6 @@ 2.5 Edge-triggered sockets should work 3. Documentation - 3.1 Update date and version in man pages 3.2 Provide cmake config-file 4. FTP @@ -58,26 +62,21 @@ 4.5 ASCII support 4.6 GSSAPI via Windows SSPI 4.7 STAT for LIST without data connection + 4.8 Option to ignore private IP addresses in PASV response 5. HTTP 5.1 Better persistency for HTTP 1.0 5.2 support FF3 sqlite cookie files 5.3 Rearrange request header order - 5.4 HTTP Digest using SHA-256 5.5 auth= in URLs 5.6 Refuse "downgrade" redirects - 5.7 Brotli compression - 5.8 QUIC - 5.9 Improve formpost API - 5.10 Leave secure cookies alone - 5.11 Chunked transfer multipart formpost - 5.12 OPTIONS * + 5.7 QUIC + 5.8 Leave secure cookies alone 6. TELNET 6.1 ditch stdin 6.2 ditch telnet-specific select 6.3 feature negotiation debug data - 6.4 send data in chunks 7. SMTP 7.1 Pipelining @@ -106,13 +105,12 @@ 13. SSL 13.1 Disable specific versions 13.2 Provide mutex locking API - 13.3 Evaluate SSL patches + 13.3 Support in-memory certs/ca certs/keys 13.4 Cache/share OpenSSL contexts 13.5 Export session ids 13.6 Provide callback for cert verification 13.7 improve configure --with-ssl 13.8 Support DANE - 13.10 Support SSLKEYLOGFILE 13.11 Support intermediate & root pinning for PINNEDPUBLICKEY 13.12 Support HSTS 13.13 Support HPKP @@ -135,15 +133,16 @@ 17.1 Multiplexing 17.2 SFTP performance 17.3 Support better than MD5 hostkey hash + 17.4 Support CURLOPT_PREQUOTE 18. Command line tool 18.1 sync 18.2 glob posts 18.3 prevent file overwriting 18.4 simultaneous parallel transfers - 18.5 provide formpost headers + 18.5 UTF-8 filenames in Content-Disposition 18.6 warning when setting an option - 18.7 warning when sending binary output to terminal + 18.7 warning if curl version is not in sync with libcurl version 18.8 offer color-coded HTTP header output 18.9 Choose the name of file in braces for complex URLs 18.10 improve how curl works in a windows console window @@ -154,6 +153,7 @@ 18.15 --retry should resume 18.16 send only part of --data 18.17 consider file name from the redirected URL with -O ? + 18.18 retry on network is unreachable 19. Build 19.1 roffit @@ -186,6 +186,16 @@ 1. libcurl +1.1 Option to refuse usernames in URLs + + There's a certain risk for application in allowing user names in URLs. For + example: if the wrong person gets to set the URL and manages to set a user + name in there when .netrc is used, the application may send along a password + that otherwise the person couldn't provide. + + A new libcurl option could be added to allow applications to switch off this + feature and thus avoid a potential risk. + 1.2 More data sharing curl_share_* functions already exist and work, and they can be extended to @@ -213,7 +223,7 @@ 1.5 get rid of PATH_MAX Having code use and rely on PATH_MAX is not nice: - http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html + https://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html Currently the SSH based code uses it a bit, but to remove PATH_MAX from there we need libssh2 to properly tell us when we pass in a too small buffer and @@ -240,11 +250,9 @@ Dynamically allocate buffer size depending on protocol in use in combination with freeing it after each individual transfer? Other suggestions? -1.7 Detect when called from within callbacks +1.7 Support HTTP/2 for HTTP(S) proxies - We should set a state variable before calling callbacks, so that we - subsequently can add code within libcurl that returns error if called within - callbacks for when that's not supported. + Support for doing HTTP/2 to HTTP and HTTPS proxies is still missing. 1.8 CURLOPT_RESOLVE for any port number @@ -259,7 +267,19 @@ A name resolve that has failed is likely to fail when made again within a short period of time. Currently we only cache positive responses. -1.11 minimize dependencies with dynamicly loaded modules +1.10 auto-detect proxy + + libcurl could be made to detect the system proxy setup automatically and use + that. On Windows, macOS and Linux desktops for example. + + The pull-request to use libproxy for this was deferred due to doubts on the + reliability of the dependency and how to use it: + https://github.com/curl/curl/pull/977 + + libdetectproxy is a (C++) library for detecting the proxy on Windows + https://github.com/paulharris/libdetectproxy + +1.11 minimize dependencies with dynamically loaded modules We can create a system with loadable modules/plug-ins, where these modules would be the ones that link to 3rd party libs. That would allow us to avoid @@ -267,17 +287,24 @@ app/invoke/used protocols would be necessary to load. See https://github.com/curl/curl/issues/349 -1.12 have form functions use CURL handle argument +1.12 updated DNS server while running + + If /etc/resolv.conf gets updated while a program using libcurl is running, it + is may cause name resolves to fail unless res_init() is called. We should + consider calling res_init() + retry once unconditionally on all name resolve + failures to mitigate against this. Firefox works like that. Note that Windows + doesn't have res_init() or an alternative. + + https://github.com/curl/curl/issues/2251 - curl_formadd() and curl_formget() both currently have no CURL handle - argument, but both can use a callback that is set in the easy handle, and - thus curl_formget() with callback cannot function without first having - curl_easy_perform() (or similar) called - which is hard to grasp and a design - mistake. +1.13 DNS-over-HTTPS - The curl_formadd() design can probably also be reconsidered to make it easier - to use and less error-prone. Probably easiest by splitting it into several - function calls. + By adding support for DNS-over-HTTPS curl could resolve host names using a + totally separate name server than the standard system resolver, while at the + same time doing so over a communication channel that enhances privacy and + security. + + https://github.com/curl/curl/wiki/DNS-over-HTTPS 1.14 Typesafe curl_easy_setopt() @@ -371,32 +398,38 @@ Mac OS. Windows supports TCP Fast Open starting with Windows 10, version 1607 and we should add support for it. -1.25 Remove the generated include file +1.25 Expose tried IP addresses that failed + + When libcurl fails to connect to a host, it should be able to offer the + application the list of IP addresses that were used in the attempt. - When curl and libcurl are built, one of the public include files are - generated and is populated with a set of defines that are derevid from sizes - and constants for the particular target architecture that build is made. For - platforms that can select between 32 bit and 64 bit at build time, this - approach makes the libcurl build only create a set of public headers suitable - for one of the architectures and not both. If you build libcurl for such a - platform and you want to allow applications to get built using either 32/64 - version, you must generate the libcurl headers once for each setup and you - must then add a replacement curl header that would itself select the correct - 32 or 64 bit specific header as necessary. + https://github.com/curl/curl/issues/2126 - Your curl/curl.h alternative could then look like (replace with suitable CPP - variable to check): +1.26 CURL_REFUSE_CLEARTEXT - #ifdef ARCH_32bit - #include - #else /* ARCH_64bit */ - #include - #endif + An environment variable that when set will make libcurl refuse to use any + cleartext network protocol. That's all non-encrypted ones (FTP, HTTP, Gopher, + etc). By adding the check to libcurl and not just curl, this environment + variable can then help users to block all libcurl-using programs from + accessing the network using unsafe protocols. - A fix would either (A) fix the 32/64 setup automatically or even better (B) - work away the architecture specific defines from the headers so that they can - be used for all architectures independently of what libcurl was built for. + The variable could be given some sort of syntax or different levels and be + used to also allow for example users to refuse libcurl to do transfers with + HTTPS certificate checks disabled. + It could also offer to refuse usernames in URLs (see TODO 1.1) + +1.27 hardcode the "localhost" addresses + + There's this new spec getting adopted that says "localhost" should always and + unconditionally be a local address and not get resolved by a DNS server. A + fine way for curl to fix this would be to simply hard-code the response to + 127.0.0.1 and/or ::1 (depending on what IP versions that are requested). This + is what the browsers probably will do with this hostname. + + https://bugzilla.mozilla.org/show_bug.cgi?id=1220810 + + https://tools.ietf.org/html/draft-ietf-dnsop-let-localhost-be-localhost-02 2. libcurl - multi interface @@ -406,7 +439,6 @@ EWOULDBLOCK or similar. Blocking cases include: - Name resolves on non-windows unless c-ares or the threaded resolver is used - - HTTP proxy CONNECT operations - SOCKS proxy handshakes - file:// transfers - TELNET transfers @@ -444,12 +476,6 @@ 3. Documentation -3.1 Update date and version in man pages - - 'maketgz' or another suitable script could update the .TH sections of the man - pages at release time to use the current date and curl/libcurl version - number. - 3.2 Provide cmake config-file A config-file package is a set of files provided by us to allow applications @@ -490,17 +516,23 @@ 4.6 GSSAPI via Windows SSPI -In addition to currently supporting the SASL GSSAPI mechanism (Kerberos V5) -via third-party GSS-API libraries, such as Heimdal or MIT Kerberos, also add -support for GSSAPI authentication via Windows SSPI. + In addition to currently supporting the SASL GSSAPI mechanism (Kerberos V5) + via third-party GSS-API libraries, such as Heimdal or MIT Kerberos, also add + support for GSSAPI authentication via Windows SSPI. 4.7 STAT for LIST without data connection -Some FTP servers allow STAT for listing directories instead of using LIST, and -the response is then sent over the control connection instead of as the -otherwise usedw data connection: http://www.nsftools.com/tips/RawFTP.htm#STAT + Some FTP servers allow STAT for listing directories instead of using LIST, + and the response is then sent over the control connection instead of as the + otherwise usedw data connection: http://www.nsftools.com/tips/RawFTP.htm#STAT -This is not detailed in any FTP specification. + This is not detailed in any FTP specification. + +4.8 Option to ignore private IP addresses in PASV response + + Some servers respond with and some other FTP client implementations can + ignore private (RFC 1918 style) IP addresses when received in PASV responses. + To consider for libcurl as well. See https://github.com/curl/curl/issues/1455 5. HTTP @@ -527,15 +559,6 @@ This is not detailed in any FTP specification. headers use a default value so only headers that need to be moved have to be specified. -5.4 HTTP Digest using SHA-256 - - RFC 7616 introduces an update to the HTTP Digest authentication - specification, which amongst other thing defines how new digest algorithms - can be used instead of MD5 which is considered old and not recommanded. - - See https://tools.ietf.org/html/rfc7616 and - https://github.com/curl/curl/issues/1018 - 5.5 auth= in URLs Add the ability to specify the preferred authentication mechanism to use by @@ -555,13 +578,7 @@ This is not detailed in any FTP specification. Consider a way to tell curl to refuse to "downgrade" protocol with a redirect and/or possibly a bit that refuses redirect to change protocol completely. -5.7 Brotli compression - - Brotli compression performs better than gzip and is being implemented by - browsers and servers widely. The algorithm: https://github.com/google/brotli - The Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=366559 - -5.8 QUIC +5.7 QUIC The standardization process of QUIC has been taken to the IETF and can be followed on the [IETF QUIC Mailing @@ -571,46 +588,13 @@ This is not detailed in any FTP specification. implemented. This, to allow other projects to benefit from the work and to thus broaden the interest and chance of others to participate. -5.9 Improve formpost API - - Revamp the formpost API and making something that is easier to use and - understand: - - https://github.com/curl/curl/wiki/formpost-API-redesigned - -5.10 Leave secure cookies alone +5.8 Leave secure cookies alone Non-secure origins (HTTP sites) should not be allowed to set or modify cookies with the 'secure' property: https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01 -5.11 Chunked transfer multipart formpost - - For a case where the file is being made during the upload is progressing - (like passed on stdin to the curl tool), we cannot know the size before-hand - and we rather not read the entire thing into memory before it can start the - upload. - - https://github.com/curl/curl/issues/1139 - -5.12 OPTIONS * - - HTTP defines an OPTIONS method that can be sent with an asterisk option like - "OPTIONS *" to ask about options from the server and not a specific URL - resource. https://tools.ietf.org/html/rfc7230#section-5.3.4 - - libcurl as it currently works will always sent HTTP methods with a path that - starts with a slash so there's no way for an application to send a proper - "OPTIONS *" using libcurl. This should be fixed. - - I can't think of any other non-slash paths we should support so it will - probably make sense to add a new boolean option for issuign an "OPTIONS *" - request. CURLOPT_OPTIONSASTERISK perhaps (and a corresponding command line - option)? - - See https://github.com/curl/curl/issues/1280 - 6. TELNET @@ -630,11 +614,6 @@ to provide the data to send. Add telnet feature negotiation data to the debug callback as header data. -6.4 send data in chunks - - Currently, telnet sends data one byte at a time. This is fine for interactive - use, but inefficient for any other. Sent data should be sent in larger - chunks. 7. SMTP @@ -726,10 +705,13 @@ that doesn't exist on the server, just like --ftp-create-dirs. library, so that the same application code can use mutex-locking independently of OpenSSL or GnutTLS being used. -13.3 Evaluate SSL patches +13.3 Support in-memory certs/ca certs/keys - Evaluate/apply Gertjan van Wingerde's SSL patches: - https://curl.haxx.se/mail/lib-2004-03/0087.html + You can specify the private and public keys for SSH/SSL as file paths. Some + programs want to avoid using files and instead just pass them as in-memory + data blobs. There's probably a challenge to make this work across the + plethory of different TLS and SSH backends that curl suppports. + https://github.com/curl/curl/issues/2310 13.4 Cache/share OpenSSL contexts @@ -781,16 +763,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. Björn Stenberg wrote a separate initial take on DANE that was never completed. -13.10 Support SSLKEYLOGFILE - - When used, Firefox and Chrome dumps their master TLS keys to the file name - this environment variable specifies. This allows tools like for example - Wireshark to capture and decipher TLS traffic to/from those clients. libcurl - could be made to support this more widely (presumably this already works when - built with NSS). Peter Wu made a OpenSSL preload to make possible that can be - used as inspiration and guidance - https://git.lekensteyn.nl/peter/wireshark-notes/tree/src/sslkeylog.c - 13.11 Support intermediate & root pinning for PINNEDPUBLICKEY CURLOPT_PINNEDPUBLICKEY does not consider the hashes of intermediate & root @@ -919,6 +891,10 @@ that doesn't exist on the server, just like --ftp-create-dirs. SHA-1 is also being deprecated these days so we should consider workign with libssh2 to instead offer support for SHA-256 or similar. +17.4 Support CURLOPT_PREQUOTE + + The two other QUOTE options are supported for SFTP, but this was left out for + unknown reasons! 18. Command line tool @@ -954,19 +930,12 @@ that doesn't exist on the server, just like --ftp-create-dirs. Using the multi interface would also allow properly using parallel transfers with HTTP/2 and supporting HTTP/2 server push from the command line. -18.5 provide formpost headers +18.5 UTF-8 filenames in Content-Disposition - Extending the capabilities of the multipart formposting. How about leaving - the ';type=foo' syntax as it is and adding an extra tag (headers) which - works like this: curl -F "coolfiles=@fil1.txt;headers=@fil1.hdr" where - fil1.hdr contains extra headers like + RFC 6266 documents how UTF-8 names can be passed to a client in the + Content-Disposition header, and curl does not support this. - Content-Type: text/plain; charset=KOI8-R" - Content-Transfer-Encoding: base64 - X-User-Comment: Please don't use browser specific HTML code - - which should overwrite the program reasonable defaults (plain/text, - 8bit...) + https://github.com/curl/curl/issues/1888 18.6 warning when setting an option @@ -974,10 +943,12 @@ that doesn't exist on the server, just like --ftp-create-dirs. This can be useful to tell when support for a particular feature hasn't been compiled into the library. -18.7 warning when sending binary output to terminal +18.7 warning if curl version is not in sync with libcurl version - Provide a way that prompts the user for confirmation before binary data is - sent to the terminal, much in the style 'less' does it. + This is usually a sign of a funny, weird or unexpected install situations + that aren't always quickly nor easily detected by users. curl and libcurl are + always released in sync and should use the same version numbers unless very + special situations. 18.8 offer color-coded HTTP header output @@ -1046,9 +1017,9 @@ that doesn't exist on the server, just like --ftp-create-dirs. 18.15 --retry should resume When --retry is used and curl actually retries transfer, it should use the - already transfered data and do a resumed transfer for the rest (when + already transferred data and do a resumed transfer for the rest (when possible) so that it doesn't have to transfer the same data again that was - already tranfered before the retry. + already transferred before the retry. See https://github.com/curl/curl/issues/1084 @@ -1080,6 +1051,18 @@ that doesn't exist on the server, just like --ftp-create-dirs. See https://github.com/curl/curl/issues/1241 +18.18 retry on network is unreachable + + The --retry option retries transfers on "transient failures". We later added + --retry-connrefused to also retry for "connection refused" errors. + + Suggestions have been brought to also allow retry on "network is unreachable" + errors and while totally reasonable, maybe we should consider a way to make + this more configurable than to add a new option for every new error people + want to retry for? + + https://github.com/curl/curl/issues/1603 + 19. Build 19.1 roffit diff --git a/docs/cmdline-opts/CMakeLists.txt b/docs/cmdline-opts/CMakeLists.txt new file mode 100644 index 0000000..5aa20df --- /dev/null +++ b/docs/cmdline-opts/CMakeLists.txt @@ -0,0 +1,12 @@ +set(MANPAGE "${CMAKE_BINARY_DIR}/docs/curl.1") + +# Load DPAGES and OTHERPAGES from shared file +transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") + +add_custom_command(OUTPUT "${MANPAGE}" + COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/gen.pl" mainpage "${CMAKE_CURRENT_SOURCE_DIR}" > "${MANPAGE}" + DEPENDS ${DPAGES} ${OTHERPAGES} + VERBATIM +) +add_custom_target(generate-curl.1 DEPENDS "${MANPAGE}") diff --git a/docs/cmdline-opts/MANPAGE.md b/docs/cmdline-opts/MANPAGE.md index 1ba00c8..3a8270b 100644 --- a/docs/cmdline-opts/MANPAGE.md +++ b/docs/cmdline-opts/MANPAGE.md @@ -23,9 +23,9 @@ Each file has a set of meta-data and a body of text. Tags: (space separated list) Protocols: (space separated list for which protocols this option works) Added: (version number in which this was added) - Mutexed: (space separated list of options this overrides) - Requires: (space separated list of features this option requires) - See-also: (space separated list of related options) + Mutexed: (space separated list of options this overrides, no dashes) + Requires: (space separated list of features this requires, no dashes) + See-also: (space separated list of related options, no dashes) Help: (short text for the --help output for this option) --- (end of meta-data) diff --git a/docs/cmdline-opts/Makefile.am b/docs/cmdline-opts/Makefile.am index c844bca..e6ecf7a 100644 --- a/docs/cmdline-opts/Makefile.am +++ b/docs/cmdline-opts/Makefile.am @@ -24,53 +24,11 @@ AUTOMAKE_OPTIONS = foreign no-dependencies MANPAGE = $(top_builddir)/docs/curl.1 -DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cert.d \ - cert-status.d cert-type.d ciphers.d compressed.d config.d \ - connect-timeout.d connect-to.d continue-at.d cookie.d cookie-jar.d \ - create-dirs.d crlf.d crlfile.d data-ascii.d data-binary.d data.d \ - data-raw.d data-urlencode.d delegation.d digest.d disable.d \ - disable-eprt.d disable-epsv.d dns-interface.d dns-ipv4-addr.d \ - dns-ipv6-addr.d dns-servers.d dump-header.d egd-file.d engine.d \ - environment.d expect100-timeout.d fail.d fail-early.d false-start.d \ - form.d form-string.d ftp-account.d ftp-alternative-to-user.d \ - ftp-create-dirs.d ftp-method.d ftp-pasv.d ftp-port.d ftp-pret.d \ - ftp-skip-pasv-ip.d ftp-ssl-ccc.d ftp-ssl-ccc-mode.d ftp-ssl-control.d \ - get.d globoff.d head.d header.d help.d hostpubmd5.d http1.0.d \ - http1.1.d http2.d http2-prior-knowledge.d ignore-content-length.d \ - include.d insecure.d interface.d ipv4.d ipv6.d junk-session-cookies.d \ - keepalive-time.d key.d key-type.d krb.d libcurl.d limit-rate.d \ - list-only.d local-port.d location.d location-trusted.d \ - login-options.d mail-auth.d mail-from.d mail-rcpt.d manual.d \ - max-filesize.d max-redirs.d max-time.d metalink.d negotiate.d netrc.d \ - netrc-file.d netrc-optional.d next.d no-alpn.d no-buffer.d \ - no-keepalive.d no-npn.d noproxy.d no-sessionid.d ntlm.d ntlm-wb.d \ - oauth2-bearer.d output.d pass.d path-as-is.d pinnedpubkey.d post301.d \ - post302.d post303.d preproxy.d progress-bar.d proto.d proto-default.d \ - proto-redir.d proxy1.0.d proxy-anyauth.d proxy-basic.d proxy-cacert.d \ - proxy-capath.d proxy-cert.d proxy-cert-type.d proxy-ciphers.d \ - proxy-crlfile.d proxy.d proxy-digest.d proxy-header.d \ - proxy-insecure.d proxy-key.d proxy-key-type.d proxy-negotiate.d \ - proxy-ntlm.d proxy-pass.d proxy-service-name.d \ - proxy-ssl-allow-beast.d proxy-tlsauthtype.d proxy-tlspassword.d \ - proxy-tlsuser.d proxy-tlsv1.d proxytunnel.d proxy-user.d pubkey.d \ - quote.d random-file.d range.d raw.d referer.d remote-header-name.d \ - remote-name-all.d remote-name.d remote-time.d request.d resolve.d \ - retry-connrefused.d retry.d retry-delay.d retry-max-time.d sasl-ir.d \ - service-name.d show-error.d silent.d socks4a.d socks4.d socks5.d \ - socks5-gssapi-nec.d socks5-gssapi-service.d socks5-hostname.d \ - speed-limit.d speed-time.d ssl-allow-beast.d ssl.d ssl-no-revoke.d \ - ssl-reqd.d sslv2.d sslv3.d stderr.d tcp-fastopen.d tcp-nodelay.d \ - telnet-option.d tftp-blksize.d tftp-no-options.d time-cond.d \ - tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ - tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ - unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ - verbose.d version.d write-out.d xattr.d +include Makefile.inc -OTHERPAGES = page-footer page-header - -EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) +EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) CMakeLists.txt all: $(MANPAGE) -$(MANPAGE): $(DPAGES) $(OTHERPAGES) +$(MANPAGE): $(DPAGES) $(OTHERPAGES) Makefile.inc @PERL@ $(srcdir)/gen.pl mainpage $(srcdir) > $(MANPAGE) diff --git a/docs/cmdline-opts/Makefile.in b/docs/cmdline-opts/Makefile.in index fb2a689..e8a378a 100644 --- a/docs/cmdline-opts/Makefile.in +++ b/docs/cmdline-opts/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,6 +35,8 @@ # KIND, either express or implied. # ########################################################################### + +# Shared between Makefile.am and CMakeLists.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -111,7 +113,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs/cmdline-opts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -132,8 +135,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -158,7 +160,7 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -174,6 +176,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -199,7 +207,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -213,7 +223,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -225,6 +238,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -270,6 +284,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -282,6 +297,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -353,53 +369,59 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies MANPAGE = $(top_builddir)/docs/curl.1 DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cert.d \ - cert-status.d cert-type.d ciphers.d compressed.d config.d \ - connect-timeout.d connect-to.d continue-at.d cookie.d cookie-jar.d \ - create-dirs.d crlf.d crlfile.d data-ascii.d data-binary.d data.d \ - data-raw.d data-urlencode.d delegation.d digest.d disable.d \ - disable-eprt.d disable-epsv.d dns-interface.d dns-ipv4-addr.d \ - dns-ipv6-addr.d dns-servers.d dump-header.d egd-file.d engine.d \ - environment.d expect100-timeout.d fail.d fail-early.d false-start.d \ - form.d form-string.d ftp-account.d ftp-alternative-to-user.d \ - ftp-create-dirs.d ftp-method.d ftp-pasv.d ftp-port.d ftp-pret.d \ - ftp-skip-pasv-ip.d ftp-ssl-ccc.d ftp-ssl-ccc-mode.d ftp-ssl-control.d \ - get.d globoff.d head.d header.d help.d hostpubmd5.d http1.0.d \ - http1.1.d http2.d http2-prior-knowledge.d ignore-content-length.d \ - include.d insecure.d interface.d ipv4.d ipv6.d junk-session-cookies.d \ - keepalive-time.d key.d key-type.d krb.d libcurl.d limit-rate.d \ - list-only.d local-port.d location.d location-trusted.d \ - login-options.d mail-auth.d mail-from.d mail-rcpt.d manual.d \ - max-filesize.d max-redirs.d max-time.d metalink.d negotiate.d netrc.d \ - netrc-file.d netrc-optional.d next.d no-alpn.d no-buffer.d \ - no-keepalive.d no-npn.d noproxy.d no-sessionid.d ntlm.d ntlm-wb.d \ - oauth2-bearer.d output.d pass.d path-as-is.d pinnedpubkey.d post301.d \ - post302.d post303.d preproxy.d progress-bar.d proto.d proto-default.d \ - proto-redir.d proxy1.0.d proxy-anyauth.d proxy-basic.d proxy-cacert.d \ - proxy-capath.d proxy-cert.d proxy-cert-type.d proxy-ciphers.d \ - proxy-crlfile.d proxy.d proxy-digest.d proxy-header.d \ - proxy-insecure.d proxy-key.d proxy-key-type.d proxy-negotiate.d \ - proxy-ntlm.d proxy-pass.d proxy-service-name.d \ - proxy-ssl-allow-beast.d proxy-tlsauthtype.d proxy-tlspassword.d \ - proxy-tlsuser.d proxy-tlsv1.d proxytunnel.d proxy-user.d pubkey.d \ - quote.d random-file.d range.d raw.d referer.d remote-header-name.d \ - remote-name-all.d remote-name.d remote-time.d request.d resolve.d \ - retry-connrefused.d retry.d retry-delay.d retry-max-time.d sasl-ir.d \ - service-name.d show-error.d silent.d socks4a.d socks4.d socks5.d \ - socks5-gssapi-nec.d socks5-gssapi-service.d socks5-hostname.d \ - speed-limit.d speed-time.d ssl-allow-beast.d ssl.d ssl-no-revoke.d \ - ssl-reqd.d sslv2.d sslv3.d stderr.d tcp-fastopen.d tcp-nodelay.d \ - telnet-option.d tftp-blksize.d tftp-no-options.d time-cond.d \ - tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ - tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ - unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ - verbose.d version.d write-out.d xattr.d + cert-status.d cert-type.d ciphers.d compressed.d compressed-ssh.d \ + config.d \ + connect-timeout.d connect-to.d continue-at.d cookie.d cookie-jar.d \ + create-dirs.d crlf.d crlfile.d data-ascii.d data-binary.d data.d \ + data-raw.d data-urlencode.d delegation.d digest.d disable.d \ + disable-eprt.d disable-epsv.d dns-interface.d dns-ipv4-addr.d \ + dns-ipv6-addr.d dns-servers.d dump-header.d egd-file.d engine.d \ + expect100-timeout.d fail.d fail-early.d false-start.d \ + form.d form-string.d ftp-account.d ftp-alternative-to-user.d \ + ftp-create-dirs.d ftp-method.d ftp-pasv.d ftp-port.d ftp-pret.d \ + ftp-skip-pasv-ip.d ftp-ssl-ccc.d ftp-ssl-ccc-mode.d ftp-ssl-control.d \ + get.d globoff.d \ + happy-eyeballs-timeout-ms.d \ + head.d header.d help.d hostpubmd5.d http1.0.d \ + http1.1.d http2.d http2-prior-knowledge.d ignore-content-length.d \ + include.d insecure.d interface.d ipv4.d ipv6.d junk-session-cookies.d \ + keepalive-time.d key.d key-type.d krb.d libcurl.d limit-rate.d \ + list-only.d local-port.d location.d location-trusted.d \ + login-options.d mail-auth.d mail-from.d mail-rcpt.d manual.d \ + max-filesize.d max-redirs.d max-time.d metalink.d negotiate.d netrc.d \ + netrc-file.d netrc-optional.d next.d no-alpn.d no-buffer.d \ + no-keepalive.d no-npn.d noproxy.d no-sessionid.d ntlm.d ntlm-wb.d \ + oauth2-bearer.d output.d pass.d path-as-is.d pinnedpubkey.d post301.d \ + post302.d post303.d preproxy.d progress-bar.d proto.d proto-default.d \ + proto-redir.d proxy1.0.d proxy-anyauth.d proxy-basic.d proxy-cacert.d \ + proxy-capath.d proxy-cert.d proxy-cert-type.d proxy-ciphers.d \ + proxy-crlfile.d proxy.d proxy-digest.d proxy-header.d \ + proxy-insecure.d proxy-key.d proxy-key-type.d proxy-negotiate.d \ + proxy-ntlm.d proxy-pass.d proxy-service-name.d \ + proxy-ssl-allow-beast.d proxy-tlsauthtype.d proxy-tlspassword.d \ + proxy-tlsuser.d proxy-tlsv1.d proxytunnel.d proxy-user.d pubkey.d \ + quote.d random-file.d range.d raw.d referer.d remote-header-name.d \ + remote-name-all.d remote-name.d remote-time.d request.d resolve.d \ + retry-connrefused.d retry.d retry-delay.d retry-max-time.d sasl-ir.d \ + service-name.d show-error.d silent.d socks4a.d socks4.d socks5.d \ + socks5-basic.d socks5-gssapi.d proxy-pinnedpubkey.d \ + socks5-gssapi-nec.d socks5-gssapi-service.d socks5-hostname.d \ + speed-limit.d speed-time.d ssl-allow-beast.d ssl.d ssl-no-revoke.d \ + ssl-reqd.d sslv2.d sslv3.d stderr.d suppress-connect-headers.d \ + tcp-fastopen.d tcp-nodelay.d \ + telnet-option.d tftp-blksize.d tftp-no-options.d time-cond.d \ + tls-max.d \ + tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ + tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ + unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ + verbose.d version.d write-out.d xattr.d request-target.d OTHERPAGES = page-footer page-header -EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) +EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) CMakeLists.txt all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -419,6 +441,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(srcdir)/Makefile.inc $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -590,7 +613,7 @@ uninstall-am: all: $(MANPAGE) -$(MANPAGE): $(DPAGES) $(OTHERPAGES) +$(MANPAGE): $(DPAGES) $(OTHERPAGES) Makefile.inc @PERL@ $(srcdir)/gen.pl mainpage $(srcdir) > $(MANPAGE) # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/docs/cmdline-opts/Makefile.inc b/docs/cmdline-opts/Makefile.inc new file mode 100644 index 0000000..778149c --- /dev/null +++ b/docs/cmdline-opts/Makefile.inc @@ -0,0 +1,51 @@ +# Shared between Makefile.am and CMakeLists.txt + +DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cert.d \ + cert-status.d cert-type.d ciphers.d compressed.d compressed-ssh.d \ + config.d \ + connect-timeout.d connect-to.d continue-at.d cookie.d cookie-jar.d \ + create-dirs.d crlf.d crlfile.d data-ascii.d data-binary.d data.d \ + data-raw.d data-urlencode.d delegation.d digest.d disable.d \ + disable-eprt.d disable-epsv.d dns-interface.d dns-ipv4-addr.d \ + dns-ipv6-addr.d dns-servers.d dump-header.d egd-file.d engine.d \ + expect100-timeout.d fail.d fail-early.d false-start.d \ + form.d form-string.d ftp-account.d ftp-alternative-to-user.d \ + ftp-create-dirs.d ftp-method.d ftp-pasv.d ftp-port.d ftp-pret.d \ + ftp-skip-pasv-ip.d ftp-ssl-ccc.d ftp-ssl-ccc-mode.d ftp-ssl-control.d \ + get.d globoff.d \ + happy-eyeballs-timeout-ms.d \ + head.d header.d help.d hostpubmd5.d http1.0.d \ + http1.1.d http2.d http2-prior-knowledge.d ignore-content-length.d \ + include.d insecure.d interface.d ipv4.d ipv6.d junk-session-cookies.d \ + keepalive-time.d key.d key-type.d krb.d libcurl.d limit-rate.d \ + list-only.d local-port.d location.d location-trusted.d \ + login-options.d mail-auth.d mail-from.d mail-rcpt.d manual.d \ + max-filesize.d max-redirs.d max-time.d metalink.d negotiate.d netrc.d \ + netrc-file.d netrc-optional.d next.d no-alpn.d no-buffer.d \ + no-keepalive.d no-npn.d noproxy.d no-sessionid.d ntlm.d ntlm-wb.d \ + oauth2-bearer.d output.d pass.d path-as-is.d pinnedpubkey.d post301.d \ + post302.d post303.d preproxy.d progress-bar.d proto.d proto-default.d \ + proto-redir.d proxy1.0.d proxy-anyauth.d proxy-basic.d proxy-cacert.d \ + proxy-capath.d proxy-cert.d proxy-cert-type.d proxy-ciphers.d \ + proxy-crlfile.d proxy.d proxy-digest.d proxy-header.d \ + proxy-insecure.d proxy-key.d proxy-key-type.d proxy-negotiate.d \ + proxy-ntlm.d proxy-pass.d proxy-service-name.d \ + proxy-ssl-allow-beast.d proxy-tlsauthtype.d proxy-tlspassword.d \ + proxy-tlsuser.d proxy-tlsv1.d proxytunnel.d proxy-user.d pubkey.d \ + quote.d random-file.d range.d raw.d referer.d remote-header-name.d \ + remote-name-all.d remote-name.d remote-time.d request.d resolve.d \ + retry-connrefused.d retry.d retry-delay.d retry-max-time.d sasl-ir.d \ + service-name.d show-error.d silent.d socks4a.d socks4.d socks5.d \ + socks5-basic.d socks5-gssapi.d proxy-pinnedpubkey.d \ + socks5-gssapi-nec.d socks5-gssapi-service.d socks5-hostname.d \ + speed-limit.d speed-time.d ssl-allow-beast.d ssl.d ssl-no-revoke.d \ + ssl-reqd.d sslv2.d sslv3.d stderr.d suppress-connect-headers.d \ + tcp-fastopen.d tcp-nodelay.d \ + telnet-option.d tftp-blksize.d tftp-no-options.d time-cond.d \ + tls-max.d \ + tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ + tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ + unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ + verbose.d version.d write-out.d xattr.d request-target.d + +OTHERPAGES = page-footer page-header diff --git a/docs/cmdline-opts/abstract-unix-socket.d b/docs/cmdline-opts/abstract-unix-socket.d index bb4467b..1fda4e5 100644 --- a/docs/cmdline-opts/abstract-unix-socket.d +++ b/docs/cmdline-opts/abstract-unix-socket.d @@ -1,6 +1,6 @@ Long: abstract-unix-socket Arg: -Help: Connect through an abstract Unix domain socket +Help: Connect via abstract Unix domain socket Added: 7.53.0 Protocols: HTTP --- diff --git a/docs/cmdline-opts/cacert.d b/docs/cmdline-opts/cacert.d index 04e1139..b2ecf90 100644 --- a/docs/cmdline-opts/cacert.d +++ b/docs/cmdline-opts/cacert.d @@ -1,5 +1,5 @@ Long: cacert -Arg: +Arg: Help: CA certificate to verify peer against Protocols: TLS --- diff --git a/docs/cmdline-opts/compressed-ssh.d b/docs/cmdline-opts/compressed-ssh.d new file mode 100644 index 0000000..583452a --- /dev/null +++ b/docs/cmdline-opts/compressed-ssh.d @@ -0,0 +1,7 @@ +Long: compressed-ssh +Help: Enable SSH compression +Protocols: SCP SFTP +Added: 7.56.0 +--- +Enables built-in SSH compression. +This is a request, not an order; the server may or may not do it. diff --git a/docs/cmdline-opts/config.d b/docs/cmdline-opts/config.d index 4a32512..105d628 100644 --- a/docs/cmdline-opts/config.d +++ b/docs/cmdline-opts/config.d @@ -3,11 +3,12 @@ Arg: Help: Read config from a file Short: K --- -Specify which config file to read curl arguments from. The config file is a -text file in which command line arguments can be written which then will be -used as if they were written on the actual command line. -Options and their parameters must be specified on the same config file line, +Specify a text file to read curl arguments from. The command line arguments +found in the text file will be used as if they were provided on the command +line. + +Options and their parameters must be specified on the same line in the file, separated by whitespace, colon, or the equals sign. Long option names can optionally be given in the config file without the initial double dashes and if so, the colon or equals characters can be used as separators. If the option @@ -29,9 +30,9 @@ line. So, it could look similar to this: url = "https://curl.haxx.se/docs/" -When curl is invoked, it always (unless --disable is used) checks for a -default config file and uses it if found. The default config file is checked -for in the following places in this order: +When curl is invoked, it (unless --disable is used) checks for a default +config file and uses it if found. The default config file is checked for in +the following places in this order: 1) curl tries to find the "home dir": It first checks for the CURL_HOME and then the HOME environment variables. Failing that, it uses getpwuid() on diff --git a/docs/cmdline-opts/connect-to.d b/docs/cmdline-opts/connect-to.d index 3fa0568..458bfe8 100644 --- a/docs/cmdline-opts/connect-to.d +++ b/docs/cmdline-opts/connect-to.d @@ -5,14 +5,17 @@ Added: 7.49.0 See-also: resolve header --- -For a request to the given HOST:PORT pair, connect to -CONNECT-TO-HOST:CONNECT-TO-PORT instead. This option is suitable to direct -requests at a specific server, e.g. at a specific cluster node in a cluster of -servers. This option is only used to establish the network connection. It -does NOT affect the hostname/port that is used for TLS/SSL (e.g. SNI, -certificate verification) or for the application protocols. "host" and "port" -may be the empty string, meaning "any host/port". "connect-to-host" and -"connect-to-port" may also be the empty string, meaning "use the request's -original host/port". +For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead. +This option is suitable to direct requests at a specific server, e.g. at a +specific cluster node in a cluster of servers. This option is only used to +establish the network connection. It does NOT affect the hostname/port that is +used for TLS/SSL (e.g. SNI, certificate verification) or for the application +protocols. "HOST1" and "PORT1" may be the empty string, meaning "any +host/port". "HOST2" and "PORT2" may also be the empty string, meaning "use the +request's original host/port". + +A "host" specified to this option is compared as a string, so it needs to +match the name used in request URL. It can be either numerical such as +"127.0.0.1" or the full host name such as "example.org". This option can be used many times to add many connect rules. diff --git a/docs/cmdline-opts/environment.d b/docs/cmdline-opts/environment.d deleted file mode 100644 index 6289e53..0000000 --- a/docs/cmdline-opts/environment.d +++ /dev/null @@ -1,7 +0,0 @@ -Long: environment -Help: Write results to environment variables -Requires: RISC OS ---- -Sets a range of environment variables, using the names the --write-out option -supports, to allow easier extraction of useful information after having run -curl. diff --git a/docs/cmdline-opts/fail-early.d b/docs/cmdline-opts/fail-early.d index 4489b4f..375d4c9 100644 --- a/docs/cmdline-opts/fail-early.d +++ b/docs/cmdline-opts/fail-early.d @@ -2,7 +2,7 @@ Long: fail-early Help: Fail on first transfer error, do not continue Added: 7.52.0 --- -Fail and exit on first detected error. +Fail and exit on the first detected transfer error. When curl is used to do multiple transfers on the command line, it will attempt to operate on each given URL, one by one. By default, it will ignore @@ -10,9 +10,12 @@ errors if there are more URLs given and the last URL's success will determine the error code curl returns. So early failures will be "hidden" by subsequent successful transfers. -Using this option, curl will instead return an error on the first transfers -that fails, independent on the amount of more URLs that are given on the -command line. This way, no transfer failures go undetected by scripts and -similar. +Using this option, curl will instead return an error on the first transfer +that fails, independent of the amount of URLs that are given on the command +line. This way, no transfer failures go undetected by scripts and similar. -This option will apply for all given URLs even if you use --next. +This option is global and does not need to be specified for each use of --next. + +This option does not imply --fail, which causes transfers to fail due to the +server's HTTP status code. You can combine the two options, however note --fail +is not global and is therefore contained by --next. diff --git a/docs/cmdline-opts/form-string.d b/docs/cmdline-opts/form-string.d index 8079055..49d0d44 100644 --- a/docs/cmdline-opts/form-string.d +++ b/docs/cmdline-opts/form-string.d @@ -1,6 +1,6 @@ Long: form-string -Help: Specify HTTP multipart POST data -Protocols: HTTP +Help: Specify multipart MIME data +Protocols: HTTP SMTP IMAP Arg: See-also: form --- diff --git a/docs/cmdline-opts/form.d b/docs/cmdline-opts/form.d index 87a7d07..8d04d41 100644 --- a/docs/cmdline-opts/form.d +++ b/docs/cmdline-opts/form.d @@ -1,28 +1,46 @@ Long: form Short: F Arg: -Help: Specify HTTP multipart POST data -Protocols: HTTP +Help: Specify multipart MIME data +Protocols: HTTP SMTP IMAP Mutexed: data head upload --- -This lets curl emulate a filled-in form in which a user has pressed the submit -button. This causes curl to POST data using the Content-Type -multipart/form-data according to RFC 2388. This enables uploading of binary -files etc. To force the 'content' part to be a file, prefix the file name with -an @ sign. To just get the content part from a file, prefix the file name with -the symbol <. The difference between @ and < is then that @ makes a file get -attached in the post as a file upload, while the < makes a text field and just -get the contents for that text field from a file. - -Example: to send an image to a server, where \&'profile' is the name of the -form-field to which portrait.jpg will be the input: +For HTTP protocol family, this lets curl emulate a filled-in form in which a +user has pressed the submit button. This causes curl to POST data using the +Content-Type multipart/form-data according to RFC 2388. + +For SMTP and IMAP protocols, this is the mean to compose a multipart mail +message to transmit. + +This enables uploading of binary files etc. To force the 'content' part to be +a file, prefix the file name with an @ sign. To just get the content part from +a file, prefix the file name with the symbol <. The difference between @ and < +is then that @ makes a file get attached in the post as a file upload, while +the < makes a text field and just get the contents for that text field from a +file. + +Tell curl to read content from stdin instead of a file by using - as +filename. This goes for both @ and < constructs. When stdin is used, the +contents is buffered in memory first by curl to determine its size and allow a +possible resend. Defining a part's data from a named non-regular file (such +as a named pipe or similar) is unfortunately not subject to buffering and will +be effectively read at transmission time; since the full size is unknown +before the transfer starts, such data is sent as chunks by HTTP and rejected +by IMAP. + +Example: send an image to an HTTP server, where \&'profile' is the name of the +form-field to which the file portrait.jpg will be the input: curl -F profile=@portrait.jpg https://example.com/upload.cgi -To read content from stdin instead of a file, use - as the filename. This goes -for both @ and < constructs. Unfortunately it does not support reading the -file from a named pipe or similar, as it needs the full size before the -transfer starts. +Example: send a your name and shoe size in two text fields to the server: + + curl -F name=John -F shoesize=11 https://example.com/ + +Example: send a your essay in a text field to the server. Send it as a plain +text field, but get the contents for it from a local file: + + curl -F "story=HTML message;type=text/html' \\ +.br + -F '=)' -F '=@textfile.txt' ... smtp://example.com + +Data can be encoded for transfer using encoder=. Available encodings are +\fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding +Content-Transfer-Encoding header, \fI7bit\fP that only rejects 8-bit characters +with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes +data according to the corresponding schemes, limiting lines length to +76 characters. + +Example: send multipart mail with a quoted-printable text message and a +base64 attached file: + + curl -F '=text message;encoder=quoted-printable' \\ +.br + -F '=@localfile;encoder=base64' ... smtp://example.com + See further examples and details in the MANUAL. This option can be used multiple times. diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index 91e893f..6ecf1b5 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl =begin comment @@ -307,10 +307,12 @@ sub listhelp { if($arg) { $opt .= " $arg"; } + my $desc = $helplong{$f}; + $desc =~ s/\"/\\\"/g; # escape double quotes - my $line = sprintf " %-19s %s\n", $opt, $helplong{$f}; + my $line = sprintf " {\"%s\",\n \"%s\"},\n", $opt, $desc; - if(length($line) > 79) { + if(length($opt) + length($desc) > 78) { print STDERR "WARN: the --$long line is too long\n"; } print $line; diff --git a/docs/cmdline-opts/happy-eyeballs-timeout-ms.d b/docs/cmdline-opts/happy-eyeballs-timeout-ms.d new file mode 100644 index 0000000..ec9a8c2 --- /dev/null +++ b/docs/cmdline-opts/happy-eyeballs-timeout-ms.d @@ -0,0 +1,17 @@ +Long: happy-eyeballs-timeout-ms +Arg: +Help: How long to wait in milliseconds for IPv6 before trying IPv4 +Added: 7.59.0 +--- +Happy eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6 +addresses for dual-stack hosts, preferring IPv6 first for the number of +milliseconds. If the IPv6 address cannot be connected to within that time then +a connection attempt is made to the IPv4 address in parallel. The first +connection to be established is the one that is used. + +The range of suggested useful values is limited. Happy Eyeballs RFC 6555 says +"It is RECOMMENDED that connection attempts be paced 150-250 ms apart to +balance human factors against network load." libcurl currently defaults to +200 ms. Firefox and Chrome currently default to 300 ms. + +If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/header.d b/docs/cmdline-opts/header.d index 90af735..d8292ed 100644 --- a/docs/cmdline-opts/header.d +++ b/docs/cmdline-opts/header.d @@ -1,10 +1,9 @@ Long: header Short: H -Arg:
-Help: Pass custom header LINE to server +Arg:
+Help: Pass custom header(s) to server Protocols: HTTP --- - Extra header to include in the request when sending HTTP to a server. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your @@ -21,6 +20,10 @@ end-of-line marker, you should thus \fBnot\fP add that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you. +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + See also the --user-agent and --referer options. Starting in 7.37.0, you need --proxy-header to send custom headers intended diff --git a/docs/cmdline-opts/include.d b/docs/cmdline-opts/include.d index e55d516..9d282dd 100644 --- a/docs/cmdline-opts/include.d +++ b/docs/cmdline-opts/include.d @@ -1,7 +1,10 @@ Long: include Short: i -Help: Include protocol headers in the output +Help: Include protocol response headers in the output See-also: verbose --- -Include the HTTP-header in the output. The HTTP-header includes things like -server-name, date of the document, HTTP-version and more... +Include the HTTP response headers in the output. The HTTP response headers can +include things like server name, cookies, date of the document, HTTP version +and more... + +To view the request headers, consider the --verbose option. diff --git a/docs/cmdline-opts/insecure.d b/docs/cmdline-opts/insecure.d index 1dd0fa8..49b0a43 100644 --- a/docs/cmdline-opts/insecure.d +++ b/docs/cmdline-opts/insecure.d @@ -1,12 +1,16 @@ Long: insecure Short: k -Help: Allow insecure connections when using SSL +Help: Allow insecure server connections when using SSL Protocols: TLS +See-also: proxy-insecure cacert --- -This option explicitly allows curl to perform "insecure" SSL connections and -transfers. All SSL connections are attempted to be made secure by using the CA -certificate bundle installed by default. This makes all connections considered -\&"insecure" fail unless --insecure is used. + +By default, every SSL connection curl makes is verified to be secure. This +option allows curl to proceed and operate even for server connections +otherwise considered insecure. + +The server connection is verified by making sure the server's certificate +contains the right name and verifies successfully using the cert store. See this online resource for further details: https://curl.haxx.se/docs/sslcerts.html diff --git a/docs/cmdline-opts/interface.d b/docs/cmdline-opts/interface.d index da84cd2..bd08176 100644 --- a/docs/cmdline-opts/interface.d +++ b/docs/cmdline-opts/interface.d @@ -10,3 +10,7 @@ name, IP address or host name. An example could look like: curl --interface eth0:1 https://www.example.com/ If this option is used several times, the last one will be used. + +On Linux it can be used to specify a VRF, but the binary needs to either +have CAP_NET_RAW or to be ran as root. More information about Linux VRF: +https://www.kernel.org/doc/Documentation/networking/vrf.txt diff --git a/docs/cmdline-opts/limit-rate.d b/docs/cmdline-opts/limit-rate.d index 8784a84..06c456e 100644 --- a/docs/cmdline-opts/limit-rate.d +++ b/docs/cmdline-opts/limit-rate.d @@ -8,7 +8,7 @@ your transfer not to use your entire bandwidth. To make it slower than it otherwise would be. The given speed is measured in bytes/second, unless a suffix is appended. -Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it +Appending 'k' or 'K' will count the number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. If you also use the --speed-limit option, that option will take precedence and diff --git a/docs/cmdline-opts/mail-rcpt.d b/docs/cmdline-opts/mail-rcpt.d index d747cea..0a2859b 100644 --- a/docs/cmdline-opts/mail-rcpt.d +++ b/docs/cmdline-opts/mail-rcpt.d @@ -1,6 +1,6 @@ Long: mail-rcpt Arg:
-Help: Mail from this address +Help: Mail to this address Protocols: SMTP Added: 7.20.0 --- diff --git a/docs/cmdline-opts/max-filesize.d b/docs/cmdline-opts/max-filesize.d index e92ef58..50d5266 100644 --- a/docs/cmdline-opts/max-filesize.d +++ b/docs/cmdline-opts/max-filesize.d @@ -7,6 +7,10 @@ Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63. +A size modifier may be used. For example, Appending 'k' or 'K' will count the +number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it +gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0) + \fBNOTE:\fP The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers. diff --git a/docs/cmdline-opts/netrc-file.d b/docs/cmdline-opts/netrc-file.d index 4118b4d..0b5d240 100644 --- a/docs/cmdline-opts/netrc-file.d +++ b/docs/cmdline-opts/netrc-file.d @@ -1,6 +1,6 @@ Long: netrc-file Help: Specify FILE for netrc -Arg: +Arg: Added: 7.21.5 Mutexed: netrc --- diff --git a/docs/cmdline-opts/no-keepalive.d b/docs/cmdline-opts/no-keepalive.d index 7eb3d63..8fb28a0 100644 --- a/docs/cmdline-opts/no-keepalive.d +++ b/docs/cmdline-opts/no-keepalive.d @@ -1,7 +1,7 @@ Long: no-keepalive Help: Disable TCP keepalive on the connection --- -Disables the use of keepalive messages on the TCP connection. curl otherwis +Disables the use of keepalive messages on the TCP connection. curl otherwise enables them by default. Note that this is the negated option name documented. You can thus use diff --git a/docs/cmdline-opts/oauth2-bearer.d b/docs/cmdline-opts/oauth2-bearer.d index adad532..7807167 100644 --- a/docs/cmdline-opts/oauth2-bearer.d +++ b/docs/cmdline-opts/oauth2-bearer.d @@ -1,5 +1,6 @@ Long: oauth2-bearer Help: OAuth 2 Bearer Token +Arg: Protocols: IMAP POP3 SMTP --- Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token diff --git a/docs/cmdline-opts/page-footer b/docs/cmdline-opts/page-footer index 55aefb2..1ca47ae 100644 --- a/docs/cmdline-opts/page-footer +++ b/docs/cmdline-opts/page-footer @@ -24,14 +24,17 @@ Sets the proxy server to use if no protocol-specific proxy is set. list of host names that shouldn't go through any proxy. If set to a asterisk \&'*' only, it matches all hosts. -Since 7.53.0, this environment variable disable the proxy even if specify ---proxy option. That is +This environment variable disables use of the proxy even when specified with +the --proxy option. That is .B NO_PROXY=direct.example.com curl -x http://proxy.example.com .B http://direct.example.com accesses the target URL directly, and .B NO_PROXY=direct.example.com curl -x http://proxy.example.com .B http://somewhere.example.com -accesses the target URL through proxy. +accesses the target URL through the proxy. + +The list of host names can also be include numerical IP addresses, and IPv6 +versions should then be given without enclosing brackets. .SH "PROXY PROTOCOL PREFIXES" Since curl version 7.21.7, the proxy string may be specified with a @@ -41,6 +44,10 @@ If no protocol is specified in the proxy string or if the string doesn't match a supported one, the proxy will be treated as an HTTP proxy. The supported proxy protocol prefixes are as follows: +.IP "http://" +Makes it use it as a HTTP proxy. The default if no scheme prefix is used. +.IP "https://" +Makes it treated as a \fBHTTPS\fP proxy. .IP "socks4://" Makes it the equivalent of --socks4 .IP "socks4a://" @@ -231,6 +238,10 @@ FTP chunk callback reported error No connection available, the session will be queued .IP 90 SSL public key does not matched pinned public key +.IP 91 +Invalid SSL certificate status. +.IP 92 +Stream error in HTTP/2 framing layer. .IP XX More error codes will appear here in future releases. The existing ones are meant to never change. diff --git a/docs/cmdline-opts/progress-bar.d b/docs/cmdline-opts/progress-bar.d index 11e95b4..f27de2d 100644 --- a/docs/cmdline-opts/progress-bar.d +++ b/docs/cmdline-opts/progress-bar.d @@ -7,5 +7,6 @@ standard, more informational, meter. This progress bar draws a single line of '#' characters across the screen and shows a percentage if the transfer size is known. For transfers without a -known size, it will instead output one '#' character for every 1024 bytes -transferred. +known size, there will be space ship (-=o=-) that moves back and forth but +only while data is being transferred, with a set of flying hash sign symbols on +top. diff --git a/docs/cmdline-opts/proxy-header.d b/docs/cmdline-opts/proxy-header.d index 1ef696b..c1b0bb7 100644 --- a/docs/cmdline-opts/proxy-header.d +++ b/docs/cmdline-opts/proxy-header.d @@ -1,6 +1,6 @@ Long: proxy-header -Arg:
-Help: Pass custom header LINE to proxy +Arg:
+Help: Pass custom header(s) to proxy Protocols: HTTP Added: 7.37.0 --- @@ -17,4 +17,8 @@ up for you. Headers specified with this option will not be included in requests that curl knows will not be sent to a proxy. +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + This option can be used multiple times to add/replace/remove multiple headers. diff --git a/docs/cmdline-opts/proxy-pinnedpubkey.d b/docs/cmdline-opts/proxy-pinnedpubkey.d new file mode 100644 index 0000000..abd6dc4 --- /dev/null +++ b/docs/cmdline-opts/proxy-pinnedpubkey.d @@ -0,0 +1,16 @@ +Long: proxy-pinnedpubkey +Arg: +Help: FILE/HASHES public key to verify proxy with +Protocols: TLS +--- +Tells curl to use the specified public key file (or hashes) to verify the +proxy. This can be a path to a file which contains a single public key in PEM +or DER format, or any number of base64 encoded sha256 hashes preceded by +\'sha256//\' and separated by \';\' + +When negotiating a TLS or SSL connection, the server sends a certificate +indicating its identity. A public key is extracted from this certificate and +if it does not exactly match the public key provided to this option, curl will +abort the connection before sending or receiving any data. + +If this option is used several times, the last one will be used. diff --git a/docs/cmdline-opts/proxytunnel.d b/docs/cmdline-opts/proxytunnel.d index 09855ed..f2e8b80 100644 --- a/docs/cmdline-opts/proxytunnel.d +++ b/docs/cmdline-opts/proxytunnel.d @@ -8,3 +8,6 @@ to attempt to tunnel through the proxy instead of merely using it to do HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to. + +To suppress proxy CONNECT response headers when curl is set to output headers +use --suppress-connect-headers. diff --git a/docs/cmdline-opts/referer.d b/docs/cmdline-opts/referer.d index 1d45211..cd84e9d 100644 --- a/docs/cmdline-opts/referer.d +++ b/docs/cmdline-opts/referer.d @@ -2,7 +2,7 @@ Long: referer Short: e Arg: Protocols: HTTP -Help: Referer URL +Help: Referrer URL See-also: user-agent header --- Sends the "Referrer Page" information to the HTTP server. This can also be set diff --git a/docs/cmdline-opts/request-target.d b/docs/cmdline-opts/request-target.d new file mode 100644 index 0000000..b46b4af --- /dev/null +++ b/docs/cmdline-opts/request-target.d @@ -0,0 +1,9 @@ +Long: request-target +Help: Specify the target for this request +Protocols: HTTP +Added: 7.55.0 +--- +Tells curl to use an alternative "target" (path) instead of using the path as +provided in the URL. Particularly useful when wanting to issue HTTP requests +without leading slash or other data that doesn't follow the regular URL +pattern, like "OPTIONS *". diff --git a/docs/cmdline-opts/resolve.d b/docs/cmdline-opts/resolve.d index ba3967a..9e1457b 100644 --- a/docs/cmdline-opts/resolve.d +++ b/docs/cmdline-opts/resolve.d @@ -1,5 +1,5 @@ Long: resolve -Arg: +Arg: Help: Resolve the host+port to this address Added: 7.21.3 --- @@ -14,4 +14,8 @@ different ports. The provided address set by this option will be used even if --ipv4 or --ipv6 is set to make curl use another IP version. +Support for providing the IP address within [brackets] was added in 7.57.0. + +Support for providing multiple IP addresses per entry was added in 7.59.0. + This option can be used many times to add many host names to resolve. diff --git a/docs/cmdline-opts/socks5-basic.d b/docs/cmdline-opts/socks5-basic.d new file mode 100644 index 0000000..67d16b3 --- /dev/null +++ b/docs/cmdline-opts/socks5-basic.d @@ -0,0 +1,7 @@ +Long: socks5-basic +Help: Enable username/password auth for SOCKS5 proxies +Added: 7.55.0 +--- +Tells curl to use username/password authentication when connecting to a SOCKS5 +proxy. The username/password authentication is enabled by default. Use +--socks5-gssapi to force GSS-API authentication to SOCKS5 proxies. diff --git a/docs/cmdline-opts/socks5-gssapi.d b/docs/cmdline-opts/socks5-gssapi.d new file mode 100644 index 0000000..0070f37 --- /dev/null +++ b/docs/cmdline-opts/socks5-gssapi.d @@ -0,0 +1,8 @@ +Long: socks5-gssapi +Help: Enable GSS-API auth for SOCKS5 proxies +Added: 7.55.0 +--- +Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy. +The GSS-API authentication is enabled by default (if curl is compiled with +GSS-API support). Use --socks5-basic to force username/password authentication +to SOCKS5 proxies. diff --git a/docs/cmdline-opts/suppress-connect-headers.d b/docs/cmdline-opts/suppress-connect-headers.d new file mode 100644 index 0000000..d208b89 --- /dev/null +++ b/docs/cmdline-opts/suppress-connect-headers.d @@ -0,0 +1,8 @@ +Long: suppress-connect-headers +Help: Suppress proxy CONNECT response headers +See-also: dump-header include proxytunnel +--- +When --proxytunnel is used and a CONNECT request is made don't output proxy +CONNECT response headers. This option is meant to be used with --dump-header or +--include which are used to show protocol headers in the output. It has no +effect on debug options such as --verbose or --trace, or any statistics. diff --git a/docs/cmdline-opts/tcp-nodelay.d b/docs/cmdline-opts/tcp-nodelay.d index 0c0ddd0..f047a7c 100644 --- a/docs/cmdline-opts/tcp-nodelay.d +++ b/docs/cmdline-opts/tcp-nodelay.d @@ -5,5 +5,5 @@ Added: 7.11.2 Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for details about this option. -Since 7.50.2, curl sets this option by default and you need to explictitly +Since 7.50.2, curl sets this option by default and you need to explicitly switch it off if you don't want it on. diff --git a/docs/cmdline-opts/tls-max.d b/docs/cmdline-opts/tls-max.d new file mode 100644 index 0000000..7ae8622 --- /dev/null +++ b/docs/cmdline-opts/tls-max.d @@ -0,0 +1,24 @@ +Long: tls-max +Arg: +Tags: Versions +Protocols: SSL +Added: 7.54.0 +Requires: TLS +See-also: tlsv1.0 tlsv1.1 tlsv1.2 +Help: Use TLSv1.0 or greater +--- +VERSION defines maximum supported TLS version. A minimum is defined +by arguments tlsv1.0 or tlsv1.1 or tlsv1.2. + +.RS +.IP "default" +Use up to recommended TLS version. +.IP "1.0" +Use up to TLSv1.0. +.IP "1.1" +Use up to TLSv1.1. +.IP "1.2" +Use up to TLSv1.2. +.IP "1.3" +Use up to TLSv1.3. +.RE diff --git a/docs/cmdline-opts/tlsauthtype.d b/docs/cmdline-opts/tlsauthtype.d index 1b1481f..ede21c2 100644 --- a/docs/cmdline-opts/tlsauthtype.d +++ b/docs/cmdline-opts/tlsauthtype.d @@ -5,4 +5,6 @@ Added: 7.21.4 --- Set TLS authentication type. Currently, the only supported option is "SRP", for TLS-SRP (RFC 5054). If --tlsuser and --tlspassword are specified but ---tlsauthtype is not, then this option defaults to "SRP". +--tlsauthtype is not, then this option defaults to "SRP". This option works +only if the underlying libcurl is built with TLS-SRP support, which requires +OpenSSL or GnuTLS with TLS-SRP support. diff --git a/docs/cmdline-opts/tlsv1.3.d b/docs/cmdline-opts/tlsv1.3.d index 7d9640e..1235896 100644 --- a/docs/cmdline-opts/tlsv1.3.d +++ b/docs/cmdline-opts/tlsv1.3.d @@ -6,4 +6,5 @@ Added: 7.52.0 Forces curl to use TLS version 1.3 when connecting to a remote TLS server. Note that TLS 1.3 is only supported by a subset of TLS backends. At the time -of writing this, those are BoringSSL and NSS only. +of this writing, they are BoringSSL, NSS, and Secure Transport (on iOS 11 or +later, and macOS 10.13 or later). diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d index 03506c9..3747845 100644 --- a/docs/cmdline-opts/write-out.d +++ b/docs/cmdline-opts/write-out.d @@ -65,8 +65,9 @@ The result of the HTTPS proxy's SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.52.0) .TP .B redirect_url -When an HTTP request was made without -L to follow redirects, this variable -will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2) +When an HTTP request was made without --location to follow redirects (or when +--max-redir is met), this variable will show the actual URL a redirect +\fIwould\fP have gone to. (Added in 7.18.2) .TP .B remote_ip The remote IP address of the most recently done connection - can be either @@ -120,7 +121,7 @@ about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. .TP .B time_redirect -The time, in seconds, it took for all redirection steps include name lookup, +The time, in seconds, it took for all redirection steps including name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3) diff --git a/docs/curl-config.1 b/docs/curl-config.1 index 4c1e323..becb1ca 100644 --- a/docs/curl-config.1 +++ b/docs/curl-config.1 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl-config 1 "25 Oct 2007" "Curl 7.17.1" "curl-config manual" +.TH curl-config 1 "November 30, 2017" "Curl 7.59.0" "curl-config manual" + .SH NAME curl-config \- Get information about a libcurl installation .SH SYNOPSIS @@ -63,6 +64,10 @@ the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols will be listed using uppercase and are separated by newlines. There may be none, one, or several protocols in the list. (Added in 7.13.0) +.IP "--ssl-backends" +Lists the SSL backends that were enabled when libcurl was built. It might be +no, one or several names. If more than one name, they will appear +comma-separated. (Added in 7.58.0) .IP "--static-libs" Shows the complete set of libs and other linker options you will need in order to link your application with libcurl statically. (Added in 7.17.1) diff --git a/docs/curl.1 b/docs/curl.1 index 600853e..f2ce142 100644 --- a/docs/curl.1 +++ b/docs/curl.1 @@ -22,7 +22,8 @@ .\" .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator. .\" -.TH curl 1 "16 Dec 2016" "Curl 7.52.0" "Curl Manual" +.TH curl 1 "November 16, 2016" "Curl 7.59.0" "Curl Manual" + .SH NAME curl \- transfer a URL .SH SYNOPSIS @@ -173,7 +174,7 @@ previously set option that sets a different authentication method (such as Used together with \fI-u, --user\fP. See also \fI--proxy-basic\fP. -.IP "--cacert " +.IP "--cacert " (TLS) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format. Normally curl is built to use a default file for this, so this option @@ -261,16 +262,22 @@ specify valid ciphers. Read up on SSL cipher list details on this URL: https://curl.haxx.se/docs/ssl-ciphers.html If this option is used several times, the last one will be used. +.IP "--compressed-ssh" +(SCP SFTP) Enables built-in SSH compression. +This is a request, not an order; the server may or may not do it. + +Added in 7.56.0. .IP "--compressed" (HTTP) Request a compressed response using one of the algorithms curl supports, and save the uncompressed document. If this option is used and the server sends an unsupported encoding, curl will report an error. .IP "-K, --config " -Specify which config file to read curl arguments from. The config file is a -text file in which command line arguments can be written which then will be -used as if they were written on the actual command line. -Options and their parameters must be specified on the same config file line, +Specify a text file to read curl arguments from. The command line arguments +found in the text file will be used as if they were provided on the command +line. + +Options and their parameters must be specified on the same line in the file, separated by whitespace, colon, or the equals sign. Long option names can optionally be given in the config file without the initial double dashes and if so, the colon or equals characters can be used as separators. If the option @@ -292,9 +299,9 @@ line. So, it could look similar to this: url = "https://curl.haxx.se/docs/" -When curl is invoked, it always (unless \fI-q, --disable\fP is used) checks for a -default config file and uses it if found. The default config file is checked -for in the following places in this order: +When curl is invoked, it (unless \fI-q, --disable\fP is used) checks for a default +config file and uses it if found. The default config file is checked for in +the following places in this order: 1) curl tries to find the "home dir": It first checks for the CURL_HOME and then the HOME environment variables. Failing that, it uses getpwuid() on @@ -332,15 +339,18 @@ If this option is used several times, the last one will be used. See also \fI-m, --max-time\fP. .IP "--connect-to " -For a request to the given HOST:PORT pair, connect to -CONNECT-TO-HOST:CONNECT-TO-PORT instead. This option is suitable to direct -requests at a specific server, e.g. at a specific cluster node in a cluster of -servers. This option is only used to establish the network connection. It -does NOT affect the hostname/port that is used for TLS/SSL (e.g. SNI, -certificate verification) or for the application protocols. "host" and "port" -may be the empty string, meaning "any host/port". "connect-to-host" and -"connect-to-port" may also be the empty string, meaning "use the request's -original host/port". +For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead. +This option is suitable to direct requests at a specific server, e.g. at a +specific cluster node in a cluster of servers. This option is only used to +establish the network connection. It does NOT affect the hostname/port that is +used for TLS/SSL (e.g. SNI, certificate verification) or for the application +protocols. "HOST1" and "PORT1" may be the empty string, meaning "any +host/port". "HOST2" and "PORT2" may also be the empty string, meaning "use the +request's original host/port". + +A "host" specified to this option is compared as a string, so it needs to +match the name used in request URL. It can be either numerical such as +"127.0.0.1" or the full host name such as "example.org". This option can be used many times to add many connect rules. @@ -596,12 +606,6 @@ See also \fI--random-file\fP. (TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI--engine\fP list to print a list of build-time supported engines. Note that not all (or none) of the engines may be available at run-time. -.IP "--environment" -Sets a range of environment variables, using the names the \fI-w, --write-out\fP option -supports, to allow easier extraction of useful information after having run -curl. - -\fI--environment\fP requires that the underlying libcurl was built to support RISC OS. .IP "--expect100-timeout " (HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue response when curl emits an Expects: 100-continue header in its request. By @@ -610,7 +614,7 @@ curl stops waiting, it will continue as if the response has been received. See also \fI--connect-timeout\fP. Added in 7.47.0. .IP "--fail-early" -Fail and exit on first detected error. +Fail and exit on the first detected transfer error. When curl is used to do multiple transfers on the command line, it will attempt to operate on each given URL, one by one. By default, it will ignore @@ -618,12 +622,15 @@ errors if there are more URLs given and the last URL's success will determine the error code curl returns. So early failures will be "hidden" by subsequent successful transfers. -Using this option, curl will instead return an error on the first transfers -that fails, independent on the amount of more URLs that are given on the -command line. This way, no transfer failures go undetected by scripts and -similar. +Using this option, curl will instead return an error on the first transfer +that fails, independent of the amount of URLs that are given on the command +line. This way, no transfer failures go undetected by scripts and similar. -This option will apply for all given URLs even if you use \fI-:, --next\fP. +This option is global and does not need to be specified for each use of \fI-:, --next\fP. + +This option does not imply \fI-f, --fail\fP, which causes transfers to fail due to the +server's HTTP status code. You can combine the two options, however note \fI-f, --fail\fP +is not global and is therefore contained by \fI-:, --next\fP. Added in 7.52.0. .IP "-f, --fail" @@ -647,7 +654,7 @@ or later, or OS X 10.9 or later) backends. Added in 7.42.0. .IP "--form-string " -(HTTP) Similar to \fI-F, --form\fP except that the value string for the named parameter is used +(HTTP SMTP IMAP) Similar to \fI-F, --form\fP except that the value string for the named parameter is used literally. Leading \&'@' and \&'<' characters, and the \&';type=' string in the value have no special meaning. Use this in preference to \fI-F, --form\fP if there's any possibility that the string value may accidentally trigger the @@ -655,24 +662,42 @@ there's any possibility that the string value may accidentally trigger the See also \fI-F, --form\fP. .IP "-F, --form " -(HTTP) This lets curl emulate a filled-in form in which a user has pressed the submit -button. This causes curl to POST data using the Content-Type -multipart/form-data according to RFC 2388. This enables uploading of binary -files etc. To force the 'content' part to be a file, prefix the file name with -an @ sign. To just get the content part from a file, prefix the file name with -the symbol <. The difference between @ and < is then that @ makes a file get -attached in the post as a file upload, while the < makes a text field and just -get the contents for that text field from a file. - -Example: to send an image to a server, where \&'profile' is the name of the -form-field to which portrait.jpg will be the input: +(HTTP SMTP IMAP) For HTTP protocol family, this lets curl emulate a filled-in form in which a +user has pressed the submit button. This causes curl to POST data using the +Content-Type multipart/form-data according to RFC 2388. + +For SMTP and IMAP protocols, this is the mean to compose a multipart mail +message to transmit. + +This enables uploading of binary files etc. To force the 'content' part to be +a file, prefix the file name with an @ sign. To just get the content part from +a file, prefix the file name with the symbol <. The difference between @ and < +is then that @ makes a file get attached in the post as a file upload, while +the < makes a text field and just get the contents for that text field from a +file. + +Tell curl to read content from stdin instead of a file by using - as +filename. This goes for both @ and < constructs. When stdin is used, the +contents is buffered in memory first by curl to determine its size and allow a +possible resend. Defining a part's data from a named non-regular file (such +as a named pipe or similar) is unfortunately not subject to buffering and will +be effectively read at transmission time; since the full size is unknown +before the transfer starts, such data is sent as chunks by HTTP and rejected +by IMAP. + +Example: send an image to an HTTP server, where \&'profile' is the name of the +form-field to which the file portrait.jpg will be the input: curl -F profile=@portrait.jpg https://example.com/upload.cgi -To read content from stdin instead of a file, use - as the filename. This goes -for both @ and < constructs. Unfortunately it does not support reading the -file from a named pipe or similar, as it needs the full size before the -transfer starts. +Example: send a your name and shoe size in two text fields to the server: + + curl -F name=John -F shoesize=11 https://example.com/ + +Example: send a your essay in a text field to the server. Send it as a plain +text field, but get the contents for it from a local file: + + curl -F "story=HTML message;type=text/html' \\ +.br + -F '=)' -F '=@textfile.txt' ... smtp://example.com + +Data can be encoded for transfer using encoder=. Available encodings are +\fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding +Content-Transfer-Encoding header, \fI7bit\fP that only rejects 8-bit characters +with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes +data according to the corresponding schemes, limiting lines length to +76 characters. + +Example: send multipart mail with a quoted-printable text message and a +base64 attached file: + + curl -F '=text message;encoder=quoted-printable' \\ +.br + -F '=@localfile;encoder=base64' ... smtp://example.com + See further examples and details in the MANUAL. This option can be used multiple times. @@ -835,13 +926,27 @@ This option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the letters {}[] without having them being interpreted by curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard. +.IP "--happy-eyeballs-timeout-ms " +Happy eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6 +addresses for dual-stack hosts, preferring IPv6 first for the number of +milliseconds. If the IPv6 address cannot be connected to within that time then +a connection attempt is made to the IPv4 address in parallel. The first +connection to be established is the one that is used. + +The range of suggested useful values is limited. Happy Eyeballs RFC 6555 says +"It is RECOMMENDED that connection attempts be paced 150-250 ms apart to +balance human factors against network load." libcurl currently defaults to +200 ms. Firefox and Chrome currently default to 300 ms. + +If this option is used several times, the last one will be used. + +Added in 7.59.0. .IP "-I, --head" (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only. -.IP "-H, --header
" -(HTTP) -Extra header to include in the request when sending HTTP to a server. You may +.IP "-H, --header
" +(HTTP) Extra header to include in the request when sending HTTP to a server. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header will be used instead of the internal one. This allows @@ -857,6 +962,10 @@ end-of-line marker, you should thus \fBnot\fP add that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you. +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options. Starting in 7.37.0, you need \fI--proxy-header\fP to send custom headers intended @@ -909,18 +1018,26 @@ files larger than 2 gigabytes. For FTP (since 7.46.0), skip the RETR command to figure out the size before downloading a file. .IP "-i, --include" -Include the HTTP-header in the output. The HTTP-header includes things like -server-name, date of the document, HTTP-version and more... +Include the HTTP response headers in the output. The HTTP response headers can +include things like server name, cookies, date of the document, HTTP version +and more... + +To view the request headers, consider the \fI-v, --verbose\fP option. See also \fI-v, --verbose\fP. .IP "-k, --insecure" -(TLS) This option explicitly allows curl to perform "insecure" SSL connections and -transfers. All SSL connections are attempted to be made secure by using the CA -certificate bundle installed by default. This makes all connections considered -\&"insecure" fail unless \fI-k, --insecure\fP is used. +(TLS) +By default, every SSL connection curl makes is verified to be secure. This +option allows curl to proceed and operate even for server connections +otherwise considered insecure. + +The server connection is verified by making sure the server's certificate +contains the right name and verifies successfully using the cert store. See this online resource for further details: https://curl.haxx.se/docs/sslcerts.html + +See also \fI--proxy-insecure\fP and \fI--cacert\fP. .IP "--interface " Perform an operation using a specified interface. You can enter interface @@ -930,6 +1047,10 @@ name, IP address or host name. An example could look like: If this option is used several times, the last one will be used. +On Linux it can be used to specify a VRF, but the binary needs to either +have CAP_NET_RAW or to be ran as root. More information about Linux VRF: +https://www.kernel.org/doc/Documentation/networking/vrf.txt + See also \fI--dns-interface\fP. .IP "-4, --ipv4" This option tells curl to resolve names to IPv4 addresses only, and not for @@ -994,7 +1115,7 @@ your transfer not to use your entire bandwidth. To make it slower than it otherwise would be. The given speed is measured in bytes/second, unless a suffix is appended. -Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it +Appending 'k' or 'K' will count the number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. If you also use the \fI-Y, --speed-limit\fP option, that option will take precedence and @@ -1100,6 +1221,10 @@ Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63. +A size modifier may be used. For example, Appending 'k' or 'K' will count the +number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it +gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0) + \fBNOTE:\fP The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers. @@ -1160,7 +1285,7 @@ and password from the \fI-u, --user\fP option aren't actually used. If this option is used several times, only the first one is used. See also \fI--basic\fP and \fI--ntlm\fP and \fI--anyauth\fP and \fI--proxy-negotiate\fP. -.IP "--netrc-file " +.IP "--netrc-file " This option is similar to \fI-n, --netrc\fP, except that you provide the path (absolute or relative) to the netrc file that Curl should use. You can only specify one netrc file per invocation. If several \fI--netrc-file\fP options are provided, @@ -1218,7 +1343,7 @@ Using this option will disable that buffering. Note that this is the negated option name documented. You can thus use --buffer to enforce the buffering. .IP "--no-keepalive" -Disables the use of keepalive messages on the TCP connection. curl otherwis +Disables the use of keepalive messages on the TCP connection. curl otherwise enables them by default. Note that this is the negated option name documented. You can thus use @@ -1272,7 +1397,7 @@ If you want to enable NTLM for your proxy authentication, then use If this option is used several times, only the first one is used. See also \fI--proxy-ntlm\fP. \fI--ntlm\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI--basic\fP and \fI--negotiated\fP and \fI--digest\fP and \fI--anyauth\fP. -.IP "--oauth2-bearer" +.IP "--oauth2-bearer " (IMAP POP3 SMTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token is used in conjunction with the user name which can be specified as part of the \fI--url\fP or \fI-u, --user\fP options. @@ -1392,8 +1517,9 @@ standard, more informational, meter. This progress bar draws a single line of '#' characters across the screen and shows a percentage if the transfer size is known. For transfers without a -known size, it will instead output one '#' character for every 1024 bytes -transferred. +known size, there will be space ship (-=o=-) that moves back and forth but +only while data is being transferred, with a set of flying hash sign symbols on +top. .IP "--proto-default " Tells curl to use \fIprotocol\fP for any URL missing a scheme name. @@ -1505,7 +1631,7 @@ Tells curl to use HTTP Digest authentication when communicating with the given proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host. See also \fI-x, --proxy\fP and \fI--proxy-anyauth\fP and \fI--proxy-basic\fP. -.IP "--proxy-header
" +.IP "--proxy-header
" (HTTP) Extra header to include in the request when sending HTTP to a proxy. You may specify any number of extra headers. This is the equivalent option to \fI-H, --header\fP but is for proxy communication only like in CONNECT requests when you want a @@ -1519,6 +1645,10 @@ up for you. Headers specified with this option will not be included in requests that curl knows will not be sent to a proxy. +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + This option can be used multiple times to add/replace/remove multiple headers. Added in 7.37.0. @@ -1547,6 +1677,18 @@ See also \fI--proxy-negotiate\fP and \fI--proxy-anyauth\fP. Same as \fI--pass\fP but used in HTTPS proxy context. Added in 7.52.0. +.IP "--proxy-pinnedpubkey " +(TLS) Tells curl to use the specified public key file (or hashes) to verify the +proxy. This can be a path to a file which contains a single public key in PEM +or DER format, or any number of base64 encoded sha256 hashes preceded by +\'sha256//\' and separated by \';\' + +When negotiating a TLS or SSL connection, the server sends a certificate +indicating its identity. A public key is extracted from this certificate and +if it does not exactly match the public key provided to this option, curl will +abort the connection before sending or receiving any data. + +If this option is used several times, the last one will be used. .IP "--proxy-service-name " This option allows you to change the service name for proxy negotiation. @@ -1628,6 +1770,9 @@ HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to. +To suppress proxy CONNECT response headers when curl is set to output headers +use \fI--suppress-connect-headers\fP. + See also \fI-x, --proxy\fP. .IP "--pubkey " (SFTP SCP) Public key file name. Allows you to provide your public key in this separate @@ -1795,6 +1940,13 @@ You may use this option as many times as the number of URLs you have. When used, this will make curl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp. +.IP "--request-target" +(HTTP) Tells curl to use an alternative "target" (path) instead of using the path as +provided in the URL. Particularly useful when wanting to issue HTTP requests +without leading slash or other data that doesn't follow the regular URL +pattern, like "OPTIONS *". + +Added in 7.55.0. .IP "-X, --request " (HTTP) Specifies a custom request method to use when communicating with the HTTP server. The specified request method will be used instead of the method @@ -1830,7 +1982,7 @@ Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0) Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0) If this option is used several times, the last one will be used. -.IP "--resolve " +.IP "--resolve " Provide a custom address for a specific host and port pair. Using this, you can make the curl requests(s) use a specified address and prevent the otherwise normally resolved address to be used. Consider it a sort of @@ -1842,6 +1994,10 @@ different ports. The provided address set by this option will be used even if \fI-4, --ipv4\fP or \fI-6, --ipv6\fP is set to make curl use another IP version. +Support for providing the IP address within [brackets] was added in 7.57.0. + +Support for providing multiple IP addresses per entry was added in 7.59.0. + This option can be used many times to add many host names to resolve. Added in 7.21.3. @@ -1940,6 +2096,12 @@ the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. If this option is used several times, the last one will be used. Added in 7.18.0. +.IP "--socks5-basic" +Tells curl to use username/password authentication when connecting to a SOCKS5 +proxy. The username/password authentication is enabled by default. Use +\fI--socks5-gssapi\fP to force GSS-API authentication to SOCKS5 proxies. + +Added in 7.55.0. .IP "--socks5-gssapi-nec" As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961 says in section 4.3/4.4 it should be protected, but the NEC reference @@ -1957,6 +2119,13 @@ would use sockd/real-name for cases where the proxy-name does not match the principal name. Added in 7.19.4. +.IP "--socks5-gssapi" +Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy. +The GSS-API authentication is enabled by default (if curl is compiled with +GSS-API support). Use \fI--socks5-basic\fP to force username/password authentication +to SOCKS5 proxies. + +Added in 7.55.0. .IP "--socks5-hostname " Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If the port number is not specified, it is assumed at port 1080. @@ -2058,6 +2227,13 @@ is a plain '-', it is instead written to stdout. If this option is used several times, the last one will be used. See also \fI-v, --verbose\fP and \fI-s, --silent\fP. +.IP "--suppress-connect-headers" +When \fI-p, --proxytunnel\fP is used and a CONNECT request is made don't output proxy +CONNECT response headers. This option is meant to be used with \fI-D, --dump-header\fP or +\fI-i, --include\fP which are used to show protocol headers in the output. It has no +effect on debug options such as \fI-v, --verbose\fP or \fI--trace\fP, or any statistics. + +See also \fI-D, --dump-header\fP and \fI-i, --include\fP and \fI-p, --proxytunnel\fP. .IP "--tcp-fastopen" Enable use of TCP Fast Open (RFC7413). @@ -2066,7 +2242,7 @@ Added in 7.49.0. Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for details about this option. -Since 7.50.2, curl sets this option by default and you need to explictitly +Since 7.50.2, curl sets this option by default and you need to explicitly switch it off if you don't want it on. Added in 7.11.2. @@ -2106,10 +2282,30 @@ that is older than the given date/time, default is a document that is newer than the specified date/time. If this option is used several times, the last one will be used. +.IP "--tls-max " +(SSL) VERSION defines maximum supported TLS version. A minimum is defined +by arguments tlsv1.0 or tlsv1.1 or tlsv1.2. + +.RS +.IP "default" +Use up to recommended TLS version. +.IP "1.0" +Use up to TLSv1.0. +.IP "1.1" +Use up to TLSv1.1. +.IP "1.2" +Use up to TLSv1.2. +.IP "1.3" +Use up to TLSv1.3. +.RE + +See also \fI--tlsv1.0\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP. \fI--tls-max\fP requires that the underlying libcurl was built to support TLS. Added in 7.54.0. .IP "--tlsauthtype " Set TLS authentication type. Currently, the only supported option is "SRP", for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are specified but -\fI--tlsauthtype\fP is not, then this option defaults to "SRP". +\fI--tlsauthtype\fP is not, then this option defaults to "SRP". This option works +only if the underlying libcurl is built with TLS-SRP support, which requires +OpenSSL or GnuTLS with TLS-SRP support. Added in 7.21.4. .IP "--tlspassword" @@ -2138,7 +2334,8 @@ Added in 7.34.0. (TLS) Forces curl to use TLS version 1.3 when connecting to a remote TLS server. Note that TLS 1.3 is only supported by a subset of TLS backends. At the time -of writing this, those are BoringSSL and NSS only. +of this writing, they are BoringSSL, NSS, and Secure Transport (on iOS 11 or +later, and macOS 10.13 or later). Added in 7.52.0. .IP "-1, --tlsv1" @@ -2395,8 +2592,9 @@ The result of the HTTPS proxy's SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.52.0) .TP .B redirect_url -When an HTTP request was made without -L to follow redirects, this variable -will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2) +When an HTTP request was made without \fI-L, --location\fP to follow redirects (or when +--max-redir is met), this variable will show the actual URL a redirect +\fIwould\fP have gone to. (Added in 7.18.2) .TP .B remote_ip The remote IP address of the most recently done connection - can be either @@ -2450,7 +2648,7 @@ about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. .TP .B time_redirect -The time, in seconds, it took for all redirection steps include name lookup, +The time, in seconds, it took for all redirection steps including name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3) @@ -2501,14 +2699,17 @@ Sets the proxy server to use if no protocol-specific proxy is set. list of host names that shouldn't go through any proxy. If set to a asterisk \&'*' only, it matches all hosts. -Since 7.53.0, this environment variable disable the proxy even if specify -\fI-x, --proxy\fP option. That is +This environment variable disables use of the proxy even when specified with +the \fI-x, --proxy\fP option. That is .B NO_PROXY=direct.example.com curl -x http://proxy.example.com .B http://direct.example.com accesses the target URL directly, and .B NO_PROXY=direct.example.com curl -x http://proxy.example.com .B http://somewhere.example.com -accesses the target URL through proxy. +accesses the target URL through the proxy. + +The list of host names can also be include numerical IP addresses, and IPv6 +versions should then be given without enclosing brackets. .SH "PROXY PROTOCOL PREFIXES" Since curl version 7.21.7, the proxy string may be specified with a @@ -2518,6 +2719,10 @@ If no protocol is specified in the proxy string or if the string doesn't match a supported one, the proxy will be treated as an HTTP proxy. The supported proxy protocol prefixes are as follows: +.IP "http://" +Makes it use it as a HTTP proxy. The default if no scheme prefix is used. +.IP "https://" +Makes it treated as a \fBHTTPS\fP proxy. .IP "socks4://" Makes it the equivalent of \fI--socks4\fP .IP "socks4a://" @@ -2708,6 +2913,10 @@ FTP chunk callback reported error No connection available, the session will be queued .IP 90 SSL public key does not matched pinned public key +.IP 91 +Invalid SSL certificate status. +.IP 92 +Stream error in HTTP/2 framing layer. .IP XX More error codes will appear here in future releases. The existing ones are meant to never change. diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c index 4555291..1da0ee2 100644 --- a/docs/examples/10-at-a-time.c +++ b/docs/examples/10-at-a-time.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -114,7 +114,7 @@ int main(void) CURLM *cm; CURLMsg *msg; long L; - unsigned int C=0; + unsigned int C = 0; int M, Q, U = -1; fd_set R, W, E; struct timeval T; @@ -162,9 +162,9 @@ int main(void) T.tv_sec = L/1000; T.tv_usec = (L%1000)*1000; - if(0 > select(M+1, &R, &W, &E, &T)) { + if(0 > select(M + 1, &R, &W, &E, &T)) { fprintf(stderr, "E: select(%i,,,,%li): %i: %s\n", - M+1, L, errno, strerror(errno)); + M + 1, L, errno, strerror(errno)); return EXIT_FAILURE; } } diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am index 7a56f34..e5ed222 100644 --- a/docs/examples/Makefile.am +++ b/docs/examples/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -30,13 +30,9 @@ EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \ # being currently built and tested are searched before the library which # might possibly already be installed in the system. # -# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h -# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h # $(top_srcdir)/include is for libcurl's external include files -AM_CPPFLAGS = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include LIBDIR = $(top_builddir)/lib @@ -57,6 +53,9 @@ else LDADD = $(LIBDIR)/libcurl.la endif +# This might hold -Werror +CFLAGS += @CURL_CFLAG_EXTRAS@ + # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines include Makefile.inc diff --git a/docs/examples/Makefile.in b/docs/examples/Makefile.in index 91189d7..35544d2 100644 --- a/docs/examples/Makefile.in +++ b/docs/examples/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -43,7 +43,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -144,24 +144,29 @@ check_PROGRAMS = 10-at-a-time$(EXEEXT) anyauthput$(EXEEXT) \ simple$(EXEEXT) simplepost$(EXEEXT) simplessl$(EXEEXT) \ sendrecv$(EXEEXT) httpcustomheader$(EXEEXT) certinfo$(EXEEXT) \ chkspeed$(EXEEXT) ftpgetinfo$(EXEEXT) ftp-wildcard$(EXEEXT) \ - smtp-mail$(EXEEXT) smtp-multi$(EXEEXT) smtp-ssl$(EXEEXT) \ - smtp-tls$(EXEEXT) smtp-vrfy$(EXEEXT) smtp-expn$(EXEEXT) \ - rtsp$(EXEEXT) externalsocket$(EXEEXT) resolve$(EXEEXT) \ - progressfunc$(EXEEXT) pop3-retr$(EXEEXT) pop3-list$(EXEEXT) \ - pop3-uidl$(EXEEXT) pop3-dele$(EXEEXT) pop3-top$(EXEEXT) \ - pop3-stat$(EXEEXT) pop3-noop$(EXEEXT) pop3-ssl$(EXEEXT) \ - pop3-tls$(EXEEXT) pop3-multi$(EXEEXT) imap-list$(EXEEXT) \ - imap-lsub$(EXEEXT) imap-fetch$(EXEEXT) imap-store$(EXEEXT) \ - imap-append$(EXEEXT) imap-examine$(EXEEXT) \ + smtp-mail$(EXEEXT) smtp-mime$(EXEEXT) smtp-multi$(EXEEXT) \ + smtp-ssl$(EXEEXT) smtp-tls$(EXEEXT) smtp-vrfy$(EXEEXT) \ + smtp-expn$(EXEEXT) rtsp$(EXEEXT) externalsocket$(EXEEXT) \ + resolve$(EXEEXT) progressfunc$(EXEEXT) pop3-retr$(EXEEXT) \ + pop3-list$(EXEEXT) pop3-uidl$(EXEEXT) pop3-dele$(EXEEXT) \ + pop3-top$(EXEEXT) pop3-stat$(EXEEXT) pop3-noop$(EXEEXT) \ + pop3-ssl$(EXEEXT) pop3-tls$(EXEEXT) pop3-multi$(EXEEXT) \ + imap-list$(EXEEXT) imap-lsub$(EXEEXT) imap-fetch$(EXEEXT) \ + imap-store$(EXEEXT) imap-append$(EXEEXT) imap-examine$(EXEEXT) \ imap-search$(EXEEXT) imap-create$(EXEEXT) imap-delete$(EXEEXT) \ imap-copy$(EXEEXT) imap-noop$(EXEEXT) imap-ssl$(EXEEXT) \ imap-tls$(EXEEXT) imap-multi$(EXEEXT) url2file$(EXEEXT) \ sftpget$(EXEEXT) ftpsget$(EXEEXT) postinmemory$(EXEEXT) \ http2-download$(EXEEXT) http2-upload$(EXEEXT) \ - http2-serverpush$(EXEEXT) getredirect$(EXEEXT) + http2-serverpush$(EXEEXT) getredirect$(EXEEXT) \ + ftpuploadfrommem$(EXEEXT) ftpuploadresume$(EXEEXT) \ + sslbackend$(EXEEXT) postit2-formadd$(EXEEXT) \ + multi-formadd$(EXEEXT) shared-connection-cache$(EXEEXT) \ + sftpuploadresume$(EXEEXT) subdir = docs/examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -182,8 +187,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 10_at_a_time_SOURCES = 10-at-a-time.c @@ -293,6 +297,20 @@ ftpupload_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@ftpupload_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +ftpuploadfrommem_SOURCES = ftpuploadfrommem.c +ftpuploadfrommem_OBJECTS = ftpuploadfrommem.$(OBJEXT) +ftpuploadfrommem_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@ftpuploadfrommem_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@ftpuploadfrommem_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +ftpuploadresume_SOURCES = ftpuploadresume.c +ftpuploadresume_OBJECTS = ftpuploadresume.$(OBJEXT) +ftpuploadresume_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@ftpuploadresume_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@ftpuploadresume_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la getinfo_SOURCES = getinfo.c getinfo_OBJECTS = getinfo.$(OBJEXT) getinfo_LDADD = $(LDADD) @@ -481,6 +499,13 @@ multi_double_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@multi_double_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +multi_formadd_SOURCES = multi-formadd.c +multi_formadd_OBJECTS = multi-formadd.$(OBJEXT) +multi_formadd_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@multi_formadd_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@multi_formadd_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la multi_post_SOURCES = multi-post.c multi_post_OBJECTS = multi-post.$(OBJEXT) multi_post_LDADD = $(LDADD) @@ -593,6 +618,13 @@ postit2_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@postit2_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +postit2_formadd_SOURCES = postit2-formadd.c +postit2_formadd_OBJECTS = postit2-formadd.$(OBJEXT) +postit2_formadd_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@postit2_formadd_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@postit2_formadd_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la progressfunc_SOURCES = progressfunc.c progressfunc_OBJECTS = progressfunc.$(OBJEXT) progressfunc_LDADD = $(LDADD) @@ -633,6 +665,20 @@ sftpget_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@sftpget_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +sftpuploadresume_SOURCES = sftpuploadresume.c +sftpuploadresume_OBJECTS = sftpuploadresume.$(OBJEXT) +sftpuploadresume_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@sftpuploadresume_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@sftpuploadresume_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +shared_connection_cache_SOURCES = shared-connection-cache.c +shared_connection_cache_OBJECTS = shared-connection-cache.$(OBJEXT) +shared_connection_cache_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@shared_connection_cache_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@shared_connection_cache_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la simple_SOURCES = simple.c simple_OBJECTS = simple.$(OBJEXT) simple_LDADD = $(LDADD) @@ -668,6 +714,13 @@ smtp_mail_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@smtp_mail_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +smtp_mime_SOURCES = smtp-mime.c +smtp_mime_OBJECTS = smtp-mime.$(OBJEXT) +smtp_mime_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_mime_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_mime_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la smtp_multi_SOURCES = smtp-multi.c smtp_multi_OBJECTS = smtp-multi.$(OBJEXT) smtp_multi_LDADD = $(LDADD) @@ -696,6 +749,13 @@ smtp_vrfy_LDADD = $(LDADD) @USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la @USE_EXPLICIT_LIB_DEPS_TRUE@smtp_vrfy_DEPENDENCIES = \ @USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la +sslbackend_SOURCES = sslbackend.c +sslbackend_OBJECTS = sslbackend.$(OBJEXT) +sslbackend_LDADD = $(LDADD) +@USE_EXPLICIT_LIB_DEPS_FALSE@sslbackend_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@sslbackend_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la url2file_SOURCES = url2file.c url2file_OBJECTS = url2file.$(OBJEXT) url2file_LDADD = $(LDADD) @@ -740,37 +800,43 @@ am__v_CCLD_1 = SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \ cookie_interface.c debug.c externalsocket.c fileupload.c \ fopen.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c \ - ftpsget.c ftpupload.c getinfo.c getinmemory.c getredirect.c \ - http-post.c http2-download.c http2-serverpush.c http2-upload.c \ + ftpsget.c ftpupload.c ftpuploadfrommem.c ftpuploadresume.c \ + getinfo.c getinmemory.c getredirect.c http-post.c \ + http2-download.c http2-serverpush.c http2-upload.c \ httpcustomheader.c httpput.c https.c imap-append.c imap-copy.c \ imap-create.c imap-delete.c imap-examine.c imap-fetch.c \ imap-list.c imap-lsub.c imap-multi.c imap-noop.c imap-search.c \ imap-ssl.c imap-store.c imap-tls.c multi-app.c \ - multi-debugcallback.c multi-double.c multi-post.c \ - multi-single.c persistant.c pop3-dele.c pop3-list.c \ - pop3-multi.c pop3-noop.c pop3-retr.c pop3-ssl.c pop3-stat.c \ - pop3-tls.c pop3-top.c pop3-uidl.c post-callback.c \ - postinmemory.c postit2.c progressfunc.c resolve.c rtsp.c \ - sendrecv.c sepheaders.c sftpget.c simple.c simplepost.c \ - simplessl.c smtp-expn.c smtp-mail.c smtp-multi.c smtp-ssl.c \ - smtp-tls.c smtp-vrfy.c url2file.c + multi-debugcallback.c multi-double.c multi-formadd.c \ + multi-post.c multi-single.c persistant.c pop3-dele.c \ + pop3-list.c pop3-multi.c pop3-noop.c pop3-retr.c pop3-ssl.c \ + pop3-stat.c pop3-tls.c pop3-top.c pop3-uidl.c post-callback.c \ + postinmemory.c postit2.c postit2-formadd.c progressfunc.c \ + resolve.c rtsp.c sendrecv.c sepheaders.c sftpget.c \ + sftpuploadresume.c shared-connection-cache.c simple.c \ + simplepost.c simplessl.c smtp-expn.c smtp-mail.c smtp-mime.c \ + smtp-multi.c smtp-ssl.c smtp-tls.c smtp-vrfy.c sslbackend.c \ + url2file.c DIST_SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \ cookie_interface.c debug.c externalsocket.c fileupload.c \ fopen.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c \ - ftpsget.c ftpupload.c getinfo.c getinmemory.c getredirect.c \ - http-post.c http2-download.c http2-serverpush.c http2-upload.c \ + ftpsget.c ftpupload.c ftpuploadfrommem.c ftpuploadresume.c \ + getinfo.c getinmemory.c getredirect.c http-post.c \ + http2-download.c http2-serverpush.c http2-upload.c \ httpcustomheader.c httpput.c https.c imap-append.c imap-copy.c \ imap-create.c imap-delete.c imap-examine.c imap-fetch.c \ imap-list.c imap-lsub.c imap-multi.c imap-noop.c imap-search.c \ imap-ssl.c imap-store.c imap-tls.c multi-app.c \ - multi-debugcallback.c multi-double.c multi-post.c \ - multi-single.c persistant.c pop3-dele.c pop3-list.c \ - pop3-multi.c pop3-noop.c pop3-retr.c pop3-ssl.c pop3-stat.c \ - pop3-tls.c pop3-top.c pop3-uidl.c post-callback.c \ - postinmemory.c postit2.c progressfunc.c resolve.c rtsp.c \ - sendrecv.c sepheaders.c sftpget.c simple.c simplepost.c \ - simplessl.c smtp-expn.c smtp-mail.c smtp-multi.c smtp-ssl.c \ - smtp-tls.c smtp-vrfy.c url2file.c + multi-debugcallback.c multi-double.c multi-formadd.c \ + multi-post.c multi-single.c persistant.c pop3-dele.c \ + pop3-list.c pop3-multi.c pop3-noop.c pop3-retr.c pop3-ssl.c \ + pop3-stat.c pop3-tls.c pop3-top.c pop3-uidl.c post-callback.c \ + postinmemory.c postit2.c postit2-formadd.c progressfunc.c \ + resolve.c rtsp.c sendrecv.c sepheaders.c sftpget.c \ + sftpuploadresume.c shared-connection-cache.c simple.c \ + simplepost.c simplessl.c smtp-expn.c smtp-mail.c smtp-mime.c \ + smtp-multi.c smtp-ssl.c smtp-tls.c smtp-vrfy.c sslbackend.c \ + url2file.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -810,8 +876,16 @@ AWK = @AWK@ BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ + +# This might hold -Werror +CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -837,7 +911,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -851,7 +927,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -863,6 +942,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -910,6 +990,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -922,6 +1003,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -1000,13 +1082,10 @@ EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \ # being currently built and tested are searched before the library which # might possibly already be installed in the system. # -# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h -# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h # $(top_srcdir)/include is for libcurl's external include files # Avoid libcurl obsolete stuff -AM_CPPFLAGS = -I$(top_builddir)/include/curl -I$(top_builddir)/include \ - -I$(top_srcdir)/include -DCURL_NO_OLDIES $(am__append_1) +AM_CPPFLAGS = -I$(top_srcdir)/include -DCURL_NO_OLDIES $(am__append_1) LIBDIR = $(top_builddir)/lib @USE_EXPLICIT_LIB_DEPS_FALSE@LDADD = $(LIBDIR)/libcurl.la @@ -1015,11 +1094,12 @@ LIBDIR = $(top_builddir)/lib # These examples require external dependencies that may not be commonly # available on POSIX systems, so don't bother attempting to compile them here. -COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \ - ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \ - opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ - smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ - multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c +COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \ + ghiper.c hiperfifo.c htmltidy.c multithread.c opensslthreadlock.c \ + sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ + smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ + multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c \ + threaded-shared-conn.c all: all-am @@ -1125,6 +1205,14 @@ ftpupload$(EXEEXT): $(ftpupload_OBJECTS) $(ftpupload_DEPENDENCIES) $(EXTRA_ftpup @rm -f ftpupload$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ftpupload_OBJECTS) $(ftpupload_LDADD) $(LIBS) +ftpuploadfrommem$(EXEEXT): $(ftpuploadfrommem_OBJECTS) $(ftpuploadfrommem_DEPENDENCIES) $(EXTRA_ftpuploadfrommem_DEPENDENCIES) + @rm -f ftpuploadfrommem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftpuploadfrommem_OBJECTS) $(ftpuploadfrommem_LDADD) $(LIBS) + +ftpuploadresume$(EXEEXT): $(ftpuploadresume_OBJECTS) $(ftpuploadresume_DEPENDENCIES) $(EXTRA_ftpuploadresume_DEPENDENCIES) + @rm -f ftpuploadresume$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftpuploadresume_OBJECTS) $(ftpuploadresume_LDADD) $(LIBS) + getinfo$(EXEEXT): $(getinfo_OBJECTS) $(getinfo_DEPENDENCIES) $(EXTRA_getinfo_DEPENDENCIES) @rm -f getinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(getinfo_OBJECTS) $(getinfo_LDADD) $(LIBS) @@ -1233,6 +1321,10 @@ multi-double$(EXEEXT): $(multi_double_OBJECTS) $(multi_double_DEPENDENCIES) $(EX @rm -f multi-double$(EXEEXT) $(AM_V_CCLD)$(LINK) $(multi_double_OBJECTS) $(multi_double_LDADD) $(LIBS) +multi-formadd$(EXEEXT): $(multi_formadd_OBJECTS) $(multi_formadd_DEPENDENCIES) $(EXTRA_multi_formadd_DEPENDENCIES) + @rm -f multi-formadd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(multi_formadd_OBJECTS) $(multi_formadd_LDADD) $(LIBS) + multi-post$(EXEEXT): $(multi_post_OBJECTS) $(multi_post_DEPENDENCIES) $(EXTRA_multi_post_DEPENDENCIES) @rm -f multi-post$(EXEEXT) $(AM_V_CCLD)$(LINK) $(multi_post_OBJECTS) $(multi_post_LDADD) $(LIBS) @@ -1297,6 +1389,10 @@ postit2$(EXEEXT): $(postit2_OBJECTS) $(postit2_DEPENDENCIES) $(EXTRA_postit2_DEP @rm -f postit2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(postit2_OBJECTS) $(postit2_LDADD) $(LIBS) +postit2-formadd$(EXEEXT): $(postit2_formadd_OBJECTS) $(postit2_formadd_DEPENDENCIES) $(EXTRA_postit2_formadd_DEPENDENCIES) + @rm -f postit2-formadd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(postit2_formadd_OBJECTS) $(postit2_formadd_LDADD) $(LIBS) + progressfunc$(EXEEXT): $(progressfunc_OBJECTS) $(progressfunc_DEPENDENCIES) $(EXTRA_progressfunc_DEPENDENCIES) @rm -f progressfunc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(progressfunc_OBJECTS) $(progressfunc_LDADD) $(LIBS) @@ -1321,6 +1417,14 @@ sftpget$(EXEEXT): $(sftpget_OBJECTS) $(sftpget_DEPENDENCIES) $(EXTRA_sftpget_DEP @rm -f sftpget$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sftpget_OBJECTS) $(sftpget_LDADD) $(LIBS) +sftpuploadresume$(EXEEXT): $(sftpuploadresume_OBJECTS) $(sftpuploadresume_DEPENDENCIES) $(EXTRA_sftpuploadresume_DEPENDENCIES) + @rm -f sftpuploadresume$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sftpuploadresume_OBJECTS) $(sftpuploadresume_LDADD) $(LIBS) + +shared-connection-cache$(EXEEXT): $(shared_connection_cache_OBJECTS) $(shared_connection_cache_DEPENDENCIES) $(EXTRA_shared_connection_cache_DEPENDENCIES) + @rm -f shared-connection-cache$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shared_connection_cache_OBJECTS) $(shared_connection_cache_LDADD) $(LIBS) + simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES) $(EXTRA_simple_DEPENDENCIES) @rm -f simple$(EXEEXT) $(AM_V_CCLD)$(LINK) $(simple_OBJECTS) $(simple_LDADD) $(LIBS) @@ -1341,6 +1445,10 @@ smtp-mail$(EXEEXT): $(smtp_mail_OBJECTS) $(smtp_mail_DEPENDENCIES) $(EXTRA_smtp_ @rm -f smtp-mail$(EXEEXT) $(AM_V_CCLD)$(LINK) $(smtp_mail_OBJECTS) $(smtp_mail_LDADD) $(LIBS) +smtp-mime$(EXEEXT): $(smtp_mime_OBJECTS) $(smtp_mime_DEPENDENCIES) $(EXTRA_smtp_mime_DEPENDENCIES) + @rm -f smtp-mime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(smtp_mime_OBJECTS) $(smtp_mime_LDADD) $(LIBS) + smtp-multi$(EXEEXT): $(smtp_multi_OBJECTS) $(smtp_multi_DEPENDENCIES) $(EXTRA_smtp_multi_DEPENDENCIES) @rm -f smtp-multi$(EXEEXT) $(AM_V_CCLD)$(LINK) $(smtp_multi_OBJECTS) $(smtp_multi_LDADD) $(LIBS) @@ -1357,6 +1465,10 @@ smtp-vrfy$(EXEEXT): $(smtp_vrfy_OBJECTS) $(smtp_vrfy_DEPENDENCIES) $(EXTRA_smtp_ @rm -f smtp-vrfy$(EXEEXT) $(AM_V_CCLD)$(LINK) $(smtp_vrfy_OBJECTS) $(smtp_vrfy_LDADD) $(LIBS) +sslbackend$(EXEEXT): $(sslbackend_OBJECTS) $(sslbackend_DEPENDENCIES) $(EXTRA_sslbackend_DEPENDENCIES) + @rm -f sslbackend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sslbackend_OBJECTS) $(sslbackend_LDADD) $(LIBS) + url2file$(EXEEXT): $(url2file_OBJECTS) $(url2file_DEPENDENCIES) $(EXTRA_url2file_DEPENDENCIES) @rm -f url2file$(EXEEXT) $(AM_V_CCLD)$(LINK) $(url2file_OBJECTS) $(url2file_LDADD) $(LIBS) @@ -1382,6 +1494,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetresp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpsget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpupload.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpuploadfrommem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpuploadresume.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinmemory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getredirect.Po@am__quote@ @@ -1409,6 +1523,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-app.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-debugcallback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-double.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-formadd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-post.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-single.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/persistant.Po@am__quote@ @@ -1424,6 +1539,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-uidl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/post-callback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postinmemory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postit2-formadd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postit2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progressfunc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve.Po@am__quote@ @@ -1431,15 +1547,19 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendrecv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sepheaders.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpget.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpuploadresume.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shared-connection-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplepost.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplessl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-expn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-mail.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-mime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-multi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-ssl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-tls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-vrfy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sslbackend.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url2file.Po@am__quote@ .c.o: diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc index 8ce6f57..e8aa9fa 100644 --- a/docs/examples/Makefile.inc +++ b/docs/examples/Makefile.inc @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -26,18 +26,21 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \ https multi-app multi-debugcallback multi-double multi-post multi-single \ persistant post-callback postit2 sepheaders simple simplepost simplessl \ sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \ - smtp-mail smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn rtsp \ - externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl \ + smtp-mail smtp-mime smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn \ + rtsp externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl \ pop3-dele pop3-top pop3-stat pop3-noop pop3-ssl pop3-tls pop3-multi \ imap-list imap-lsub imap-fetch imap-store imap-append imap-examine \ imap-search imap-create imap-delete imap-copy imap-noop imap-ssl \ imap-tls imap-multi url2file sftpget ftpsget postinmemory http2-download \ - http2-upload http2-serverpush getredirect + http2-upload http2-serverpush getredirect ftpuploadfrommem \ + ftpuploadresume sslbackend postit2-formadd multi-formadd \ + shared-connection-cache sftpuploadresume # These examples require external dependencies that may not be commonly # available on POSIX systems, so don't bother attempting to compile them here. -COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \ - ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \ - opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ - smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ - multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c +COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \ + ghiper.c hiperfifo.c htmltidy.c multithread.c opensslthreadlock.c \ + sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ + smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \ + multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c \ + threaded-shared-conn.c diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32 index e75b6d1..5fbc5d6 100644 --- a/docs/examples/Makefile.m32 +++ b/docs/examples/Makefile.m32 @@ -84,7 +84,7 @@ endif endif CC = $(CROSSPREFIX)gcc -CFLAGS = -g -O2 -Wall +CFLAGS = -g -O2 -Wall -W CFLAGS += -fno-strict-aliasing ifeq ($(ARCH),w64) CFLAGS += -m64 -D_AMD64_ diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware index 9fe9db4..e75d143 100644 --- a/docs/examples/Makefile.netware +++ b/docs/examples/Makefile.netware @@ -64,7 +64,7 @@ DESCR = curl ($(LIBARCH)) MTSAFE = YES STACK = 8192 SCREEN = Example Program -# Comment the line below if you dont want to load protected automatically. +# Comment the line below if you don't want to load protected automatically. # LDRING = 3 # Uncomment the next line to enable linking with POSIX semantics. @@ -136,7 +136,7 @@ endif CFLAGS += -align 4 else # PRELUDE = $(NDK_CLIB)/imports/clibpre.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # to avoid the __init_* / __deinit_* whoes don't use prelude from NDK PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" CFLAGS += -align 1 @@ -159,7 +159,7 @@ else endif else # PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # to avoid the __init_* / __deinit_* whoes don't use prelude from NDK # http://www.gknw.net/development/mk_nlm/gcc_pre.zip PRELUDE = $(NDK_ROOT)/pre/prelude.o CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index 1c9f965..eb91d99 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -29,41 +29,17 @@ #ifdef WIN32 # include #else -# ifdef __VMS - typedef int intptr_t; -# endif -# if !defined(_AIX) && !defined(__sgi) && !defined(__osf__) -# include -# endif # include #endif #include #include -#ifdef _MSC_VER -# ifdef _WIN64 - typedef __int64 intptr_t; -# else - typedef int intptr_t; -# endif -#endif - #include #if LIBCURL_VERSION_NUM < 0x070c03 #error "upgrade your libcurl to no less than 7.12.3" #endif -#ifndef TRUE -#define TRUE 1 -#endif - -#if defined(_AIX) || defined(__sgi) || defined(__osf__) -#ifndef intptr_t -#define intptr_t long -#endif -#endif - /* * This example shows a HTTP PUT operation with authentiction using "any" * type. It PUTs a file given as a command line argument to the URL also given @@ -130,7 +106,7 @@ int main(int argc, char **argv) if(argc < 3) return 1; - file= argv[1]; + file = argv[1]; url = argv[2]; /* get the file size of the local file */ diff --git a/docs/examples/asiohiper.cpp b/docs/examples/asiohiper.cpp index ced4ef4..9e0554f 100644 --- a/docs/examples/asiohiper.cpp +++ b/docs/examples/asiohiper.cpp @@ -90,7 +90,7 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) timer.expires_from_now(boost::posix_time::millisec(timeout_ms)); timer.async_wait(boost::bind(&timer_cb, _1, g)); } - else { + else if(timeout_ms == 0) { /* call timeout function immediately */ boost::system::error_code error; /*success*/ timer_cb(error, g); @@ -170,15 +170,19 @@ static void check_multi_info(GlobalInfo *g) } /* Called by asio when there is an action on a socket */ -static void event_cb(GlobalInfo *g, boost::asio::ip::tcp::socket *tcp_socket, +static void event_cb(GlobalInfo *g, curl_socket_t s, int action, const boost::system::error_code & error, int *fdp) { fprintf(MSG_OUT, "\nevent_cb: action=%d", action); + if(socket_map.find(s) == socket_map.end()) { + fprintf(MSG_OUT, "\nevent_cb: socket already closed"); + return; + } + /* make sure the event matches what are wanted */ if(*fdp == action || *fdp == CURL_POLL_INOUT) { - curl_socket_t s = tcp_socket->native_handle(); CURLMcode rc; if(error) action = CURL_CSELECT_ERR; @@ -197,14 +201,16 @@ static void event_cb(GlobalInfo *g, boost::asio::ip::tcp::socket *tcp_socket, * in curl_multi_socket_action(), so check them both */ if(!error && socket_map.find(s) != socket_map.end() && (*fdp == action || *fdp == CURL_POLL_INOUT)) { + boost::asio::ip::tcp::socket *tcp_socket = socket_map.find(s)->second; + if(action == CURL_POLL_IN) { tcp_socket->async_read_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, + boost::bind(&event_cb, g, s, action, _1, fdp)); } if(action == CURL_POLL_OUT) { tcp_socket->async_write_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, + boost::bind(&event_cb, g, s, action, _1, fdp)); } } @@ -257,7 +263,7 @@ static void setsock(int *fdp, curl_socket_t s, CURL *e, int act, int oldact, fprintf(MSG_OUT, "\nwatching for socket to become readable"); if(oldact != CURL_POLL_IN && oldact != CURL_POLL_INOUT) { tcp_socket->async_read_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, + boost::bind(&event_cb, g, s, CURL_POLL_IN, _1, fdp)); } } @@ -265,7 +271,7 @@ static void setsock(int *fdp, curl_socket_t s, CURL *e, int act, int oldact, fprintf(MSG_OUT, "\nwatching for socket to become writable"); if(oldact != CURL_POLL_OUT && oldact != CURL_POLL_INOUT) { tcp_socket->async_write_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, + boost::bind(&event_cb, g, s, CURL_POLL_OUT, _1, fdp)); } } @@ -273,12 +279,12 @@ static void setsock(int *fdp, curl_socket_t s, CURL *e, int act, int oldact, fprintf(MSG_OUT, "\nwatching for socket to become readable & writable"); if(oldact != CURL_POLL_IN && oldact != CURL_POLL_INOUT) { tcp_socket->async_read_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, + boost::bind(&event_cb, g, s, CURL_POLL_IN, _1, fdp)); } if(oldact != CURL_POLL_OUT && oldact != CURL_POLL_INOUT) { tcp_socket->async_write_some(boost::asio::null_buffers(), - boost::bind(&event_cb, g, tcp_socket, + boost::bind(&event_cb, g, s, CURL_POLL_OUT, _1, fdp)); } } diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c index ace58e4..cf7c76e 100644 --- a/docs/examples/cacertinmem.c +++ b/docs/examples/cacertinmem.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -24,85 +24,103 @@ * */ +#include #include #include #include size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream) { - fwrite(ptr, size, nmemb, stream); + fwrite(ptr, size, nmemb, (FILE *)stream); return (nmemb*size); } static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) { - X509_STORE *store; - X509 *cert=NULL; - BIO *bio; - char *mypem = /* www.cacert.org */ - "-----BEGIN CERTIFICATE-----\n"\ - "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\n"\ - "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\n"\ - "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\n"\ - "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\n"\ - "BgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEi\n"\ - "MCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJ\n"\ - "ARYSc3VwcG9ydEBjYWNlcnQub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC\n"\ - "CgKCAgEAziLA4kZ97DYoB1CW8qAzQIxL8TtmPzHlawI229Z89vGIj053NgVBlfkJ\n"\ - "8BLPRoZzYLdufujAWGSuzbCtRRcMY/pnCujW0r8+55jE8Ez64AO7NV1sId6eINm6\n"\ - "zWYyN3L69wj1x81YyY7nDl7qPv4coRQKFWyGhFtkZip6qUtTefWIonvuLwphK42y\n"\ - "fk1WpRPs6tqSnqxEQR5YYGUFZvjARL3LlPdCfgv3ZWiYUQXw8wWRBB0bF4LsyFe7\n"\ - "w2t6iPGwcswlWyCR7BYCEo8y6RcYSNDHBS4CMEK4JZwFaz+qOqfrU0j36NK2B5jc\n"\ - "G8Y0f3/JHIJ6BVgrCFvzOKKrF11myZjXnhCLotLddJr3cQxyYN/Nb5gznZY0dj4k\n"\ - "epKwDpUeb+agRThHqtdB7Uq3EvbXG4OKDy7YCbZZ16oE/9KTfWgu3YtLq1i6L43q\n"\ - "laegw1SJpfvbi1EinbLDvhG+LJGGi5Z4rSDTii8aP8bQUWWHIbEZAWV/RRyH9XzQ\n"\ - "QUxPKZgh/TMfdQwEUfoZd9vUFBzugcMd9Zi3aQaRIt0AUMyBMawSB3s42mhb5ivU\n"\ - "fslfrejrckzzAeVLIL+aplfKkQABi6F1ITe1Yw1nPkZPcCBnzsXWWdsC4PDSy826\n"\ - "YreQQejdIOQpvGQpQsgi3Hia/0PsmBsJUUtaWsJx8cTLc6nloQsCAwEAAaOCAc4w\n"\ - "ggHKMB0GA1UdDgQWBBQWtTIb1Mfz4OaO873SsDrusjkY0TCBowYDVR0jBIGbMIGY\n"\ - "gBQWtTIb1Mfz4OaO873SsDrusjkY0aF9pHsweTEQMA4GA1UEChMHUm9vdCBDQTEe\n"\ - "MBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0\n"\ - "IFNpZ25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2Vy\n"\ - "dC5vcmeCAQAwDwYDVR0TAQH/BAUwAwEB/zAyBgNVHR8EKzApMCegJaAjhiFodHRw\n"\ - "czovL3d3dy5jYWNlcnQub3JnL3Jldm9rZS5jcmwwMAYJYIZIAYb4QgEEBCMWIWh0\n"\ - "dHBzOi8vd3d3LmNhY2VydC5vcmcvcmV2b2tlLmNybDA0BglghkgBhvhCAQgEJxYl\n"\ - "aHR0cDovL3d3dy5jYWNlcnQub3JnL2luZGV4LnBocD9pZD0xMDBWBglghkgBhvhC\n"\ - "AQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBGUkVFIGhlYWQg\n"\ - "b3ZlciB0byBodHRwOi8vd3d3LmNhY2VydC5vcmcwDQYJKoZIhvcNAQEEBQADggIB\n"\ - "ACjH7pyCArpcgBLKNQodgW+JapnM8mgPf6fhjViVPr3yBsOQWqy1YPaZQwGjiHCc\n"\ - "nWKdpIevZ1gNMDY75q1I08t0AoZxPuIrA2jxNGJARjtT6ij0rPtmlVOKTV39O9lg\n"\ - "18p5aTuxZZKmxoGCXJzN600BiqXfEVWqFcofN8CCmHBh22p8lqOOLlQ+TyGpkO/c\n"\ - "gr/c6EWtTZBzCDyUZbAEmXZ/4rzCahWqlwQ3JNgelE5tDlG+1sSPypZt90Pf6DBl\n"\ - "Jzt7u0NDY8RD97LsaMzhGY4i+5jhe1o+ATc7iwiwovOVThrLm82asduycPAtStvY\n"\ - "sONvRUgzEv/+PDIqVPfE94rwiCPCR/5kenHA0R6mY7AHfqQv0wGP3J8rtsYIqQ+T\n"\ - "SCX8Ev2fQtzzxD72V7DX3WnRBnc0CkvSyqD/HMaMyRa+xMwyN2hzXwj7UfdJUzYF\n"\ - "CpUCTPJ5GhD22Dp1nPMd8aINcGeGG7MW9S/lpOt5hvk9C8JzC6WZrG/8Z7jlLwum\n"\ - "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\n"\ - "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\n"\ - "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\n"\ + CURLcode rv = CURLE_ABORTED_BY_CALLBACK; + X509_STORE *store = NULL; + X509 *cert = NULL; + BIO *bio = NULL; + char *mypem = + /* CA for example.com. CN = DigiCert High Assurance EV Root CA */ + "-----BEGIN CERTIFICATE-----\n" + "MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs\n" + "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" + "d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j\n" + "ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL\n" + "MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3\n" + "LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug\n" + "RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm\n" + "+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW\n" + "PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM\n" + "xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB\n" + "Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3\n" + "hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg\n" + "EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF\n" + "MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA\n" + "FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec\n" + "nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z\n" + "eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF\n" + "hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2\n" + "Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe\n" + "vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep\n" + "+OkuE6N36B9K\n" "-----END CERTIFICATE-----\n"; + + /* clear the current thread's OpenSSL error queue */ + ERR_clear_error(); + /* get a BIO */ - bio=BIO_new_mem_buf(mypem, -1); + bio = BIO_new_mem_buf(mypem, -1); + if(!bio) + goto err; + /* use it to read the PEM formatted certificate from memory into an X509 * structure that SSL can use */ - PEM_read_bio_X509(bio, &cert, 0, NULL); - if(cert == NULL) - printf("PEM_read_bio_X509 failed...\n"); + if(!PEM_read_bio_X509(bio, &cert, 0, NULL)) + goto err; /* get a pointer to the X509 certificate store (which may be empty!) */ - store=SSL_CTX_get_cert_store((SSL_CTX *)sslctx); + store = SSL_CTX_get_cert_store((SSL_CTX *)sslctx); + if(!store) + goto err; /* add our certificate to this store */ - if(X509_STORE_add_cert(store, cert)==0) - printf("error adding certificate\n"); + if(!X509_STORE_add_cert(store, cert)) { + unsigned long error = ERR_peek_last_error(); + + /* Ignore error X509_R_CERT_ALREADY_IN_HASH_TABLE which means the + * certificate is already in the store. That could happen if + * libcurl already loaded the certificate from a ca cert bundle + * set at libcurl build-time or runtime. + */ + if(ERR_GET_LIB(error) != ERR_LIB_X509 || + ERR_GET_REASON(error) != X509_R_CERT_ALREADY_IN_HASH_TABLE) + goto err; + + ERR_clear_error(); + } + + rv = CURLE_OK; + +err: + if(rv != CURLE_OK) { + char errbuf[256]; + unsigned long error = ERR_peek_last_error(); + + fprintf(stderr, "error adding certificate\n"); + if(error) { + ERR_error_string_n(error, errbuf, sizeof errbuf); + fprintf(stderr, "%s\n", errbuf); + } + } - /* decrease reference counts */ X509_free(cert); BIO_free(bio); + ERR_clear_error(); - /* all set to go */ - return CURLE_OK; + return rv; } int main(void) @@ -110,35 +128,54 @@ int main(void) CURL *ch; CURLcode rv; - rv=curl_global_init(CURL_GLOBAL_ALL); - ch=curl_easy_init(); - rv=curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L); - rv=curl_easy_setopt(ch, CURLOPT_HEADER, 0L); - rv=curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L); - rv=curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L); - rv=curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, *writefunction); - rv=curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout); - rv=curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, *writefunction); - rv=curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr); - rv=curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); - rv=curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L); - rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); - - /* first try: retrieve page without cacerts' certificate -> will fail + rv = curl_global_init(CURL_GLOBAL_ALL); + ch = curl_easy_init(); + rv = curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L); + rv = curl_easy_setopt(ch, CURLOPT_HEADER, 0L); + rv = curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L); + rv = curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L); + rv = curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, *writefunction); + rv = curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout); + rv = curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, *writefunction); + rv = curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr); + rv = curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); + rv = curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L); + rv = curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); + + /* turn off the default CA locations (optional) + * otherwise libcurl will load CA certificates from the locations that + * were detected/specified at build-time */ - rv=curl_easy_perform(ch); - if(rv==CURLE_OK) + rv = curl_easy_setopt(ch, CURLOPT_CAINFO, NULL); + rv = curl_easy_setopt(ch, CURLOPT_CAPATH, NULL); + + /* first try: retrieve page without ca certificates -> should fail + * unless libcurl was built --with-ca-fallback enabled at build-time + */ + rv = curl_easy_perform(ch); + if(rv == CURLE_OK) printf("*** transfer succeeded ***\n"); else printf("*** transfer failed ***\n"); + /* use a fresh connection (optional) + * this option seriously impacts performance of multiple transfers but + * it is necessary order to demonstrate this example. recall that the + * ssl ctx callback is only called _before_ an SSL connection is + * established, therefore it will not affect existing verified SSL + * connections already in the connection cache associated with this + * handle. normally you would set the ssl ctx function before making + * any transfers, and not use this option. + */ + rv = curl_easy_setopt(ch, CURLOPT_FRESH_CONNECT, 1L); + /* second try: retrieve page using cacerts' certificate -> will succeed - * load the certificate by installing a function doing the nescessary + * load the certificate by installing a function doing the necessary * "modifications" to the SSL CONTEXT just before link init */ - rv=curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); - rv=curl_easy_perform(ch); - if(rv==CURLE_OK) + rv = curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); + rv = curl_easy_perform(ch); + if(rv == CURLE_OK) printf("*** transfer succeeded ***\n"); else printf("*** transfer failed ***\n"); diff --git a/docs/examples/certinfo.c b/docs/examples/certinfo.c index de2e310..1aee614 100644 --- a/docs/examples/certinfo.c +++ b/docs/examples/certinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -56,24 +56,19 @@ int main(void) res = curl_easy_perform(curl); if(!res) { - union { - struct curl_slist *to_info; - struct curl_certinfo *to_certinfo; - } ptr; + struct curl_certinfo *certinfo; - ptr.to_info = NULL; + res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo); - res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ptr.to_info); - - if(!res && ptr.to_info) { + if(!res && certinfo) { int i; - printf("%d certs!\n", ptr.to_certinfo->num_of_certs); + printf("%d certs!\n", certinfo->num_of_certs); - for(i = 0; i < ptr.to_certinfo->num_of_certs; i++) { + for(i = 0; i < certinfo->num_of_certs; i++) { struct curl_slist *slist; - for(slist = ptr.to_certinfo->certinfo[i]; slist; slist = slist->next) + for(slist = certinfo->certinfo[i]; slist; slist = slist->next) printf("%s\n", slist->data); } diff --git a/docs/examples/chkspeed.c b/docs/examples/chkspeed.c index de20567..f3dd1e9 100644 --- a/docs/examples/chkspeed.c +++ b/docs/examples/chkspeed.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) prttime = 1; } else if(strncasecmp(*argv, "-M=", 3) == 0) { - long m = strtol((*argv)+3, NULL, 10); + long m = strtol((*argv) + 3, NULL, 10); switch(m) { case 1: url = URL_1M; diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c index 064c7b3..2af0619 100644 --- a/docs/examples/cookie_interface.c +++ b/docs/examples/cookie_interface.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,7 +47,8 @@ print_cookies(CURL *curl) curl_easy_strerror(res)); exit(1); } - nc = cookies, i = 1; + nc = cookies; + i = 1; while(nc) { printf("[%d]: %s\n", i, nc->data); nc = nc->next; @@ -93,9 +94,9 @@ main(void) #endif /* Netscape format cookie */ snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s", - ".google.com", "TRUE", "/", "FALSE", + ".example.com", "TRUE", "/", "FALSE", (unsigned long)time(NULL) + 31337UL, - "PREF", "hello google, i like you very much!"); + "PREF", "hello example, i like you very much!"); res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline); if(res != CURLE_OK) { fprintf(stderr, "Curl curl_easy_setopt failed: %s\n", @@ -111,7 +112,7 @@ main(void) */ snprintf(nline, sizeof(nline), "Set-Cookie: OLD_PREF=3d141414bf4209321; " - "expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com"); + "expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.example.com"); res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline); if(res != CURLE_OK) { fprintf(stderr, "Curl curl_easy_setopt failed: %s\n", diff --git a/docs/examples/curlx.c b/docs/examples/curlx.c index cd1677a..2aa10aa 100644 --- a/docs/examples/curlx.c +++ b/docs/examples/curlx.c @@ -101,7 +101,7 @@ static const char *curlx_usage[]={ "usage: curlx args\n", " -p12 arg - tia file ", - " -envpass arg - environement variable which content the tia private" + " -envpass arg - environment variable which content the tia private" " key password", " -out arg - output file (response)- default stdout", " -in arg - input file (request)- default stdin", @@ -195,7 +195,8 @@ static int ssl_app_verify_callback(X509_STORE_CTX *ctx, void *arg) if(p->verbose > 2) BIO_printf(p->errorbio, "entering ssl_app_verify_callback\n"); - if((ok= X509_verify_cert(ctx)) && ctx->cert) { + ok = X509_verify_cert(ctx); + if(ok && ctx->cert) { unsigned char *accessinfo; if(p->verbose > 1) X509_print_ex(p->errorbio, ctx->cert, 0, 0); @@ -268,16 +269,16 @@ static CURLcode sslctxfun(CURL *curl, void *sslctx, void *parm) int main(int argc, char **argv) { - BIO* in=NULL; - BIO* out=NULL; + BIO* in = NULL; + BIO* out = NULL; char *outfile = NULL; char *infile = NULL; - int tabLength=100; + int tabLength = 100; char *binaryptr; char *mimetype; - char *mimetypeaccept=NULL; + char *mimetypeaccept = NULL; char *contenttype; const char **pp; unsigned char *hostporturl = NULL; @@ -288,8 +289,8 @@ int main(int argc, char **argv) char *response; CURLcode res; - struct curl_slist *headers=NULL; - int badarg=0; + struct curl_slist *headers = NULL; + int badarg = 0; binaryptr = malloc(tabLength); @@ -307,75 +308,75 @@ int main(int argc, char **argv) while(*args && *args[0] == '-') { if(!strcmp (*args, "-in")) { if(args[1]) { - infile=*(++args); + infile = *(++args); } else - badarg=1; + badarg = 1; } else if(!strcmp (*args, "-out")) { if(args[1]) { - outfile=*(++args); + outfile = *(++args); } else - badarg=1; + badarg = 1; } else if(!strcmp (*args, "-p12")) { if(args[1]) { p.p12file = *(++args); } else - badarg=1; + badarg = 1; } else if(strcmp(*args, "-envpass") == 0) { if(args[1]) { p.pst = getenv(*(++args)); } else - badarg=1; + badarg = 1; } else if(strcmp(*args, "-connect") == 0) { if(args[1]) { hostporturl = *(++args); } else - badarg=1; + badarg = 1; } else if(strcmp(*args, "-mimetype") == 0) { if(args[1]) { mimetype = *(++args); } else - badarg=1; + badarg = 1; } else if(strcmp(*args, "-acceptmime") == 0) { if(args[1]) { mimetypeaccept = *(++args); } else - badarg=1; + badarg = 1; } else if(strcmp(*args, "-accesstype") == 0) { if(args[1]) { p.accesstype = OBJ_obj2nid(OBJ_txt2obj(*++args, 0)); if(p.accesstype == 0) - badarg=1; + badarg = 1; } else - badarg=1; + badarg = 1; } else if(strcmp(*args, "-verbose") == 0) { p.verbose++; } else - badarg=1; + badarg = 1; args++; } - if(mimetype==NULL || mimetypeaccept == NULL) + if(mimetype == NULL || mimetypeaccept == NULL) badarg = 1; if(badarg) { - for(pp=curlx_usage; (*pp != NULL); pp++) + for(pp = curlx_usage; (*pp != NULL); pp++) BIO_printf(p.errorbio, "%s\n", *pp); BIO_printf(p.errorbio, "\n"); goto err; @@ -383,7 +384,8 @@ int main(int argc, char **argv) /* set input */ - if((in=BIO_new(BIO_s_file())) == NULL) { + in = BIO_new(BIO_s_file()); + if(in == NULL) { BIO_printf(p.errorbio, "Error setting input bio\n"); goto err; } @@ -397,7 +399,8 @@ int main(int argc, char **argv) /* set output */ - if((out=BIO_new(BIO_s_file())) == NULL) { + out = BIO_new(BIO_s_file()); + if(out == NULL) { BIO_printf(p.errorbio, "Error setting output bio.\n"); goto err; } @@ -429,7 +432,7 @@ int main(int argc, char **argv) goto err; } - p.ca= NULL; + p.ca = NULL; if(!(PKCS12_parse (p.p12, p.pst, &(p.pkey), &(p.usercert), &(p.ca) ) )) { BIO_printf(p.errorbio, "Invalid P12 structure in %s\n", p.p12file); goto err; @@ -454,10 +457,10 @@ int main(int argc, char **argv) given access type */ serverurl = my_get_ext(p.usercert, p.accesstype, NID_info_access); if(!serverurl) { - int j=0; + int j = 0; BIO_printf(p.errorbio, "no service URL in user cert " "cherching in others certificats\n"); - for(j=0; j0) { - i+=lu; - if(i== tabLength) { - tabLength+=100; - binaryptr=realloc(binaryptr, tabLength); /* should be more careful */ + i += lu; + if(i == tabLength) { + tabLength += 100; + binaryptr = realloc(binaryptr, tabLength); /* should be more careful */ } } tabLength = i; @@ -533,8 +536,8 @@ int main(int argc, char **argv) BIO_printf(p.errorbio, "%d %s %d\n", __LINE__, "curl_easy_perform", res = curl_easy_perform(p.curl)); { - int result =curl_easy_getinfo(p.curl, CURLINFO_CONTENT_TYPE, &response); - if(mimetypeaccept && p.verbose) + int result = curl_easy_getinfo(p.curl, CURLINFO_CONTENT_TYPE, &response); + if(mimetypeaccept && p.verbose) { if(!strcmp(mimetypeaccept, response)) BIO_printf(p.errorbio, "the response has a correct mimetype : %s\n", response); @@ -542,6 +545,7 @@ int main(int argc, char **argv) BIO_printf(p.errorbio, "the response doesn\'t have an acceptable " "mime type, it is %s instead of %s\n", response, mimetypeaccept); + } } /*** code d'erreur si accept mime ***, egalement code return HTTP != 200 ***/ diff --git a/docs/examples/debug.c b/docs/examples/debug.c index cbf1c11..554eb3e 100644 --- a/docs/examples/debug.c +++ b/docs/examples/debug.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -38,7 +38,7 @@ void dump(const char *text, size_t i; size_t c; - unsigned int width=0x10; + unsigned int width = 0x10; if(nohex) /* without the hex output, we can fit more on screen */ @@ -47,30 +47,32 @@ void dump(const char *text, fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n", text, (long)size, (long)size); - for(i=0; i=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.'); + (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.'); /* check again for 0D0A, to avoid an extra \n if it's at width */ - if(nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) { - i+=(c+3-width); + if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && + ptr[i + c + 2] == 0x0A) { + i += (c + 3 - width); break; } } @@ -91,6 +93,7 @@ int my_trace(CURL *handle, curl_infotype type, switch(type) { case CURLINFO_TEXT: fprintf(stderr, "== Info: %s", data); + /* FALLTHROUGH */ default: /* in case a new one is introduced to shock us */ return 0; diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c index efe4247..257c127 100644 --- a/docs/examples/evhiperfifo.c +++ b/docs/examples/evhiperfifo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -124,7 +124,7 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) ev_timer_init(&g->timer_event, timer_cb, t, 0.); ev_timer_start(g->loop, &g->timer_event); } - else + else if(timeout_ms == 0) timer_cb(g->loop, &g->timer_event, 0); return 0; } @@ -136,28 +136,28 @@ static void mcode_or_die(const char *where, CURLMcode code) const char *s; switch(code) { case CURLM_BAD_HANDLE: - s="CURLM_BAD_HANDLE"; + s = "CURLM_BAD_HANDLE"; break; case CURLM_BAD_EASY_HANDLE: - s="CURLM_BAD_EASY_HANDLE"; + s = "CURLM_BAD_EASY_HANDLE"; break; case CURLM_OUT_OF_MEMORY: - s="CURLM_OUT_OF_MEMORY"; + s = "CURLM_OUT_OF_MEMORY"; break; case CURLM_INTERNAL_ERROR: - s="CURLM_INTERNAL_ERROR"; + s = "CURLM_INTERNAL_ERROR"; break; case CURLM_UNKNOWN_OPTION: - s="CURLM_UNKNOWN_OPTION"; + s = "CURLM_UNKNOWN_OPTION"; break; case CURLM_LAST: - s="CURLM_LAST"; + s = "CURLM_LAST"; break; default: - s="CURLM_unknown"; + s = "CURLM_unknown"; break; case CURLM_BAD_SOCKET: - s="CURLM_BAD_SOCKET"; + s = "CURLM_BAD_SOCKET"; fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s); /* ignore this error */ return; @@ -257,7 +257,7 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, ev_io_stop(g->loop, &f->ev); ev_io_init(&f->ev, event_cb, f->sockfd, kind); f->ev.data = g; - f->evset=1; + f->evset = 1; ev_io_start(g->loop, &f->ev); } @@ -371,13 +371,13 @@ static void new_conn(char *url, GlobalInfo *g) static void fifo_cb(EV_P_ struct ev_io *w, int revents) { char s[1024]; - long int rv=0; - int n=0; + long int rv = 0; + int n = 0; GlobalInfo *g = (GlobalInfo *)w->data; do { s[0]='\0'; - rv=fscanf(g->input, "%1023s%n", s, &n); + rv = fscanf(g->input, "%1023s%n", s, &n); s[n]='\0'; if(n && s[0]) { new_conn(s, g); /* if we read a URL, go get it! */ diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c index 918f082..0ac113d 100644 --- a/docs/examples/externalsocket.c +++ b/docs/examples/externalsocket.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -38,7 +38,7 @@ #include /* socket types */ #include /* socket definitions */ #include -#include /* inet (3) funtions */ +#include /* inet (3) functions */ #include /* misc. Unix functions */ #endif @@ -58,6 +58,13 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) return written; } +static int closecb(void *clientp, curl_socket_t item) +{ + (void)clientp; + printf("libcurl wants to close %d now\n", (int)item); + return 0; +} + static curl_socket_t opensocket(void *clientp, curlsocktype purpose, struct curl_sockaddr *address) @@ -137,6 +144,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket); curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd); + /* call this function to close sockets */ + curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closecb); + curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &sockfd); + /* call this function to set options for the socket */ curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback); diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c index 7435264..eb27c6a 100644 --- a/docs/examples/fopen.c +++ b/docs/examples/fopen.c @@ -10,10 +10,10 @@ * instead of (only) local files. Local files (ie those that can be directly * fopened) will drop back to using the underlying clib implementations * - * See the main() function at the bottom that shows an app that retrives from a - * specified url using fgets() and fread() and saves as two output files. + * See the main() function at the bottom that shows an app that retrieves from + * a specified url using fgets() and fread() and saves as two output files. * - * Copyright (c) 2003 Simtec Electronics + * Copyright (c) 2003, 2017 Simtec Electronics * * Re-implemented by Vincent Sanders with extensive * reference to original curl example code @@ -58,9 +58,9 @@ #include enum fcurl_type_e { - CFTYPE_NONE=0, - CFTYPE_FILE=1, - CFTYPE_CURL=2 + CFTYPE_NONE = 0, + CFTYPE_FILE = 1, + CFTYPE_CURL = 2 }; struct fcurl_data @@ -88,7 +88,7 @@ char *url_fgets(char *ptr, size_t size, URL_FILE *file); void url_rewind(URL_FILE *file); /* we use a global one for convenience */ -CURLM *multi_handle; +static CURLM *multi_handle; /* curl calls this routine to get more data */ static size_t write_callback(char *buffer, @@ -102,19 +102,19 @@ static size_t write_callback(char *buffer, URL_FILE *url = (URL_FILE *)userp; size *= nitems; - rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */ + rembuff = url->buffer_len - url->buffer_pos; /* remaining space in buffer */ if(size > rembuff) { /* not enough space in buffer */ - newbuff=realloc(url->buffer, url->buffer_len + (size - rembuff)); - if(newbuff==NULL) { + newbuff = realloc(url->buffer, url->buffer_len + (size - rembuff)); + if(newbuff == NULL) { fprintf(stderr, "callback buffer grow failed\n"); - size=rembuff; + size = rembuff; } else { /* realloc succeeded increase buffer size*/ - url->buffer_len+=size - rembuff; - url->buffer=newbuff; + url->buffer_len += size - rembuff; + url->buffer = newbuff; } } @@ -189,7 +189,7 @@ static int fill_buffer(URL_FILE *file, size_t want) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } switch(rc) { @@ -211,12 +211,12 @@ static int fill_buffer(URL_FILE *file, size_t want) static int use_buffer(URL_FILE *file, size_t want) { /* sort out buffer */ - if((file->buffer_pos - want) <=0) { + if((file->buffer_pos - want) <= 0) { /* ditch buffer - write will recreate */ free(file->buffer); - file->buffer=NULL; - file->buffer_pos=0; - file->buffer_len=0; + file->buffer = NULL; + file->buffer_pos = 0; + file->buffer_len = 0; } else { /* move rest down make it available for later */ @@ -243,7 +243,8 @@ URL_FILE *url_fopen(const char *url, const char *operation) memset(file, 0, sizeof(URL_FILE)); - if((file->handle.file=fopen(url, operation))) + file->handle.file = fopen(url, operation); + if(file->handle.file) file->type = CFTYPE_FILE; /* marked as URL */ else { @@ -282,11 +283,11 @@ URL_FILE *url_fopen(const char *url, const char *operation) int url_fclose(URL_FILE *file) { - int ret=0;/* default is good return */ + int ret = 0;/* default is good return */ switch(file->type) { case CFTYPE_FILE: - ret=fclose(file->handle.file); /* passthrough */ + ret = fclose(file->handle.file); /* passthrough */ break; case CFTYPE_CURL: @@ -298,8 +299,8 @@ int url_fclose(URL_FILE *file) break; default: /* unknown or supported type - oh dear */ - ret=EOF; - errno=EBADF; + ret = EOF; + errno = EBADF; break; } @@ -311,11 +312,11 @@ int url_fclose(URL_FILE *file) int url_feof(URL_FILE *file) { - int ret=0; + int ret = 0; switch(file->type) { case CFTYPE_FILE: - ret=feof(file->handle.file); + ret = feof(file->handle.file); break; case CFTYPE_CURL: @@ -324,8 +325,8 @@ int url_feof(URL_FILE *file) break; default: /* unknown or supported type - oh dear */ - ret=-1; - errno=EBADF; + ret = -1; + errno = EBADF; break; } return ret; @@ -337,7 +338,7 @@ size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file) switch(file->type) { case CFTYPE_FILE: - want=fread(ptr, size, nmemb, file->handle.file); + want = fread(ptr, size, nmemb, file->handle.file); break; case CFTYPE_CURL: @@ -345,7 +346,7 @@ size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file) fill_buffer(file, want); - /* check if theres data in the buffer - if not fill_buffer() + /* check if there's data in the buffer - if not fill_buffer() * either errored or EOF */ if(!file->buffer_pos) return 0; @@ -363,8 +364,8 @@ size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file) break; default: /* unknown or supported type - oh dear */ - want=0; - errno=EBADF; + want = 0; + errno = EBADF; break; } @@ -384,7 +385,7 @@ char *url_fgets(char *ptr, size_t size, URL_FILE *file) case CFTYPE_CURL: fill_buffer(file, want); - /* check if theres data in the buffer - if not fill either errored or + /* check if there's data in the buffer - if not fill either errored or * EOF */ if(!file->buffer_pos) return NULL; @@ -395,24 +396,24 @@ char *url_fgets(char *ptr, size_t size, URL_FILE *file) /*buffer contains data */ /* look for newline or eof */ - for(loop=0;loop < want;loop++) { + for(loop = 0; loop < want; loop++) { if(file->buffer[loop] == '\n') { - want=loop+1;/* include newline */ + want = loop + 1;/* include newline */ break; } } /* xfer data to caller */ memcpy(ptr, file->buffer, want); - ptr[want]=0;/* allways null terminate */ + ptr[want] = 0;/* always null terminate */ use_buffer(file, want); break; default: /* unknown or supported type - oh dear */ - ptr=NULL; - errno=EBADF; + ptr = NULL; + errno = EBADF; break; } @@ -435,9 +436,9 @@ void url_rewind(URL_FILE *file) /* ditch buffer - write will recreate - resets stream pos*/ free(file->buffer); - file->buffer=NULL; - file->buffer_pos=0; - file->buffer_len=0; + file->buffer = NULL; + file->buffer_pos = 0; + file->buffer_len = 0; break; @@ -450,7 +451,7 @@ void url_rewind(URL_FILE *file) #define FREADFILE "fread.test" #define REWINDFILE "rewind.test" -/* Small main program to retrive from a url using fgets and fread saving the +/* Small main program to retrieve from a url using fgets and fread saving the * output to two test files (note the fgets method will corrupt binary files if * they contain 0 chars */ int main(int argc, char *argv[]) @@ -463,12 +464,12 @@ int main(int argc, char *argv[]) const char *url; if(argc < 2) - url="http://192.168.7.3/testfile";/* default to testurl */ + url = "http://192.168.7.3/testfile";/* default to testurl */ else - url=argv[1];/* use passed url */ + url = argv[1];/* use passed url */ /* copy from url line by line with fgets */ - outf=fopen(FGETSFILE, "wb+"); + outf = fopen(FGETSFILE, "wb+"); if(!outf) { perror("couldn't open fgets output file\n"); return 1; @@ -492,7 +493,7 @@ int main(int argc, char *argv[]) /* Copy from url with fread */ - outf=fopen(FREADFILE, "wb+"); + outf = fopen(FREADFILE, "wb+"); if(!outf) { perror("couldn't open fread output file\n"); return 1; @@ -516,7 +517,7 @@ int main(int argc, char *argv[]) /* Test rewind */ - outf=fopen(REWINDFILE, "wb+"); + outf = fopen(REWINDFILE, "wb+"); if(!outf) { perror("couldn't open fread output file\n"); return 1; diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c index 9b7dc02..a2a7da0 100644 --- a/docs/examples/ftpget.c +++ b/docs/examples/ftpget.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -35,10 +35,10 @@ struct FtpFile { static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { - struct FtpFile *out=(struct FtpFile *)stream; + struct FtpFile *out = (struct FtpFile *)stream; if(out && !out->stream) { /* open file for writing */ - out->stream=fopen(out->filename, "wb"); + out->stream = fopen(out->filename, "wb"); if(!out->stream) return -1; /* failure, can't open file to write */ } @@ -50,7 +50,7 @@ int main(void) { CURL *curl; CURLcode res; - struct FtpFile ftpfile={ + struct FtpFile ftpfile = { "curl.tar.gz", /* name to store the file as if successful */ NULL }; diff --git a/docs/examples/ftpsget.c b/docs/examples/ftpsget.c index d53f088..fb7489f 100644 --- a/docs/examples/ftpsget.c +++ b/docs/examples/ftpsget.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -37,10 +37,10 @@ struct FtpFile { static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { - struct FtpFile *out=(struct FtpFile *)stream; + struct FtpFile *out = (struct FtpFile *)stream; if(out && !out->stream) { /* open file for writing */ - out->stream=fopen(out->filename, "wb"); + out->stream = fopen(out->filename, "wb"); if(!out->stream) return -1; /* failure, can't open file to write */ } @@ -52,7 +52,7 @@ int main(void) { CURL *curl; CURLcode res; - struct FtpFile ftpfile={ + struct FtpFile ftpfile = { "yourfile.bin", /* name to store the file as if successful */ NULL }; diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c index 41e2d80..bd77bb1 100644 --- a/docs/examples/ftpupload.c +++ b/docs/examples/ftpupload.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -71,13 +71,13 @@ int main(void) struct stat file_info; curl_off_t fsize; - struct curl_slist *headerlist=NULL; + struct curl_slist *headerlist = NULL; static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS; static const char buf_2 [] = "RNTO " RENAME_FILE_TO; /* get the file size of the local file */ if(stat(LOCAL_FILE, &file_info)) { - printf("Couldnt open '%s': %s\n", LOCAL_FILE, strerror(errno)); + printf("Couldn't open '%s': %s\n", LOCAL_FILE, strerror(errno)); return 1; } fsize = (curl_off_t)file_info.st_size; diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c new file mode 100644 index 0000000..134cda3 --- /dev/null +++ b/docs/examples/ftpuploadfrommem.c @@ -0,0 +1,124 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + * FTP upload a file from memory + * + */ +#include +#include +#include + +static const char data[]= + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " + "Nam rhoncus odio id venenatis volutpat. Vestibulum dapibus " + "bibendum ullamcorper. Maecenas finibus elit augue, vel " + "condimentum odio maximus nec. In hac habitasse platea dictumst. " + "Vestibulum vel dolor et turpis rutrum finibus ac at nulla. " + "Vivamus nec neque ac elit blandit pretium vitae maximus ipsum. " + "Quisque sodales magna vel erat auctor, sed pellentesque nisi " + "rhoncus. Donec vehicula maximus pretium. Aliquam eu tincidunt " + "lorem."; + +struct WriteThis { + const char *readptr; + size_t sizeleft; +}; + +static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) +{ + struct WriteThis *upload = (struct WriteThis *)userp; + size_t max = size*nmemb; + + if(max < 1) + return 0; + + if(upload->sizeleft) { + size_t copylen = max; + if(copylen > upload->sizeleft) + copylen = upload->sizeleft; + memcpy(ptr, upload->readptr, copylen); + upload->readptr += copylen; + upload->sizeleft -= copylen; + return copylen; + } + + return 0; /* no more data left to deliver */ +} + +int main(void) +{ + CURL *curl; + CURLcode res; + + struct WriteThis upload; + + upload.readptr = data; + upload.sizeleft = strlen(data); + + /* In windows, this will init the winsock stuff */ + res = curl_global_init(CURL_GLOBAL_DEFAULT); + /* Check for errors */ + if(res != CURLE_OK) { + fprintf(stderr, "curl_global_init() failed: %s\n", + curl_easy_strerror(res)); + return 1; + } + + /* get a curl handle */ + curl = curl_easy_init(); + if(curl) { + /* First set the URL, the target file */ + curl_easy_setopt(curl, CURLOPT_URL, + "ftp://example.com/path/to/upload/file"); + + /* User and password for the FTP login */ + curl_easy_setopt(curl, CURLOPT_USERPWD, "login:secret"); + + /* Now specify we want to UPLOAD data */ + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); + + /* we want to use our own read function */ + curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); + + /* pointer to pass to our read function */ + curl_easy_setopt(curl, CURLOPT_READDATA, &upload); + + /* get verbose debug output please */ + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + + /* Set the expected upload size. */ + curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, + (curl_off_t)upload.sizeleft); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* always cleanup */ + curl_easy_cleanup(curl); + } + curl_global_cleanup(); + return 0; +} diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c index 8f7f45d..fc7f803 100644 --- a/docs/examples/ftpuploadresume.c +++ b/docs/examples/ftpuploadresume.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,44 +26,32 @@ #include #include - #include -#if defined(_MSC_VER) && (_MSC_VER < 1300) -# error _snscanf requires MSVC 7.0 or later. -#endif - -/* The MinGW headers are missing a few Win32 function definitions, - you shouldn't need this if you use VC++ */ -#if defined(__MINGW32__) && !defined(__MINGW64__) -int __cdecl _snscanf(const char *input, size_t length, - const char *format, ...); -#endif - - /* parse headers for Content-Length */ -size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) +static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, + void *stream) { int r; long len = 0; - /* _snscanf() is Win32 specific */ - r = _snscanf(ptr, size * nmemb, "Content-Length: %ld\n", &len); - - if(r) /* Microsoft: we don't read the specs */ + r = sscanf(ptr, "Content-Length: %ld\n", &len); + if(r) *((long *) stream) = len; return size * nmemb; } /* discard downloaded data */ -size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) +static size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) { + (void)ptr; + (void)stream; return size * nmemb; } /* read data to upload */ -size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream) +static size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream) { FILE *f = stream; size_t n; @@ -77,8 +65,8 @@ size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream) } -int upload(CURL *curlhandle, const char *remotepath, const char *localpath, - long timeout, long tries) +static int upload(CURL *curlhandle, const char *remotepath, + const char *localpath, long timeout, long tries) { FILE *f; long uploaded_len = 0; @@ -156,7 +144,7 @@ int upload(CURL *curlhandle, const char *remotepath, const char *localpath, } } -int main(int c, char **argv) +int main(void) { CURL *curlhandle = NULL; diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index a1af4c5..fd643fc 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -99,14 +99,14 @@ static void mcode_or_die(const char *where, CURLMcode code) if(CURLM_OK != code) { const char *s; switch(code) { - case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break; - case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break; - case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break; - case CURLM_INTERNAL_ERROR: s="CURLM_INTERNAL_ERROR"; break; - case CURLM_BAD_SOCKET: s="CURLM_BAD_SOCKET"; break; - case CURLM_UNKNOWN_OPTION: s="CURLM_UNKNOWN_OPTION"; break; - case CURLM_LAST: s="CURLM_LAST"; break; - default: s="CURLM_unknown"; + case CURLM_BAD_HANDLE: s = "CURLM_BAD_HANDLE"; break; + case CURLM_BAD_EASY_HANDLE: s = "CURLM_BAD_EASY_HANDLE"; break; + case CURLM_OUT_OF_MEMORY: s = "CURLM_OUT_OF_MEMORY"; break; + case CURLM_INTERNAL_ERROR: s = "CURLM_INTERNAL_ERROR"; break; + case CURLM_BAD_SOCKET: s = "CURLM_BAD_SOCKET"; break; + case CURLM_UNKNOWN_OPTION: s = "CURLM_UNKNOWN_OPTION"; break; + case CURLM_LAST: s = "CURLM_LAST"; break; + default: s = "CURLM_unknown"; } MSG_OUT("ERROR: %s returns %s\n", where, s); exit(code); @@ -156,13 +156,22 @@ static gboolean timer_cb(gpointer data) static int update_timeout_cb(CURLM *multi, long timeout_ms, void *userp) { struct timeval timeout; - GlobalInfo *g=(GlobalInfo *)userp; + GlobalInfo *g = (GlobalInfo *)userp; timeout.tv_sec = timeout_ms/1000; timeout.tv_usec = (timeout_ms%1000)*1000; MSG_OUT("*** update_timeout_cb %ld => %ld:%ld ***\n", timeout_ms, timeout.tv_sec, timeout.tv_usec); + /* TODO + * + * if timeout_ms is 0, call curl_multi_socket_action() at once! + * + * if timeout_ms is -1, just delete the timer + * + * for all other values of timeout_ms, this should set or *update* + * the timer to the new value + */ g->timer_event = g_timeout_add(timeout_ms, timer_cb, g); return 0; } @@ -172,7 +181,7 @@ static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data) { GlobalInfo *g = (GlobalInfo*) data; CURLMcode rc; - int fd=g_io_channel_unix_get_fd(ch); + int fd = g_io_channel_unix_get_fd(ch); int action = (condition & G_IO_IN ? CURL_CSELECT_IN : 0) | @@ -219,7 +228,7 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, if(f->ev) { g_source_remove(f->ev); } - f->ev=g_io_add_watch(f->ch, kind, event_cb, g); + f->ev = g_io_add_watch(f->ch, kind, event_cb, g); } /* Initialize a new SockInfo structure */ @@ -228,7 +237,7 @@ static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g) SockInfo *fdp = g_malloc0(sizeof(SockInfo)); fdp->global = g; - fdp->ch=g_io_channel_unix_new(s); + fdp->ch = g_io_channel_unix_new(s); setsock(fdp, s, easy, action, g); curl_multi_assign(g->multi, s, fdp); } @@ -310,7 +319,7 @@ static void new_conn(char *url, GlobalInfo *g) curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 30L); MSG_OUT("Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url); - rc =curl_multi_add_handle(g->multi, conn->easy); + rc = curl_multi_add_handle(g->multi, conn->easy); mcode_or_die("new_conn: curl_multi_add_handle", rc); /* note that the add_handle() will set a time-out to trigger very soon so @@ -322,11 +331,11 @@ static gboolean fifo_cb(GIOChannel *ch, GIOCondition condition, gpointer data) { #define BUF_SIZE 1024 gsize len, tp; - gchar *buf, *tmp, *all=NULL; + gchar *buf, *tmp, *all = NULL; GIOStatus rv; do { - GError *err=NULL; + GError *err = NULL; rv = g_io_channel_read_line(ch, &buf, &len, &tp, &err); if(buf) { if(tp) { @@ -336,15 +345,15 @@ static gboolean fifo_cb(GIOChannel *ch, GIOCondition condition, gpointer data) g_free(buf); } else { - buf = g_malloc(BUF_SIZE+1); + buf = g_malloc(BUF_SIZE + 1); while(TRUE) { buf[BUF_SIZE]='\0'; g_io_channel_read_chars(ch, buf, BUF_SIZE, &len, &err); if(len) { buf[len]='\0'; if(all) { - tmp=all; - all=g_strdup_printf("%s%s", tmp, buf); + tmp = all; + all = g_strdup_printf("%s%s", tmp, buf); g_free(tmp); } else { @@ -408,12 +417,12 @@ int main(int argc, char **argv) GMainLoop*gmain; int fd; GIOChannel* ch; - g=g_malloc0(sizeof(GlobalInfo)); + g = g_malloc0(sizeof(GlobalInfo)); - fd=init_fifo(); - ch=g_io_channel_unix_new(fd); + fd = init_fifo(); + ch = g_io_channel_unix_new(fd); g_io_add_watch(ch, G_IO_IN, fifo_cb, g); - gmain=g_main_loop_new(NULL, FALSE); + gmain = g_main_loop_new(NULL, FALSE); g->multi = curl_multi_init(); curl_multi_setopt(g->multi, CURLMOPT_SOCKETFUNCTION, sock_cb); curl_multi_setopt(g->multi, CURLMOPT_SOCKETDATA, g); diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c index f08fcda..76bc6c1 100644 --- a/docs/examples/hiperfifo.c +++ b/docs/examples/hiperfifo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -108,8 +108,6 @@ typedef struct _SockInfo GlobalInfo *global; } SockInfo; - - /* Update the event timer after curl_multi library calls */ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) { @@ -119,6 +117,16 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g) timeout.tv_sec = timeout_ms/1000; timeout.tv_usec = (timeout_ms%1000)*1000; fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms); + + /* TODO + * + * if timeout_ms is 0, call curl_multi_socket_action() at once! + * + * if timeout_ms is -1, just delete the timer + * + * for all other values of timeout_ms, this should set or *update* + * the timer to the new value + */ evtimer_add(g->timer_event, &timeout); return 0; } @@ -129,15 +137,15 @@ static void mcode_or_die(const char *where, CURLMcode code) if(CURLM_OK != code) { const char *s; switch(code) { - case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break; - case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break; - case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break; - case CURLM_INTERNAL_ERROR: s="CURLM_INTERNAL_ERROR"; break; - case CURLM_UNKNOWN_OPTION: s="CURLM_UNKNOWN_OPTION"; break; - case CURLM_LAST: s="CURLM_LAST"; break; - default: s="CURLM_unknown"; + case CURLM_BAD_HANDLE: s = "CURLM_BAD_HANDLE"; break; + case CURLM_BAD_EASY_HANDLE: s = "CURLM_BAD_EASY_HANDLE"; break; + case CURLM_OUT_OF_MEMORY: s = "CURLM_OUT_OF_MEMORY"; break; + case CURLM_INTERNAL_ERROR: s = "CURLM_INTERNAL_ERROR"; break; + case CURLM_UNKNOWN_OPTION: s = "CURLM_UNKNOWN_OPTION"; break; + case CURLM_LAST: s = "CURLM_LAST"; break; + default: s = "CURLM_unknown"; break; - case CURLM_BAD_SOCKET: s="CURLM_BAD_SOCKET"; + case CURLM_BAD_SOCKET: s = "CURLM_BAD_SOCKET"; fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s); /* ignore this error */ return; @@ -351,15 +359,15 @@ static void new_conn(char *url, GlobalInfo *g) static void fifo_cb(int fd, short event, void *arg) { char s[1024]; - long int rv=0; - int n=0; + long int rv = 0; + int n = 0; GlobalInfo *g = (GlobalInfo *)arg; (void)fd; /* unused */ (void)event; /* unused */ do { s[0]='\0'; - rv=fscanf(g->input, "%1023s%n", s, &n); + rv = fscanf(g->input, "%1023s%n", s, &n); s[n]='\0'; if(n && s[0]) { new_conn(s, arg); /* if we read a URL, go get it! */ diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c index 687e3f3..44af0c5 100644 --- a/docs/examples/htmltidy.c +++ b/docs/examples/htmltidy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -52,7 +52,7 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent) TidyAttr attr; printf("%*.*s%s ", indent, indent, "<", name); /* walk the attribute list */ - for(attr=tidyAttrFirst(child); attr; attr=tidyAttrNext(attr) ) { + for(attr = tidyAttrFirst(child); attr; attr = tidyAttrNext(attr) ) { printf(tidyAttrName(attr)); tidyAttrValue(attr)?printf("=\"%s\" ", tidyAttrValue(attr)):printf(" "); @@ -95,7 +95,7 @@ int main(int argc, char **argv) tidyBufInit(&docbuf); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &docbuf); - err=curl_easy_perform(curl); + err = curl_easy_perform(curl); if(!err) { err = tidyParseBuffer(tdoc, &docbuf); /* parse the input */ if(err >= 0) { diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c index c82fed2..8515663 100644 --- a/docs/examples/http2-download.c +++ b/docs/examples/http2-download.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -43,15 +43,15 @@ #define NUM_HANDLES 1000 -void *curl_hnd[NUM_HANDLES]; -int num_transfers; +static void *curl_hnd[NUM_HANDLES]; +static int num_transfers; /* a handle to number lookup, highly ineffective when we do many transfers... */ static int hnd2num(CURL *hnd) { int i; - for(i=0; i< num_transfers; i++) { + for(i = 0; i< num_transfers; i++) { if(curl_hnd[i] == hnd) return i; } @@ -65,7 +65,7 @@ void dump(const char *text, int num, unsigned char *ptr, size_t size, size_t i; size_t c; - unsigned int width=0x10; + unsigned int width = 0x10; if(nohex) /* without the hex output, we can fit more on screen */ @@ -74,30 +74,32 @@ void dump(const char *text, int num, unsigned char *ptr, size_t size, fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n", num, text, (long)size, (long)size); - for(i=0; i=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.'); + (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.'); /* check again for 0D0A, to avoid an extra \n if it's at width */ - if(nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) { - i+=(c+3-width); + if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && + ptr[i + c + 2] == 0x0A) { + i += (c + 3 - width); break; } } @@ -117,6 +119,7 @@ int my_trace(CURL *handle, curl_infotype type, switch(type) { case CURLINFO_TEXT: fprintf(stderr, "== %d Info: %s", num, data); + /* FALLTHROUGH */ default: /* in case a new one is introduced to shock us */ return 0; @@ -159,7 +162,7 @@ static void setup(CURL *hnd, int num) /* set the same URL */ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html"); - /* send it verbose for max debuggaility */ + /* please be verbose */ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace); @@ -198,7 +201,7 @@ int main(int argc, char **argv) /* init a multi stack */ multi_handle = curl_multi_init(); - for(i=0; i, et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -45,7 +45,7 @@ void dump(const char *text, unsigned char *ptr, size_t size, size_t i; size_t c; - unsigned int width=0x10; + unsigned int width = 0x10; if(nohex) /* without the hex output, we can fit more on screen */ @@ -54,30 +54,32 @@ void dump(const char *text, unsigned char *ptr, size_t size, fprintf(stderr, "%s, %ld bytes (0x%lx)\n", text, (long)size, (long)size); - for(i=0; i=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.'); + (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.'); /* check again for 0D0A, to avoid an extra \n if it's at width */ - if(nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) { - i+=(c+3-width); + if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && + ptr[i + c + 2] == 0x0A) { + i += (c + 3 - width); break; } } @@ -96,6 +98,7 @@ int my_trace(CURL *handle, curl_infotype type, switch(type) { case CURLINFO_TEXT: fprintf(stderr, "== Info: %s", data); + /* FALLTHROUGH */ default: /* in case a new one is introduced to shock us */ return 0; @@ -135,7 +138,7 @@ static void setup(CURL *hnd) /* set the same URL */ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html"); - /* send it verbose for max debuggaility */ + /* please be verbose */ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace); @@ -180,7 +183,7 @@ static int server_push_callback(CURL *parent, fprintf(stderr, "**** push callback approves stream %u, got %d headers!\n", count, (int)num_headers); - for(i=0; i, et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -45,15 +45,15 @@ #define NUM_HANDLES 1000 -void *curl_hnd[NUM_HANDLES]; -int num_transfers; +static void *curl_hnd[NUM_HANDLES]; +static int num_transfers; /* a handle to number lookup, highly ineffective when we do many transfers... */ static int hnd2num(CURL *hnd) { int i; - for(i=0; i< num_transfers; i++) { + for(i = 0; i< num_transfers; i++) { if(curl_hnd[i] == hnd) return i; } @@ -66,7 +66,7 @@ void dump(const char *text, int num, unsigned char *ptr, size_t size, { size_t i; size_t c; - unsigned int width=0x10; + unsigned int width = 0x10; if(nohex) /* without the hex output, we can fit more on screen */ @@ -75,30 +75,32 @@ void dump(const char *text, int num, unsigned char *ptr, size_t size, fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n", num, text, (long)size, (long)size); - for(i=0; i=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.'); + (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.'); /* check again for 0D0A, to avoid an extra \n if it's at width */ - if(nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) { - i+=(c+3-width); + if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && + ptr[i + c + 2] == 0x0A) { + i += (c + 3 - width); break; } } @@ -136,6 +138,7 @@ int my_trace(CURL *handle, curl_infotype type, switch(type) { case CURLINFO_TEXT: fprintf(stderr, "%s [%d] Info: %s", timebuf, num, data); + /* FALLTHROUGH */ default: /* in case a new one is introduced to shock us */ return 0; @@ -177,7 +180,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) return retcode; } -struct input indata[NUM_HANDLES]; +static struct input indata[NUM_HANDLES]; static void setup(CURL *hnd, int num, const char *upload) { @@ -215,7 +218,7 @@ static void setup(CURL *hnd, int num, const char *upload) /* upload please */ curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L); - /* send it verbose for max debuggaility */ + /* please be verbose */ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L); curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace); @@ -259,7 +262,7 @@ int main(int argc, char **argv) /* init a multi stack */ multi_handle = curl_multi_init(); - for(i=0; i, et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -69,7 +69,7 @@ int main(int argc, char **argv) if(argc < 3) return 1; - file= argv[1]; + file = argv[1]; url = argv[2]; /* get the file size of the local file */ diff --git a/docs/examples/imap-copy.c b/docs/examples/imap-copy.c index 4c3b640..1ef43f8 100644 --- a/docs/examples/imap-copy.c +++ b/docs/examples/imap-copy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,7 +48,7 @@ int main(void) /* This is source mailbox folder to select */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX"); - /* Set the COPY command specifing the message ID and destination folder */ + /* Set the COPY command specifying the message ID and destination folder */ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "COPY 1 FOLDER"); /* Note that to perform a move operation you will need to perform the copy, diff --git a/docs/examples/imap-create.c b/docs/examples/imap-create.c index 8f72cb8..6f04453 100644 --- a/docs/examples/imap-create.c +++ b/docs/examples/imap-create.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,7 +48,7 @@ int main(void) /* This is just the server URL */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); - /* Set the CREATE command specifing the new folder name */ + /* Set the CREATE command specifying the new folder name */ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CREATE FOLDER"); /* Perform the custom request */ diff --git a/docs/examples/imap-delete.c b/docs/examples/imap-delete.c index bd9d1a4..cf1ae0b 100644 --- a/docs/examples/imap-delete.c +++ b/docs/examples/imap-delete.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,7 +48,7 @@ int main(void) /* This is just the server URL */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); - /* Set the DELETE command specifing the existing folder */ + /* Set the DELETE command specifying the existing folder */ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE FOLDER"); /* Perform the custom request */ diff --git a/docs/examples/imap-examine.c b/docs/examples/imap-examine.c index 4287f8a..b89e9dc 100644 --- a/docs/examples/imap-examine.c +++ b/docs/examples/imap-examine.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,7 +48,7 @@ int main(void) /* This is just the server URL */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com"); - /* Set the EXAMINE command specifing the mailbox folder */ + /* Set the EXAMINE command specifying the mailbox folder */ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXAMINE OUTBOX"); /* Perform the custom request */ diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c index 8cd4858..07d1b8b 100644 --- a/docs/examples/imap-multi.c +++ b/docs/examples/imap-multi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -144,7 +144,7 @@ int main(void) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) { diff --git a/docs/examples/imap-search.c b/docs/examples/imap-search.c index f1261e1..427dcc9 100644 --- a/docs/examples/imap-search.c +++ b/docs/examples/imap-search.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,7 +48,7 @@ int main(void) /* This is mailbox folder to select */ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX"); - /* Set the SEARCH command specifing what we want to search for. Note that + /* Set the SEARCH command specifying what we want to search for. Note that * this can contain a message sequence set and a number of search criteria * keywords including flags such as ANSWERED, DELETED, DRAFT, FLAGGED, NEW, * RECENT and SEEN. For more information about the search criteria please diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index 9a8ecfe..74b2a94 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -55,7 +55,7 @@ int main(void) int msgs_left; /* how many messages are left */ /* Allocate one CURL handle per transfer */ - for(i=0; ieasy_handle == handles[idx]); if(found) break; @@ -170,7 +170,7 @@ int main(void) curl_multi_cleanup(multi_handle); /* Free the CURL handles */ - for(i=0; i, et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -45,7 +45,7 @@ void dump(const char *text, size_t i; size_t c; - unsigned int width=0x10; + unsigned int width = 0x10; if(nohex) /* without the hex output, we can fit more on screen */ @@ -54,30 +54,32 @@ void dump(const char *text, fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n", text, (long)size, (long)size); - for(i=0; i=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.'); + (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.'); /* check again for 0D0A, to avoid an extra \n if it's at width */ - if(nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) { - i+=(c+3-width); + if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && + ptr[i + c + 2] == 0x0A) { + i += (c + 3 - width); break; } } @@ -99,6 +101,7 @@ int my_trace(CURL *handle, curl_infotype type, switch(type) { case CURLINFO_TEXT: fprintf(stderr, "== Info: %s", data); + /* FALLTHROUGH */ default: /* in case a new one is introduced to shock us */ return 0; @@ -203,7 +206,7 @@ int main(void) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } switch(rc) { diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c index 4e50c76..3434539 100644 --- a/docs/examples/multi-double.c +++ b/docs/examples/multi-double.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -119,7 +119,7 @@ int main(void) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } switch(rc) { diff --git a/docs/examples/multi-formadd.c b/docs/examples/multi-formadd.c new file mode 100644 index 0000000..bd85cc6 --- /dev/null +++ b/docs/examples/multi-formadd.c @@ -0,0 +1,171 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + * using the multi interface to do a multipart formpost without blocking + * + */ + +#include +#include +#include + +#include + +int main(void) +{ + CURL *curl; + + CURLM *multi_handle; + int still_running; + + struct curl_httppost *formpost = NULL; + struct curl_httppost *lastptr = NULL; + struct curl_slist *headerlist = NULL; + static const char buf[] = "Expect:"; + + /* Fill in the file upload field. This makes libcurl load data from + the given file name when curl_easy_perform() is called. */ + curl_formadd(&formpost, + &lastptr, + CURLFORM_COPYNAME, "sendfile", + CURLFORM_FILE, "postit2.c", + CURLFORM_END); + + /* Fill in the filename field */ + curl_formadd(&formpost, + &lastptr, + CURLFORM_COPYNAME, "filename", + CURLFORM_COPYCONTENTS, "postit2.c", + CURLFORM_END); + + /* Fill in the submit field too, even if this is rarely needed */ + curl_formadd(&formpost, + &lastptr, + CURLFORM_COPYNAME, "submit", + CURLFORM_COPYCONTENTS, "send", + CURLFORM_END); + + curl = curl_easy_init(); + multi_handle = curl_multi_init(); + + /* initialize custom header list (stating that Expect: 100-continue is not + wanted */ + headerlist = curl_slist_append(headerlist, buf); + if(curl && multi_handle) { + + /* what URL that receives this POST */ + curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi"); + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); + curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); + + curl_multi_add_handle(multi_handle, curl); + + curl_multi_perform(multi_handle, &still_running); + + do { + struct timeval timeout; + int rc; /* select() return code */ + CURLMcode mc; /* curl_multi_fdset() return code */ + + fd_set fdread; + fd_set fdwrite; + fd_set fdexcep; + int maxfd = -1; + + long curl_timeo = -1; + + FD_ZERO(&fdread); + FD_ZERO(&fdwrite); + FD_ZERO(&fdexcep); + + /* set a suitable timeout to play around with */ + timeout.tv_sec = 1; + timeout.tv_usec = 0; + + curl_multi_timeout(multi_handle, &curl_timeo); + if(curl_timeo >= 0) { + timeout.tv_sec = curl_timeo / 1000; + if(timeout.tv_sec > 1) + timeout.tv_sec = 1; + else + timeout.tv_usec = (curl_timeo % 1000) * 1000; + } + + /* get file descriptors from the transfers */ + mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + + if(mc != CURLM_OK) { + fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); + break; + } + + /* On success the value of maxfd is guaranteed to be >= -1. We call + select(maxfd + 1, ...); specially in case of (maxfd == -1) there are + no fds ready yet so we call select(0, ...) --or Sleep() on Windows-- + to sleep 100ms, which is the minimum suggested value in the + curl_multi_fdset() doc. */ + + if(maxfd == -1) { +#ifdef _WIN32 + Sleep(100); + rc = 0; +#else + /* Portable sleep for platforms other than Windows. */ + struct timeval wait = { 0, 100 * 1000 }; /* 100ms */ + rc = select(0, NULL, NULL, NULL, &wait); +#endif + } + else { + /* Note that on some platforms 'timeout' may be modified by select(). + If you need access to the original value save a copy beforehand. */ + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); + } + + switch(rc) { + case -1: + /* select error */ + break; + case 0: + default: + /* timeout or readable/writable sockets */ + printf("perform!\n"); + curl_multi_perform(multi_handle, &still_running); + printf("running: %d!\n", still_running); + break; + } + } while(still_running); + + curl_multi_cleanup(multi_handle); + + /* always cleanup */ + curl_easy_cleanup(curl); + + /* then cleanup the formpost chain */ + curl_formfree(formpost); + + /* free slist */ + curl_slist_free_all(headerlist); + } + return 0; +} diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c index cc2ca18..95d71be 100644 --- a/docs/examples/multi-post.c +++ b/docs/examples/multi-post.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -37,47 +37,43 @@ int main(void) CURLM *multi_handle; int still_running; - struct curl_httppost *formpost=NULL; - struct curl_httppost *lastptr=NULL; - struct curl_slist *headerlist=NULL; + curl_mime *form = NULL; + curl_mimepart *field = NULL; + struct curl_slist *headerlist = NULL; static const char buf[] = "Expect:"; - /* Fill in the file upload field. This makes libcurl load data from - the given file name when curl_easy_perform() is called. */ - curl_formadd(&formpost, - &lastptr, - CURLFORM_COPYNAME, "sendfile", - CURLFORM_FILE, "postit2.c", - CURLFORM_END); - - /* Fill in the filename field */ - curl_formadd(&formpost, - &lastptr, - CURLFORM_COPYNAME, "filename", - CURLFORM_COPYCONTENTS, "postit2.c", - CURLFORM_END); - - /* Fill in the submit field too, even if this is rarely needed */ - curl_formadd(&formpost, - &lastptr, - CURLFORM_COPYNAME, "submit", - CURLFORM_COPYCONTENTS, "send", - CURLFORM_END); - curl = curl_easy_init(); multi_handle = curl_multi_init(); - /* initialize custom header list (stating that Expect: 100-continue is not - wanted */ - headerlist = curl_slist_append(headerlist, buf); if(curl && multi_handle) { + /* Create the form */ + form = curl_mime_init(curl); + + /* Fill in the file upload field */ + field = curl_mime_addpart(form); + curl_mime_name(field, "sendfile"); + curl_mime_filedata(field, "multi-post.c"); + + /* Fill in the filename field */ + field = curl_mime_addpart(form); + curl_mime_name(field, "filename"); + curl_mime_data(field, "multi-post.c", CURL_ZERO_TERMINATED); + + /* Fill in the submit field too, even if this is rarely needed */ + field = curl_mime_addpart(form); + curl_mime_name(field, "submit"); + curl_mime_data(field, "send", CURL_ZERO_TERMINATED); + + /* initialize custom header list (stating that Expect: 100-continue is not + wanted */ + headerlist = curl_slist_append(headerlist, buf); /* what URL that receives this POST */ curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi"); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); - curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); + curl_easy_setopt(curl, CURLOPT_MIMEPOST, form); curl_multi_add_handle(multi_handle, curl); @@ -139,7 +135,7 @@ int main(void) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } switch(rc) { @@ -161,8 +157,8 @@ int main(void) /* always cleanup */ curl_easy_cleanup(curl); - /* then cleanup the formpost chain */ - curl_formfree(formpost); + /* then cleanup the form */ + curl_mime_free(form); /* free slist */ curl_slist_free_all(headerlist); diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c index 37e4f47..ceddad0 100644 --- a/docs/examples/multi-uv.c +++ b/docs/examples/multi-uv.c @@ -148,7 +148,7 @@ static void curl_perform(uv_poll_t *req, int status, int events) check_multi_info(); } -static void on_timeout(uv_timer_t *req, int status) +static void on_timeout(uv_timer_t *req) { int running_handles; curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0, diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c index 26c40f5..e3ae8e6 100644 --- a/docs/examples/multithread.c +++ b/docs/examples/multithread.c @@ -74,7 +74,7 @@ int main(int argc, char **argv) /* Must initialize libcurl before any threads are started */ curl_global_init(CURL_GLOBAL_ALL); - for(i=0; i< NUMT; i++) { + for(i = 0; i< NUMT; i++) { error = pthread_create(&tid[i], NULL, /* default attributes please */ pull_one_url, @@ -86,7 +86,7 @@ int main(int argc, char **argv) } /* now wait for all threads to terminate */ - for(i=0; i< NUMT; i++) { + for(i = 0; i< NUMT; i++) { error = pthread_join(tid[i], NULL); fprintf(stderr, "Thread %d terminated\n", i); } diff --git a/docs/examples/opensslthreadlock.c b/docs/examples/opensslthreadlock.c index 6f86c7f..649ef93 100644 --- a/docs/examples/opensslthreadlock.c +++ b/docs/examples/opensslthreadlock.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -50,7 +50,7 @@ void handle_error(const char *file, int lineno, const char *msg) } /* This array will store all of the mutexes available to OpenSSL. */ -static MUTEX_TYPE *mutex_buf= NULL; +static MUTEX_TYPE *mutex_buf = NULL; static void locking_function(int mode, int n, const char *file, int line) { diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c index f932918..4b87886 100644 --- a/docs/examples/pop3-multi.c +++ b/docs/examples/pop3-multi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -144,7 +144,7 @@ int main(void) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) { diff --git a/docs/examples/pop3-top.c b/docs/examples/pop3-top.c index f452b41..4f5937f 100644 --- a/docs/examples/pop3-top.c +++ b/docs/examples/pop3-top.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -21,7 +21,7 @@ ***************************************************************************/ /* - * POP3 example showing how to retreive only the headers of an e-mail + * POP3 example showing how to retrieve only the headers of an e-mail * */ diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c index f4cd50c..ebb4e2a 100644 --- a/docs/examples/post-callback.c +++ b/docs/examples/post-callback.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,36 +20,45 @@ * ***************************************************************************/ /* - * An example source code that issues a HTTP POST and we provide the actual - * data through a read callback. + * Issue an HTTP POST and provide the data through the read callback. * */ #include #include #include -const char data[]="this is what we post to the silly web server"; +/* silly test data to POST */ +static const char data[]="Lorem ipsum dolor sit amet, consectetur adipiscing " + "elit. Sed vel urna neque. Ut quis leo metus. Quisque eleifend, ex at " + "laoreet rhoncus, odio ipsum semper metus, at tempus ante urna in mauris. " + "Suspendisse ornare tempor venenatis. Ut dui neque, pellentesque a varius " + "eget, mattis vitae ligula. Fusce ut pharetra est. Ut ullamcorper mi ac " + "sollicitudin semper. Praesent sit amet tellus varius, posuere nulla non, " + "rhoncus ipsum."; struct WriteThis { const char *readptr; - long sizeleft; + size_t sizeleft; }; -static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) +static size_t read_callback(void *dest, size_t size, size_t nmemb, void *userp) { - struct WriteThis *pooh = (struct WriteThis *)userp; - - if(size*nmemb < 1) - return 0; - - if(pooh->sizeleft) { - *(char *)ptr = pooh->readptr[0]; /* copy one single byte */ - pooh->readptr++; /* advance pointer */ - pooh->sizeleft--; /* less data left */ - return 1; /* we return 1 byte at a time! */ + struct WriteThis *wt = (struct WriteThis *)userp; + size_t buffer_size = size*nmemb; + + if(wt->sizeleft) { + /* copy as much as possible from the source to the destination */ + size_t copy_this_much = wt->sizeleft; + if(copy_this_much > buffer_size) + copy_this_much = buffer_size; + memcpy(dest, wt->readptr, copy_this_much); + + wt->readptr += copy_this_much; + wt->sizeleft -= copy_this_much; + return copy_this_much; /* we copied this many bytes */ } - return 0; /* no more data left to deliver */ + return 0; /* no more data left to deliver */ } int main(void) @@ -57,10 +66,10 @@ int main(void) CURL *curl; CURLcode res; - struct WriteThis pooh; + struct WriteThis wt; - pooh.readptr = data; - pooh.sizeleft = (long)strlen(data); + wt.readptr = data; + wt.sizeleft = strlen(data); /* In windows, this will init the winsock stuff */ res = curl_global_init(CURL_GLOBAL_DEFAULT); @@ -75,7 +84,7 @@ int main(void) curl = curl_easy_init(); if(curl) { /* First set the URL that is about to receive our POST. */ - curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/index.cgi"); + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/index.cgi"); /* Now specify we want to POST data */ curl_easy_setopt(curl, CURLOPT_POST, 1L); @@ -84,7 +93,7 @@ int main(void) curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); /* pointer to pass to our read function */ - curl_easy_setopt(curl, CURLOPT_READDATA, &pooh); + curl_easy_setopt(curl, CURLOPT_READDATA, &wt); /* get verbose debug output please */ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); @@ -108,7 +117,7 @@ int main(void) #else /* Set the expected POST size. If you want to POST large amounts of data, consider CURLOPT_POSTFIELDSIZE_LARGE */ - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, pooh.sizeleft); + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)wt.sizeleft); #endif #ifdef DISABLE_EXPECT diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c index 9dd4cb6..488d227 100644 --- a/docs/examples/postinmemory.c +++ b/docs/examples/postinmemory.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -58,7 +58,7 @@ int main(void) CURL *curl; CURLcode res; struct MemoryStruct chunk; - static const char *postthis="Field=1&Field=2&Field=3"; + static const char *postthis = "Field=1&Field=2&Field=3"; chunk.memory = malloc(1); /* will be grown as needed by realloc above */ chunk.size = 0; /* no data at this point */ diff --git a/docs/examples/postit2-formadd.c b/docs/examples/postit2-formadd.c new file mode 100644 index 0000000..0ac09f2 --- /dev/null +++ b/docs/examples/postit2-formadd.c @@ -0,0 +1,107 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + * HTTP Multipart formpost with file upload and two additional parts. + * + */ +/* Example code that uploads a file name 'foo' to a remote script that accepts + * "HTML form based" (as described in RFC1738) uploads using HTTP POST. + * + * The imaginary form we'll fill in looks like: + * + *
+ * Enter file: + * Enter file name: + * + *
+ * + * This exact source code has not been verified to work. + */ + +#include +#include + +#include + +int main(int argc, char *argv[]) +{ + CURL *curl; + CURLcode res; + + struct curl_httppost *formpost = NULL; + struct curl_httppost *lastptr = NULL; + struct curl_slist *headerlist = NULL; + static const char buf[] = "Expect:"; + + curl_global_init(CURL_GLOBAL_ALL); + + /* Fill in the file upload field */ + curl_formadd(&formpost, + &lastptr, + CURLFORM_COPYNAME, "sendfile", + CURLFORM_FILE, "postit2.c", + CURLFORM_END); + + /* Fill in the filename field */ + curl_formadd(&formpost, + &lastptr, + CURLFORM_COPYNAME, "filename", + CURLFORM_COPYCONTENTS, "postit2.c", + CURLFORM_END); + + + /* Fill in the submit field too, even if this is rarely needed */ + curl_formadd(&formpost, + &lastptr, + CURLFORM_COPYNAME, "submit", + CURLFORM_COPYCONTENTS, "send", + CURLFORM_END); + + curl = curl_easy_init(); + /* initialize custom header list (stating that Expect: 100-continue is not + wanted */ + headerlist = curl_slist_append(headerlist, buf); + if(curl) { + /* what URL that receives this POST */ + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi"); + if((argc == 2) && (!strcmp(argv[1], "noexpectheader"))) + /* only disable 100-continue header if explicitly requested */ + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); + curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* always cleanup */ + curl_easy_cleanup(curl); + + /* then cleanup the formpost chain */ + curl_formfree(formpost); + /* free slist */ + curl_slist_free_all(headerlist); + } + return 0; +} diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index ef50a66..49391e1 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,46 +47,42 @@ int main(int argc, char *argv[]) CURL *curl; CURLcode res; - struct curl_httppost *formpost=NULL; - struct curl_httppost *lastptr=NULL; - struct curl_slist *headerlist=NULL; + curl_mime *form = NULL; + curl_mimepart *field = NULL; + struct curl_slist *headerlist = NULL; static const char buf[] = "Expect:"; curl_global_init(CURL_GLOBAL_ALL); - /* Fill in the file upload field */ - curl_formadd(&formpost, - &lastptr, - CURLFORM_COPYNAME, "sendfile", - CURLFORM_FILE, "postit2.c", - CURLFORM_END); + curl = curl_easy_init(); + if(curl) { + /* Create the form */ + form = curl_mime_init(curl); - /* Fill in the filename field */ - curl_formadd(&formpost, - &lastptr, - CURLFORM_COPYNAME, "filename", - CURLFORM_COPYCONTENTS, "postit2.c", - CURLFORM_END); + /* Fill in the file upload field */ + field = curl_mime_addpart(form); + curl_mime_name(field, "sendfile"); + curl_mime_filedata(field, "postit2.c"); + /* Fill in the filename field */ + field = curl_mime_addpart(form); + curl_mime_name(field, "filename"); + curl_mime_data(field, "postit2.c", CURL_ZERO_TERMINATED); - /* Fill in the submit field too, even if this is rarely needed */ - curl_formadd(&formpost, - &lastptr, - CURLFORM_COPYNAME, "submit", - CURLFORM_COPYCONTENTS, "send", - CURLFORM_END); + /* Fill in the submit field too, even if this is rarely needed */ + field = curl_mime_addpart(form); + curl_mime_name(field, "submit"); + curl_mime_data(field, "send", CURL_ZERO_TERMINATED); - curl = curl_easy_init(); - /* initialize custom header list (stating that Expect: 100-continue is not - wanted */ - headerlist = curl_slist_append(headerlist, buf); - if(curl) { + /* initialize custom header list (stating that Expect: 100-continue is not + wanted */ + headerlist = curl_slist_append(headerlist, buf); /* what URL that receives this POST */ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi"); if((argc == 2) && (!strcmp(argv[1], "noexpectheader"))) /* only disable 100-continue header if explicitly requested */ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); - curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); + curl_easy_setopt(curl, CURLOPT_MIMEPOST, form); /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); @@ -98,8 +94,8 @@ int main(int argc, char *argv[]) /* always cleanup */ curl_easy_cleanup(curl); - /* then cleanup the formpost chain */ - curl_formfree(formpost); + /* then cleanup the form */ + curl_mime_free(form); /* free slist */ curl_slist_free_all(headerlist); } diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c index 5c66aa6..32084e9 100644 --- a/docs/examples/rtsp.c +++ b/docs/examples/rtsp.c @@ -63,13 +63,13 @@ static int _getch(void) /* error handling macros */ #define my_curl_easy_setopt(A, B, C) \ res = curl_easy_setopt((A), (B), (C)); \ - if(!res) \ + if(res != CURLE_OK) \ fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \ #A, #B, #C, res); #define my_curl_easy_perform(A) \ res = curl_easy_perform(A); \ - if(!res) \ + if(res != CURLE_OK) \ fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res); @@ -129,6 +129,9 @@ static void rtsp_play(CURL *curl, const char *uri, const char *range) my_curl_easy_setopt(curl, CURLOPT_RANGE, range); my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_PLAY); my_curl_easy_perform(curl); + + /* switch off using range again */ + my_curl_easy_setopt(curl, CURLOPT_RANGE, NULL); } diff --git a/docs/examples/sampleconv.c b/docs/examples/sampleconv.c index eece6aa..96eff46 100644 --- a/docs/examples/sampleconv.c +++ b/docs/examples/sampleconv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -42,49 +42,49 @@ #include #include -CURLcode my_conv_from_ascii_to_ebcdic(char *buffer, size_t length) +static CURLcode my_conv_from_ascii_to_ebcdic(char *buffer, size_t length) { - char *tempptrin, *tempptrout; - size_t bytes = length; - int rc; - tempptrin = tempptrout = buffer; - rc = platform_a2e(&tempptrin, &bytes, &tempptrout, &bytes); - if(rc == PLATFORM_CONV_OK) { - return CURLE_OK; - } - else { - return CURLE_CONV_FAILED; - } + char *tempptrin, *tempptrout; + size_t bytes = length; + int rc; + tempptrin = tempptrout = buffer; + rc = platform_a2e(&tempptrin, &bytes, &tempptrout, &bytes); + if(rc == PLATFORM_CONV_OK) { + return CURLE_OK; + } + else { + return CURLE_CONV_FAILED; + } } -CURLcode my_conv_from_ebcdic_to_ascii(char *buffer, size_t length) +static CURLcode my_conv_from_ebcdic_to_ascii(char *buffer, size_t length) { - char *tempptrin, *tempptrout; - size_t bytes = length; - int rc; - tempptrin = tempptrout = buffer; - rc = platform_e2a(&tempptrin, &bytes, &tempptrout, &bytes); - if(rc == PLATFORM_CONV_OK) { - return CURLE_OK; - } - else { - return CURLE_CONV_FAILED; - } + char *tempptrin, *tempptrout; + size_t bytes = length; + int rc; + tempptrin = tempptrout = buffer; + rc = platform_e2a(&tempptrin, &bytes, &tempptrout, &bytes); + if(rc == PLATFORM_CONV_OK) { + return CURLE_OK; + } + else { + return CURLE_CONV_FAILED; + } } -CURLcode my_conv_from_utf8_to_ebcdic(char *buffer, size_t length) +static CURLcode my_conv_from_utf8_to_ebcdic(char *buffer, size_t length) { - char *tempptrin, *tempptrout; - size_t bytes = length; - int rc; - tempptrin = tempptrout = buffer; - rc = platform_u2e(&tempptrin, &bytes, &tempptrout, &bytes); - if(rc == PLATFORM_CONV_OK) { - return CURLE_OK; - } - else { - return CURLE_CONV_FAILED; - } + char *tempptrin, *tempptrout; + size_t bytes = length; + int rc; + tempptrin = tempptrout = buffer; + rc = platform_u2e(&tempptrin, &bytes, &tempptrout, &bytes); + if(rc == PLATFORM_CONV_OK) { + return CURLE_OK; + } + else { + return CURLE_CONV_FAILED; + } } int main(void) diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index 6623234..eedaf4c 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -36,7 +36,7 @@ static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms) int res; tv.tv_sec = timeout_ms / 1000; - tv.tv_usec= (timeout_ms % 1000) * 1000; + tv.tv_usec = (timeout_ms % 1000) * 1000; FD_ZERO(&infd); FD_ZERO(&outfd); @@ -52,7 +52,7 @@ static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms) } /* select() returns the number of signalled sockets or -1 */ - res = select(sockfd + 1, &infd, &outfd, &errfd, &tv); + res = select((int)sockfd + 1, &infd, &outfd, &errfd, &tv); return res; } diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c index 1ca7448..44a3caf 100644 --- a/docs/examples/sftpget.c +++ b/docs/examples/sftpget.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -46,10 +46,10 @@ struct FtpFile { static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { - struct FtpFile *out=(struct FtpFile *)stream; + struct FtpFile *out = (struct FtpFile *)stream; if(out && !out->stream) { /* open file for writing */ - out->stream=fopen(out->filename, "wb"); + out->stream = fopen(out->filename, "wb"); if(!out->stream) return -1; /* failure, can't open file to write */ } @@ -61,7 +61,7 @@ int main(void) { CURL *curl; CURLcode res; - struct FtpFile ftpfile={ + struct FtpFile ftpfile = { "yourfile.bin", /* name to store the file as if successful */ NULL }; diff --git a/docs/examples/sftpuploadresume.c b/docs/examples/sftpuploadresume.c new file mode 100644 index 0000000..032bcaf --- /dev/null +++ b/docs/examples/sftpuploadresume.c @@ -0,0 +1,130 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + * Upload to SFTP, resuming a previously aborted transfer. + * + */ + +#include +#include +#include + +/* read data to upload */ +static size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream) +{ + FILE *f = (FILE *)stream; + size_t n; + + if(ferror(f)) + return CURL_READFUNC_ABORT; + + n = fread(ptr, size, nmemb, f) * size; + + return n; +} + +/* + * sftpGetRemoteFileSize returns the remote file size in byte; -1 on error + */ +static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile) +{ + CURLcode result = CURLE_GOT_NOTHING; + curl_off_t remoteFileSizeByte = -1; + CURL *curlHandlePtr = NULL; + + curlHandlePtr = curl_easy_init(); + curl_easy_setopt(curlHandlePtr, CURLOPT_VERBOSE, 1L); + + curl_easy_setopt(curlHandlePtr, CURLOPT_URL, i_remoteFile); + curl_easy_setopt(curlHandlePtr, CURLOPT_NOPROGRESS, 1); + curl_easy_setopt(curlHandlePtr, CURLOPT_NOBODY, 1); + curl_easy_setopt(curlHandlePtr, CURLOPT_HEADER, 1); + curl_easy_setopt(curlHandlePtr, CURLOPT_FILETIME, 1); + + result = curl_easy_perform(curlHandlePtr); + if(CURLE_OK == result) { + result = curl_easy_getinfo(curlHandlePtr, + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, + &remoteFileSizeByte); + printf("filesize: %ld \n", remoteFileSizeByte); + } + curl_easy_cleanup(curlHandlePtr); + + return remoteFileSizeByte; +} + + +static int sftpResumeUpload(CURL *curlhandle, const char *remotepath, + const char *localpath) +{ + FILE *f = NULL; + CURLcode result = CURLE_GOT_NOTHING; + + curl_off_t remoteFileSizeByte = sftpGetRemoteFileSize(remotepath); + if(-1 == remoteFileSizeByte) { + printf("Error reading the remote file size: unable to resume upload\n"); + return -1; + } + + f = fopen(localpath, "rb"); + if(!f) { + perror(NULL); + return 0; + } + + curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L); + curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath); + curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc); + curl_easy_setopt(curlhandle, CURLOPT_READDATA, f); + + fseek(f, remoteFileSizeByte, SEEK_SET); + curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L); + result = curl_easy_perform(curlhandle); + + fclose(f); + + if(result == CURLE_OK) + return 1; + else { + fprintf(stderr, "%s\n", curl_easy_strerror(result)); + return 0; + } +} + +int main(void) +{ + const char *remote = "sftp://user:pass@example.com/path/filename"; + const char *filename = "filename"; + CURL *curlhandle = NULL; + + curl_global_init(CURL_GLOBAL_ALL); + curlhandle = curl_easy_init(); + + if(!sftpResumeUpload(curlhandle, remote, filename)) { + printf("resumed upload using curl %s failed\n", curl_version()); + } + + curl_easy_cleanup(curlhandle); + curl_global_cleanup(); + + return 0; +} diff --git a/docs/examples/shared-connection-cache.c b/docs/examples/shared-connection-cache.c new file mode 100644 index 0000000..a1aa0d6 --- /dev/null +++ b/docs/examples/shared-connection-cache.c @@ -0,0 +1,85 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + * Connection cache shared between easy handles with the share inteface + * + */ +#include +#include + +static void my_lock(CURL *handle, curl_lock_data data, + curl_lock_access laccess, void *useptr) +{ + (void)handle; + (void)data; + (void)laccess; + (void)useptr; + fprintf(stderr, "-> Mutex lock\n"); +} + +static void my_unlock(CURL *handle, curl_lock_data data, void *useptr) +{ + (void)handle; + (void)data; + (void)useptr; + fprintf(stderr, "<- Mutex unlock\n"); +} + +int main(void) +{ + CURL *curl; + CURLcode res; + CURLSH *share; + int i; + + share = curl_share_init(); + curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); + + curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock); + curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock); + + /* Loop the transfer and cleanup the handle properly every lap. This will + still reuse connections since the pool is in the shared object! */ + + for(i = 0; i < 3; i++) { + curl = curl_easy_init(); + if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://curl.haxx.se/"); + + /* use the share object */ + curl_easy_setopt(curl, CURLOPT_SHARE, share); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* always cleanup */ + curl_easy_cleanup(curl); + } + } + + curl_share_cleanup(share); + return 0; +} diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c index 99df057..e366f00 100644 --- a/docs/examples/simplepost.c +++ b/docs/examples/simplepost.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -32,7 +32,7 @@ int main(void) CURL *curl; CURLcode res; - static const char *postthis="moo mooo moo moo"; + static const char *postthis = "moo mooo moo moo"; curl = curl_easy_init(); if(curl) { diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c index 81713ab..fdc7cf1 100644 --- a/docs/examples/simplessl.c +++ b/docs/examples/simplessl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -53,7 +53,7 @@ int main(void) const char *pPassphrase = NULL; static const char *pCertFile = "testcert.pem"; - static const char *pCACertFile="cacert.pem"; + static const char *pCACertFile = "cacert.pem"; static const char *pHeaderFile = "dumpit"; const char *pKeyName; diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c index 713fcc6..8451743 100644 --- a/docs/examples/smooth-gtk-thread.c +++ b/docs/examples/smooth-gtk-thread.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -134,7 +134,7 @@ void *create_thread(void *progress_bar) int error; /* Make sure I don't create more threads than urls. */ - for(i=0; i < NUMT && i < num_urls ; i++) { + for(i = 0; i < NUMT && i < num_urls ; i++) { error = pthread_create(&tid[i], NULL, /* default attributes please */ pull_one_url, @@ -146,7 +146,7 @@ void *create_thread(void *progress_bar) } /* Wait for all threads to terminate. */ - for(i=0; i < NUMT && i < num_urls; i++) { + for(i = 0; i < NUMT && i < num_urls; i++) { error = pthread_join(tid[i], NULL); fprintf(stderr, "Thread %d terminated\n", i); } diff --git a/docs/examples/smtp-mail.c b/docs/examples/smtp-mail.c index 315bb2c..3285b31 100644 --- a/docs/examples/smtp-mail.c +++ b/docs/examples/smtp-mail.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -21,7 +21,7 @@ ***************************************************************************/ /* - * SMTP example showing how to send e-mails + * Send e-mail with SMTP * */ @@ -29,22 +29,26 @@ #include #include -/* This is a simple example showing how to send mail using libcurl's SMTP - * capabilities. For an example of using the multi interface please see - * smtp-multi.c. - * - * Note that this example requires libcurl 7.20.0 or above. +/* + * For an SMTP example using the multi interface please see smtp-multi.c. + */ + +/* The libcurl options want plain addresses, the viewable headers in the mail + * can very well get a full name as well. */ +#define FROM_ADDR "" +#define TO_ADDR "" +#define CC_ADDR "" -#define FROM "" -#define TO "" -#define CC "" +#define FROM_MAIL "Sender Person " FROM_ADDR +#define TO_MAIL "A Receiver " TO_ADDR +#define CC_MAIL "John CC Smith " CC_ADDR static const char *payload_text[] = { "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n", - "To: " TO "\r\n", - "From: " FROM "(Example User)\r\n", - "Cc: " CC "(Another example User)\r\n", + "To: " TO_MAIL "\r\n", + "From: " FROM_MAIL "\r\n", + "Cc: " CC_MAIL "\r\n", "Message-ID: \r\n", "Subject: SMTP example message\r\n", @@ -103,13 +107,13 @@ int main(void) * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more * details. */ - curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM); + curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_ADDR); /* Add two recipients, in this particular case they correspond to the * To: and Cc: addressees in the header, but they could be any kind of * recipient. */ - recipients = curl_slist_append(recipients, TO); - recipients = curl_slist_append(recipients, CC); + recipients = curl_slist_append(recipients, TO_ADDR); + recipients = curl_slist_append(recipients, CC_ADDR); curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients); /* We're using a callback function to specify the payload (the headers and diff --git a/docs/examples/smtp-mime.c b/docs/examples/smtp-mime.c new file mode 100644 index 0000000..dcd867f --- /dev/null +++ b/docs/examples/smtp-mime.c @@ -0,0 +1,162 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* + * SMTP example showing how to send mime e-mails + * + */ + +#include +#include +#include + +/* This is a simple example showing how to send mime mail using libcurl's SMTP + * capabilities. For an example of using the multi interface please see + * smtp-multi.c. + * + * Note that this example requires libcurl 7.56.0 or above. + */ + +#define FROM "" +#define TO "" +#define CC "" + +static const char *headers_text[] = { + "Date: Tue, 22 Aug 2017 14:08:43 +0100", + "To: " TO, + "From: " FROM " (Example User)", + "Cc: " CC " (Another example User)", + "Message-ID: ", + "Subject: example sending a MIME-formatted message", + NULL +}; + +static const char inline_text[] = + "This is the inline text message of the e-mail.\r\n" + "\r\n" + " It could be a lot of lines that would be displayed in an e-mail\r\n" + "viewer that is not able to handle HTML.\r\n"; + +static const char inline_html[] = + "\r\n" + "

This is the inline HTML message of the e-mail.

" + "
\r\n" + "

It could be a lot of HTML data that would be displayed by " + "e-mail viewers able to handle HTML.

" + "\r\n"; + + +int main(void) +{ + CURL *curl; + CURLcode res = CURLE_OK; + struct curl_slist *headers = NULL; + struct curl_slist *recipients = NULL; + struct curl_slist *slist = NULL; + curl_mime *mime; + curl_mime *alt; + curl_mimepart *part; + const char **cpp; + + curl = curl_easy_init(); + if(curl) { + /* This is the URL for your mailserver */ + curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com"); + + /* Note that this option isn't strictly required, omitting it will result + * in libcurl sending the MAIL FROM command with empty sender data. All + * autoresponses should have an empty reverse-path, and should be directed + * to the address in the reverse-path which triggered them. Otherwise, + * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more + * details. + */ + curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM); + + /* Add two recipients, in this particular case they correspond to the + * To: and Cc: addressees in the header, but they could be any kind of + * recipient. */ + recipients = curl_slist_append(recipients, TO); + recipients = curl_slist_append(recipients, CC); + curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients); + + /* Build and set the message header list. */ + for(cpp = headers_text; *cpp; cpp++) + headers = curl_slist_append(headers, *cpp); + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + + /* Build the mime message. */ + mime = curl_mime_init(curl); + + /* The inline part is an alterative proposing the html and the text + versions of the e-mail. */ + alt = curl_mime_init(curl); + + /* HTML message. */ + part = curl_mime_addpart(alt); + curl_mime_data(part, inline_html, CURL_ZERO_TERMINATED); + curl_mime_type(part, "text/html"); + + /* Text message. */ + part = curl_mime_addpart(alt); + curl_mime_data(part, inline_text, CURL_ZERO_TERMINATED); + + /* Create the inline part. */ + part = curl_mime_addpart(mime); + curl_mime_subparts(part, alt); + curl_mime_type(part, "multipart/alternative"); + slist = curl_slist_append(NULL, "Content-Disposition: inline"); + curl_mime_headers(part, slist, 1); + + /* Add the current source program as an attachment. */ + part = curl_mime_addpart(mime); + curl_mime_filedata(part, "smtp-mime.c"); + curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime); + + /* Send the message */ + res = curl_easy_perform(curl); + + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* Free lists. */ + curl_slist_free_all(recipients); + curl_slist_free_all(headers); + + /* curl won't send the QUIT command until you call cleanup, so you should + * be able to re-use this connection for additional messages (setting + * CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling + * curl_easy_perform() again. It may not be a good idea to keep the + * connection open for a very long time though (more than a few minutes + * may result in the server timing out the connection), and you do want to + * clean up in the end. + */ + curl_easy_cleanup(curl); + + /* Free multipart message. */ + curl_mime_free(mime); + } + + return (int)res; +} diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c index 89e1d94..bd70bdb 100644 --- a/docs/examples/smtp-multi.c +++ b/docs/examples/smtp-multi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -44,8 +44,8 @@ static const char *payload_text[] = { "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n", "To: " TO "\r\n", - "From: " FROM "(Example User)\r\n", - "Cc: " CC "(Another example User)\r\n", + "From: " FROM " (Example User)\r\n", + "Cc: " CC " (Another example User)\r\n", "Message-ID: \r\n", "Subject: SMTP multi example message\r\n", @@ -211,7 +211,7 @@ int main(void) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) { diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c index f012340..019da7d 100644 --- a/docs/examples/smtp-ssl.c +++ b/docs/examples/smtp-ssl.c @@ -44,8 +44,8 @@ static const char *payload_text[] = { "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n", "To: " TO "\r\n", - "From: " FROM "(Example User)\r\n", - "Cc: " CC "(Another example User)\r\n", + "From: " FROM " (Example User)\r\n", + "Cc: " CC " (Another example User)\r\n", "Message-ID: \r\n", "Subject: SMTP SSL example message\r\n", diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c index c863e05..671a80d 100644 --- a/docs/examples/smtp-tls.c +++ b/docs/examples/smtp-tls.c @@ -44,8 +44,8 @@ static const char *payload_text[] = { "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n", "To: " TO "\r\n", - "From: " FROM "(Example User)\r\n", - "Cc: " CC "(Another example User)\r\n", + "From: " FROM " (Example User)\r\n", + "Cc: " CC " (Another example User)\r\n", "Message-ID: \r\n", "Subject: SMTP TLS example message\r\n", diff --git a/docs/examples/sslbackend.c b/docs/examples/sslbackend.c new file mode 100644 index 0000000..1483dcc --- /dev/null +++ b/docs/examples/sslbackend.c @@ -0,0 +1,77 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + * Shows HTTPS usage with client certs and optional ssl engine use. + * + */ +#include +#include +#include +#include +#include + +#include + +/* + * An SSL-enabled libcurl is required for this sample to work (at least one + * SSL backend has to be configured). + * + * **** This example only works with libcurl 7.56.0 and later! **** +*/ + +int main(int argc, char **argv) +{ + const char *name = argc > 1 ? argv[1] : "openssl"; + CURLsslset result; + + if(!strcmp("list", name)) { + const curl_ssl_backend **list; + int i; + + result = curl_global_sslset(-1, NULL, &list); + assert(result == CURLSSLSET_UNKNOWN_BACKEND); + + for(i = 0; list[i]; i++) + printf("SSL backend #%d: '%s' (ID: %d)\n", + i, list[i]->name, list[i]->id); + + return 0; + } + else if(isdigit(*name)) { + curl_sslbackend id = (curl_sslbackend)atoi(name); + + result = curl_global_sslset(id, NULL, NULL); + } + else + result = curl_global_sslset(-1, name, NULL); + + if(result == CURLSSLSET_UNKNOWN_BACKEND) { + fprintf(stderr, "Unknown SSL backend id: %s\n", name); + return 1; + } + + assert(result == CURLSSLSET_OK); + + printf("Version with SSL backend '%s':\n\n\t%s\n", name, curl_version()); + + return 0; +} diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index 48377f5..e5cdfed 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -94,7 +94,7 @@ #define MAX_STRING 256 -#define MAX_STRING1 MAX_STRING+1 +#define MAX_STRING1 MAX_STRING + 1 #define SYNCTIME_UA "synctime/1.0" @@ -158,9 +158,9 @@ size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb, if(RetVal == 7) { SYSTime.wMilliseconds = 500; /* adjust to midpoint, 0.5 sec */ - for(i=0; i<12; i++) { + for(i = 0; i<12; i++) { if(strcmp(MthStr[i], TmpStr2) == 0) { - SYSTime.wMonth = i+1; + SYSTime.wMonth = i + 1; break; } } @@ -243,7 +243,7 @@ int conf_init(conf_t *conf) int i; *conf->http_proxy = 0; - for(i=0; iproxy_user[i] = 0; /* Clean up password from memory */ *conf->timeserver = 0; return 1; diff --git a/docs/examples/threaded-shared-conn.c b/docs/examples/threaded-shared-conn.c new file mode 100644 index 0000000..ab5ac40 --- /dev/null +++ b/docs/examples/threaded-shared-conn.c @@ -0,0 +1,156 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +/* + * Multi-threaded transfers sharing a single connection pool + * + * + * This example fires up NUM_THREADS threads and in each single thread, it + * downloads the same fixed URL a URL_ITERATIONS number of times. The received + * data is just thrown away. It sets up a single shared object that holds the + * connection cache and all easy handles in all threads share that same cache. + * + * This example uses pthreads for threads and mutexes, but should be easy to + * modify to use different thread/mutex system should you want to. + * + */ + +#include +#include +#include + +/* + URL to fetch. If you select HTTPS, you need to use a TLS backend with mutex + locks taken care of (OpenSSL 1.1.x, NSS, etc) or add SSL mutex callbacks! +*/ +#define URL "http://localhost/4KB" + +/* number of threads to fire up in parallel */ +#define NUM_THREADS 67 + +/* how many times each URL is transferred per thread */ +#define URL_ITERATIONS 11235 + +static pthread_mutex_t connlock; + +static size_t write_db(void *ptr, size_t size, size_t nmemb, void *data) +{ + /* not interested in the downloaded bytes, return the size */ + (void)ptr; /* unused */ + (void)data; /* unused */ + return (size_t)(size * nmemb); +} + +static void lock_cb(CURL *handle, curl_lock_data data, + curl_lock_access access, void *userptr) +{ + (void)access; /* unused */ + (void)userptr; /* unused */ + (void)handle; /* unused */ + (void)data; /* unused */ + pthread_mutex_lock(&connlock); +} + +static void unlock_cb(CURL *handle, curl_lock_data data, + void *userptr) +{ + (void)userptr; /* unused */ + (void)handle; /* unused */ + (void)data; /* unused */ + pthread_mutex_unlock(&connlock); +} + +static void init_locks(void) +{ + pthread_mutex_init(&connlock, NULL); +} + +static void kill_locks(void) +{ + pthread_mutex_destroy(&connlock); +} + +struct initurl { + const char *url; + CURLSH *share; + int threadno; +}; + +static void *run_thread(void *ptr) +{ + struct initurl *u = (struct initurl *)ptr; + int i; + + for(i = 0; i < URL_ITERATIONS; i++) { + CURL *curl = curl_easy_init(); + curl_easy_setopt(curl, CURLOPT_URL, u->url); + curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L); + curl_easy_setopt(curl, CURLOPT_SHARE, u->share); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_db); + curl_easy_perform(curl); /* ignores error */ + curl_easy_cleanup(curl); + fprintf(stderr, "Tread %d transfer %d\n", u->threadno, i); + } + + return NULL; +} + +int main(void) +{ + pthread_t tid[NUM_THREADS]; + int i; + int error; + CURLSH *share; + struct initurl url[NUM_THREADS]; + + /* Must initialize libcurl before any threads are started */ + curl_global_init(CURL_GLOBAL_ALL); + + share = curl_share_init(); + curl_share_setopt(share, CURLSHOPT_LOCKFUNC, lock_cb); + curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, unlock_cb); + curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); + + init_locks(); + + for(i = 0; i< NUM_THREADS; i++) { + url[i].url = URL; + url[i].share = share; + url[i].threadno = i; + error = pthread_create(&tid[i], NULL, run_thread, &url[i]); + if(0 != error) + fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error); + else + fprintf(stderr, "Thread %d, gets %s\n", i, URL); + } + + /* now wait for all threads to terminate */ + for(i = 0; i< NUM_THREADS; i++) { + error = pthread_join(tid[i], NULL); + fprintf(stderr, "Thread %d terminated\n", i); + } + + kill_locks(); + + curl_share_cleanup(share); + curl_global_cleanup(); + return 0; +} diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c index 5f1d9b9..adf4629 100644 --- a/docs/examples/threaded-ssl.c +++ b/docs/examples/threaded-ssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,7 +25,7 @@ * */ /* A multi-threaded example that uses pthreads and fetches 4 remote files at - * once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS + * once over HTTPS. The lock callbacks and stuff assume OpenSSL <1.1 or GnuTLS * (libgcrypt) so far. * * OpenSSL docs for this: @@ -63,7 +63,7 @@ static unsigned long thread_id(void) { unsigned long ret; - ret=(unsigned long)pthread_self(); + ret = (unsigned long)pthread_self(); return ret; } @@ -71,9 +71,9 @@ static void init_locks(void) { int i; - lockarray=(pthread_mutex_t *)OPENSSL_malloc(CRYPTO_num_locks() * - sizeof(pthread_mutex_t)); - for(i=0; i, et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -80,5 +80,7 @@ int main(int argc, char *argv[]) /* cleanup curl stuff */ curl_easy_cleanup(curl_handle); + curl_global_cleanup(); + return 0; } diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c index 77fde91..40505b0 100644 --- a/docs/examples/usercertinmem.c +++ b/docs/examples/usercertinmem.c @@ -200,7 +200,7 @@ int main(void) /* first try: retrieve page without user certificate and key -> will fail */ rv = curl_easy_perform(ch); - if(rv==CURLE_OK) { + if(rv == CURLE_OK) { printf("*** transfer succeeded ***\n"); } else { @@ -213,7 +213,7 @@ int main(void) */ rv = curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); rv = curl_easy_perform(ch); - if(rv==CURLE_OK) { + if(rv == CURLE_OK) { printf("*** transfer succeeded ***\n"); } else { diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c index 8066828..9ee4a2e 100644 --- a/docs/examples/xmlstream.c +++ b/docs/examples/xmlstream.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -127,7 +127,7 @@ int main(void) XML_SetCharacterDataHandler(parser, characterDataHandler); /* Initialize a libcurl handle. */ - curl_global_init(CURL_GLOBAL_ALL ^ CURL_GLOBAL_SSL); + curl_global_init(CURL_GLOBAL_DEFAULT); curl_handle = curl_easy_init(); curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.w3schools.com/xml/simple.xml"); diff --git a/docs/libcurl/CMakeLists.txt b/docs/libcurl/CMakeLists.txt new file mode 100644 index 0000000..0b32c50 --- /dev/null +++ b/docs/libcurl/CMakeLists.txt @@ -0,0 +1,55 @@ +# Load man_MANS from shared file +transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") + +function(add_manual_pages _listname) + foreach(_file IN LISTS ${_listname}) + if(_file STREQUAL "libcurl-symbols.3") + # Special case, an auto-generated file. + set(_srcfile "${CMAKE_CURRENT_BINARY_DIR}/${_file}") + else() + set(_srcfile "${CMAKE_CURRENT_SOURCE_DIR}/${_file}") + endif() + + string(REPLACE ".3" ".html" _htmlfile "${CMAKE_CURRENT_BINARY_DIR}/${_file}") + add_custom_command(OUTPUT "${_htmlfile}" + COMMAND roffit "--mandir=${CMAKE_CURRENT_SOURCE_DIR}" "${_srcfile}" > "${_htmlfile}" + DEPENDS "${_srcfile}" + VERBATIM + ) + + string(REPLACE ".3" ".pdf" _pdffile "${CMAKE_CURRENT_BINARY_DIR}/${_file}") + string(REPLACE ".3" ".ps" _psfile "${CMAKE_CURRENT_BINARY_DIR}/${_file}") + # XXX any reason why groff -Tpdf (for gropdf) is not used? + add_custom_command(OUTPUT "${_pdffile}" + COMMAND groff -Tps -man "${_srcfile}" > "${_psfile}" + COMMAND ps2pdf "${_psfile}" "${_pdffile}" + COMMAND "${CMAKE_COMMAND}" -E remove "${_psfile}" + DEPENDS "${_srcfile}" + #BYPRODUCTS "${_psfile}" + VERBATIM + ) + # "BYPRODUCTS" for add_custom_command requires CMake 3.2. For now hope that + # the temporary files are removed (i.e. the command is not interrupted). + endforeach() +endfunction() + +add_custom_command(OUTPUT libcurl-symbols.3 + COMMAND + "${PERL_EXECUTABLE}" + "${CMAKE_CURRENT_SOURCE_DIR}/mksymbolsmanpage.pl" < + "${CMAKE_CURRENT_SOURCE_DIR}/symbols-in-versions" > libcurl-symbols.3 + DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/symbols-in-versions" + "${CMAKE_CURRENT_SOURCE_DIR}/mksymbolsmanpage.pl" + VERBATIM +) + +add_manual_pages(man_MANS) + +string(REPLACE ".3" ".html" HTMLPAGES "${man_MANS}") +string(REPLACE ".3" ".pdf" PDFPAGES "${man_MANS}") +add_custom_target(html DEPENDS ${HTMLPAGES}) +add_custom_target(pdf DEPENDS ${PDFPAGES}) + +add_subdirectory(opts) diff --git a/docs/libcurl/Makefile.am b/docs/libcurl/Makefile.am index 2d51b46..8a232e8 100644 --- a/docs/libcurl/Makefile.am +++ b/docs/libcurl/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -24,74 +24,22 @@ AUTOMAKE_OPTIONS = foreign no-dependencies SUBDIRS = opts -man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \ - curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \ - curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \ - curl_slist_append.3 curl_slist_free_all.3 curl_version.3 \ - curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 \ - curl_strequal.3 curl_mprintf.3 curl_global_init.3 \ - curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3 \ - curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3 \ - curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3 \ - curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3 \ - libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 \ - curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3 \ - libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 \ - curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \ - curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \ - curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \ - curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3 \ - libcurl-thread.3 curl_multi_socket_all.3 - -HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \ - curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \ - curl_easy_duphandle.html curl_formadd.html curl_formfree.html \ - curl_getdate.html curl_getenv.html curl_slist_append.html \ - curl_slist_free_all.html curl_version.html curl_version_info.html \ - curl_escape.html curl_unescape.html curl_free.html curl_strequal.html \ - curl_mprintf.html curl_global_init.html curl_global_cleanup.html \ - curl_multi_add_handle.html curl_multi_cleanup.html \ - curl_multi_fdset.html curl_multi_info_read.html curl_multi_init.html \ - curl_multi_perform.html curl_multi_remove_handle.html \ - curl_share_cleanup.html curl_share_init.html curl_share_setopt.html \ - libcurl.html libcurl-multi.html libcurl-easy.html libcurl-share.html \ - libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html \ - curl_share_strerror.html curl_global_init_mem.html \ - libcurl-tutorial.html curl_easy_reset.html curl_easy_escape.html \ - curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \ - curl_multi_timeout.html curl_formget.html curl_multi_assign.html \ - curl_easy_pause.html curl_easy_recv.html curl_easy_send.html \ - curl_multi_socket_action.html curl_multi_wait.html \ - libcurl-symbols.html libcurl-thread.html curl_multi_socket_all.html - -PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \ - curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \ - curl_easy_duphandle.pdf curl_formadd.pdf curl_formfree.pdf \ - curl_getdate.pdf curl_getenv.pdf curl_slist_append.pdf \ - curl_slist_free_all.pdf curl_version.pdf curl_version_info.pdf \ - curl_escape.pdf curl_unescape.pdf curl_free.pdf curl_strequal.pdf \ - curl_mprintf.pdf curl_global_init.pdf curl_global_cleanup.pdf \ - curl_multi_add_handle.pdf curl_multi_cleanup.pdf curl_multi_fdset.pdf \ - curl_multi_info_read.pdf curl_multi_init.pdf curl_multi_perform.pdf \ - curl_multi_remove_handle.pdf curl_share_cleanup.pdf \ - curl_share_init.pdf curl_share_setopt.pdf libcurl.pdf \ - libcurl-multi.pdf libcurl-easy.pdf libcurl-share.pdf \ - libcurl-errors.pdf curl_easy_strerror.pdf curl_multi_strerror.pdf \ - curl_share_strerror.pdf curl_global_init_mem.pdf libcurl-tutorial.pdf \ - curl_easy_reset.pdf curl_easy_escape.pdf curl_easy_unescape.pdf \ - curl_multi_setopt.pdf curl_multi_socket.pdf curl_multi_timeout.pdf \ - curl_formget.pdf curl_multi_assign.pdf curl_easy_pause.pdf \ - curl_easy_recv.pdf curl_easy_send.pdf curl_multi_socket_action.pdf \ - curl_multi_wait.pdf libcurl-symbols.pdf libcurl-thread.pdf \ - curl_multi_socket_all.pdf +include Makefile.inc + +man_DISTMANS = $(man_MANS:.3=.3.dist) + +HTMLPAGES = $(man_MANS:.3=.html) + +PDFPAGES = $(man_MANS:.3=.pdf) m4macrodir = $(datadir)/aclocal dist_m4macro_DATA = libcurl.m4 -CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) libcurl-symbols.3 +CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) $(man_DISTMANS) \ + libcurl-symbols.3 EXTRA_DIST = $(man_MANS) index.html ABI symbols-in-versions symbols.pl \ - mksymbolsmanpage.pl + mksymbolsmanpage.pl CMakeLists.txt MAN2HTML= roffit --mandir=. $< >$@ SUFFIXES = .3 .html @@ -100,13 +48,13 @@ libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@ html: $(HTMLPAGES) - cd opts && make html + cd opts && $(MAKE) html .3.html: $(MAN2HTML) pdf: $(PDFPAGES) - cd opts && make pdf + cd opts && $(MAKE) pdf .3.pdf: @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ diff --git a/docs/libcurl/Makefile.in b/docs/libcurl/Makefile.in index 782272d..67792ae 100644 --- a/docs/libcurl/Makefile.in +++ b/docs/libcurl/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -36,6 +36,8 @@ # ########################################################################### +# Shared between Makefile.am and CMakeLists.txt + VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -112,7 +114,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs/libcurl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -134,8 +137,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ DIST_COMMON = $(srcdir)/Makefile.am $(dist_m4macro_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -402,7 +404,8 @@ TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \ + $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -443,6 +446,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -468,7 +477,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -482,7 +493,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -494,6 +508,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -539,6 +554,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -551,6 +567,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -621,72 +638,40 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies SUBDIRS = opts -man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \ - curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \ - curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \ - curl_slist_append.3 curl_slist_free_all.3 curl_version.3 \ - curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 \ - curl_strequal.3 curl_mprintf.3 curl_global_init.3 \ - curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3 \ - curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3 \ - curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3 \ - curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3 \ - libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 \ - curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3 \ - libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 \ - curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \ - curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \ - curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \ - curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3 \ - libcurl-thread.3 curl_multi_socket_all.3 - -HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \ - curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \ - curl_easy_duphandle.html curl_formadd.html curl_formfree.html \ - curl_getdate.html curl_getenv.html curl_slist_append.html \ - curl_slist_free_all.html curl_version.html curl_version_info.html \ - curl_escape.html curl_unescape.html curl_free.html curl_strequal.html \ - curl_mprintf.html curl_global_init.html curl_global_cleanup.html \ - curl_multi_add_handle.html curl_multi_cleanup.html \ - curl_multi_fdset.html curl_multi_info_read.html curl_multi_init.html \ - curl_multi_perform.html curl_multi_remove_handle.html \ - curl_share_cleanup.html curl_share_init.html curl_share_setopt.html \ - libcurl.html libcurl-multi.html libcurl-easy.html libcurl-share.html \ - libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html \ - curl_share_strerror.html curl_global_init_mem.html \ - libcurl-tutorial.html curl_easy_reset.html curl_easy_escape.html \ - curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \ - curl_multi_timeout.html curl_formget.html curl_multi_assign.html \ - curl_easy_pause.html curl_easy_recv.html curl_easy_send.html \ - curl_multi_socket_action.html curl_multi_wait.html \ - libcurl-symbols.html libcurl-thread.html curl_multi_socket_all.html - -PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \ - curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \ - curl_easy_duphandle.pdf curl_formadd.pdf curl_formfree.pdf \ - curl_getdate.pdf curl_getenv.pdf curl_slist_append.pdf \ - curl_slist_free_all.pdf curl_version.pdf curl_version_info.pdf \ - curl_escape.pdf curl_unescape.pdf curl_free.pdf curl_strequal.pdf \ - curl_mprintf.pdf curl_global_init.pdf curl_global_cleanup.pdf \ - curl_multi_add_handle.pdf curl_multi_cleanup.pdf curl_multi_fdset.pdf \ - curl_multi_info_read.pdf curl_multi_init.pdf curl_multi_perform.pdf \ - curl_multi_remove_handle.pdf curl_share_cleanup.pdf \ - curl_share_init.pdf curl_share_setopt.pdf libcurl.pdf \ - libcurl-multi.pdf libcurl-easy.pdf libcurl-share.pdf \ - libcurl-errors.pdf curl_easy_strerror.pdf curl_multi_strerror.pdf \ - curl_share_strerror.pdf curl_global_init_mem.pdf libcurl-tutorial.pdf \ - curl_easy_reset.pdf curl_easy_escape.pdf curl_easy_unescape.pdf \ - curl_multi_setopt.pdf curl_multi_socket.pdf curl_multi_timeout.pdf \ - curl_formget.pdf curl_multi_assign.pdf curl_easy_pause.pdf \ - curl_easy_recv.pdf curl_easy_send.pdf curl_multi_socket_action.pdf \ - curl_multi_wait.pdf libcurl-symbols.pdf libcurl-thread.pdf \ - curl_multi_socket_all.pdf - +man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \ + curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \ + curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \ + curl_slist_append.3 curl_slist_free_all.3 curl_version.3 \ + curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 \ + curl_strequal.3 curl_strnequal.3 curl_mprintf.3 curl_global_init.3 \ + curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3 \ + curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3 \ + curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3 \ + curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3 \ + libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 \ + curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3 \ + libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 \ + curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \ + curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \ + curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \ + curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3 \ + libcurl-thread.3 curl_multi_socket_all.3 curl_global_sslset.3 \ + curl_mime_init.3 curl_mime_free.3 curl_mime_addpart.3 curl_mime_name.3 \ + curl_mime_data.3 curl_mime_data_cb.3 curl_mime_filedata.3 \ + curl_mime_filename.3 curl_mime_subparts.3 \ + curl_mime_type.3 curl_mime_headers.3 curl_mime_encoder.3 libcurl-env.3 \ + libcurl-security.3 + +man_DISTMANS = $(man_MANS:.3=.3.dist) +HTMLPAGES = $(man_MANS:.3=.html) +PDFPAGES = $(man_MANS:.3=.pdf) m4macrodir = $(datadir)/aclocal dist_m4macro_DATA = libcurl.m4 -CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) libcurl-symbols.3 +CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) $(man_DISTMANS) \ + libcurl-symbols.3 + EXTRA_DIST = $(man_MANS) index.html ABI symbols-in-versions symbols.pl \ - mksymbolsmanpage.pl + mksymbolsmanpage.pl CMakeLists.txt MAN2HTML = roffit --mandir=. $< >$@ SUFFIXES = .3 .html @@ -700,7 +685,7 @@ all: all-recursive .SUFFIXES: .SUFFIXES: .3 .html .log .pdf .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -720,6 +705,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(srcdir)/Makefile.inc $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -1256,13 +1242,13 @@ libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@ html: $(HTMLPAGES) - cd opts && make html + cd opts && $(MAKE) html .3.html: $(MAN2HTML) pdf: $(PDFPAGES) - cd opts && make pdf + cd opts && $(MAKE) pdf .3.pdf: @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ diff --git a/docs/libcurl/Makefile.inc b/docs/libcurl/Makefile.inc new file mode 100644 index 0000000..eea48c4 --- /dev/null +++ b/docs/libcurl/Makefile.inc @@ -0,0 +1,25 @@ +# Shared between Makefile.am and CMakeLists.txt + +man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \ + curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \ + curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \ + curl_slist_append.3 curl_slist_free_all.3 curl_version.3 \ + curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 \ + curl_strequal.3 curl_strnequal.3 curl_mprintf.3 curl_global_init.3 \ + curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3 \ + curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3 \ + curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3 \ + curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3 \ + libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 \ + curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3 \ + libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 \ + curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \ + curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \ + curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \ + curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3 \ + libcurl-thread.3 curl_multi_socket_all.3 curl_global_sslset.3 \ + curl_mime_init.3 curl_mime_free.3 curl_mime_addpart.3 curl_mime_name.3 \ + curl_mime_data.3 curl_mime_data_cb.3 curl_mime_filedata.3 \ + curl_mime_filename.3 curl_mime_subparts.3 \ + curl_mime_type.3 curl_mime_headers.3 curl_mime_encoder.3 libcurl-env.3 \ + libcurl-security.3 diff --git a/docs/libcurl/curl_easy_cleanup.3 b/docs/libcurl/curl_easy_cleanup.3 index cc5990e..eaffb08 100644 --- a/docs/libcurl/curl_easy_cleanup.3 +++ b/docs/libcurl/curl_easy_cleanup.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual" +.TH curl_easy_cleanup 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_cleanup - End a libcurl easy handle .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3 index 262cebd..1832db8 100644 --- a/docs/libcurl/curl_easy_duphandle.3 +++ b/docs/libcurl/curl_easy_duphandle.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_duphandle 3 "19 Sep 2014" "libcurl" "libcurl Manual" +.TH curl_easy_duphandle 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_duphandle - Clone a libcurl session handle .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_escape.3 b/docs/libcurl/curl_easy_escape.3 index d2b6cd2..bd995a8 100644 --- a/docs/libcurl/curl_easy_escape.3 +++ b/docs/libcurl/curl_easy_escape.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_escape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual" +.TH curl_easy_escape 3 "August 12, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_escape - URL encodes the given string .SH SYNOPSIS @@ -39,6 +40,15 @@ If \fIlength\fP is set to 0 (zero), \fIcurl_easy_escape(3)\fP uses strlen() on the input \fIstring\fP to find out the size. You must \fIcurl_free(3)\fP the returned string when you're done with it. +.SH ENCODING +libcurl is typically not aware of, nor does it care about, character +encodings. \fIcurl_easy_escape(3)\fP encodes the data byte-by-byte into the +URL encoded version without knowledge or care for what particular character +encoding the application or the receiving server may assume that the data +uses. + +The caller of \fIcurl_easy_escape(3)\fP must make sure that the data passed in +to the function is encoded correctly. .SH AVAILABILITY Added in 7.15.4 and replaces the old \fIcurl_escape(3)\fP function. .SH RETURN VALUE diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3 index fabc7e9..049233a 100644 --- a/docs/libcurl/curl_easy_getinfo.3 +++ b/docs/libcurl/curl_easy_getinfo.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_getinfo 3 "11 Feb 2009" "libcurl 7.19.4" "libcurl Manual" +.TH curl_easy_getinfo 3 "January 25, 2018" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_getinfo - extract information from a curl handle .SH SYNOPSIS @@ -54,8 +55,9 @@ See \fICURLINFO_HTTP_CONNECTCODE(3)\fP The http version used in the connection. See \fICURLINFO_HTTP_VERSION(3)\fP .IP CURLINFO_FILETIME -Remote time of the retrieved document. -See \fICURLINFO_FILETIME(3)\fP +Remote time of the retrieved document. See \fICURLINFO_FILETIME(3)\fP +.IP CURLINFO_FILETIME_T +Remote time of the retrieved document. See \fICURLINFO_FILETIME_T(3)\fP .IP CURLINFO_TOTAL_TIME Total time of previous transfer. See \fICURLINFO_TOTAL_TIME(3)\fP @@ -84,17 +86,29 @@ See \fICURLINFO_REDIRECT_COUNT(3)\fP URL a redirect would take you to, had you enabled redirects. See \fICURLINFO_REDIRECT_URL(3)\fP .IP CURLINFO_SIZE_UPLOAD -Number of bytes uploaded. +(Deprecated) Number of bytes uploaded. See \fICURLINFO_SIZE_UPLOAD(3)\fP +.IP CURLINFO_SIZE_UPLOAD_T +Number of bytes uploaded. +See \fICURLINFO_SIZE_UPLOAD_T(3)\fP .IP CURLINFO_SIZE_DOWNLOAD -Number of bytes downloaded. +(Deprecated) Number of bytes downloaded. See \fICURLINFO_SIZE_DOWNLOAD(3)\fP +.IP CURLINFO_SIZE_DOWNLOAD_T +Number of bytes downloaded. +See \fICURLINFO_SIZE_DOWNLOAD_T(3)\fP .IP CURLINFO_SPEED_DOWNLOAD -Average download speed. +(Deprecated) Average download speed. See \fICURLINFO_SPEED_DOWNLOAD(3)\fP +.IP CURLINFO_SPEED_DOWNLOAD_T +Average download speed. +See \fICURLINFO_SPEED_DOWNLOAD_T(3)\fP .IP CURLINFO_SPEED_UPLOAD -Average upload speed. +(Deprecated) Average upload speed. See \fICURLINFO_SPEED_UPLOAD(3)\fP +.IP CURLINFO_SPEED_UPLOAD_T +Average upload speed. +See \fICURLINFO_SPEED_UPLOAD_T(3)\fP .IP CURLINFO_HEADER_SIZE Number of bytes of all headers received. See \fICURLINFO_HEADER_SIZE(3)\fP @@ -111,11 +125,15 @@ See \fICURLINFO_PROXY_SSL_VERIFYRESULT(3)\fP A list of OpenSSL crypto engines. See \fICURLINFO_SSL_ENGINES(3)\fP .IP CURLINFO_CONTENT_LENGTH_DOWNLOAD -Content length from the Content-Length header. +(Deprecated) Content length from the Content-Length header. See \fICURLINFO_CONTENT_LENGTH_DOWNLOAD(3)\fP +.IP CURLINFO_CONTENT_LENGTH_DOWNLOAD_T +Content length from the Content-Length header. +See \fICURLINFO_CONTENT_LENGTH_DOWNLOAD_T(3)\fP .IP CURLINFO_CONTENT_LENGTH_UPLOAD -Upload size. -See \fICURLINFO_CONTENT_LENGTH_UPLOAD(3)\fP +(Deprecated) Upload size. See \fICURLINFO_CONTENT_LENGTH_UPLOAD(3)\fP +.IP CURLINFO_CONTENT_LENGTH_UPLOAD_T +Upload size. See \fICURLINFO_CONTENT_LENGTH_UPLOAD_T(3)\fP .IP CURLINFO_CONTENT_TYPE Content type from the Content-Type header. See \fICURLINFO_CONTENT_TYPE(3)\fP diff --git a/docs/libcurl/curl_easy_init.3 b/docs/libcurl/curl_easy_init.3 index 371a3b8..c37cc53 100644 --- a/docs/libcurl/curl_easy_init.3 +++ b/docs/libcurl/curl_easy_init.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual" +.TH curl_easy_init 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_init - Start a libcurl easy session .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_pause.3 b/docs/libcurl/curl_easy_pause.3 index 131fa77..867cbba 100644 --- a/docs/libcurl/curl_easy_pause.3 +++ b/docs/libcurl/curl_easy_pause.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual" +.TH curl_easy_pause 3 "May 01, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_pause - pause and unpause a connection .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_perform.3 b/docs/libcurl/curl_easy_perform.3 index 48c1f31..9a46f53 100644 --- a/docs/libcurl/curl_easy_perform.3 +++ b/docs/libcurl/curl_easy_perform.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual" +.TH curl_easy_perform 3 "May 02, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_perform - perform a blocking file transfer .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_recv.3 b/docs/libcurl/curl_easy_recv.3 index 7a812dd..8a002ea 100644 --- a/docs/libcurl/curl_easy_recv.3 +++ b/docs/libcurl/curl_easy_recv.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_recv 3 "29 April 2008" "libcurl 7.18.2" "libcurl Manual" +.TH curl_easy_recv 3 "December 18, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_recv - receives raw data on an "easy" connection .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_reset.3 b/docs/libcurl/curl_easy_reset.3 index 0bafb64..41c96d1 100644 --- a/docs/libcurl/curl_easy_reset.3 +++ b/docs/libcurl/curl_easy_reset.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_reset 3 "31 July 2004" "libcurl 7.12.1" "libcurl Manual" +.TH curl_easy_reset 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_reset - reset all options of a libcurl session handle .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_send.3 b/docs/libcurl/curl_easy_send.3 index 47976f3..7e16c9c 100644 --- a/docs/libcurl/curl_easy_send.3 +++ b/docs/libcurl/curl_easy_send.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_send 3 "29 April 2008" "libcurl 7.18.2" "libcurl Manual" +.TH curl_easy_send 3 "December 18, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_send - sends raw data over an "easy" connection .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 422cb85..a141f0f 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_setopt 3 "25 Jun 2014" "libcurl 7.38.0" "libcurl Manual" +.TH curl_easy_setopt 3 "February 14, 2018" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_setopt \- set options for a curl easy handle .SH SYNOPSIS @@ -137,6 +138,12 @@ Data pointer to pass to the chunk callbacks. See \fICURLOPT_CHUNK_DATA(3)\fP Callback for wildcard matching. See \fICURLOPT_FNMATCH_FUNCTION(3)\fP .IP CURLOPT_FNMATCH_DATA Data pointer to pass to the wildcard matching callback. See \fICURLOPT_FNMATCH_DATA(3)\fP +.IP CURLOPT_SUPPRESS_CONNECT_HEADERS +Suppress proxy CONNECT response headers from user callbacks. See \fICURLOPT_SUPPRESS_CONNECT_HEADERS(3)\fP +.IP CURLOPT_RESOLVER_START_FUNCTION +Callback to be called before a new resolve request is started. See \fICURLOPT_RESOLVER_START_FUNCTION(3)\fP +.IP CURLOPT_RESOLVER_START_DATA +Data pointer to pass to resolver start callback. See \fICURLOPT_RESOLVER_START_DATA(3)\fP .SH ERROR OPTIONS .IP CURLOPT_ERRORBUFFER Error message buffer. See \fICURLOPT_ERRORBUFFER(3)\fP @@ -171,6 +178,8 @@ Filter out hosts from proxy use. \fICURLOPT_NOPROXY(3)\fP Tunnel through the HTTP proxy. \fICURLOPT_HTTPPROXYTUNNEL(3)\fP .IP CURLOPT_CONNECT_TO Connect to a specific host and port. See \fICURLOPT_CONNECT_TO(3)\fP +.IP CURLOPT_SOCKS5_AUTH +Socks5 authentication methods. See \fICURLOPT_SOCKS5_AUTH(3)\fP .IP CURLOPT_SOCKS5_GSSAPI_SERVICE Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP .IP CURLOPT_SOCKS5_GSSAPI_NEC @@ -301,6 +310,8 @@ Start a new cookie session. See \fICURLOPT_COOKIESESSION(3)\fP Add or control cookies. See \fICURLOPT_COOKIELIST(3)\fP .IP CURLOPT_HTTPGET Do a HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP +.IP CURLOPT_REQUEST_TARGET +Set the request target. \fICURLOPT_REQUEST_TARGET(3)\fP .IP CURLOPT_HTTP_VERSION HTTP version to use. \fICURLOPT_HTTP_VERSION(3)\fP .IP CURLOPT_IGNORE_CONTENT_LENGTH @@ -405,6 +416,8 @@ Size of file to send. \fICURLOPT_INFILESIZE(3)\fP Size of file to send. \fICURLOPT_INFILESIZE_LARGE(3)\fP .IP CURLOPT_UPLOAD Upload data. See \fICURLOPT_UPLOAD(3)\fP +.IP CURLOPT_MIMEPOST +Post/send MIME data. See \fICURLOPT_MIMEPOST(3)\fP .IP CURLOPT_MAXFILESIZE Maximum file size to get. See \fICURLOPT_MAXFILESIZE(3)\fP .IP CURLOPT_MAXFILESIZE_LARGE @@ -413,6 +426,8 @@ Maximum file size to get. See \fICURLOPT_MAXFILESIZE_LARGE(3)\fP Make a time conditional request. See \fICURLOPT_TIMECONDITION(3)\fP .IP CURLOPT_TIMEVALUE Time value for the time conditional request. See \fICURLOPT_TIMEVALUE(3)\fP +.IP CURLOPT_TIMEVALUE_LARGE +Time value for the time conditional request. See \fICURLOPT_TIMEVALUE_LARGE(3)\fP .SH CONNECTION OPTIONS .IP CURLOPT_TIMEOUT Timeout for the entire request. See \fICURLOPT_TIMEOUT(3)\fP @@ -454,6 +469,8 @@ Bind name resolves to this IP6 address. See \fICURLOPT_DNS_LOCAL_IP6(3)\fP Preferred DNS servers. See \fICURLOPT_DNS_SERVERS(3)\fP .IP CURLOPT_ACCEPTTIMEOUT_MS Timeout for waiting for the server's connect back to be accepted. See \fICURLOPT_ACCEPTTIMEOUT_MS(3)\fP +.IP CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS +Timeout for happy eyeballs. See \fICURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS(3)\fP .SH SSL and SECURITY OPTIONS .IP CURLOPT_SSLCERT Client cert. See \fICURLOPT_SSLCERT(3)\fP @@ -541,6 +558,8 @@ Disable GSS-API delegation. See \fICURLOPT_GSSAPI_DELEGATION(3)\fP .SH SSH OPTIONS .IP CURLOPT_SSH_AUTH_TYPES SSH authentication types. See \fICURLOPT_SSH_AUTH_TYPES(3)\fP +.IP CURLOPT_SSH_COMPRESSION +Enable SSH compression. See \fICURLOPT_SSH_COMPRESSION(3)\fP .IP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 MD5 of host's public key. See \fICURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)\fP .IP CURLOPT_SSH_PUBLIC_KEYFILE diff --git a/docs/libcurl/curl_easy_strerror.3 b/docs/libcurl/curl_easy_strerror.3 index ac94122..562f8b2 100644 --- a/docs/libcurl/curl_easy_strerror.3 +++ b/docs/libcurl/curl_easy_strerror.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_easy_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual" +.TH curl_easy_strerror 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_strerror - return string describing error code .SH SYNOPSIS diff --git a/docs/libcurl/curl_easy_unescape.3 b/docs/libcurl/curl_easy_unescape.3 index 50ce97d..99b35a0 100644 --- a/docs/libcurl/curl_easy_unescape.3 +++ b/docs/libcurl/curl_easy_unescape.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH curl_easy_unescape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual" +.TH curl_easy_unescape 3 "October 04, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_easy_unescape - URL decodes the given string .SH SYNOPSIS diff --git a/docs/libcurl/curl_escape.3 b/docs/libcurl/curl_escape.3 index 03f02d3..69e2b9f 100644 --- a/docs/libcurl/curl_escape.3 +++ b/docs/libcurl/curl_escape.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual" +.TH curl_escape 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_escape - URL encodes the given string .SH SYNOPSIS diff --git a/docs/libcurl/curl_formadd.3 b/docs/libcurl/curl_formadd.3 index 5d1faa5..441edd2 100644 --- a/docs/libcurl/curl_formadd.3 +++ b/docs/libcurl/curl_formadd.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual" +.TH curl_formadd 3 "October 08, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_formadd - add a section to a multipart/formdata HTTP POST .SH SYNOPSIS @@ -29,6 +30,8 @@ curl_formadd - add a section to a multipart/formdata HTTP POST .BI "struct curl_httppost ** " lastitem, " ...);" .ad .SH DESCRIPTION +This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead! + curl_formadd() is used to append sections when building a multipart/formdata HTTP POST (sometimes referred to as RFC2388-style posts). Append one section at a time until you've added all the sections you want included and then you @@ -60,16 +63,15 @@ parts. .IP CURLFORM_COPYNAME followed by a string which provides the \fIname\fP of this part. libcurl copies the string so your application doesn't need to keep it around after -this function call. If the name isn't NUL-terminated, or if you'd -like it to contain zero bytes, you must set its length with -\fBCURLFORM_NAMELENGTH\fP. The copied data will be freed by -\fIcurl_formfree(3)\fP. +this function call. If the name isn't NUL-terminated, you must set its length +with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain +zero-valued bytes. The copied data will be freed by \fIcurl_formfree(3)\fP. .IP CURLFORM_PTRNAME followed by a string which provides the \fIname\fP of this part. libcurl will use the pointer and refer to the data in your application, so you must make sure it remains until curl no longer needs it. If the name -isn't NUL-terminated, or if you'd like it to contain zero -bytes, you must set its length with \fBCURLFORM_NAMELENGTH\fP. +isn't NUL-terminated, you must set its length with \fBCURLFORM_NAMELENGTH\fP. +The \fIname\fP is not allowed to contain zero-valued bytes. .IP CURLFORM_COPYCONTENTS followed by a pointer to the contents of this part, the actual data to send away. libcurl copies the provided data, so your application doesn't @@ -169,6 +171,12 @@ the \fICURLOPT_HTTPPOST(3)\fP option), you must not free the list until after you've called \fIcurl_easy_cleanup(3)\fP for the curl handle. See example below. +.SH AVAILABILITY +Deprecated in 7.56.0. Before this release, field names were allowed to +contain zero-valued bytes. The pseudo-filename "-" to read stdin is +discouraged although still supported, but data is not read before being +actually sent: the effective data size can then not be automatically +determined, resulting in a chunked encoding transfer. .SH RETURN VALUE 0 means everything was ok, non-zero means an error occurred corresponding to a CURL_FORMADD_* constant defined in @@ -254,5 +262,6 @@ to a CURL_FORMADD_* constant defined in curl_easy_setopt(curl, CURLOPT_HTTPPOST, post); .SH "SEE ALSO" -.BR curl_easy_setopt "(3), " -.BR curl_formfree "(3)" +.BR curl_easy_setopt "(3)," +.BR curl_formfree "(3)," +.BR curl_mime_init "(3)" diff --git a/docs/libcurl/curl_formfree.3 b/docs/libcurl/curl_formfree.3 index a2536cd..7d1d804 100644 --- a/docs/libcurl/curl_formfree.3 +++ b/docs/libcurl/curl_formfree.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual" +.TH curl_formfree 3 "September 02, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_formfree - free a previously build multipart/formdata HTTP POST chain .SH SYNOPSIS @@ -28,6 +29,8 @@ curl_formfree - free a previously build multipart/formdata HTTP POST chain .BI "void curl_formfree(struct curl_httppost *" form); .ad .SH DESCRIPTION +This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead! + curl_formfree() is used to clean up data previously built/appended with \fIcurl_formadd(3)\fP. This must be called when the data has been used, which typically means after \fIcurl_easy_perform(3)\fP has been called. @@ -38,7 +41,9 @@ the \fIcurl_formadd(3)\fP invoke(s). \fBform\fP is the pointer as returned from a previous call to \fIcurl_formadd(3)\fP and may be NULL. +.SH AVAILABILITY +Deprecated in 7.56.0. .SH RETURN VALUE None .SH "SEE ALSO" -.BR curl_formadd "(3) " +.BR curl_formadd "(3), " curl_mime_init "(3), " curl_mime_free "(3)" diff --git a/docs/libcurl/curl_formget.3 b/docs/libcurl/curl_formget.3 index 635c487..69dc992 100644 --- a/docs/libcurl/curl_formget.3 +++ b/docs/libcurl/curl_formget.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual" +.TH curl_formget 3 "September 02, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_formget - serialize a previously built multipart/formdata HTTP POST chain .SH SYNOPSIS @@ -65,6 +66,7 @@ request as only then will libcurl get the actual read callback to use! return total_size; } .SH AVAILABILITY -This function was added in libcurl 7.15.5 +This function was added in libcurl 7.15.5. The form API is deprecated in +libcurl 7.56.0. .SH "SEE ALSO" -.BR curl_formadd "(3) " +.BR curl_formadd "(3), " curl_mime_init "(3)" diff --git a/docs/libcurl/curl_free.3 b/docs/libcurl/curl_free.3 index 5bbf745..32e5cf2 100644 --- a/docs/libcurl/curl_free.3 +++ b/docs/libcurl/curl_free.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual" +.TH curl_free 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_free - reclaim memory that has been obtained through a libcurl call .SH SYNOPSIS diff --git a/docs/libcurl/curl_getdate.3 b/docs/libcurl/curl_getdate.3 index d09980d..9c0aa1a 100644 --- a/docs/libcurl/curl_getdate.3 +++ b/docs/libcurl/curl_getdate.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual" +.TH curl_getdate 3 "January 18, 2018" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_getdate - Convert a date string to number of seconds .SH SYNOPSIS @@ -96,13 +97,15 @@ only ones RFC 7231 says HTTP applications may use. This function returns -1 when it fails to parse the date string. Otherwise it returns the number of seconds as described. -If the year is larger than 2037 on systems with 32 bit time_t, this function -will return 0x7fffffff (since that is the largest possible signed 32 bit -number). +On systems with a signed 32 bit time_t: if the year is larger than 2037 or +less than 1903, this function will return -1. + +On systems with an unsigned 32 bit time_t: if the year is larger than 2106 or +less than 1970, this function will return -1. -Having a 64 bit time_t is not a guarantee that dates beyond 03:14:07 UTC, -January 19, 2038 will work fine. On systems with a 64 bit time_t but with a -crippled mktime(), \fIcurl_getdate(3)\fP will return -1 in this case. +On systems with 64 bit time_t: if the year is less than 1583, this function +will return -1. (The Gregorian calendar was first introduced 1582 so no "real" +dates in this way of doing dates existed before then.) .SH "SEE ALSO" .BR curl_easy_escape "(3), " curl_easy_unescape "(3), " .BR CURLOPT_TIMECONDITION "(3), " CURLOPT_TIMEVALUE "(3) " diff --git a/docs/libcurl/curl_getenv.3 b/docs/libcurl/curl_getenv.3 index c6bee98..0ddb9e8 100644 --- a/docs/libcurl/curl_getenv.3 +++ b/docs/libcurl/curl_getenv.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual" +.TH curl_getenv 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_getenv - return value for environment name .SH SYNOPSIS diff --git a/docs/libcurl/curl_global_cleanup.3 b/docs/libcurl/curl_global_cleanup.3 index 04ab043..b0e4bc0 100644 --- a/docs/libcurl/curl_global_cleanup.3 +++ b/docs/libcurl/curl_global_cleanup.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_global_cleanup 3 "17 Feb 2006" "libcurl 7.8" "libcurl Manual" +.TH curl_global_cleanup 3 "September 20, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_global_cleanup - global libcurl cleanup .SH SYNOPSIS diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index d2bd79e..324c7be 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual" +.TH curl_global_init 3 "January 24, 2018" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_global_init - Global libcurl initialisation .SH SYNOPSIS @@ -62,6 +63,9 @@ Initialize everything possible. This sets all known bits except \fBCURL_GLOBAL_ACK_EINTR\fP. .IP CURL_GLOBAL_SSL +(This flag's presence or absence serves no meaning since 7.57.0. The +description below is for older libcurl versions.) + Initialize SSL. The implication here is that if this bit is not set, the initialization of the @@ -93,5 +97,6 @@ other curl functions. .SH "SEE ALSO" .BR curl_global_init_mem "(3), " .BR curl_global_cleanup "(3), " +.BR curl_global_sslset "(3), " .BR curl_easy_init "(3) " .BR libcurl "(3) " diff --git a/docs/libcurl/curl_global_init_mem.3 b/docs/libcurl/curl_global_init_mem.3 index 7252cf9..5590133 100644 --- a/docs/libcurl/curl_global_init_mem.3 +++ b/docs/libcurl/curl_global_init_mem.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual" +.TH curl_global_init_mem 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_global_init_mem - Global libcurl initialisation with memory callbacks .SH SYNOPSIS diff --git a/docs/libcurl/curl_global_sslset.3 b/docs/libcurl/curl_global_sslset.3 new file mode 100644 index 0000000..03b74cd --- /dev/null +++ b/docs/libcurl/curl_global_sslset.3 @@ -0,0 +1,98 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_global_sslset 3 "September 21, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_global_sslset - Select SSL backend to use with libcurl +.SH SYNOPSIS +.B #include +.nf + +typedef struct { + curl_sslbackend id; + const char *name; +} curl_ssl_backend; + +typedef enum { + CURLSSLBACKEND_NONE = 0, + CURLSSLBACKEND_OPENSSL = 1, + CURLSSLBACKEND_GNUTLS = 2, + CURLSSLBACKEND_NSS = 3, + CURLSSLBACKEND_GSKIT = 5, + CURLSSLBACKEND_POLARSSL = 6, + CURLSSLBACKEND_WOLFSSL = 7, + CURLSSLBACKEND_SCHANNEL = 8, + CURLSSLBACKEND_DARWINSSL = 9, + CURLSSLBACKEND_AXTLS = 10, + CURLSSLBACKEND_MBEDTLS = 11 +} curl_sslbackend; + +.B "CURLsslset curl_global_sslset(curl_sslbackend " id, +.B " const char *" name, +.B " curl_ssl_backend ***" avail ");" +.fi +.SH DESCRIPTION +This function configures at runtime which SSL backend to use with +libcurl. This function can only be used to select an SSL backend once, and it +must be called \fBbefore\fP \fIcurl_global_init(3)\fP. + +The backend can be identified by the \fIid\fP +(e.g. \fBCURLSSLBACKEND_OPENSSL\fP). The backend can also be specified via the +\fIname\fP parameter for a case insensitive match (passing -1 as \fIid\fP). If +both \fIid\fP and \fIname\fP are specified, the \fIname\fP will be ignored. + +If neither \fIid\fP nor \fPname\fP are specified, the function will fail with +CURLSSLSET_UNKNOWN_BACKEND and set the \fIavail\fP pointer to the +NULL-terminated list of available backends. The available backends are those +that this particular build of libcurl supports. + +Upon success, the function returns CURLSSLSET_OK. + +If the specified SSL backend is not available, the function returns +CURLSSLSET_UNKNOWN_BACKEND and sets the \fIavail\fP pointer to a +NULL-terminated list of available SSL backends. In this case, you may call the +function again to try to select a different backend. + +The SSL backend can be set only once. If it has already been set, a subsequent +attempt to change it will result in a \fBCURLSSLSET_TOO_LATE\fP. + +\fBThis function is not thread safe.\fP You must not call it when any other +thread in the program (i.e. a thread sharing the same memory) is running. +This doesn't just mean no other thread that is using libcurl. + +.SH AVAILABILITY +This function was added in libcurl 7.56.0. Before this version, there was no +support for choosing SSL backends at runtime. +.SH RETURN VALUE +If this function returns CURLSSLSET_OK, the backend was successfully selected. + +If the chosen backend is unknown (or support for the chosed backend has not +been compiled into libcurl), the function returns \fICURLSSLSET_UNKNOWN_BACKEND\fP. + +If the backend had been configured previously, or if \fIcurl_global_init(3)\fP +has already been called, the function returns \fICURLSSLSET_TOO_LATE\fP. + +If this libcurl was built completely without SSL support, with no backends at +all, this function returns \fICURLSSLSET_NO_BACKENDS\fP. +.SH "SEE ALSO" +.BR curl_global_init "(3), " +.BR libcurl "(3) " diff --git a/docs/libcurl/curl_mime_addpart.3 b/docs/libcurl/curl_mime_addpart.3 new file mode 100644 index 0000000..fb4acd8 --- /dev/null +++ b/docs/libcurl/curl_mime_addpart.3 @@ -0,0 +1,67 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_addpart 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_addpart - append a new empty part to a mime structure +.SH SYNOPSIS +.B #include +.sp +.BI "curl_mimepart * curl_mime_addpart(curl_mime * " mime ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_addpart(3)\fP creates and appends a new empty part to the given +mime structure and returns a handle to it. The returned part handle can +subsequently be populated using functions from the mime API. + +\fImime\fP is the handle of the mime structure in which the new part must be +appended. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +A mime part structure handle, or NULL upon failure. +.SH EXAMPLE +.nf + curl_mime *mime; + curl_mimepart *part; + + /* create a mime handle */ + mime = curl_mime_init(easy); + + /* add a part */ + part = curl_mime_addpart(mime); + + /* continue and set name + data to the part */ + curl_mime_data(part, "This is the field data", CURL_ZERO_TERMINATED); + curl_mime_name(part, "data"); +.fi +.SH "SEE ALSO" +.BR curl_mime_init "(3)," +.BR curl_mime_name "(3)," +.BR curl_mime_data "(3)," +.BR curl_mime_data_cb "(3)," +.BR curl_mime_filedata "(3)," +.BR curl_mime_filename "(3)," +.BR curl_mime_subparts "(3)," +.BR curl_mime_type "(3)," +.BR curl_mime_headers "(3)," +.BR curl_mime_encoder "(3)" diff --git a/docs/libcurl/curl_mime_data.3 b/docs/libcurl/curl_mime_data.3 new file mode 100644 index 0000000..437ab1e --- /dev/null +++ b/docs/libcurl/curl_mime_data.3 @@ -0,0 +1,70 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_data 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_data - set a mime part's body data from memory +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_data(curl_mimepart * " part ", const char * " data +.BI ", size_t " datasize ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_data(3)\fP sets a mime part's body content from memory data. + +\fIdata\fP points to the data bytes: those are copied to the part and their +storage may safely be reused after call. +\fIdatasize\fP is the number of data bytes: it can be set to +\fICURL_ZERO_TERMINATED\fP to indicate \fIdata\fP is a nul-terminated +character string. +\fIpart\fP is the part's to assign contents to. + +Setting a part's contents twice is valid: only the value set by the last call +is retained. It is possible to unassign part's contents by setting +\fIdata\fP to NULL. + +Setting very large data is memory consuming: one might consider using +\fIcurl_mime_data_cb(3)\fP in such a case. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +.nf + curl_mime *mime; + curl_mimepart *part; + + /* create a mime handle */ + mime = curl_mime_init(easy); + + /* add a part */ + part = curl_mime_addpart(mime); + + /* add data to the part */ + curl_mime_data(part, "raw contents to send", CURL_ZERO_TERMINATED); +.fi +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_data_cb "(3)," +.BR curl_mime_name "(3)," +.BR curl_mime_type "(3)" diff --git a/docs/libcurl/curl_mime_data_cb.3 b/docs/libcurl/curl_mime_data_cb.3 new file mode 100644 index 0000000..21fb5d4 --- /dev/null +++ b/docs/libcurl/curl_mime_data_cb.3 @@ -0,0 +1,168 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_data_cb 3 "January 14, 2018" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_data_cb - set a callback-based data source for a mime part's body +.SH SYNOPSIS +.B #include +.sp +size_t readfunc(char *buffer, size_t size, size_t nitems, void *arg); +.br +int seekfunc(void *arg, curl_off_t offset, int origin); +.br +void freefunc(void *arg); +.sp +.BI "CURLcode curl_mime_data_cb(curl_mimepart * " part ", curl_off_t " datasize , +.br +.BI " curl_read_callback " readfunc ", curl_seek_callback " seekfunc , +.br +.BI " curl_free_callback " freefunc ", void * " arg ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_data_cb(3)\fP sets the data source of a mime part's body content +from a data read callback function. + +\fIpart\fP is the part's to assign contents to. + +\fIreadfunc\fP is a pointer to a data read callback function, with a signature +as shown by the above prototype. It may not be set to NULL. + +\fIseekfunc\fP is a pointer to a seek callback function, with a signature as +shown by the above prototype. This function will be used upon resending data +(i.e.: after a redirect); this pointer may be set to NULL, in which case a +resend is not possible. + +\fIfreefunc\fP is a pointer to a user resource freeing callback function, with +a signature as shown by the above prototype. If no resource is to be freed, it +may safely be set to NULL. This function will be called upon mime structure +freeing. + +\fIarg\fP is a user defined argument to callback functions. + +The read callback function gets called by libcurl as soon as it needs to +read data in order to send it to the peer - like if you ask it to upload or +post data to the server. The data area pointed at by the pointer \fIbuffer\fP +should be filled up with at most \fIsize\fP multiplied with \fInmemb\fP number +of bytes by your function. + +Your read function must then return the actual number of bytes that it stored +in that memory area. Returning 0 will signal end-of-file to the library and +cause it to stop the current transfer. + +If you stop the current transfer by returning 0 "pre-maturely" (i.e before the +server expected it, like when you've said you will upload N bytes and you +upload less than N bytes), you may experience that the server "hangs" waiting +for the rest of the data that won't come. + +The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current +operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error +code from the transfer. + +The callback can return \fICURL_READFUNC_PAUSE\fP to cause reading from this +connection to pause. See \fIcurl_easy_pause(3)\fP for further details. + +The seek function gets called by libcurl to rewind input stream data or to +seek to a certain position. The function shall work like fseek(3) or lseek(3) +and it gets SEEK_SET, SEEK_CUR or SEEK_END as argument for \fIorigin\fP, +although libcurl currently only passes SEEK_SET. + +The callback function must return \fICURL_SEEKFUNC_OK\fP on success, +\fICURL_SEEKFUNC_FAIL\fP to cause the upload operation to fail or +\fICURL_SEEKFUNC_CANTSEEK\fP to indicate that while the seek failed, libcurl +is free to work around the problem if possible. The latter can sometimes be +done by instead reading from the input or similar. + +Care must be taken if the part is bound to a curl easy handle that is later +duplicated: the \fIarg\fP pointer argument is also duplicated, resulting in +the pointed item to be shared between the original and the copied handle. +In particular, special attention should be given to the \fIfreefunc\fP +procedure code since it will be called twice with the same argument. + +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +Sending a huge data string will cause the same amount of memory to be +allocated: to avoid overhead resources consumption, one might want to use a +callback source to avoid data duplication. In this case, original data +must be retained until after the transfer terminates. +.nf + +char hugedata[512000]; + +struct ctl { + char *buffer; + curl_off_t size; + curl_off_t position; +}; + +size_t read_callback(char *buffer, size_t size, size_t nitems, void *arg) +{ + struct ctl *p = (struct ctl *) arg; + curl_off_t sz = p->size - p->position; + + nitems *= size; + if(sz > nitems) + sz = nitems; + if(sz) + memcpy(buffer, p->buffer + p->position, sz); + p->position += sz; + return sz; +} + +int seek_callback(void *arg, curl_off_t offset, int origin) +{ + struct ctl *p = (struct ctl *) arg; + + switch(origin) { + case SEEK_END: + offset += p->size; + break; + case SEEK_CUR: + offset += p->position; + break; + } + + if(offset < 0) + return CURL_SEEKFUNC_FAIL; + p->position = offset; + return CURL_SEEKFUNC_OK; +} + + CURL *easy = curl_easy_init(); + curl_mime *mime = curl_mime_init(easy); + curl_mimepart *part = curl_mime_addpart(mime); + struct ctl hugectl; + + hugectl.buffer = hugedata; + hugectl.size = sizeof hugedata; + hugectl.position = 0; + curl_mime_data_cb(part, hugectl.size, read_callback, seek_callback, NULL, + &hugectl); + +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_data "(3)," +.BR curl_mime_name "(3)," +.BR curl_easy_duphandle "(3)" diff --git a/docs/libcurl/curl_mime_encoder.3 b/docs/libcurl/curl_mime_encoder.3 new file mode 100644 index 0000000..bceaeb2 --- /dev/null +++ b/docs/libcurl/curl_mime_encoder.3 @@ -0,0 +1,98 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_encoder 3 "September 05, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_encoder - set a mime part's encoder and content transfer encoding +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_encoder(curl_mimepart * " part , +.BI "const char * " encoding ");" +.ad +.SH DESCRIPTION +curl_mime_encoder() requests a mime part's content to be encoded before being +transmitted. + +\fIpart\fP is the part's handle to assign an encoder. +\fIencoding\fP is a pointer to a zero-terminated encoding scheme. It may be +set to NULL to disable an encoder previously attached to the part. The encoding +scheme storage may safely be reused after this function returns. + +Setting a part's encoder twice is valid: only the value set by the last call is +retained. + +Upon multipart rendering, the part's content is encoded according to the +pertaining scheme and a corresponding \fIContent-Transfer-Encoding"\fP header +is added to the part. + +Supported encoding schemes are: +.br +"\fIbinary\fP": the data is left unchanged, the header is added. +.br +"\fI8bit\fP": header added, no data change. +.br +"\fI7bit\fP": the data is unchanged, but is each byte is checked +to be a 7-bit value; if not, a read error occurs. +.br +"\fIbase64\fP": Data is converted to base64 encoding, then split in +CRLF-terminated lines of at most 76 characters. +.br +"\fIquoted-printable\fP": data is encoded in quoted printable lines of +at most 76 characters. Since the resulting size of the final data cannot be +determined prior to reading the original data, it is left as unknown, causing +chunked transfer in HTTP. For the same reason, this encoder may not be used +with IMAP. This encoder targets text data that is mostly ASCII and should +not be used with other types of data. + +If the original data is already encoded in such a scheme, a custom +\fIContent-Transfer-Encoding\fP header should be added with +\FIcurl_mime_headers\fP() instead of setting a part encoder. + +Encoding should not be applied to multiparts, thus the use of this +function on a part with content set with \fIcurl_mime_subparts\fP() is +strongly discouraged. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +.nf + curl_mime *mime; + curl_mimepart *part; + + /* create a mime handle */ + mime = curl_mime_init(easy); + + /* add a part */ + part = curl_mime_addpart(mime); + + /* send a file */ + curl_mime_filedata(part, "image.png"); + + /* encode file data in base64 for transfer */ + curl_mime_encoder(part, "base64"); +.fi +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_headers "(3)," +.BR curl_mime_subparts "(3)" diff --git a/docs/libcurl/curl_mime_filedata.3 b/docs/libcurl/curl_mime_filedata.3 new file mode 100644 index 0000000..bff6b29 --- /dev/null +++ b/docs/libcurl/curl_mime_filedata.3 @@ -0,0 +1,85 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_filedata 3 "January 14, 2018" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_filedata - set a mime part's body data from a file contents +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_filedata(curl_mimepart * " part , +.BI " const char * " filename ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_filedata(3)\fP sets a mime part's body content from the named +file's contents. This is an alernative to \fIcurl_mime_data(3)\fP for setting +data to a mime part. + +\fIpart\fP is the part's to assign contents to. + +\fIfilename\fP points to the nul-terminated file's path name. The pointer can +be NULL to detach the previous part contents settings. Filename storage can be +safely be reused after this call. + +As a side effect, the part's remote file name is set to the base name of the +given \fIfilename\fP if it is a valid named file. This can be undone or +overridden by a subsequent call to \fIcurl_mime_filename(3)\fP. + +The contents of the file is read during the file transfer in a streaming +manner to allow huge files to get transferred without using much memory. It +therefore requires that the file is kept intact during the entire request. + +If the file size cannot be determined before actually reading it (such as for +a device or named pipe), the whole mime structure containing the part +will be transferred as chunks by HTTP and rejected by IMAP. + +Setting a part's contents twice is valid: only the value set by the last call +is retained. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. CURLE_READ_ERROR is only an +indication that the file is not yet readable: it can be safely ignored at +this time, but the file must be made readable before the pertaining +easy handle is performed. +.SH EXAMPLE +.nf + curl_mime *mime; + curl_mimepart *part; + + /* create a mime handle */ + mime = curl_mime_init(easy); + + /* add a part */ + part = curl_mime_addpart(mime); + + /* send data from this file */ + curl_mime_filedata(part, "image.png"); + + /* set name */ + curl_mime_name(part, "data"); +.fi +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_data "(3)," +.BR curl_mime_filename "(3)," +.BR curl_mime_name "(3)" diff --git a/docs/libcurl/curl_mime_filename.3 b/docs/libcurl/curl_mime_filename.3 new file mode 100644 index 0000000..1027b21 --- /dev/null +++ b/docs/libcurl/curl_mime_filename.3 @@ -0,0 +1,73 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_filename 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_filename - set a mime part's remote file name +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_filename(curl_mimepart * " part , +.BI "const char * " filename ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_filename(3)\fP sets a mime part's remote file name. When remote +file name is set, content data is processed as a file, whatever is the part's +content source. A part's remote file name is transmitted to the server in the +associated Content-Disposition generated header. + +\fIpart\fP is the part's handle to assign the remote file name to. + +\fIfilename\fP points to the nul-terminated file name string; it may be set to +NULL to remove a previously attached remote file name. + +The remote file name string is copied into the part, thus the associated +storage may safely be released or reused after call. Setting a part's file +name twice is valid: only the value set by the last call is retained. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +.nf + curl_mime *mime; + curl_mimepart *part; + + /* create a mime handle */ + mime = curl_mime_init(easy); + + /* add a part */ + part = curl_mime_addpart(mime); + + /* send image data from memory */ + curl_mime_data(part, imagebuf, imagebuf_len); + + /* set a file name to make it look like a file upload */ + curl_mime_filename(part, "image.png"); + + /* set name */ + curl_mime_name(part, "data"); +.fi +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_filedata "(3)," +.BR curl_mime_data "(3)" diff --git a/docs/libcurl/curl_mime_free.3 b/docs/libcurl/curl_mime_free.3 new file mode 100644 index 0000000..55993de --- /dev/null +++ b/docs/libcurl/curl_mime_free.3 @@ -0,0 +1,49 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_free 3 "September 04, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_free - free a previously built mime structure +.SH SYNOPSIS +.B #include +.sp +.BI "void curl_mime_free(curl_mime *" mime); +.ad +.SH DESCRIPTION +\fIcurl_mime_free(3)\fP is used to clean up data previously built/appended +with \fIcurl_mime_addpart(3)\fP and other mime-handling functions. This must +be called when the data has been used, which typically means after +\fIcurl_easy_perform(3)\fP has been called. + +The handle to free is the one you passed to +the \fICURLOPT_MIMEPOST(3)\fP option: attached subparts mime structures must +not be explicitly freed as they are by the top structure freeing. + +\fBmime\fP is the handle as returned from a previous call to +\fIcurl_mime_init(3)\fP and may be NULL. + +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +None +.SH "SEE ALSO" +.BR curl_mime_init "(3)" diff --git a/docs/libcurl/curl_mime_headers.3 b/docs/libcurl/curl_mime_headers.3 new file mode 100644 index 0000000..b48ea7a --- /dev/null +++ b/docs/libcurl/curl_mime_headers.3 @@ -0,0 +1,66 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_headers 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_headers - set a mime part's custom headers +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_headers(curl_mimepart * " part , +.BI "struct curl_slist * " headers ", int " take_ownership ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_headers(3)\fP sets a mime part's custom headers. + +\fIpart\fP is the part's handle to assign the custom headers list to. + +\fIheaders\fP is the head of a list of custom headers; it may be set to NULL +to remove a previously attached custom header list. + +\fItake_ownership\fP: when non-zero, causes the list to be freed upon +replacement or mime structure deletion; in this case the list must not be +freed explicitly. + +Setting a part's custom headers list twice is valid: only the value set by +the last call is retained. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +.nf + struct curl_slist *headers = NULL; + + headers = curl_slist_append("Custom-Header: mooo", headers); + + /* use these headers, please take ownership */ + curl_mime_headers(part, headers, TRUE); + + /* pass on this data */ + curl_mime_data(part, "12345679", CURL_ZERO_TERMINATED); + + /* set name */ + curl_mime_name(part, "numbers"); +.fi +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)" diff --git a/docs/libcurl/curl_mime_init.3 b/docs/libcurl/curl_mime_init.3 new file mode 100644 index 0000000..7017da0 --- /dev/null +++ b/docs/libcurl/curl_mime_init.3 @@ -0,0 +1,70 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_init 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_init - create a mime handle +.SH SYNOPSIS +.B #include +.sp +.BI "curl_mime * curl_mime_init(CURL * " easy_handle ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_init(3)\fP creates a handle to a new empty mime structure +intended to be used with \fIeasy_handle\fP. This mime structure can be +subsequently filled using the mime API, then attached to \fIeasy_handle\fP +using option \fICURLOPT_MIMEPOST(3)\fP within a \fIcurl_easy_setopt(3)\fP +call. + +Using a mime handle is the recommended way to post an HTTP form, format and +send a multi-part e-mail with SMTP or upload such an e-mail to an IMAP server. + +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +A mime struct handle, or NULL upon failure. +.SH EXAMPLE +.nf + + CURL *easy = curl_easy_init(); + curl_mime *mime; + curl_mimepart *part; + + /* Build an HTTP form with a single field named "data", */ + mime = curl_mime_init(easy); + part = curl_mime_addpart(mime); + curl_mime_data(part, "This is the field data", CURL_ZERO_TERMINATED); + curl_mime_name(part, "data"); + + /* Post and send it. */ + curl_easy_setopt(easy, CURLOPT_MIMEPOST, mime); + curl_easy_setopt(easy, CURLOPT_URL, "http://example.com"); + curl_easy_perform(easy); + + /* Clean-up. */ + curl_easy_cleanup(easy); + curl_mime_free(mime); + +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_free "(3)," +.BR CURLOPT_MIMEPOST "(3)" diff --git a/docs/libcurl/curl_mime_name.3 b/docs/libcurl/curl_mime_name.3 new file mode 100644 index 0000000..19e8d7f --- /dev/null +++ b/docs/libcurl/curl_mime_name.3 @@ -0,0 +1,64 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_name 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_name - set a mime part's name +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_name(curl_mimepart * " part ", const char * " name ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_name(3)\fP sets a mime part's name. This is the way HTTP form +fields are named. + +\fIpart\fP is the part's handle to assign a name to. + +\fIname\fP points to the zero-terminated name string. + +The name string is copied into the part, thus the associated storage may +safely be released or reused after call. Setting a part's name twice is valid: +only the value set by the last call is retained. It is possible to "unname" a +part by setting \fIname\fP to NULL. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +.nf + curl_mime *mime; + curl_mimepart *part; + + /* create a mime handle */ + mime = curl_mime_init(easy); + + /* add a part */ + part = curl_mime_addpart(mime); + + /* give the part a name */ + curl_mime_name(part, "shoe_size"); +.fi +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_data "(3)," +.BR curl_mime_type "(3)" diff --git a/docs/libcurl/curl_mime_subparts.3 b/docs/libcurl/curl_mime_subparts.3 new file mode 100644 index 0000000..3692393 --- /dev/null +++ b/docs/libcurl/curl_mime_subparts.3 @@ -0,0 +1,54 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_subparts 3 "September 05, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_subparts - set subparts of a multipart mime part +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_subparts(curl_mimepart * " part , +.BI "curl_mime * " subparts ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_subparts(3)\fP sets a multipart mime part's content from a mime +structure. + +\fIpart\fP is a handle to the multipart part. + +\fIsubparts\fP is a mime structure handle holding the subparts. After +\fIcurl_mime_subparts\fP succeeds, the mime structure handle belongs to the +multipart part and must not be freed explicitly. It may however be updated by +subsequent calls to mime API functions. + +Setting a part's contents twice is valid: only the value set by the last call +is retained. It is possible to unassign previous part's contents by setting +\fIsubparts\fP to NULL. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +TODO +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_init "(3)" diff --git a/docs/libcurl/curl_mime_type.3 b/docs/libcurl/curl_mime_type.3 new file mode 100644 index 0000000..ceb60c7 --- /dev/null +++ b/docs/libcurl/curl_mime_type.3 @@ -0,0 +1,84 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH curl_mime_type 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual" + +.SH NAME +curl_mime_type - set a mime part's content type +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_mime_type(curl_mimepart * " part , +.BI "const char * " mimetype ");" +.ad +.SH DESCRIPTION +\fIcurl_mime_type(3)\fP sets a mime part's content type. + +\fIpart\fP is the part's handle to assign the content type to. + +\fImimetype\fP points to the nul-terminated file mime type string; it may be +set to NULL to remove a previously attached mime type. + +The mime type string is copied into the part, thus the associated storage may +safely be released or reused after call. Setting a part's type twice is valid: +only the value set by the last call is retained. + +In the absence of a mime type and if needed by the protocol specifications, +a default mime type is determined by the context: +.br +- If set as a custom header, use this value. +.br +- application/form-data for a HTTP form post. +.br +- If a remote file name is set, the mime type is taken from the file name +extension, or application/octet-stream by default. +.br +- For a multipart part, multipart/mixed. +.br +- text/plain in other cases. +.SH AVAILABILITY +As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0. +.SH RETURN VALUE +CURLE_OK or a CURL error code upon failure. +.SH EXAMPLE +.nf + curl_mime *mime; + curl_mimepart *part; + + /* create a mime handle */ + mime = curl_mime_init(easy); + + /* add a part */ + part = curl_mime_addpart(mime); + + /* get data from this file */ + curl_mime_filedata(part, "image.png"); + + /* content-type for this part */ + curl_mime_type(part, "image/png"); + + /* set name */ + curl_mime_name(part, "image"); +.fi +.SH "SEE ALSO" +.BR curl_mime_addpart "(3)," +.BR curl_mime_name "(3)," +.BR curl_mime_data "(3)" diff --git a/docs/libcurl/curl_mprintf.3 b/docs/libcurl/curl_mprintf.3 index e861ed9..24880a1 100644 --- a/docs/libcurl/curl_mprintf.3 +++ b/docs/libcurl/curl_mprintf.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual" +.TH curl_printf 3 "April 01, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf, diff --git a/docs/libcurl/curl_multi_add_handle.3 b/docs/libcurl/curl_multi_add_handle.3 index 4c294f5..4c2b32c 100644 --- a/docs/libcurl/curl_multi_add_handle.3 +++ b/docs/libcurl/curl_multi_add_handle.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual" +.TH curl_multi_add_handle 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_add_handle - add an easy handle to a multi session .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_assign.3 b/docs/libcurl/curl_multi_assign.3 index 75cb86b..3a126c0 100644 --- a/docs/libcurl/curl_multi_assign.3 +++ b/docs/libcurl/curl_multi_assign.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual" +.TH curl_multi_assign 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_assign \- set data to associate with an internal socket .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_cleanup.3 b/docs/libcurl/curl_multi_cleanup.3 index 07d9216..9053af0 100644 --- a/docs/libcurl/curl_multi_cleanup.3 +++ b/docs/libcurl/curl_multi_cleanup.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_cleanup 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual" +.TH curl_multi_cleanup 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_cleanup - close down a multi session .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3 index beef4de..d4a2dd9 100644 --- a/docs/libcurl/curl_multi_fdset.3 +++ b/docs/libcurl/curl_multi_fdset.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_fdset 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual" +.TH curl_multi_fdset 3 "November 09, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_fdset - extracts file descriptor information from a multi handle .SH SYNOPSIS @@ -58,9 +59,10 @@ libcurl set. When libcurl returns -1 in \fImax_fd\fP, it is because libcurl currently does something that isn't possible for your application to monitor with a socket and unfortunately you can then not know exactly when the current action is completed using select(). You then need to wait a while before you -proceed and call \fIcurl_multi_perform(3)\fP anyway. How long to wait? We -suggest 100 milliseconds at least, but you may want to test it out in your own -particular conditions to find a suitable value. +proceed and call \fIcurl_multi_perform(3)\fP anyway. How long to wait? Unless +\fIcurl_multi_timeout(3)\fP gives you a lower number, we suggest 100 +milliseconds or so, but you may want to test it out in your own particular +conditions to find a suitable value. When doing select(), you should use \fIcurl_multi_timeout(3)\fP to figure out how long to wait for action. Call \fIcurl_multi_perform(3)\fP even if no diff --git a/docs/libcurl/curl_multi_info_read.3 b/docs/libcurl/curl_multi_info_read.3 index 736183d..a8871e9 100644 --- a/docs/libcurl/curl_multi_info_read.3 +++ b/docs/libcurl/curl_multi_info_read.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_info_read 3 "18 Dec 2004" "libcurl 7.10.3" "libcurl Manual" +.TH curl_multi_info_read 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_info_read - read multi stack informationals .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_init.3 b/docs/libcurl/curl_multi_init.3 index e84eb76..6f4f2b8 100644 --- a/docs/libcurl/curl_multi_init.3 +++ b/docs/libcurl/curl_multi_init.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_init 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual" +.TH curl_multi_init 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_init - create a multi handle .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_perform.3 b/docs/libcurl/curl_multi_perform.3 index d2ae541..b254b5d 100644 --- a/docs/libcurl/curl_multi_perform.3 +++ b/docs/libcurl/curl_multi_perform.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual" +.TH curl_multi_perform 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_perform - reads/writes available data from each easy handle .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_remove_handle.3 b/docs/libcurl/curl_multi_remove_handle.3 index b9daae9..b7b6cb5 100644 --- a/docs/libcurl/curl_multi_remove_handle.3 +++ b/docs/libcurl/curl_multi_remove_handle.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_remove_handle 3 "6 March 2002" "libcurl 7.9.5" "libcurl Manual" +.TH curl_multi_remove_handle 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_remove_handle - remove an easy handle from a multi session .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_setopt.3 b/docs/libcurl/curl_multi_setopt.3 index d27c524..5546e28 100644 --- a/docs/libcurl/curl_multi_setopt.3 +++ b/docs/libcurl/curl_multi_setopt.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libcurl Manual" +.TH curl_multi_setopt 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_setopt \- set options for a curl multi handle .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_socket.3 b/docs/libcurl/curl_multi_socket.3 index ea29e71..65d8914 100644 --- a/docs/libcurl/curl_multi_socket.3 +++ b/docs/libcurl/curl_multi_socket.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_socket 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual" +.TH curl_multi_socket 3 "December 15, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_socket \- reads/writes available data .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_socket_action.3 b/docs/libcurl/curl_multi_socket_action.3 index 2b84192..0f1e8d6 100644 --- a/docs/libcurl/curl_multi_socket_action.3 +++ b/docs/libcurl/curl_multi_socket_action.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_socket_action 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual" +.TH curl_multi_socket_action 3 "June 07, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_socket_action \- reads/writes available data given an action .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_strerror.3 b/docs/libcurl/curl_multi_strerror.3 index b5aa7af..7ea6b20 100644 --- a/docs/libcurl/curl_multi_strerror.3 +++ b/docs/libcurl/curl_multi_strerror.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual" +.TH curl_multi_strerror 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_strerror - return string describing error code .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_timeout.3 b/docs/libcurl/curl_multi_timeout.3 index 71b2b32..ce89899 100644 --- a/docs/libcurl/curl_multi_timeout.3 +++ b/docs/libcurl/curl_multi_timeout.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_timeout 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual" +.TH curl_multi_timeout 3 "May 02, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_timeout \- how long to wait for action before proceeding .SH SYNOPSIS diff --git a/docs/libcurl/curl_multi_wait.3 b/docs/libcurl/curl_multi_wait.3 index 9f15c5f..cf84330 100644 --- a/docs/libcurl/curl_multi_wait.3 +++ b/docs/libcurl/curl_multi_wait.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_multi_wait 3 "12 Jul 2012" "libcurl 7.28.0" "libcurl Manual" +.TH curl_multi_wait 3 "March 09, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_multi_wait - polls on all easy handles in a multi handle .SH SYNOPSIS diff --git a/docs/libcurl/curl_share_cleanup.3 b/docs/libcurl/curl_share_cleanup.3 index 0b265e8..2b0d2e1 100644 --- a/docs/libcurl/curl_share_cleanup.3 +++ b/docs/libcurl/curl_share_cleanup.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_cleanup 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual" +.TH curl_share_cleanup 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_share_cleanup - Clean up a shared object .SH SYNOPSIS diff --git a/docs/libcurl/curl_share_init.3 b/docs/libcurl/curl_share_init.3 index 545ba03..edcce88 100644 --- a/docs/libcurl/curl_share_init.3 +++ b/docs/libcurl/curl_share_init.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_init 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual" +.TH curl_share_init 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_share_init - Create a shared object .SH SYNOPSIS diff --git a/docs/libcurl/curl_share_setopt.3 b/docs/libcurl/curl_share_setopt.3 index 55e06f1..e92435f 100644 --- a/docs/libcurl/curl_share_setopt.3 +++ b/docs/libcurl/curl_share_setopt.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual" +.TH curl_share_setopt 3 "February 23, 2018" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_share_setopt - Set options for a shared object .SH SYNOPSIS @@ -62,14 +63,31 @@ Cookie data will be shared across the easy handles using this shared object. .IP CURL_LOCK_DATA_DNS Cached DNS hosts will be shared across the easy handles using this shared object. Note that when you use the multi interface, all easy handles added to -the same multi handle will share DNS cache by default without this having to -be used! +the same multi handle will share DNS cache by default without using this +option. .IP CURL_LOCK_DATA_SSL_SESSION SSL session IDs will be shared across the easy handles using this shared object. This will reduce the time spent in the SSL handshake when reconnecting to the same server. Note SSL session IDs are reused within the same easy handle by default. Note this symbol was added in 7.10.3 but was not implemented until 7.23.0. +.IP CURL_LOCK_DATA_CONNECT +Put the connection cache in the share object and make all easy handles using +this share object share the connection cache. Using this, you can for example +do multi-threaded libcurl use with one handle in each thread, and yet have a +shared pool of unused connections and this way get way better connection +re-use than if you use one separate pool in each thread. + +Connections that are used for HTTP/1.1 Pipelining or HTTP/2 multiplexing only +get additional transfers added to them if the existing connection is held by +the same multi or easy handle. libcurl does not support doing HTTP/2 streams +in different threads using a shared connection. + +Support for \fBCURL_LOCK_DATA_CONNECT\fP was added in 7.57.0, but the symbol +existed before this. + +Note that when you use the multi interface, all easy handles added to the same +multi handle will share connection cache by default without using this option. .RE .IP CURLSHOPT_UNSHARE This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that diff --git a/docs/libcurl/curl_share_strerror.3 b/docs/libcurl/curl_share_strerror.3 index faa5299..0d92c3e 100644 --- a/docs/libcurl/curl_share_strerror.3 +++ b/docs/libcurl/curl_share_strerror.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_share_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual" +.TH curl_share_strerror 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_share_strerror - return string describing error code .SH SYNOPSIS diff --git a/docs/libcurl/curl_slist_append.3 b/docs/libcurl/curl_slist_append.3 index fed8029..6f944f1 100644 --- a/docs/libcurl/curl_slist_append.3 +++ b/docs/libcurl/curl_slist_append.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_slist_append 3 "19 Jun 2003" "libcurl 7.10.4" "libcurl Manual" +.TH curl_slist_append 3 "May 05, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_slist_append - add a string to an slist .SH SYNOPSIS @@ -29,11 +30,11 @@ curl_slist_append - add a string to an slist .BI "const char * "string ");" .ad .SH DESCRIPTION -curl_slist_append() appends a specified string to a linked list of -strings. The existing \fIlist\fP should be passed as the first argument while -the new list is returned from this function. The specified \fIstring\fP has -been appended when this function returns. curl_slist_append() copies the -string. +\fIcurl_slist_append(3)\fP appends a string to a linked list of strings. The +existing \fBlist\fP should be passed as the first argument and the new list is +returned from this function. Pass in NULL in the \fBlist\fP argument to create +a new list. The specified \fBstring\fP has been appended when this function +returns. \fIcurl_slist_append(3)\fP copies the string. The list should be freed again (after usage) with \fIcurl_slist_free_all(3)\fP. @@ -42,19 +43,19 @@ A null pointer is returned if anything went wrong, otherwise the new list pointer is returned. .SH EXAMPLE .nf - CURL handle; - struct curl_slist *slist=NULL; +CURL *handle; +struct curl_slist *slist=NULL; - slist = curl_slist_append(slist, "pragma:"); +slist = curl_slist_append(slist, "pragma:"); - if (slist == NULL) - return -1; +if (slist == NULL) + return -1; - curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist); +curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist); - curl_easy_perform(handle); +curl_easy_perform(handle); - curl_slist_free_all(slist); /* free the list again */ +curl_slist_free_all(slist); /* free the list again */ .fi .SH "SEE ALSO" .BR curl_slist_free_all "(3), " diff --git a/docs/libcurl/curl_slist_free_all.3 b/docs/libcurl/curl_slist_free_all.3 index 31d81da..2f3afed 100644 --- a/docs/libcurl/curl_slist_free_all.3 +++ b/docs/libcurl/curl_slist_free_all.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual" +.TH curl_slist_free_all 3 "May 05, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_slist_free_all - free an entire curl_slist list .SH SYNOPSIS @@ -32,6 +33,22 @@ curl_slist_free_all() removes all traces of a previously built curl_slist linked list. .SH RETURN VALUE Nothing. +.SH EXAMPLE +.nf +CURL *handle; +struct curl_slist *slist=NULL; + +slist = curl_slist_append(slist, "X-libcurl: coolness"); + +if (slist == NULL) + return -1; + +curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist); + +curl_easy_perform(handle); + +curl_slist_free_all(slist); /* free the list again */ +.fi .SH "SEE ALSO" .BR curl_slist_append "(3), " diff --git a/docs/libcurl/curl_strequal.3 b/docs/libcurl/curl_strequal.3 index a745f7e..a442c7f 100644 --- a/docs/libcurl/curl_strequal.3 +++ b/docs/libcurl/curl_strequal.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_strequal 3 "30 April 2004" "libcurl 7.12" "libcurl Manual" +.TH curl_strequal 3 "June 29, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_strequal, curl_strnequal - case insensitive string comparisons .SH SYNOPSIS @@ -27,7 +28,7 @@ curl_strequal, curl_strnequal - case insensitive string comparisons .sp .BI "int curl_strequal(char *" str1 ", char *" str2 ");" .sp -.BI "int curl_strenqual(char *" str1 ", char *" str2 ", size_t " len ");" +.BI "int curl_strnequal(char *" str1 ", char *" str2 ", size_t " len ");" .SH DESCRIPTION The .B curl_strequal() diff --git a/docs/libcurl/curl_strnequal.3 b/docs/libcurl/curl_strnequal.3 new file mode 100644 index 0000000..ce41d3e --- /dev/null +++ b/docs/libcurl/curl_strnequal.3 @@ -0,0 +1 @@ +.so man3/curl_strequal.3 diff --git a/docs/libcurl/curl_unescape.3 b/docs/libcurl/curl_unescape.3 index 061fbbf..6619317 100644 --- a/docs/libcurl/curl_unescape.3 +++ b/docs/libcurl/curl_unescape.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_unescape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual" +.TH curl_unescape 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_unescape - URL decodes the given string .SH SYNOPSIS diff --git a/docs/libcurl/curl_version.3 b/docs/libcurl/curl_version.3 index 4acd73a..88a8544 100644 --- a/docs/libcurl/curl_version.3 +++ b/docs/libcurl/curl_version.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH curl_version 3 "5 March 2001" "libcurl 7.0" "libcurl Manual" +.TH curl_version 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_version - returns the libcurl version string .SH SYNOPSIS diff --git a/docs/libcurl/curl_version_info.3 b/docs/libcurl/curl_version_info.3 index ebb11c3..5b2899f 100644 --- a/docs/libcurl/curl_version_info.3 +++ b/docs/libcurl/curl_version_info.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,17 +20,18 @@ .\" * .\" ************************************************************************** .\" -.TH curl_version_info 3 "2 Nov 2014" "libcurl 7.40.0" "libcurl Manual" +.TH curl_version_info 3 "December 29, 2017" "libcurl 7.59.0" "libcurl Manual" + .SH NAME curl_version_info - returns run-time libcurl version info .SH SYNOPSIS .B #include .sp -.BI "curl_version_info_data *curl_version_info( CURLversion "type ");" +.BI "curl_version_info_data *curl_version_info( CURLversion "age ");" .ad .SH DESCRIPTION Returns a pointer to a filled in static struct with information about various -features in the running version of libcurl. \fItype\fP should be set to the +features in the running version of libcurl. \fIage\fP should be set to the version of this functionality by the time you write your program. This way, libcurl will always return a proper struct that your program understands, while programs in the future might get a different @@ -72,6 +73,12 @@ typedef struct { const char *libssh_version; /* human readable string */ + /* when 'age' is 4 or higher (7.57.0 or later), the members below also + exist */ + unsigned int brotli_ver_num; /* Numeric Brotli version + (MAJOR << 24) | (MINOR << 12) | PATCH */ + const char *brotli_version; /* human readable string. */ + } curl_version_info_data; .fi @@ -156,6 +163,12 @@ libcurl ignore cookies with a domain that's on the list. .IP CURL_VERSION_HTTPS_PROXY libcurl was built with support for HTTPS-proxy. (Added in 7.52.0) +.IP CURL_VERSION_MULTI_SSL +libcurl was built with multiple SSL backends. For details, see +\fIcurl_global_sslset(3)\fP. +(Added in 7.56.0) +.IP CURL_VERSION_BROTLI +supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0) .RE \fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl has no SSL support, this is NULL. diff --git a/docs/libcurl/libcurl-easy.3 b/docs/libcurl/libcurl-easy.3 index d112632..792f71b 100644 --- a/docs/libcurl/libcurl-easy.3 +++ b/docs/libcurl/libcurl-easy.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl 3 "19 Sep 2014" "libcurl" "libcurl easy interface" +.TH libcurl 3 "February 03, 2016" "libcurl 7.59.0" "libcurl easy interface" + .SH NAME libcurl-easy \- easy interface overview .SH DESCRIPTION diff --git a/docs/libcurl/libcurl-env.3 b/docs/libcurl/libcurl-env.3 new file mode 100644 index 0000000..feeacec --- /dev/null +++ b/docs/libcurl/libcurl-env.3 @@ -0,0 +1,90 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.TH libcurl-env 3 "January 24, 2018" "libcurl 7.59.0" "libcurl environment variables" + +.SH NAME +libcurl-env \- environment variables libcurl understands +.SH DESCRIPTION +libcurl reads and understands a set of environment variables that if set will +control and change behaviors. This is the full list of variables to set and +description of what they do. Also note that curl, the command line tool, +supports a set of additional environment variables independently of this. +.IP "[scheme]_proxy" +When libcurl is given a URL to use in a transfer, it first extracts the +"scheme" part from the URL and checks if there is a given proxy set for that +in its corresponding environment variable. A URL like "http://example.com" +will hence use the "http_proxy" variable, while a URL like "ftp://example.com" +will use the "ftp_proxy" variable. + +These proxy variables are also checked for in their uppercase versions, except +the "http_proxy" one which is only used lowercase. Note also that some systems +actually have a case insensitive handling of environment variables and then of +course "HTTP_PROXY" will still work... +.IP ALL_PROXY +This is a setting to set proxy for all URLs, independently of what scheme is +being used. Note that the scheme specific variables will override this one if +set. +.IP CURL_SSL_BACKEND +When libcurl is built to support multiple SSL backends, it will select a +specific backend at first use. If no selection is done by the program using +libcurl, this variable's selection will be used. It should be set to the full +SSL backend name to use (case insensitive). +.IP HOME +When the netrc feature is used (\fICURLOPT_NETRC(3)\fP), this variable is +checked as the primary way to find the "current" home directory in which +the .netrc file is likely to exist. +.IP LOGNAME +User name to use when invoking the ntlm-wb tool, if NTLMUSER wasn't set. +.IP NO_PROXY +This has the same functionality as the \fICURLOPT_NOPROXY(3)\fP option: it +gives libcurl a comma-separated list of host name patterns for which libcurl +should not use a proxy. +.IP NTLMUSER +User name to use when invoking the ntlm-wb tool. +.IP SSLKEYLOGFILE +When set and libcurl runs with a SSL backend that supports this feature, +libcurl will save SSL secrets into the given file name. Using those SSL +secrets, other tools (such as Wireshark) can decrypt the SSL communication and +analyze/view the traffic. +.IP SSL_DIR +When libcurl runs with the NSS backends for TLS features, this variable is +used to find the directory for NSS PKI database instead of the built-in. +.IP USER +User name to use when invoking the ntlm-wb tool, if NTLMUSER and LOGNAME +weren't set. +.SH "Debug Variables" +There's a set of variables only recognized and used if libcurl was buillt +"debug enabled", which should never be true for a library used in production. +.IP "CURL_GETHOSTNAME" +Debug-only variable. +.IP "CURL_FORCETIME" +Debug-only variable. +.IP "CURL_ENTROPY" +Debug-only variable. Used to set a fixed faked value to use instead of a +proper random number so that functions in libcurl that are otherwise getting +random outputs can be tested for what they generate. +.IP "CURL_TRACE" +Debug-only variable. Used for debugging the lib/ldap implementation. +.IP "CURL_NTLM_WB_FILE" +Debug-only variable. Used to set to a debug-version of the ntlm-wb executable. +.IP "CURL_OPENLDAP_TRACE" +Debug-only variable. Used for debugging the lib/openldap.c implementation. diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3 index 1b6e34f..8aa7b97 100644 --- a/docs/libcurl/libcurl-errors.3 +++ b/docs/libcurl/libcurl-errors.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-errors 3 "1 Jan 2010" "libcurl 7.20.0" "libcurl errors" +.TH libcurl-errors 3 "February 10, 2018" "libcurl 7.59.0" "libcurl errors" + .SH NAME libcurl-errors \- error codes in libcurl .SH DESCRIPTION @@ -252,6 +253,8 @@ Failed to match the pinned key specified with \fICURLOPT_PINNEDPUBLICKEY(3)\fP. Status returned failure when asked with \fICURLOPT_SSL_VERIFYSTATUS(3)\fP. .IP "CURLE_HTTP2_STREAM (92)" Stream error in the HTTP/2 framing layer. +.IP "CURLE_RECURSIVE_API_CALL (93)" +An API function was called from inside a callback. .IP "CURLE_OBSOLETE*" These error codes will never be returned. They were used in an old libcurl version and are currently unused. @@ -285,6 +288,8 @@ curl_multi_setopt() with unsupported option .IP "CURLM_ADDED_ALREADY (7)" An easy handle already added to a multi handle was attempted to get added a second time. (Added in 7.32.1) +.IP "CURLM_RECURSIVE_API_CALL (8)" +An API function was called from inside a callback. .SH "CURLSHcode" The "share" interface will return a CURLSHcode to indicate when an error has occurred. Also consider \fIcurl_share_strerror(3)\fP. diff --git a/docs/libcurl/libcurl-multi.3 b/docs/libcurl/libcurl-multi.3 index d25a1b0..1fd2366 100644 --- a/docs/libcurl/libcurl-multi.3 +++ b/docs/libcurl/libcurl-multi.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-multi 3 "19 Sep 2014" "libcurl" "libcurl multi interface" +.TH libcurl-multi 3 "June 07, 2017" "libcurl 7.59.0" "libcurl multi interface" + .SH NAME libcurl-multi \- how to use the multi interface .SH DESCRIPTION @@ -173,7 +174,6 @@ the future, you should be aware of the following current restrictions: .nf - Name resolves unless the c-ares or threaded-resolver backends are used - - HTTP proxy CONNECT operations - SOCKS proxy handshakes - file:// transfers - TELNET transfers diff --git a/docs/libcurl/libcurl-security.3 b/docs/libcurl/libcurl-security.3 new file mode 100644 index 0000000..e8037c3 --- /dev/null +++ b/docs/libcurl/libcurl-security.3 @@ -0,0 +1,339 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH libcurl-security 3 "February 13, 2018" "libcurl 7.59.0" "libcurl security" + +.SH NAME +libcurl-security \- security considerations when using libcurl +.SH "Security" +The libcurl project takes security seriously. The library is written with +caution and precautions are taken to mitigate many kinds of risks encountered +while operating with potentially malicious servers on the Internet. It is a +powerful library, however, which allows application writers to make trade-offs +between ease of writing and exposure to potential risky operations. If used +the right way, you can use libcurl to transfer data pretty safely. + +Many applications are used in closed networks where users and servers can +(possibly) be trusted, but many others are used on arbitrary servers and are +fed input from potentially untrusted users. Following is a discussion about +some risks in the ways in which applications commonly use libcurl and +potential mitigations of those risks. It is by no means comprehensive, but +shows classes of attacks that robust applications should consider. The Common +Weakness Enumeration project at https://cwe.mitre.org/ is a good reference for +many of these and similar types of weaknesses of which application writers +should be aware. +.SH "Command Lines" +If you use a command line tool (such as curl) that uses libcurl, and you give +options to the tool on the command line those options can very likely get read +by other users of your system when they use 'ps' or other tools to list +currently running processes. + +To avoid these problems, never feed sensitive things to programs using command +line options. Write them to a protected file and use the \-K option to avoid +this. +.SH ".netrc" +\&.netrc is a pretty handy file/feature that allows you to login quickly and +automatically to frequently visited sites. The file contains passwords in +clear text and is a real security risk. In some cases, your .netrc is also +stored in a home directory that is NFS mounted or used on another network +based file system, so the clear text password will fly through your network +every time anyone reads that file! + +For applications that enable .netrc use, a user who manage to set the right +URL might then be possible to pass on passwords. + +To avoid these problems, don't use .netrc files and never store passwords in +plain text anywhere. +.SH "Clear Text Passwords" +Many of the protocols libcurl supports send name and password unencrypted as +clear text (HTTP Basic authentication, FTP, TELNET etc). It is very easy for +anyone on your network or a network nearby yours to just fire up a network +analyzer tool and eavesdrop on your passwords. Don't let the fact that HTTP +Basic uses base64 encoded passwords fool you. They may not look readable at a +first glance, but they very easily "deciphered" by anyone within seconds. + +To avoid this problem, use an authentication mechanism or other protocol that +doesn't let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or +NTLM authentication. Or even better: use authenticated protocols that protect +the entire connection and everything sent over it. +.SH "Un-authenticated Connections" +Protocols that don't have any form of cryptographic authentication can not +with any certainty know that they communicate with the right remote server. + +If your application is using a fixed scheme or fixed host name, it is not safe +as long as the connection is un-authenticated. There can be a +man-in-the-middle or in fact the whole server might have been replaced by an +evil actor. + +Un-authenticated protocols are unsafe. The data that comes back to curl may +have been injected by an attacker. The data that curl sends might be modified +before it reaches the intended server. If it even reaches the intended server +at all. + +Remedies include: + - Restrict operations to authenticated transfers + - Make sure the server's certificate etc is verified +.SH "Redirects" +The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP +redirects sent by a remote server. These redirects can refer to any kind of +URL, not just HTTP. libcurl restricts the protocols allowed to be used in +redirects for security reasons: FILE, SCP, SMB and SMBS are disabled by +default. Applications are encouraged to restrict that set further. + +A redirect to a file: URL would cause the libcurl to read (or write) arbitrary +files from the local filesystem. If the application returns the data back to +the user (as would happen in some kinds of CGI scripts), an attacker could +leverage this to read otherwise forbidden data (e.g. +file://localhost/etc/passwd). + +If authentication credentials are stored in the ~/.netrc file, or Kerberos +is in use, any other URL type (not just file:) that requires +authentication is also at risk. A redirect such as +ftp://some-internal-server/private-file would then return data even when +the server is password protected. + +In the same way, if an unencrypted SSH private key has been configured for the +user running the libcurl application, SCP: or SFTP: URLs could access password +or private-key protected resources, +e.g. sftp://user@some-internal-server/etc/passwd + +The \fICURLOPT_REDIR_PROTOCOLS(3)\fP and \fICURLOPT_NETRC(3)\fP options can be +used to mitigate against this kind of attack. + +A redirect can also specify a location available only on the machine running +libcurl, including servers hidden behind a firewall from the attacker. +e.g. http://127.0.0.1/ or http://intranet/delete-stuff.cgi?delete=all or +tftp://bootp-server/pc-config-data + +Applications can mitigate against this by disabling +\fICURLOPT_FOLLOWLOCATION(3)\fP and handling redirects itself, sanitizing URLs +as necessary. Alternately, an app could leave \fICURLOPT_FOLLOWLOCATION(3)\fP +enabled but set \fICURLOPT_REDIR_PROTOCOLS(3)\fP and install a +\fICURLOPT_OPENSOCKETFUNCTION(3)\fP callback function in which addresses are +sanitized before use. +.SH "Local Resources" +A user who can control the DNS server of a domain being passed in within a URL +can change the address of the host to a local, private address which a +server-side libcurl-using application could then use. e.g. the innocuous URL +http://fuzzybunnies.example.com/ could actually resolve to the IP address of a +server behind a firewall, such as 127.0.0.1 or 10.1.2.3. Applications can +mitigate against this by setting a \fICURLOPT_OPENSOCKETFUNCTION(3)\fP and +checking the address before a connection. + +All the malicious scenarios regarding redirected URLs apply just as well to +non-redirected URLs, if the user is allowed to specify an arbitrary URL that +could point to a private resource. For example, a web app providing a +translation service might happily translate file://localhost/etc/passwd and +display the result. Applications can mitigate against this with the +\fICURLOPT_PROTOCOLS(3)\fP option as well as by similar mitigation techniques +for redirections. + +A malicious FTP server could in response to the PASV command return an IP +address and port number for a server local to the app running libcurl but +behind a firewall. Applications can mitigate against this by using the +\fICURLOPT_FTP_SKIP_PASV_IP(3)\fP option or \fICURLOPT_FTPPORT(3)\fP. + +Local servers sometimes assume local access comes from friends and trusted +users. An application that expects http://example.com/file_to_read that and +instead gets http://192.168.0.1/my_router_config might print a file that would +otherwise be protected by the firewall. + +Allowing your application to connect to local hosts, be it the same machine +that runs the application or a machine on the same local network, might be +possible to exploit by an attacker who then perhaps can "port-scan" the +particular hosts - depending on how the application and servers acts. +.SH "IPv6 Addresses" +libcurl will normally handle IPv6 addresses transparently and just as easily +as IPv4 addresses. That means that a sanitizing function that filters out +addresses like 127.0.0.1 isn't sufficient--the equivalent IPv6 addresses ::1, +::, 0:00::0:1, ::127.0.0.1 and ::ffff:7f00:1 supplied somehow by an attacker +would all bypass a naive filter and could allow access to undesired local +resources. IPv6 also has special address blocks like link-local and +site-local that generally shouldn't be accessed by a server-side libcurl-using +application. A poorly-configured firewall installed in a data center, +organization or server may also be configured to limit IPv4 connections but +leave IPv6 connections wide open. In some cases, setting +\fICURLOPT_IPRESOLVE(3)\fP to CURL_IPRESOLVE_V4 can be used to limit resolved +addresses to IPv4 only and bypass these issues. +.SH Uploads +When uploading, a redirect can cause a local (or remote) file to be +overwritten. Applications must not allow any unsanitized URL to be passed in +for uploads. Also, \fICURLOPT_FOLLOWLOCATION(3)\fP should not be used on +uploads. Instead, the applications should consider handling redirects itself, +sanitizing each URL first. +.SH Authentication +Use of \fICURLOPT_UNRESTRICTED_AUTH(3)\fP could cause authentication +information to be sent to an unknown second server. Applications can mitigate +against this by disabling \fICURLOPT_FOLLOWLOCATION(3)\fP and handling +redirects itself, sanitizing where necessary. + +Use of the CURLAUTH_ANY option to \fICURLOPT_HTTPAUTH(3)\fP could result in +user name and password being sent in clear text to an HTTP server. Instead, +use CURLAUTH_ANYSAFE which ensures that the password is encrypted over the +network, or else fail the request. + +Use of the CURLUSESSL_TRY option to \fICURLOPT_USE_SSL(3)\fP could result in +user name and password being sent in clear text to an FTP server. Instead, +use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or else +fail the request. +.SH Cookies +If cookies are enabled and cached, then a user could craft a URL which +performs some malicious action to a site whose authentication is already +stored in a cookie. e.g. http://mail.example.com/delete-stuff.cgi?delete=all +Applications can mitigate against this by disabling cookies or clearing them +between requests. +.SH "Dangerous SCP URLs" +SCP URLs can contain raw commands within the scp: URL, which is a side effect +of how the SCP protocol is designed. e.g. + + scp://user:pass@host/a;date >/tmp/test; + +Applications must not allow unsanitized SCP: URLs to be passed in for +downloads. +.SH "file://" +By default curl and libcurl support file:// URLs. Such a URL is always an +access, or attempted access, to a local resource. If your application wants to +avoid that, keep control of what URLs to use and/or prevent curl/libcurl from +using the protocol. + +By default, libcurl prohibits redirects to file:// URLs. +.SH "What if the user can set the URL" +Applications may find it tempting to let users set the URL that it can work +on. That's probably fine, but opens up for mischief and trickery that you as +an application author may want to address or take precautions against. + +If your curl-using script allow a custom URL do you also, perhaps +unintentionally, allow the user to pass other options to the curl command line +if creative use of special characters are applied? + +If the user can set the URL, the user can also specify the scheme part to +other protocols that you didn't intend for users to use and perhaps didn't +consider. curl supports over 20 different URL schemes. "http://" might be what +you thought, "ftp://" or "imap://" might be what the user gives your +application. Also, cross-protocol operations might be done by using a +particular scheme in the URL but point to a server doing a different protocol +on a non-standard port. + +Remedies: + + - curl command lines can use \fI--proto\fP to limit what schemes it accepts + - libcurl programs can use \fICURLOPT_PROTOCOLS(3)\fP + - consider not allowing the user to set the full URL + - consider strictly filtering input to only allow specific choices +.SH "RFC 3986 vs WHATWG URL" +curl supports URLs mostly according to how they are defined in RFC 3986, and +has done so since the beginning. + +Web browsers mostly adhere to the WHATWG URL Specification. + +This deviance makes some URLs copied between browsers (or returned over HTTP +for redirection) and curl not work the same way. This can mislead users into +getting the wrong thing, connecting to the wrong host or otherwise not work +identically. +.SH "FTP uses two connections" +When performing an FTP transfer, two TCP connections are used: one for setting +up the transfer and one for the actual data. + +FTP is not only un-authenticated, but the setting up of the second transfer is +also a weak spot. The second connection to use for data, is either setup with +the PORT/EPRT command that makes the server connect back to the client on the +given IP+PORT, or with PASV/EPSV that makes the server setup a port to listen +to and tells the client to connect to a given IP+PORT. + +Again, un-authenticated means that the connection might be meddled with by a +man-in-the-middle or that there's a malicious server pretending to be the +right one. + +A malicious FTP server can respond to PASV commands with the IP+PORT of a +totally different machine. Perhaps even a third party host, and when there are +many clients trying to connect to that third party, it could create a +Distributed Denial-Of-Service attack out of it! If the client makes an upload +operation, it can make the client send the data to another site. If the +attacker can affect what data the client uploads, it can be made to work as a +HTTP request and then the client could be made to issue HTTP requests to third +party hosts. + +An attacker that manages to control curl's command line options can tell curl +to send an FTP PORT command to ask the server to connect to a third party host +instead of back to curl. + +The fact that FTP uses two connections makes it vulnerable in a way that is +hard to avoid. +.SH "Denial of Service" +A malicious server could cause libcurl to effectively hang by sending data +very slowly, or even no data at all but just keeping the TCP connection open. +This could effectively result in a denial-of-service attack. The +\fICURLOPT_TIMEOUT(3)\fP and/or \fICURLOPT_LOW_SPEED_LIMIT(3)\fP options can +be used to mitigate against this. + +A malicious server could cause libcurl to download an infinite amount of data, +potentially causing all of memory or disk to be filled. Setting the +\fICURLOPT_MAXFILESIZE_LARGE(3)\fP option is not sufficient to guard against +this. Instead, applications should monitor the amount of data received within +the write or progress callback and abort once the limit is reached. + +A malicious HTTP server could cause an infinite redirection loop, causing a +denial-of-service. This can be mitigated by using the +\fICURLOPT_MAXREDIRS(3)\fP option. +.SH "Arbitrary Headers" +User-supplied data must be sanitized when used in options like +\fICURLOPT_USERAGENT(3)\fP, \fICURLOPT_HTTPHEADER(3)\fP, +\fICURLOPT_POSTFIELDS(3)\fP and others that are used to generate structured +data. Characters like embedded carriage returns or ampersands could allow the +user to create additional headers or fields that could cause malicious +transactions. +.SH "Server-supplied Names" +A server can supply data which the application may, in some cases, use as a +file name. The curl command-line tool does this with +\fI--remote-header-name\fP, using the Content-disposition: header to generate +a file name. An application could also use \fICURLINFO_EFFECTIVE_URL(3)\fP to +generate a file name from a server-supplied redirect URL. Special care must be +taken to sanitize such names to avoid the possibility of a malicious server +supplying one like "/etc/passwd", "\\autoexec.bat", "prn:" or even ".bashrc". +.SH "Server Certificates" +A secure application should never use the \fICURLOPT_SSL_VERIFYPEER(3)\fP +option to disable certificate validation. There are numerous attacks that are +enabled by applications that fail to properly validate server TLS/SSL +certificates, thus enabling a malicious server to spoof a legitimate +one. HTTPS without validated certificates is potentially as insecure as a +plain HTTP connection. +.SH "Report Security Problems" +Should you detect or just suspect a security problem in libcurl or curl, +contact the project curl security team immediately. See the separate +SECURITY.md document for details. +.SH "Showing What You Do" +Relatedly, be aware that in situations when you have problems with libcurl and +ask someone for help, everything you reveal in order to get best possible help +might also impose certain security related risks. Host names, user names, +paths, operating system specifics, etc. (not to mention passwords of course) +may in fact be used by intruders to gain additional information of a potential +target. + +Be sure to limit access to application logs if they could hold private or +security-related data. Besides the obvious candidates like user names and +passwords, things like URLs, cookies or even file names could also hold +sensitive data. + +To avoid this problem, you must of course use your common sense. Often, you +can just edit out the sensitive data or just search/replace your true +information with faked data. + diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 index c7cd655..b1d6a33 100644 --- a/docs/libcurl/libcurl-share.3 +++ b/docs/libcurl/libcurl-share.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface" +.TH libcurl-share 3 "November 27, 2017" "libcurl 7.59.0" "libcurl share interface" + .SH NAME libcurl-share \- how to use the share interface .SH DESCRIPTION @@ -34,10 +35,9 @@ The share interface was added to enable sharing of data between curl \&"handles". .SH "ONE SET OF DATA - MANY TRANSFERS" You can have multiple easy handles share data between them. Have them update -and use the \fBsame\fP cookie database, DNS cache, TLS session cache! This -way, each single transfer will take advantage from data updates made by the -other transfer(s). The sharing interface, however, does not share active or -persistent connections between different easy handles. +and use the \fBsame\fP cookie database, DNS cache, TLS session cache and/or +connection cache! This way, each single transfer will take advantage from data +updates made by the other transfer(s). .SH "SHARE OBJECT" You create a shared object with \fIcurl_share_init(3)\fP. It returns a handle for a newly created one. diff --git a/docs/libcurl/libcurl-symbols.3 b/docs/libcurl/libcurl-symbols.3 index cbbae6f..20d9069 100644 --- a/docs/libcurl/libcurl-symbols.3 +++ b/docs/libcurl/libcurl-symbols.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -19,7 +19,7 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl-symbols 3 "feb 22, 2017" "libcurl 7.41.0" "libcurl symbols" +.TH libcurl-symbols 3 "mar 14, 2018" "libcurl 7.41.0" "libcurl symbols" .SH NAME libcurl-symbols \- libcurl symbol version information .SH "libcurl symbols" @@ -45,6 +45,8 @@ Introduced in 7.10.6 Introduced in 7.10.6 .IP CURLAUTH_DIGEST_IE Introduced in 7.19.3 +.IP CURLAUTH_GSSAPI +Introduced in 7.55.0 .IP CURLAUTH_GSSNEGOTIATE Introduced in 7.10.6 Deprecated since 7.38.0 @@ -230,6 +232,8 @@ Introduced in 7.17.0 Introduced in 7.1 .IP CURLE_RECV_ERROR Introduced in 7.10 +.IP CURLE_RECURSIVE_API_CALL +Introduced in 7.59.0 .IP CURLE_REMOTE_ACCESS_DENIED Introduced in 7.17.0 .IP CURLE_REMOTE_DISK_FULL @@ -355,6 +359,7 @@ Introduced in 7.21.0 Introduced in 7.21.0 .IP CURLFORM_ARRAY Introduced in 7.9.1 +Deprecated since 7.56.0 .IP CURLFORM_ARRAY_END Introduced in 7.9.1 Deprecated since 7.9.5 @@ -365,40 +370,58 @@ Deprecated since 7.9.5 Last used in 7.9.5 .IP CURLFORM_BUFFER Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURLFORM_BUFFERLENGTH Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURLFORM_BUFFERPTR Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURLFORM_CONTENTHEADER Introduced in 7.9.3 +Deprecated since 7.56.0 .IP CURLFORM_CONTENTLEN Introduced in 7.46.0 +Deprecated since 7.56.0 .IP CURLFORM_CONTENTSLENGTH Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_CONTENTTYPE Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_COPYCONTENTS Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_COPYNAME Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_END Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_FILE Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_FILECONTENT Introduced in 7.9.1 +Deprecated since 7.56.0 .IP CURLFORM_FILENAME Introduced in 7.9.6 +Deprecated since 7.56.0 .IP CURLFORM_NAMELENGTH Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_NOTHING Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_PTRCONTENTS Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_PTRNAME Introduced in 7.9 +Deprecated since 7.56.0 .IP CURLFORM_STREAM Introduced in 7.18.2 +Deprecated since 7.56.0 .IP CURLFTPAUTH_DEFAULT Introduced in 7.12.2 .IP CURLFTPAUTH_SSL @@ -459,8 +482,12 @@ Introduced in 7.19.4 Introduced in 7.4.1 .IP CURLINFO_CONTENT_LENGTH_DOWNLOAD Introduced in 7.6.1 +.IP CURLINFO_CONTENT_LENGTH_DOWNLOAD_T +Introduced in 7.55.0 .IP CURLINFO_CONTENT_LENGTH_UPLOAD Introduced in 7.6.1 +.IP CURLINFO_CONTENT_LENGTH_UPLOAD_T +Introduced in 7.55.0 .IP CURLINFO_CONTENT_TYPE Introduced in 7.9.4 .IP CURLINFO_COOKIELIST @@ -477,6 +504,8 @@ Introduced in 7.4 Introduced in 7.9.6 .IP CURLINFO_FILETIME Introduced in 7.5 +.IP CURLINFO_FILETIME_T +Introduced in 7.59.0 .IP CURLINFO_FTP_ENTRY_PATH Introduced in 7.15.4 .IP CURLINFO_HEADER_IN @@ -512,6 +541,8 @@ Introduced in 7.4.1 Introduced in 7.4.1 .IP CURLINFO_NUM_CONNECTS Introduced in 7.12.3 +.IP CURLINFO_OFF_T +Introduced in 7.55.0 .IP CURLINFO_OS_ERRNO Introduced in 7.12.2 .IP CURLINFO_PRETRANSFER_TIME @@ -528,6 +559,8 @@ Introduced in 7.52.0 Introduced in 7.10.8 .IP CURLINFO_PROXY_SSL_VERIFYRESULT Introduced in 7.52.0 +.IP CURLINFO_PTR +Introduced in 7.54.1 .IP CURLINFO_REDIRECT_COUNT Introduced in 7.9.7 .IP CURLINFO_REDIRECT_TIME @@ -550,16 +583,24 @@ Introduced in 7.20.0 Introduced in 7.52.0 .IP CURLINFO_SIZE_DOWNLOAD Introduced in 7.4.1 +.IP CURLINFO_SIZE_DOWNLOAD_T +Introduced in 7.55.0 .IP CURLINFO_SIZE_UPLOAD Introduced in 7.4.1 +.IP CURLINFO_SIZE_UPLOAD_T +Introduced in 7.55.0 .IP CURLINFO_SLIST Introduced in 7.12.3 .IP CURLINFO_SOCKET Introduced in 7.45.0 .IP CURLINFO_SPEED_DOWNLOAD Introduced in 7.4.1 +.IP CURLINFO_SPEED_DOWNLOAD_T +Introduced in 7.55.0 .IP CURLINFO_SPEED_UPLOAD Introduced in 7.4.1 +.IP CURLINFO_SPEED_UPLOAD_T +Introduced in 7.55.0 .IP CURLINFO_SSL_DATA_IN Introduced in 7.12.1 .IP CURLINFO_SSL_DATA_OUT @@ -609,6 +650,10 @@ Introduced in 7.19.6 Introduced in 7.19.6 .IP CURLKHTYPE_DSS Introduced in 7.19.6 +.IP CURLKHTYPE_ECDSA +Introduced in 7.58.0 +.IP CURLKHTYPE_ED25519 +Introduced in 7.58.0 .IP CURLKHTYPE_RSA Introduced in 7.19.6 .IP CURLKHTYPE_RSA1 @@ -667,6 +712,8 @@ Introduced in 7.9.6 Introduced in 7.9.6 .IP CURLM_OUT_OF_MEMORY Introduced in 7.9.6 +.IP CURLM_RECURSIVE_API_CALL +Introduced in 7.59.0 .IP CURLM_UNKNOWN_OPTION Introduced in 7.15.4 .IP CURLOPTTYPE_FUNCTIONPOINT @@ -833,6 +880,8 @@ Introduced in 7.9.2 Introduced in 7.20.0 .IP CURLOPT_GSSAPI_DELEGATION Introduced in 7.22.0 +.IP CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS +Introduced in 7.59.0 .IP CURLOPT_HEADER Introduced in 7.1 .IP CURLOPT_HEADERDATA @@ -851,6 +900,7 @@ Introduced in 7.8.1 Introduced in 7.1 .IP CURLOPT_HTTPPOST Introduced in 7.1 +Deprecated since 7.56.0 .IP CURLOPT_HTTPPROXYTUNNEL Introduced in 7.3 .IP CURLOPT_HTTPREQUEST @@ -884,10 +934,10 @@ Introduced in 7.12.3 Introduced in 7.10.8 .IP CURLOPT_ISSUERCERT Introduced in 7.19.0 -.IP CURLOPT_KEYPASSWD -Introduced in 7.17.0 .IP CURLOPT_KEEP_SENDING_ON_ERROR Introduced in 7.51.0 +.IP CURLOPT_KEYPASSWD +Introduced in 7.17.0 .IP CURLOPT_KRB4LEVEL Introduced in 7.3 Deprecated since 7.17.0 @@ -921,6 +971,8 @@ Introduced in 7.5 Introduced in 7.15.5 .IP CURLOPT_MAX_SEND_SPEED_LARGE Introduced in 7.15.5 +.IP CURLOPT_MIMEPOST +Introduced in 7.56.0 .IP CURLOPT_MUTE Introduced in 7.1 Deprecated since 7.8 @@ -1069,6 +1121,8 @@ Introduced in 7.1 Introduced in 7.19.4 .IP CURLOPT_REFERER Introduced in 7.1 +.IP CURLOPT_REQUEST_TARGET +Introduced in 7.55.0 .IP CURLOPT_RESOLVE Introduced in 7.21.3 .IP CURLOPT_RESUME_FROM @@ -1105,6 +1159,8 @@ Introduced in 7.10 Introduced in 7.16.0 .IP CURLOPT_SOCKOPTFUNCTION Introduced in 7.16.0 +.IP CURLOPT_SOCKS5_AUTH +Introduced in 7.55.0 .IP CURLOPT_SOCKS5_GSSAPI_NEC Introduced in 7.19.4 .IP CURLOPT_SOCKS5_GSSAPI_SERVICE @@ -1128,6 +1184,8 @@ Introduced in 7.13.0 Introduced in 7.12.1 .IP CURLOPT_SSH_AUTH_TYPES Introduced in 7.16.1 +.IP CURLOPT_SSH_COMPRESSION +Introduced in 7.56.0 .IP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 Introduced in 7.17.1 .IP CURLOPT_SSH_KEYDATA @@ -1190,6 +1248,10 @@ Introduced in 7.46.0 Introduced in 7.46.0 .IP CURLOPT_STREAM_WEIGHT Introduced in 7.46.0 +.IP CURLOPT_SUPPRESS_CONNECT_HEADERS +Introduced in 7.54.0 +.IP CURLOPT_TCP_FASTOPEN +Introduced in 7.49.0 .IP CURLOPT_TCP_KEEPALIVE Introduced in 7.25.0 .IP CURLOPT_TCP_KEEPIDLE @@ -1198,8 +1260,6 @@ Introduced in 7.25.0 Introduced in 7.25.0 .IP CURLOPT_TCP_NODELAY Introduced in 7.11.2 -.IP CURLOPT_TCP_FASTOPEN -Introduced in 7.49.0 .IP CURLOPT_TELNETOPTIONS Introduced in 7.7 .IP CURLOPT_TFTP_BLKSIZE @@ -1214,6 +1274,8 @@ Introduced in 7.1 Introduced in 7.16.2 .IP CURLOPT_TIMEVALUE Introduced in 7.1 +.IP CURLOPT_TIMEVALUE_LARGE +Introduced in 7.59.0 .IP CURLOPT_TLSAUTH_PASSWORD Introduced in 7.21.4 .IP CURLOPT_TLSAUTH_TYPE @@ -1224,6 +1286,10 @@ Introduced in 7.21.4 Introduced in 7.1.1 .IP CURLOPT_TRANSFER_ENCODING Introduced in 7.21.6 +.IP CURLOPT_RESOLVER_START_FUNCTION +Introduced in 7.59.0 +.IP CURLOPT_RESOLVER_START_DATA +Introduced in 7.59.0 .IP CURLOPT_UNIX_SOCKET_PATH Introduced in 7.40.0 .IP CURLOPT_UNRESTRICTED_AUTH @@ -1336,10 +1402,10 @@ Introduced in 7.19.4 Introduced in 7.19.4 .IP CURLPROXY_HTTP Introduced in 7.10 -.IP CURLPROXY_HTTP_1_0 -Introduced in 7.19.4 .IP CURLPROXY_HTTPS Introduced in 7.52.0 +.IP CURLPROXY_HTTP_1_0 +Introduced in 7.19.4 .IP CURLPROXY_SOCKS4 Introduced in 7.10 .IP CURLPROXY_SOCKS4A @@ -1382,6 +1448,8 @@ Introduced in 7.28.0 Introduced in 7.16.1 .IP CURLSSH_AUTH_DEFAULT Introduced in 7.16.1 +.IP CURLSSH_AUTH_GSSAPI +Introduced in 7.58.0 .IP CURLSSH_AUTH_HOST Introduced in 7.16.1 .IP CURLSSH_AUTH_KEYBOARD @@ -1426,6 +1494,14 @@ Introduced in 7.49.0 Introduced in 7.25.0 .IP CURLSSLOPT_NO_REVOKE Introduced in 7.44.0 +.IP CURLSSLSET_NO_BACKENDS +Introduced in 7.56.0 +.IP CURLSSLSET_OK +Introduced in 7.56.0 +.IP CURLSSLSET_TOO_LATE +Introduced in 7.56.0 +.IP CURLSSLSET_UNKNOWN_BACKEND +Introduced in 7.56.0 .IP CURLUSESSL_ALL Introduced in 7.17.0 .IP CURLUSESSL_CONTROL @@ -1434,6 +1510,8 @@ Introduced in 7.17.0 Introduced in 7.17.0 .IP CURLUSESSL_TRY Introduced in 7.17.0 +.IP CURLVERSION_FIFTH +Introduced in 7.57.0 .IP CURLVERSION_FIRST Introduced in 7.10 .IP CURLVERSION_FOURTH @@ -1476,20 +1554,28 @@ Introduced in 7.21.0 Introduced in 7.21.0 .IP CURL_FORMADD_DISABLED Introduced in 7.12.1 +Deprecated since 7.56.0 .IP CURL_FORMADD_ILLEGAL_ARRAY Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURL_FORMADD_INCOMPLETE Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURL_FORMADD_MEMORY Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURL_FORMADD_NULL Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURL_FORMADD_OK Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURL_FORMADD_OPTION_TWICE Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURL_FORMADD_UNKNOWN_OPTION Introduced in 7.9.8 +Deprecated since 7.56.0 .IP CURL_GLOBAL_ACK_EINTR Introduced in 7.30.0 .IP CURL_GLOBAL_ALL @@ -1502,6 +1588,8 @@ Introduced in 7.8 Introduced in 7.8 .IP CURL_GLOBAL_WIN32 Introduced in 7.8.1 +.IP CURL_HET_DEFAULT +Introduced in 7.59.0 .IP CURL_HTTPPOST_BUFFER Introduced in 7.46.0 .IP CURL_HTTPPOST_CALLBACK @@ -1524,10 +1612,10 @@ Introduced in 7.9.1 Introduced in 7.9.1 .IP CURL_HTTP_VERSION_2 Introduced in 7.43.0 -.IP CURL_HTTP_VERSION_2_0 -Introduced in 7.33.0 .IP CURL_HTTP_VERSION_2TLS Introduced in 7.47.0 +.IP CURL_HTTP_VERSION_2_0 +Introduced in 7.33.0 .IP CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE Introduced in 7.49.0 .IP CURL_HTTP_VERSION_NONE @@ -1650,10 +1738,20 @@ Introduced in 7.21.5 Introduced in 7.21.5 .IP CURL_SOCKOPT_OK Introduced in 7.21.5 -.IP CURL_STRICTER -Introduced in 7.50.2 .IP CURL_SSLVERSION_DEFAULT Introduced in 7.9.2 +.IP CURL_SSLVERSION_MAX_DEFAULT +Introduced in 7.54.0 +.IP CURL_SSLVERSION_MAX_NONE +Introduced in 7.54.0 +.IP CURL_SSLVERSION_MAX_TLS +Introduced in +.IP CURL_SSLVERSION_MAX_TLS +Introduced in +.IP CURL_SSLVERSION_MAX_TLS +Introduced in +.IP CURL_SSLVERSION_MAX_TLS +Introduced in .IP CURL_SSLVERSION_SSL Introduced in .IP CURL_SSLVERSION_SSL @@ -1668,6 +1766,8 @@ Introduced in Introduced in .IP CURL_SSLVERSION_TLS Introduced in +.IP CURL_STRICTER +Introduced in 7.50.2 .IP CURL_TIMECOND_IFMODSINCE Introduced in 7.9.7 .IP CURL_TIMECOND_IFUNMODSINCE @@ -1682,6 +1782,8 @@ Introduced in 7.21.4 Introduced in 7.21.4 .IP CURL_VERSION_ASYNCHDNS Introduced in 7.10.7 +.IP CURL_VERSION_BROTLI +Introduced in 7.57.0 .IP CURL_VERSION_CONV Introduced in 7.15.4 .IP CURL_VERSION_CURLDEBUG @@ -1710,6 +1812,8 @@ Introduced in 7.40.0 Introduced in 7.11.1 .IP CURL_VERSION_LIBZ Introduced in 7.10 +.IP CURL_VERSION_MULTI_SSL +Introduced in 7.56.0 .IP CURL_VERSION_NTLM Introduced in 7.10.6 .IP CURL_VERSION_NTLM_WB @@ -1734,3 +1838,5 @@ Introduced in 7.28.0 Introduced in 7.28.0 .IP CURL_WRITEFUNC_PAUSE Introduced in 7.18.0 +.IP CURL_ZERO_TERMINATED +Introduced in 7.56.0 diff --git a/docs/libcurl/libcurl-thread.3 b/docs/libcurl/libcurl-thread.3 index 379ca8f..56a736d 100644 --- a/docs/libcurl/libcurl-thread.3 +++ b/docs/libcurl/libcurl-thread.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 2015 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 2015 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-thread 3 "13 Jul 2015" "libcurl" "libcurl thread safety" +.TH libcurl-thread 3 "August 08, 2017" "libcurl 7.59.0" "libcurl thread safety" + .SH NAME libcurl-thread \- libcurl thread safety .SH "Multi-threading with libcurl" @@ -53,7 +54,7 @@ https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION https://curl.haxx.se/libcurl/c/opensslthreadlock.html .IP GnuTLS -http://gnutls.org/manual/html_node/Thread-safety.html +https://gnutls.org/manual/html_node/Thread-safety.html .IP NSS thread-safe already without anything required. .IP PolarSSL @@ -77,9 +78,10 @@ without using either the c-ares or threaded resolver backends. When using multiple threads you should set the \fICURLOPT_NOSIGNAL(3)\fP option to 1L for all handles. Everything will or might work fine except that timeouts are not honored during the DNS lookup - which you can work around by building libcurl -with c-ares support. c-ares is a library that provides asynchronous name -resolves. On some platforms, libcurl simply will not function properly -multi-threaded unless this option is set. +with c-ares or threaded-resolver support. c-ares is a library that provides +asynchronous name resolves. On some platforms, libcurl simply will not +function properly multi-threaded unless the \fICURLOPT_NOSIGNAL(3)\fP option is +set. .IP "Name resolving" \fBgethostby* functions and other system calls.\fP These functions, provided by your operating system, must be thread safe. It is very important that diff --git a/docs/libcurl/libcurl-tutorial.3 b/docs/libcurl/libcurl-tutorial.3 index 3144da3..b88ef06 100644 --- a/docs/libcurl/libcurl-tutorial.3 +++ b/docs/libcurl/libcurl-tutorial.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH libcurl-tutorial 3 "19 Sep 2014" "libcurl" "libcurl programming" +.TH libcurl-tutorial 3 "February 23, 2018" "libcurl 7.59.0" "libcurl programming" + .SH NAME libcurl-tutorial \- libcurl programming tutorial .SH "Objective" @@ -477,14 +478,67 @@ multi-part because they're built by a chain of parts, each part being a single unit of data. Each part has its own name and contents. You can in fact create and post a multi-part formpost with the regular libcurl POST support described above, but that would require that you build a formpost yourself and provide -to libcurl. To make that easier, libcurl provides \fIcurl_formadd(3)\fP. Using -this function, you add parts to the form. When you're done adding parts, you -post the whole form. +to libcurl. To make that easier, libcurl provides a MIME API consisting in +several functions: using those, you can create and fill a multi-part form. +Function \fIcurl_mime_init(3)\fP creates a multi-part body; you can then +append new parts to a multi-part body using \fIcurl_mime_addpart(3)\fP. +There are three possible data sources for a part: memory using +\fIcurl_mime_data(3)\fP, file using \fIcurl_mime_filedata(3)\fP and +user-defined data read callback using \fIcurl_mime_data_cb(3)\fP. +\fIcurl_mime_name(3)\fP sets a part's (i.e.: form field) name, while +\fIcurl_mime_filename(3)\fP fills in the remote file name. With +\fIcurl_mime_type(3)\fP, you can tell the MIME type of a part, +\fIcurl_mime_headers(3)\fP allows defining the part's headers. When a +multi-part body is no longer needed, you can destroy it using +\fIcurl_mime_free(3)\fP. The following example sets two simple text parts with plain textual contents, and then a file with binary contents and uploads the whole thing. .nf + curl_mime *multipart = curl_mime_init(easyhandle); + curl_mimepart *part = curl_mime_addpart(mutipart); + curl_mime_name(part, "name"); + curl_mime_data(part, "daniel", CURL_ZERO_TERMINATED); + part = curl_mime_addpart(mutipart); + curl_mime_name(part, "project"); + curl_mime_data(part, "curl", CURL_ZERO_TERMINATED); + part = curl_mime_addpart(mutipart); + curl_mime_name(part, "logotype-image"); + curl_mime_filedata(part, "curl.png"); + + /* Set the form info */ + curl_easy_setopt(easyhandle, CURLOPT_MIMEPOST, multipart); + + curl_easy_perform(easyhandle); /* post away! */ + + /* free the post data again */ + curl_mime_free(multipart); +.fi + +To post multiple files for a single form field, you must supply each file in +a separate part, all with the same field name. Although function +\fIcurl_mime_subparts(3)\fP implements nested muti-parts, this way of +multiple files posting is deprecated by RFC 7578, chapter 4.3. + +To set the data source from an already opened FILE pointer, use: + +.nf + curl_mime_data_cb(part, filesize, (curl_read_callback) fread, + (curl_seek_callback) fseek, NULL, filepointer); +.fi + +A deprecated \fIcurl_formadd(3)\fP function is still supported in libcurl. +It should however not be used anymore for new designs and programs using it +ought to be converted to the MIME API. It is however described here as an +aid to conversion. + +Using \fIcurl_formadd\fP, you add parts to the form. When you're done adding +parts, you post the whole form. + +The MIME API example above is expressed as follows using this function: + +.nf struct curl_httppost *post=NULL; struct curl_httppost *last=NULL; curl_formadd(&post, &last, @@ -542,6 +596,136 @@ request. You force an easyhandle to go back to GET by using the Just setting \fICURLOPT_POSTFIELDS(3)\fP to "" or NULL will *not* stop libcurl from doing a POST. It will just make it POST without any data to send! +.SH "Converting from deprecated form API to MIME API" +Four rules have to be respected in building the multi-part: +.br +- The easy handle must be created before building the multi-part. +.br +- The multi-part is always created by a call to curl_mime_init(easyhandle). +.br +- Each part is created by a call to curl_mime_addpart(multipart). +.br +- When complete, the multi-part must be bound to the easy handle using +\fICURLOPT_MIMEPOST(3)\fP instead of \fICURLOPT_HTTPPOST(3)\fP. + +Here are some example of \fIcurl_formadd\fP calls to MIME API sequences: + +.nf + curl_formadd(&post, &last, + CURLFORM_COPYNAME, "id", + CURLFORM_COPYCONTENTS, "daniel", CURLFORM_END); + CURLFORM_CONTENTHEADER, headers, + CURLFORM_END); +.fi +becomes: +.nf + part = curl_mime_addpart(multipart); + curl_mime_name(part, "id"); + curl_mime_data(part, "daniel", CURL_ZERO_TERMINATED); + curl_mime_headers(part, headers, FALSE); +.fi + +Setting the last \fIcurl_mime_headers\fP argument to TRUE would have caused +the headers to be automatically released upon destroyed the multi-part, thus +saving a clean-up call to \fIcurl_slist_free_all(3)\fP. + +.nf + curl_formadd(&post, &last, + CURLFORM_PTRNAME, "logotype-image", + CURLFORM_FILECONTENT, "-", + CURLFORM_END); +.fi +becomes: +.nf + part = curl_mime_addpart(multipart); + curl_mime_name(part, "logotype-image"); + curl_mime_data_cb(part, (curl_off_t) -1, fread, fseek, NULL, stdin); +.fi + +\fIcurl_mime_name\fP always copies the field name. The special file name "-" +is not supported by \fIcurl_mime_file\fP: to read an open file, use +a callback source using fread(). The transfer will be chunked since the data +size is unknown. + +.nf + curl_formadd(&post, &last, + CURLFORM_COPYNAME, "datafile[]", + CURLFORM_FILE, "file1", + CURLFORM_FILE, "file2", + CURLFORM_END); +.fi +becomes: +.nf + part = curl_mime_addpart(multipart); + curl_mime_name(part, "datafile[]"); + curl_mime_filedata(part, "file1"); + part = curl_mime_addpart(multipart); + curl_mime_name(part, "datafile[]"); + curl_mime_filedata(part, "file2"); +.fi + +The deprecated multipart/mixed implementation of multiple files field is +translated to two distinct parts with the same name. + +.nf + curl_easy_setopt(easyhandle, CURLOPT_READFUNCTION, myreadfunc); + curl_formadd(&post, &last, + CURLFORM_COPYNAME, "stream", + CURLFORM_STREAM, arg, + CURLFORM_CONTENTLEN, (curl_off_t) datasize, + CURLFORM_FILENAME, "archive.zip", + CURLFORM_CONTENTTYPE, "application/zip", + CURLFORM_END); +.fi +becomes: +.nf + part = curl_mime_addpart(multipart); + curl_mime_name(part, "stream"); + curl_mime_data_cb(part, (curl_off_t) datasize, + myreadfunc, NULL, NULL, arg); + curl_mime_filename(part, "archive.zip"); + curl_mime_type(part, "application/zip"); +.fi + +\fICURLOPT_READFUNCTION\fP callback is not used: it is replace by directly +setting the part source data from the callback read function. + +.nf + curl_formadd(&post, &last, + CURLFORM_COPYNAME, "memfile", + CURLFORM_BUFFER, "memfile.bin", + CURLFORM_BUFFERPTR, databuffer, + CURLFORM_BUFFERLENGTH, (long) sizeof databuffer, + CURLFORM_END); +.fi +becomes: +.nf + part = curl_mime_addpart(multipart); + curl_mime_name(part, "memfile"); + curl_mime_data(part, databuffer, (curl_off_t) sizeof databuffer); + curl_mime_filename(part, "memfile.bin"); +.fi + +\fIcurl_mime_data\fP always copies the initial data: data buffer is thus +free for immediate reuse. + +.nf + curl_formadd(&post, &last, + CURLFORM_COPYNAME, "message", + CURLFORM_FILECONTENT, "msg.txt", + CURLFORM_END); +.fi +becomes: +.nf + part = curl_mime_addpart(multipart); + curl_mime_name(part, "message"); + curl_mime_filedata(part, "msg.txt"); + curl_mime_filename(part, NULL); +.fi + +Use of \fIcurl_mime_filedata\fP sets the remote file name as a side effect: it +is therefore necessary to clear it for \fICURLFORM_FILECONTENT\fP emulation. + .SH "Showing Progress" For historical and traditional reasons, libcurl has a built-in progress meter @@ -673,7 +857,7 @@ discussed. Instead, the only way to have SSL work over a HTTP proxy is to ask the proxy to tunnel trough everything without being able to check or fiddle with the traffic. -Opening an SSL connection over a HTTP proxy is therefor a matter of asking the +Opening an SSL connection over a HTTP proxy is therefore a matter of asking the proxy for a straight connection to the target host on a specified port. This is made with the HTTP request CONNECT. ("please mr proxy, connect me to that remote host"). @@ -1005,6 +1189,81 @@ When doing the "PORT" approach, libcurl will attempt to use the EPRT and the LPRT before trying PORT, as they work with more protocols. You can disable this behavior by setting \fICURLOPT_FTP_USE_EPRT(3)\fP to zero. +.SH "MIME API revisited for SMTP and IMAP" +In addition to support HTTP multi-part form fields, the MIME API can be used +to build structured e-mail messages and send them via SMTP or append such +messages to IMAP directories. + +A structured e-mail message may contain several parts: some are displayed +inline by the MUA, some are attachments. Parts can also be structured as +multi-part, for example to include another e-mail message or to offer several +text formats alternatives. This can be nested to any level. + +To build such a message, you prepare the nth-level multi-part and then include +it as a source to the parent multi-part using function +\fIcurl_mime_subparts(3)\fP. Once it has been +bound to its parent multi-part, a nth-level multi-part belongs to it and +should not be freed explicitly. + +E-mail messages data is not supposed to be non-ascii and line length is +limited: fortunately, some transfer encodings are defined by the standards +to support the transmission of such incompatible data. Function +\fIcurl_mime_encoder(3)\fP tells a part that its source data must be encoded +before being sent. It also generates the corresponding header for that part. +If the part data you want to send is already encoded in such a scheme, +do not use this function (this would over-encode it), but explicitly set the +corresponding part header. + +Upon sending such a message, libcurl prepends it with the header list +set with \fICURLOPT_HTTPHEADER(3)\fP, as 0th-level mime part headers. + +Here is an example building an e-mail message with an inline plain/html text +alternative and a file attachment encoded in base64: + +.nf + curl_mime *message = curl_mime_init(easyhandle); + + /* The inline part is an alternative proposing the html and the text + versions of the e-mail. */ + curl_mime *alt = curl_mime_init(easyhandle); + + /* HTML message. */ + curl_mimepart *part = curl_mime_addpart(alt); + curl_mime_data(part, "

This is HTML

", + CURL_ZERO_TERMINATED); + curl_mime_type(part, "text/html"); + + /* Text message. */ + part = curl_mime_addpart(alt); + curl_mime_data(part, "This is plain text message", + CURL_ZERO_TERMINATED); + + /* Create the inline part. */ + part = curl_mime_addpart(message); + curl_mime_subparts(part, alt); + curl_mime_type(part, "multipart/alternative"); + struct curl_slist *headers = curl_slist_append(NULL, + "Content-Disposition: inline"); + curl_mime_headers(part, headers, TRUE); + + /* Add the attachment. */ + part = curl_mime_addpart(message); + curl_mime_filedata(part, "manual.pdf"); + curl_mime_encoder(part, "base64"); + + /* Build the mail headers. */ + headers = curl_slist_append(NULL, "From: me@example.com"); + headers = curl_slist_append(headers, "To: you@example.com"); + + /* Set these into the easy handle. */ + curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers); + curl_easy_setopt(easyhandle, CURLOPT_MIMEPOST, mime); +.fi + +It should be noted that appending a message to an IMAP directory requires +the message size to be known prior upload. It is therefore not possible to +include parts with unknown data size in this context. + .SH "Headers Equal Fun" Some protocols provide "headers", meta-data separated from the normal @@ -1028,234 +1287,7 @@ etc. actually true headers, but in this case we pretend they are! ;-) .SH "Post Transfer Information" - - [ curl_easy_getinfo ] - -.SH "Security Considerations" - -The libcurl project takes security seriously. The library is written with -caution and precautions are taken to mitigate many kinds of risks encountered -while operating with potentially malicious servers on the Internet. It is a -powerful library, however, which allows application writers to make trade offs -between ease of writing and exposure to potential risky operations. If -used the right way, you can use libcurl to transfer data pretty safely. - -Many applications are used in closed networks where users and servers -can be trusted, but many others are used on arbitrary servers and are fed -input from potentially untrusted users. Following is a discussion about -some risks in the ways in which applications commonly use libcurl and -potential mitigations of those risks. It is by no means comprehensive, but -shows classes of attacks that robust applications should consider. The -Common Weakness Enumeration project at https://cwe.mitre.org/ is a good -reference for many of these and similar types of weaknesses of which -application writers should be aware. - -.IP "Command Lines" -If you use a command line tool (such as curl) that uses libcurl, and you give -options to the tool on the command line those options can very likely get read -by other users of your system when they use 'ps' or other tools to list -currently running processes. - -To avoid this problem, never feed sensitive things to programs using command -line options. Write them to a protected file and use the \-K option to -avoid this. - -.IP ".netrc" -\&.netrc is a pretty handy file/feature that allows you to login quickly and -automatically to frequently visited sites. The file contains passwords in -clear text and is a real security risk. In some cases, your .netrc is also -stored in a home directory that is NFS mounted or used on another network -based file system, so the clear text password will fly through your network -every time anyone reads that file! - -To avoid this problem, don't use .netrc files and never store passwords in -plain text anywhere. - -.IP "Clear Text Passwords" -Many of the protocols libcurl supports send name and password unencrypted as -clear text (HTTP Basic authentication, FTP, TELNET etc). It is very easy for -anyone on your network or a network nearby yours to just fire up a network -analyzer tool and eavesdrop on your passwords. Don't let the fact that HTTP -Basic uses base64 encoded passwords fool you. They may not look readable at a -first glance, but they very easily "deciphered" by anyone within seconds. - -To avoid this problem, use an authentication mechanism or other protocol that -doesn't let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or -NTLM authentication, HTTPS, FTPS, SCP and SFTP are a few examples. - -.IP "Redirects" -The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP -redirects sent by a remote server. These redirects can refer to any kind of -URL, not just HTTP. By default libcurl will allow all protocols on redirect -except several disabled for security reasons: Since 7.19.4 FILE and SCP are -disabled, and since 7.40.0 SMB and SMBS are also disabled. - -A redirect to a file: URL would cause the libcurl to read (or write) arbitrary -files from the local filesystem. If the application returns the data back to -the user (as would happen in some kinds of CGI scripts), an attacker could -leverage this to read otherwise forbidden data (e.g. -file://localhost/etc/passwd). - -If authentication credentials are stored in the ~/.netrc file, or Kerberos -is in use, any other URL type (not just file:) that requires -authentication is also at risk. A redirect such as -ftp://some-internal-server/private-file would then return data even when -the server is password protected. - -In the same way, if an unencrypted SSH private key has been configured for -the user running the libcurl application, SCP: or SFTP: URLs could access -password or private-key protected resources, -e.g. sftp://user@some-internal-server/etc/passwd - -The \fICURLOPT_REDIR_PROTOCOLS(3)\fP and \fICURLOPT_NETRC(3)\fP options can be -used to mitigate against this kind of attack. - -A redirect can also specify a location available only on the machine running -libcurl, including servers hidden behind a firewall from the attacker. -e.g. http://127.0.0.1/ or http://intranet/delete-stuff.cgi?delete=all or -tftp://bootp-server/pc-config-data - -Apps can mitigate against this by disabling \fICURLOPT_FOLLOWLOCATION(3)\fP -and handling redirects itself, sanitizing URLs as necessary. Alternately, an -app could leave \fICURLOPT_FOLLOWLOCATION(3)\fP enabled but set -\fICURLOPT_REDIR_PROTOCOLS(3)\fP and install a -\fICURLOPT_OPENSOCKETFUNCTION(3)\fP callback function in which addresses are -sanitized before use. - -.IP "Private Resources" -A user who can control the DNS server of a domain being passed in within a URL -can change the address of the host to a local, private address which a -server-side libcurl-using application could then use. e.g. the innocuous URL -http://fuzzybunnies.example.com/ could actually resolve to the IP address of a -server behind a firewall, such as 127.0.0.1 or 10.1.2.3. Apps can mitigate -against this by setting a \fICURLOPT_OPENSOCKETFUNCTION(3)\fP and checking the -address before a connection. - -All the malicious scenarios regarding redirected URLs apply just as well to -non-redirected URLs, if the user is allowed to specify an arbitrary URL that -could point to a private resource. For example, a web app providing a -translation service might happily translate file://localhost/etc/passwd and -display the result. Apps can mitigate against this with the -\fICURLOPT_PROTOCOLS(3)\fP option as well as by similar mitigation techniques -for redirections. - -A malicious FTP server could in response to the PASV command return an IP -address and port number for a server local to the app running libcurl but -behind a firewall. Apps can mitigate against this by using the -\fICURLOPT_FTP_SKIP_PASV_IP(3)\fP option or \fICURLOPT_FTPPORT(3)\fP. - -.IP "IPv6 Addresses" -libcurl will normally handle IPv6 addresses transparently and just as easily -as IPv4 addresses. That means that a sanitizing function that filters out -addressses like 127.0.0.1 isn't sufficient--the equivalent IPv6 addresses ::1, -::, 0:00::0:1, ::127.0.0.1 and ::ffff:7f00:1 supplied somehow by an attacker -would all bypass a naive filter and could allow access to undesired local -resources. IPv6 also has special address blocks like link-local and site-local -that generally shouldn't be accessed by a server-side libcurl-using -application. A poorly-configured firewall installed in a data center, -organization or server may also be configured to limit IPv4 connections but -leave IPv6 connections wide open. In some cases, the CURL_IPRESOLVE_V4 option -can be used to limit resolved addresses to IPv4 only and bypass these issues. - -.IP Uploads -When uploading, a redirect can cause a local (or remote) file to be -overwritten. Apps must not allow any unsanitized URL to be passed in for -uploads. Also, \fICURLOPT_FOLLOWLOCATION(3)\fP should not be used on uploads. -Instead, the app should handle redirects itself, sanitizing each URL first. - -.IP Authentication -Use of \fICURLOPT_UNRESTRICTED_AUTH(3)\fP could cause authentication -information to be sent to an unknown second server. Apps can mitigate against -this by disabling \fICURLOPT_FOLLOWLOCATION(3)\fP and handling redirects -itself, sanitizing where necessary. - -Use of the CURLAUTH_ANY option to \fICURLOPT_HTTPAUTH(3)\fP could result in -user name and password being sent in clear text to an HTTP server. Instead, -use CURLAUTH_ANYSAFE which ensures that the password is encrypted over the -network, or else fail the request. - -Use of the CURLUSESSL_TRY option to \fICURLOPT_USE_SSL(3)\fP could result in -user name and password being sent in clear text to an FTP server. Instead, -use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or else -fail the request. - -.IP Cookies -If cookies are enabled and cached, then a user could craft a URL which -performs some malicious action to a site whose authentication is already -stored in a cookie. e.g. http://mail.example.com/delete-stuff.cgi?delete=all -Apps can mitigate against this by disabling cookies or clearing them -between requests. - -.IP "Dangerous URLs" -SCP URLs can contain raw commands within the scp: URL, which is a side effect -of how the SCP protocol is designed. e.g. -scp://user:pass@host/a;date >/tmp/test; -Apps must not allow unsanitized SCP: URLs to be passed in for downloads. - -.IP "Denial of Service" -A malicious server could cause libcurl to effectively hang by sending a -trickle of data through, or even no data at all but just keeping the TCP -connection open. This could result in a denial-of-service attack. The -\fICURLOPT_TIMEOUT(3)\fP and/or \fICURLOPT_LOW_SPEED_LIMIT(3)\fP options can -be used to mitigate against this. - -A malicious server could cause libcurl to effectively hang by starting to send -data, then severing the connection without cleanly closing the TCP connection. -The app could install a \fICURLOPT_SOCKOPTFUNCTION(3)\fP callback function and -set the TCP SO_KEEPALIVE option to mitigate against this. Setting one of the -timeout options would also work against this attack. - -A malicious server could cause libcurl to download an infinite amount of data, -potentially causing all of memory or disk to be filled. Setting the -\fICURLOPT_MAXFILESIZE_LARGE(3)\fP option is not sufficient to guard against -this. Instead, the app should monitor the amount of data received within the -write or progress callback and abort once the limit is reached. - -A malicious HTTP server could cause an infinite redirection loop, causing a -denial-of-service. This can be mitigated by using the -\fICURLOPT_MAXREDIRS(3)\fP option. - -.IP "Arbitrary Headers" -User-supplied data must be sanitized when used in options like -\fICURLOPT_USERAGENT(3)\fP, \fICURLOPT_HTTPHEADER(3)\fP, -\fICURLOPT_POSTFIELDS(3)\fP and others that are used to generate structured -data. Characters like embedded carriage returns or ampersands could allow the -user to create additional headers or fields that could cause malicious -transactions. - -.IP "Server-supplied Names" -A server can supply data which the application may, in some cases, use as -a file name. The curl command-line tool does this with --remote-header-name, -using the Content-disposition: header to generate a file name. An application -could also use CURLINFO_EFFECTIVE_URL to generate a file name from a -server-supplied redirect URL. Special care must be taken to sanitize such -names to avoid the possibility of a malicious server supplying one like -"/etc/passwd", "\\autoexec.bat", "prn:" or even ".bashrc". - -.IP "Server Certificates" -A secure application should never use the \fICURLOPT_SSL_VERIFYPEER(3)\fP -option to disable certificate validation. There are numerous attacks that are -enabled by apps that fail to properly validate server TLS/SSL certificates, -thus enabling a malicious server to spoof a legitimate one. HTTPS without -validated certificates is potentially as insecure as a plain HTTP connection. - -.IP "Showing What You Do" -On a related issue, be aware that even in situations like when you have -problems with libcurl and ask someone for help, everything you reveal in order -to get best possible help might also impose certain security related -risks. Host names, user names, paths, operating system specifics, etc. (not to -mention passwords of course) may in fact be used by intruders to gain -additional information of a potential target. - -Be sure to limit access to application logs if they could hold private or -security-related data. Besides the obvious candidates like user names and -passwords, things like URLs, cookies or even file names could also hold -sensitive data. - -To avoid this problem, you must of course use your common sense. Often, you -can just edit out the sensitive data or just search/replace your true -information with faked data. - +See \fIcurl_easy_getinfo(3)\fP. .SH "The multi Interface" The easy interface as described in detail in this document is a synchronous interface that transfers one file at a time and doesn't return until it is diff --git a/docs/libcurl/libcurl.3 b/docs/libcurl/libcurl.3 index 6618734..6026f10 100644 --- a/docs/libcurl/libcurl.3 +++ b/docs/libcurl/libcurl.3 @@ -19,7 +19,8 @@ .\" * KIND, either express or implied. .\" * .\" ************************************************************************** -.TH libcurl 3 "19 March 2002" "libcurl 7.9.6" "libcurl overview" +.TH libcurl 3 "July 15, 2017" "libcurl 7.59.0" "libcurl overview" + .SH NAME libcurl \- client-side URL transfers .SH DESCRIPTION @@ -38,6 +39,10 @@ while using libcurl. This essentially means you call \fIcurl_global_cleanup(3)\fP at the end. See \fBGLOBAL CONSTANTS\fP below for details. +If libcurl was compiled with support for multiple SSL backends, the function +\fIcurl_global_sslset(3)\fP can be called before \fIcurl_global_init(3)\fP +to select the active SSL backend. + To transfer files, you create an "easy handle" using \fIcurl_easy_init(3)\fP for a single individual transfer (in either direction). You then set your desired set of options in that handle with \fIcurl_easy_setopt(3)\fP. Options diff --git a/docs/libcurl/mksymbolsmanpage.pl b/docs/libcurl/mksymbolsmanpage.pl old mode 100644 new mode 100755 index 21053c4..8ae202e --- a/docs/libcurl/mksymbolsmanpage.pl +++ b/docs/libcurl/mksymbolsmanpage.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # *************************************************************************** # * _ _ ____ _ # * Project ___| | | | _ \| | diff --git a/docs/libcurl/opts/CMakeLists.txt b/docs/libcurl/opts/CMakeLists.txt new file mode 100644 index 0000000..709d3e4 --- /dev/null +++ b/docs/libcurl/opts/CMakeLists.txt @@ -0,0 +1,12 @@ +# Load man_MANS from shared file +transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") + +add_manual_pages(man_MANS) + +string(REPLACE ".3" ".html" HTMLPAGES "${man_MANS}") +string(REPLACE ".3" ".pdf" PDFPAGES "${man_MANS}") +add_custom_target(opts-html DEPENDS ${HTMLPAGES}) +add_custom_target(opts-pdf DEPENDS ${PDFPAGES}) +add_dependencies(html opts-html) +add_dependencies(pdf opts-pdf) diff --git a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 index 0896d15..6cac17f 100644 --- a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 +++ b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_ACTIVESOCKET 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_ACTIVESOCKET 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_ACTIVESOCKET \- get the active socket .SH SYNOPSIS @@ -41,7 +42,25 @@ that one isn't working on all platforms. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_socket_t sockfd; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Do not do the transfer - only connect to host */ + curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L); + res = curl_easy_perform(curl); + + /* Extract the socket from the curl handle */ + res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd); + + if(res != CURLE_OK) { + printf("Error: %s\\n", curl_easy_strerror(res)); + return 1; + } +} +.fi .SH AVAILABILITY Added in 7.45.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 index dceb98b..7a8d7e0 100644 --- a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_APPCONNECT_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_APPCONNECT_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_APPCONNECT_TIME \- get the time until the SSL/SSH handshake is completed .SH SYNOPSIS @@ -38,7 +39,22 @@ See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + double connect; + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &connect); + if(CURLE_OK == res) { + printf("Time: %.1f", connect); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_CERTINFO.3 b/docs/libcurl/opts/CURLINFO_CERTINFO.3 index cb0bd8a..83a30bb 100644 --- a/docs/libcurl/opts/CURLINFO_CERTINFO.3 +++ b/docs/libcurl/opts/CURLINFO_CERTINFO.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CERTINFO 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_CERTINFO 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_CERTINFO \- get the TLS certificate chain .SH SYNOPSIS @@ -39,7 +40,37 @@ for the specific named data. See also the certinfo.c example. .SH PROTOCOLS All TLS-based .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/"); + + /* connect to any HTTPS site, trusted or not */ + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); + + curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L); + + res = curl_easy_perform(curl); + + if (!res) { + struct curl_certinfo *ci; + res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci); + + if (!res) { + printf("%d certs!\\n", ci->num_of_certs); + + for(i = 0; i < ci->num_of_certs; i++) { + struct curl_slist *slist; + + for(slist = ci->certinfo[i]; slist; slist = slist->next) + printf("%s\\n", slist->data); + } + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option is only working in libcurl built with OpenSSL, NSS, schannel or GSKit support. schannel support added in 7.50.0 diff --git a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 index 452c261..3caf566 100644 --- a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 +++ b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONDITION_UNMET 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_CONDITION_UNMET 3 "February 23, 2018" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_CONDITION_UNMET \- get info on unmet time conditional .SH SYNOPSIS @@ -31,12 +32,35 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONDITION_UNMET, long *unmet); Pass a pointer to a long to receive the number 1 if the condition provided in the previous request didn't match (see \fICURLOPT_TIMECONDITION(3)\fP). Alas, if this returns a 1 you know that the reason you didn't get data in return is -because it didn't fulfill the condition. The long ths argument points to will +because it didn't fulfill the condition. The long this argument points to will get a zero stored if the condition instead was met. .SH PROTOCOLS HTTP and some .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* January 1, 2020 is 1577833200 */ + curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 1577833200L); + + /* If-Modified-Since the above time stamp */ + curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + /* check the time condition */ + long unmet; + res = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet); + if(!res) { + printf("The time condition was %sfulfilled\\n", unmet?"NOT":""); + } + } +} +.fi .SH AVAILABILITY Added in 7.19.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 index 1b63e23..90f9d08 100644 --- a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONNECT_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_CONNECT_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_CONNECT_TIME \- get the time until connect .SH SYNOPSIS @@ -35,7 +36,22 @@ See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + double connect; + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &connect); + if(CURLE_OK == res) { + printf("Time: %.1f", connect); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 index 311f313..dedd772 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_CONTENT_LENGTH_DOWNLOAD \- get content-length of download .SH SYNOPSIS @@ -32,10 +33,30 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, Pass a pointer to a double to receive the content-length of the download. This is the value read from the Content-Length: field. Since 7.19.4, this returns -1 if the size isn't known. + +\fICURLINFO_CONTENT_LENGTH_DOWNLOAD_T(3)\fP is a newer replacement that returns a more +sensible variable type. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + /* check the size */ + double cl; + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl); + if(!res) { + printf("Size: %.0f\\n", cl); + } + } +} +.fi .SH AVAILABILITY Added in 7.6.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 new file mode 100644 index 0000000..24456d1 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 @@ -0,0 +1,63 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_CONTENT_LENGTH_DOWNLOAD_T \- get content-length of download +.SH SYNOPSIS +#include + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, + curl_off_t *content_length); +.SH DESCRIPTION +Pass a pointer to a \fIcurl_off_t\fP to receive the content-length of the +download. This is the value read from the Content-Length: field. Stores -1 if +the size isn't known. +.SH PROTOCOLS +HTTP(S) +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + /* check the size */ + curl_off_t cl; + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl); + if(!res) { + printf("Size: " CURL_FORMAT_CURL_OFF_T "\\n", cl); + } + } +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_CONTENT_LENGTH_UPLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 index e40d5ea..9f345ef 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_CONTENT_LENGTH_UPLOAD \- get the specified size of the upload .SH SYNOPSIS @@ -31,13 +32,34 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD, .SH DESCRIPTION Pass a pointer to a double to receive the specified size of the upload. Since 7.19.4, this returns -1 if the size isn't known. + +\fICURLINFO_CONTENT_LENGTH_UPLOAD_T(3)\fP is a newer replacement that returns a +more sensible variable type. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the upload */ + res = curl_easy_perform(curl); + + if(!res) { + /* check the size */ + double cl; + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &cl); + if(!res) { + printf("Size: %.0f\\n", cl); + } + } +} +.fi .SH AVAILABILITY Added in 7.6.1 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 new file mode 100644 index 0000000..ab7d938 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 @@ -0,0 +1,62 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_CONTENT_LENGTH_UPLOAD_T \- get the specified size of the upload +.SH SYNOPSIS +#include + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD_T, + curl_off_t *content_length); +.SH DESCRIPTION +Pass a pointer to a \fIcurl_off_t\fP to receive the specified size of the +upload. Stores -1 if the size isn't known. +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the upload */ + res = curl_easy_perform(curl); + + if(!res) { + /* check the size */ + curl_off_t cl; + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl); + if(!res) { + printf("Size: " CURL_FORMAT_CURL_OFF_T "\\n", cl); + } + } +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 index 7536000..9db1414 100644 --- a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 +++ b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_CONTENT_TYPE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_CONTENT_TYPE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_CONTENT_TYPE \- get Content-Type .SH SYNOPSIS @@ -39,7 +40,24 @@ corresponding CURL handle. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + res = curl_easy_perform(curl); + + if(!res) { + /* extract the content-type */ + char *ct = NULL; + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct); + if(!res && ct) { + printf("Content-Type: %s\\n", ct); + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.9.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 b/docs/libcurl/opts/CURLINFO_COOKIELIST.3 index b9f75f4..62039ad 100644 --- a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 +++ b/docs/libcurl/opts/CURLINFO_COOKIELIST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_COOKIELIST 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_COOKIELIST 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_COOKIELIST \- get all known cookies .SH SYNOPSIS @@ -40,7 +41,33 @@ domain name are not exported by this option. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* enable the cookie engine with a non-existing file */ + curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "-"); + + res = curl_easy_perform(curl); + + if(!res) { + /* extract all known cookies */ + struct curl_slist *cookies = NULL; + res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies); + if(!res && cookies) { + /* a linked list of cookies in cookie file format */ + while(cookies) { + printf("%s", cookies->data); + cookies = cookies->next; + } + /* we must free these cookies when we're done */ + curl_slist_free_all(cookies); + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.14.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 index 342fd5d..ec79319 100644 --- a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 +++ b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_EFFECTIVE_URL 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_EFFECTIVE_URL 3 "May 04, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_EFFECTIVE_URL \- get the last used URL .SH SYNOPSIS @@ -39,7 +40,22 @@ corresponding CURL handle. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + char *url = NULL; + curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url); + if(url) + printf("Redirect to: %s\\n", url); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_FILETIME.3 b/docs/libcurl/opts/CURLINFO_FILETIME.3 index 84093eb..0b77214 100644 --- a/docs/libcurl/opts/CURLINFO_FILETIME.3 +++ b/docs/libcurl/opts/CURLINFO_FILETIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_FILETIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_FILETIME \- get the remote time of the retrieved document .SH SYNOPSIS @@ -34,13 +35,33 @@ Pass a pointer to a long to receive the remote time of the retrieved document hide it or the server doesn't support the command that tells document time etc) and the time of the document is unknown. -Note that you must tell the server to collect this information before the -transfer is made, by using the \fICURLOPT_FILETIME(3)\fP option to -\fIcurl_easy_setopt(3)\fP or you will unconditionally get a -1 back. +You must tell libcurl to collect this information before the transfer is made, +by using the \fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or +you will unconditionally get a -1 back. + +Consider using \fICURLINFO_FILETIME_T(3)\fP to be able to extract dates beyond +the year 2038 on systems using 32 bit longs. .SH PROTOCOLS HTTP(S), FTP(S), SFTP .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, url); + /* Ask for filetime */ + curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); + if((CURLE_OK == res) && (filetime >= 0)) { + time_t file_time = (time_t)filetime; + printf("filetime %s: %s", filename, ctime(&file_time)); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.5 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_FILETIME_T.3 b/docs/libcurl/opts/CURLINFO_FILETIME_T.3 new file mode 100644 index 0000000..e9a9867 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_FILETIME_T.3 @@ -0,0 +1,72 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_FILETIME_T \- get the remote time of the retrieved document +.SH SYNOPSIS +#include + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME_T, curl_off_t *timep); +.SH DESCRIPTION +Pass a pointer to a curl_off_t to receive the remote time of the retrieved +document (in number of seconds since 1 jan 1970 in the GMT/UTC time zone). If +you get -1, it can be because of many reasons (it might be unknown, the server +might hide it or the server doesn't support the command that tells document +time etc) and the time of the document is unknown. + +You must ask libcurl to collect this information before the transfer is made, +by using the \fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or +you will unconditionally get a -1 back. + +This option is an alternative to \fICURLINFO_FILETIME(3)\fP to allow systems +with 32 bit long variables to extract dates outside of the 32bit timestamp +range. +.SH PROTOCOLS +HTTP(S), FTP(S), SFTP +.SH EXAMPLE +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, url); + /* Ask for filetime */ + curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + curl_off_t filetime; + res = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime); + if((CURLE_OK == res) && (filetime >= 0)) { + time_t file_time = (time_t)filetime; + printf("filetime %s: %s", filename, ctime(&file_time)); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi +.SH AVAILABILITY +Added in 7.59.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " diff --git a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 index e7d7fcf..039cf66 100644 --- a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 +++ b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_FTP_ENTRY_PATH 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_FTP_ENTRY_PATH 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_FTP_ENTRY_PATH \- get entry path in FTP server .SH SYNOPSIS @@ -39,7 +40,24 @@ corresponding CURL handle. .SH PROTOCOLS FTP(S) and SFTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com"); + + res = curl_easy_perform(curl); + + if(!res) { + /* extract the entry path */ + char *ep = NULL; + res = curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &ep); + if(!res && ep) { + printf("Entry path was: %s\\n", ep); + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.15.4. Works for SFTP since 7.21.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 index b4b9b57..eee5d00 100644 --- a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 +++ b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HEADER_SIZE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_HEADER_SIZE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_HEADER_SIZE \- get size of retrieved headers .SH SYNOPSIS @@ -30,10 +31,27 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HEADER_SIZE, long *sizep); .SH DESCRIPTION Pass a pointer to a long to receive the total size of all the headers received. Measured in number of bytes. + +The total includes the size of any received headers suppressed by +\fICURLOPT_SUPPRESS_CONNECT_HEADERS(3)\fP. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long size; + res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size); + if(!res) + printf("Header size: %ld bytes\\n", size); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 index a5d0e72..dad576a 100644 --- a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 +++ b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HTTPAUTH_AVAIL 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_HTTPAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_HTTPAUTH_AVAIL \- get available HTTP authentication methods .SH SYNOPSIS @@ -35,9 +36,35 @@ bits is explained in the \fICURLOPT_HTTPAUTH(3)\fP option for .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + res = curl_easy_perform(curl); + + if(!res) { + /* extract the available authentication types */ + long auth; + res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_AVAIL, &auth); + if(!res) { + if(!auth) + printf("No auth available, perhaps no 401?\\n"); + else { + printf("%s%s%s%s\\n", + auth & CURLAUTH_BASIC ? "Basic ":"", + auth & CURLAUTH_DIGEST ? "Digest ":"", + auth & CURLAUTH_NEGOTIATE ? "Negotiate ":"", + auth % CURLAUTH_NTLM ? "NTLM ":""); + } + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY -Added in 7.10.8 +Added RFC2617 in 7.10.8 +Added RFC7616 in 7.57.0 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 index acfef77..4ada67e 100644 --- a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 +++ b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HTTP_CONNECTCODE 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_HTTP_CONNECTCODE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_HTTP_CONNECTCODE \- get the CONNECT response code .SH SYNOPSIS @@ -34,7 +35,24 @@ was available. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + + /* typically CONNECT is used to do HTTPS over HTTP proxies */ + curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long code; + res = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &code); + if(!res && code) + printf("The CONNECT response code: %03ld\\n", code); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.10.7 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 index b0f43e5..b6aa769 100644 --- a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 +++ b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_HTTP_VERSION 3 "11 May 2016" "libcurl 7.50.0" "curl_easy_getinfo options" +.TH CURLINFO_HTTP_VERSION 3 "May 11, 2016" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_HTTP_VERSION \- get the http version used in the connection .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 b/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 index 8e73453..0fa45e5 100644 --- a/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 +++ b/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_LASTSOCKET 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_LASTSOCKET 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_LASTSOCKET \- get the last socket used .SH SYNOPSIS @@ -43,7 +44,25 @@ type is 64 bits large while its 'long' is 32 bits. Use the .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + long sockfd; /* doesn't work on win64! */ + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Do not do the transfer - only connect to host */ + curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L); + res = curl_easy_perform(curl); + + /* Extract the socket from the curl handle */ + res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd); + + if(res != CURLE_OK) { + printf("Error: %s\\n", curl_easy_strerror(res)); + return 1; + } +} +.fi .SH AVAILABILITY Added in 7.15.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 b/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 index b2228e2..10643d2 100644 --- a/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 +++ b/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_LOCAL_IP 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_LOCAL_IP 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_LOCAL_IP \- get local IP address of last connection .SH SYNOPSIS @@ -41,7 +42,24 @@ corresponding CURL handle. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +{ + char *ip; + + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if((res == CURLE_OK) && + !curl_easy_getinfo(curl, CURLINFO_LOCAL_IP, &ip) && ip) { + printf("Local IP: %s\\n", ip); + } + + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 index aa7f418..91a3bb6 100644 --- a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 +++ b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_LOCAL_PORT 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_LOCAL_PORT 3 "March 16, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_LOCAL_PORT \- get the latest local port number .SH SYNOPSIS @@ -33,7 +34,29 @@ connection done with this \fBcurl\fP handle. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +{ + CURL *curl; + CURLcode res; + + curl = curl_easy_init(); + if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); + res = curl_easy_perform(curl); + + if(CURLE_OK == res) { + long port; + res = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port); + + if(CURLE_OK == res) { + printf("We used local port: %ld\\n", port); + } + } + curl_easy_cleanup(curl); + } + return 0; +} +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 index 68059ec..fba0972 100644 --- a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_NAMELOOKUP_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_NAMELOOKUP_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_NAMELOOKUP_TIME \- get the name lookup time .SH SYNOPSIS @@ -35,7 +36,22 @@ See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + double namelookup; + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &namelookup); + if(CURLE_OK == res) { + printf("Time: %.1f", namelookup); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 index eccff50..35389e1 100644 --- a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 +++ b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_NUM_CONNECTS 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_NUM_CONNECTS 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_NUM_CONNECTS \- get number of created connections .SH SYNOPSIS @@ -37,7 +38,22 @@ to make persistent connections to save time. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long connects; + res = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connects); + if(res) + printf("It needed %d connects\\n", connects); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.12.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 b/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 index b56d40e..e9b4ad0 100644 --- a/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 +++ b/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_OS_ERRNO 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_OS_ERRNO 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_OS_ERRNO \- get errno number from last connect failure .SH SYNOPSIS @@ -34,7 +35,22 @@ operation. The number is OS and system specific. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + res = curl_easy_perform(curl); + if(res != CURLE_OK) { + long error; + res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error); + if(res && error) { + printf("Errno: %ld\n", error); + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.12.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 index c445ea0..debef22 100644 --- a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRETRANSFER_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_PRETRANSFER_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_PRETRANSFER_TIME \- get the time until the file transfer start .SH SYNOPSIS @@ -38,7 +39,22 @@ See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + double pretransfer; + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &pretransfer); + if(CURLE_OK == res) { + printf("Time: %.1f", pretransfer); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 index 9d276ea..ca3e2b1 100644 --- a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 +++ b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRIMARY_IP 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_PRIMARY_IP 3 "March 22, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_PRIMARY_IP \- get IP address of last connection .SH SYNOPSIS @@ -38,8 +39,26 @@ The \fBip\fP pointer will be NULL or pointing to private memory you MUST NOT free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding CURL handle. .SH PROTOCOLS +All network based ones .SH EXAMPLE -TODO +.nf +{ + char *ip; + + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if((res == CURLE_OK) && + !curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip) && ip) { + printf("IP: %s\\n", ip); + } + + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 index 45ed6a6..f8124f2 100644 --- a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 +++ b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRIMARY_PORT 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_PRIMARY_PORT 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_PRIMARY_PORT \- get the latest destination port number .SH SYNOPSIS @@ -33,7 +34,21 @@ connection done with this \fBcurl\fP handle. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long port; + res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port); + if(!res) + printf("Connected to remote port: %ld\\n", port); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_PRIVATE.3 b/docs/libcurl/opts/CURLINFO_PRIVATE.3 index a7fe9d5..647460f 100644 --- a/docs/libcurl/opts/CURLINFO_PRIVATE.3 +++ b/docs/libcurl/opts/CURLINFO_PRIVATE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PRIVATE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_PRIVATE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_PRIVATE \- get the private pointer .SH SYNOPSIS @@ -35,7 +36,22 @@ pointer, although effectively being a 'void *'. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + void *pointer = 0x2345454; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* set the private pointer */ + curl_easy_setopt(curl, CURLOPT_PRIVATE, pointer); + ret = curl_easy_perform(curl); + + /* extract the private pointer again */ + ret = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.10.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_PROTOCOL.3 b/docs/libcurl/opts/CURLINFO_PROTOCOL.3 index b821118..61aacf5 100644 --- a/docs/libcurl/opts/CURLINFO_PROTOCOL.3 +++ b/docs/libcurl/opts/CURLINFO_PROTOCOL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PROTOCOL 3 "23 November 2016" "libcurl 7.52.0" "curl_easy_getinfo options" +.TH CURLINFO_PROTOCOL 3 "November 23, 2016" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_PROTOCOL \- get the protocol used in the connection .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 index d07c5b9..df4577b 100644 --- a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 +++ b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PROXYAUTH_AVAIL 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_PROXYAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_PROXYAUTH_AVAIL \- get available HTTP proxy authentication methods .SH SYNOPSIS @@ -35,9 +36,36 @@ bits is explained in the \fICURLOPT_PROXYAUTH(3)\fP option for .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1:80"); + + res = curl_easy_perform(curl); + + if(!res) { + /* extract the available proxy authentication types */ + long auth; + res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_AVAIL, &auth); + if(!res) { + if(!auth) + printf("No proxy auth available, perhaps no 407?\\n"); + else { + printf("%s%s%s%s\\n", + auth & CURLAUTH_BASIC ? "Basic ":"", + auth & CURLAUTH_DIGEST ? "Digest ":"", + auth & CURLAUTH_NEGOTIATE ? "Negotiate ":"", + auth % CURLAUTH_NTLM ? "NTLM ":""); + } + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY -Added in 7.10.8 +Added RFC2617 in 7.10.8 +Added RFC7616 in 7.57.0 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 index 3a80f97..93057fc 100644 --- a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 +++ b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_getinfo options" +.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verification .SH SYNOPSIS @@ -29,11 +30,25 @@ CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verif CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_SSL_VERIFYRESULT, long *result); .SH DESCRIPTION Pass a pointer to a long to receive the result of the certificate verification -that was requested (using the \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP option. +that was requested (using the \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP +option. This is only used for HTTPS proxies. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + long verifyresult; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443"); + res = curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT, &verifyresult); + printf("The peer verification said %s\\n", verifyresult? + "fine":"BAAAD"); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 index ee1ebbb..88ac2ef 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REDIRECT_COUNT 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_REDIRECT_COUNT 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_REDIRECT_COUNT \- get the number of redirects .SH SYNOPSIS @@ -33,7 +34,20 @@ actually followed. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long redirects; + curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &redirects); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.9.7 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 index 1a9e6df..8008a8e 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REDIRECT_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_REDIRECT_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_REDIRECT_TIME \- get the time for all redirection steps .SH SYNOPSIS @@ -37,7 +38,22 @@ See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + double redirect; + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &redirect); + if(CURLE_OK == res) { + printf("Time: %.1f", redirect); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.9.7 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 index a7bf726..01db575 100644 --- a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 +++ b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REDIRECT_URL 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_REDIRECT_URL 3 "June 24, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_REDIRECT_URL \- get the URL a redirect would go to .SH SYNOPSIS @@ -33,10 +34,27 @@ take you to if you would enable \fICURLOPT_FOLLOWLOCATION(3)\fP. This can come very handy if you think using the built-in libcurl redirect logic isn't good enough for you but you would still prefer to avoid implementing all the magic of figuring out the new URL. + +This URL is also set if the \fICURLOPT_MAXREDIRS(3)\fP limit prevented a +redirect to happen (since 7.54.1). .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + char *url = NULL; + curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &url); + if(url) + printf("Redirect to: %s\\n", url); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.18.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 index 6f85735..62c835f 100644 --- a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 +++ b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_REQUEST_SIZE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_REQUEST_SIZE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_REQUEST_SIZE \- get size of sent request .SH SYNOPSIS @@ -34,7 +35,21 @@ than one request if \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long req; + res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req); + if(!res) + printf("Request size: %ld bytes\\n", req); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 index b1f4847..c44b64a 100644 --- a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 +++ b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RESPONSE_CODE 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_RESPONSE_CODE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_RESPONSE_CODE \- get the last response code .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 index 822fde8..d4f4a4e 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_RTSP_CLIENT_CSEQ \- get the next RTSP client CSeq .SH SYNOPSIS @@ -33,7 +34,19 @@ application. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long cseq; + curl_easy_getinfo(curl, CURLINFO_RTSP_CLIENT_CSEQ, &cseq); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 index 13d1319..6b2197d 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_CSEQ_RECV 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_CSEQ_RECV 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_RTSP_CSEQ_RECV \- get the recently received CSeq .SH SYNOPSIS @@ -35,7 +36,19 @@ value. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long cseq; + curl_easy_getinfo(curl, CURLINFO_RTSP_CSEQ_RECV, &cseq); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 index 571a915..3854601 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_SERVER_CSEQ 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_RTSP_SERVER_CSEQ \- get the next RTSP server CSeq .SH SYNOPSIS @@ -38,7 +39,19 @@ retrieve this info before closing the active connection. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + long cseq; + curl_easy_getinfo(curl, CURLINFO_RTSP_SERVER_CSEQ, &cseq); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 index 4d4d3f1..28ef058 100644 --- a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 +++ b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_RTSP_SESSION_ID 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_RTSP_SESSION_ID \- get RTSP session ID .SH SYNOPSIS @@ -40,7 +41,19 @@ corresponding CURL handle. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com"); + res = curl_easy_perform(curl); + if(res == CURLE_OK) { + char *id; + curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &id); + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_SCHEME.3 b/docs/libcurl/opts/CURLINFO_SCHEME.3 index 78c3d68..bdbfbf5 100644 --- a/docs/libcurl/opts/CURLINFO_SCHEME.3 +++ b/docs/libcurl/opts/CURLINFO_SCHEME.3 @@ -20,20 +20,22 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SCHEME 3 "23 November 2016" "libcurl 7.52.0" "curl_easy_getinfo options" +.TH CURLINFO_SCHEME 3 "April 08, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_SCHEME \- get the URL scheme (sometimes called protocol) used in the connection .SH SYNOPSIS #include -CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, long *p); +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, char **scheme); .SH DESCRIPTION Pass a pointer to a char pointer to receive the pointer to a zero-terminated -string holding the URL scheme used for the most recent connection done with this -\fBcurl\fP handle. +string holding the URL scheme used for the most recent connection done with +this CURL \fBhandle\fP. -The \fBid\fP pointer will be NULL or pointing to private read-only memory you -MUST NOT free or modify. +The \fBscheme\fP pointer will be NULL or pointing to private memory you MUST +NOT free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the +corresponding CURL handle. .SH PROTOCOLS All .SH EXAMPLE @@ -44,8 +46,10 @@ if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { - char * scheme; + char *scheme = NULL; curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme); + if(scheme) + printf("scheme: %s\\n", scheme); /* scheme: HTTP */ } curl_easy_cleanup(curl); } diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 index 85039ff..baf96de 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SIZE_DOWNLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_SIZE_DOWNLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_SIZE_DOWNLOAD \- get the number of downloaded bytes .SH SYNOPSIS @@ -33,13 +34,35 @@ downloaded. The amount is only for the latest transfer and will be reset again for each new transfer. This counts actual payload data, what's also commonly called body. All meta and header data are excluded and will not be counted in this number. + +\fICURLINFO_SIZE_DOWNLOAD_T(3)\fP is a newer replacement that returns a more +sensible variable type. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + /* check the size */ + double dl; + res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dl); + if(!res) { + printf("Downloaded %.0f bytes\\n", cl); + } + } +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_SIZE_DOWNLOAD_T "(3), " +.BR CURLINFO_SIZE_UPLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 new file mode 100644 index 0000000..c0e8723 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 @@ -0,0 +1,65 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_SIZE_DOWNLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_SIZE_DOWNLOAD_T \- get the number of downloaded bytes +.SH SYNOPSIS +#include + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD_T, curl_off_t *dlp); +.SH DESCRIPTION +Pass a pointer to a \fIcurl_off_t\fP to receive the total amount of bytes that +were downloaded. The amount is only for the latest transfer and will be reset +again for each new transfer. This counts actual payload data, what's also +commonly called body. All meta and header data are excluded and will not be +counted in this number. +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + /* check the size */ + curl_off_t dl; + res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl); + if(!res) { + printf("Downloaded " CURL_FORMAT_CURL_OFF_T " bytes\\n", cl); + } + } +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_SIZE_DOWNLOAD "(3), " +.BR CURLINFO_SIZE_UPLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 index 034c6df..55363c4 100644 --- a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SIZE_UPLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_SIZE_UPLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_SIZE_UPLOAD \- get the number of uploaded bytes .SH SYNOPSIS @@ -30,13 +31,33 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD, double *uploadp); .SH DESCRIPTION Pass a pointer to a double to receive the total amount of bytes that were uploaded. + +\fICURLINFO_SIZE_UPLOAD_T(3)\fP is a newer replacement that returns a more +sensible variable type. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + double ul; + res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul); + if(!res) { + printf("Uploaded %.0f bytes\\n", ul); + } + } +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_SIZE_DOWNLOAD_T "(3), " CURLINFO_SIZE_UPLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 new file mode 100644 index 0000000..67d8e59 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 @@ -0,0 +1,60 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_SIZE_UPLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_SIZE_UPLOAD_T \- get the number of uploaded bytes +.SH SYNOPSIS +#include + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD_T, curl_off_t *uploadp); +.SH DESCRIPTION +Pass a pointer to a \fIcurl_off_t\fP to receive the total amount of bytes that +were uploaded. +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + curl_off_t ul; + res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul); + if(!res) { + printf("Uploaded " CURL_FORMAT_CURL_OFF_T " bytes\\n", ul); + } + } +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_SIZE_DOWNLOAD_T "(3), " CURLINFO_SIZE_UPLOAD "(3), " diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 index ef1c739..78ce1d0 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SPEED_DOWNLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_SPEED_DOWNLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_SPEED_DOWNLOAD \- get download speed .SH SYNOPSIS @@ -30,9 +31,28 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD, double *speed) .SH DESCRIPTION Pass a pointer to a double to receive the average download speed that curl measured for the complete download. Measured in bytes/second. + +\fICURLINFO_SPEED_DOWNLOAD_T(3)\fP is a newer replacement that returns a more +sensible variable type. .SH PROTOCOLS .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + double speed; + res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &speed); + if(!res) { + printf("Download speed %.0f bytes/sec\\n", ul); + } + } +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE @@ -40,3 +60,4 @@ Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" .BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " .BR CURLINFO_SPEED_UPLOAD "(3), " +.BR CURLINFO_SIZE_UPLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 new file mode 100644 index 0000000..4286fd6 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 @@ -0,0 +1,60 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_SPEED_DOWNLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_SPEED_DOWNLOAD_T \- get download speed +.SH SYNOPSIS +#include + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD_T, curl_off_t *speed); +.SH DESCRIPTION +Pass a pointer to a \fIcurl_off_t\fP to receive the average download speed +that curl measured for the complete download. Measured in bytes/second. +.SH PROTOCOLS +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + curl_off_t speed; + res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed); + if(!res) { + printf("Download speed " CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", ul); + } + } +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_SPEED_UPLOAD "(3), " +.BR CURLINFO_SIZE_UPLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 index f79ea1f..4007527 100644 --- a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 +++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SPEED_UPLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_SPEED_UPLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_SPEED_UPLOAD \- get upload speed .SH SYNOPSIS @@ -30,9 +31,28 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD, double *speed); .SH DESCRIPTION Pass a pointer to a double to receive the average upload speed that curl measured for the complete upload. Measured in bytes/second. + +\fICURLINFO_SPEED_UPLOAD_T(3)\fP is a newer replacement that returns a more +sensible variable type. .SH PROTOCOLS .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + double speed; + res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed); + if(!res) { + printf("Upload speed %.0f bytes/sec\\n", ul); + } + } +} +.fi .SH AVAILABILITY Added in .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 new file mode 100644 index 0000000..c18f271 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 @@ -0,0 +1,59 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLINFO_SPEED_UPLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + +.SH NAME +CURLINFO_SPEED_UPLOAD_T \- get upload speed +.SH SYNOPSIS +#include + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD_T, curl_off_t *speed); +.SH DESCRIPTION +Pass a pointer to a \fIcurl_off_t\fP to receive the average upload speed that +curl measured for the complete upload. Measured in bytes/second. +.SH PROTOCOLS +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* Perform the request */ + res = curl_easy_perform(curl); + + if(!res) { + curl_off_t speed; + res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed); + if(!res) { + printf("Upload speed " CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", ul); + } + } +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), " +.BR CURLINFO_SPEED_DOWNLOAD_T "(3), " diff --git a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 index c1ebfc9..5658374 100644 --- a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 +++ b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SSL_ENGINES 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_SSL_ENGINES 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_SSL_ENGINES \- get an slist of OpenSSL crypto-engines .SH SYNOPSIS @@ -38,7 +39,20 @@ data for you. .SH PROTOCOLS All TLS based ones. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + struct curl_slist *engines; + res = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines); + if((res == CURLE_OK) && engines) { + /* we have a list, free it when done using it */ + curl_slist_free_all(engines); + } + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.12.3. Available in OpenSSL builds with "engine" support. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 index 1651a9b..d287ab8 100644 --- a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 +++ b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_SSL_VERIFYRESULT 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_SSL_VERIFYRESULT \- get the result of the certificate verification .SH SYNOPSIS @@ -34,7 +35,19 @@ option. .SH PROTOCOLS All using TLS .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + long verifyresult; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + res = curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &verifyresult); + printf("The peer verification said %s\\n", verifyresult? + "fine":"BAAAD"); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.5 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 index 5464364..dc9e6ab 100644 --- a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_STARTTRANSFER_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_STARTTRANSFER_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_STARTTRANSFER_TIME \- get the time until the first byte is received .SH SYNOPSIS @@ -37,7 +38,22 @@ See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + double start; + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &start); + if(CURLE_OK == res) { + printf("Time: %.1f", start); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.9.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 b/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 index 3cc3b65..b201737 100644 --- a/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 +++ b/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_TLS_SESSION 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_TLS_SESSION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_TLS_SESSION \- get TLS session info .SH SYNOPSIS @@ -49,7 +50,17 @@ information. .SH PROTOCOLS All TLS-based .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + struct curl_tlssessioninfo *tls; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + res = curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &tls); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.34.0, and supported OpenSSL, GnuTLS, NSS and gskit only up until 7.48.0 was released. diff --git a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 index decf0fc..4c792a8 100644 --- a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 +++ b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_TLS_SSL_PTR 3 "23 Feb 2016" "libcurl 7.48.0" "curl_easy_getinfo options" +.TH CURLINFO_TLS_SSL_PTR 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_TLS_SESSION, CURLINFO_TLS_SSL_PTR \- get TLS session info .SH SYNOPSIS @@ -128,7 +129,17 @@ https://github.com/curl/curl/issues/685 .SH PROTOCOLS All TLS-based .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode res; + struct curl_tlssessioninfo *tls; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + res = curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &tls); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.48.0. diff --git a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 index b068a8b..c8979aa 100644 --- a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 +++ b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLINFO_TOTAL_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options" +.TH CURLINFO_TOTAL_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options" + .SH NAME CURLINFO_TOTAL_TIME \- get total time of previous transfer .SH SYNOPSIS @@ -36,7 +37,22 @@ See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + double total; + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total); + if(CURLE_OK == res) { + printf("Time: %.1f", total); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 index ab2d2f6..8beb3eb 100644 --- a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 +++ b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining .SH SYNOPSIS @@ -38,7 +39,11 @@ The default value is 0, which means that the penalization is inactive. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURLM *m = curl_multi_init(); +long maxchunk = 10000; +curl_multi_setopt(m, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, maxchunk); +.fi .SH AVAILABILITY Added in 7.30.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 index 3b4e81d..9336de1 100644 --- a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 +++ b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty .SH SYNOPSIS @@ -38,7 +39,11 @@ The default value is 0, which means that the size penalization is inactive. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURLM *m = curl_multi_init(); +long maxlength = 10000; +curl_multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, maxlength); +.fi .SH AVAILABILITY Added in 7.30.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 index ee9bdca..6795c8b 100644 --- a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" +.TH CURLMOPT_MAXCONNECTS 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_MAXCONNECTS \- set size of connection cache .SH SYNOPSIS @@ -51,7 +52,11 @@ See DESCRIPTION .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURLM *m = curl_multi_init(); +/* only keep 10 connections in the cache */ +curl_multi_setopt(m, CURLMOPT_MAXCONNECTS, 10L); +.fi .SH AVAILABILITY Added in 7.16.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 index 2e0352f..ebc84c8 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" +.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host .SH SYNOPSIS @@ -49,7 +50,11 @@ considered to be the host for which this limit counts. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURLM *m = curl_multi_init(); +/* do no more than 2 connections per host */ +curl_multi_setopt(m, CURLMOPT_MAX_HOST_CONNECTIONS, 2L); +.fi .SH AVAILABILITY Added in 7.30.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 index 1204a0f..aedcefc 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline .SH SYNOPSIS @@ -42,7 +43,11 @@ total number of requests in-flight is \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP * .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURLM *m = curl_multi_init(); +/* set a more conservative pipe length */ +curl_multi_setopt(m, CURLMOPT_MAX_PIPELINE_LENGTH, 3L); +.fi .SH AVAILABILITY Added in 7.30.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 index ea53bff..8fe2dfb 100644 --- a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 +++ b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections .SH SYNOPSIS @@ -41,7 +42,11 @@ controlled by the number of easy handles added. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURLM *m = curl_multi_init(); +/* never do more than 15 connections */ +curl_multi_setopt(m, CURLMOPT_MAX_TOTAL_CONNECTIONS, 15L); +.fi .SH AVAILABILITY Added in 7.30.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING.3 index 1a40476..6f236dd 100644 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 +++ b/docs/libcurl/opts/CURLMOPT_PIPELINING.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PIPELINING 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" +.TH CURLMOPT_PIPELINING 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_PIPELINING \- enable HTTP pipelining and multiplexing .SH SYNOPSIS @@ -65,7 +66,12 @@ existing connection if possible. This requires HTTP/2. .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +CURLM *m = curl_multi_init(); +/* try HTTP/1 pipelining and HTTP/2 multiplexing */ +curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_HTTP1 | + CURLPIPE_MULTIPLEX); +.fi .SH AVAILABILITY Added in 7.16.0. Multiplex support bit added in 7.43.0. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 index 660afec..7d4918e 100644 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 +++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PIPELINING_SERVER_BL 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_PIPELINING_SERVER_BL 3 "February 03, 2016" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 index 8c5f5d4..990924c 100644 --- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 +++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PIPELINING_SITE_BL 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_PIPELINING_SITE_BL 3 "February 03, 2016" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_PIPELINING_SITE_BL \- pipelining host blacklist .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 b/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 index ca9fe8a..fa14fb1 100644 --- a/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 +++ b/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PUSHDATA 3 "1 Jun 2015" "libcurl 7.44.0" "curl_multi_setopt options" +.TH CURLMOPT_PUSHDATA 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_PUSHDATA \- pointer to pass to push callback .SH SYNOPSIS @@ -38,7 +39,37 @@ NULL .SH PROTOCOLS HTTP(S) .SH EXAMPLE -TODO +.nf +/* only allow pushes for file names starting with "push-" */ +int push_callback(CURL *parent, + CURL *easy, + size_t num_headers, + struct curl_pushheaders *headers, + void *userp) +{ + char *headp; + int *transfers = (int *)userp; + FILE *out; + headp = curl_pushheader_byname(headers, ":path"); + if(headp && !strncmp(headp, "/push-", 6)) { + fprintf(stderr, "The PATH is %s\\n", headp); + + /* save the push here */ + out = fopen("pushed-stream", "wb"); + + /* write to this file */ + curl_easy_setopt(easy, CURLOPT_WRITEDATA, out); + + (*transfers)++; /* one more */ + + return CURL_PUSH_OK; + } + return CURL_PUSH_DENY; +} + +curl_multi_setopt(multi, CURLMOPT_PUSHFUNCTION, push_callback); +curl_multi_setopt(multi, CURLMOPT_PUSHDATA, &counter); +.fi .SH AVAILABILITY Added in 7.44.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 index 9fe02f8..c7bb392 100644 --- a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 +++ b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_PUSHFUNCTION 3 "1 Jun 2015" "libcurl 7.44.0" "curl_multi_setopt options" +.TH CURLMOPT_PUSHFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_PUSHFUNCTION \- callback that approves or denies server pushes .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 index b9cdc83..fb05882 100644 --- a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 +++ b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_SOCKETDATA 3 "3 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_SOCKETDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback .SH SYNOPSIS @@ -39,7 +40,34 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) +{ + GlobalInfo *g = (GlobalInfo*) cbp; + SockInfo *fdp = (SockInfo*) sockp; + + if(what == CURL_POLL_REMOVE) { + remsock(fdp); + } + else { + if(!fdp) { + addsock(s, e, what, g); + } + else { + setsock(fdp, s, e, what, g); + } + } + return 0; +} + +main() +{ + GlobalInfo setup; + /* ... use socket callback and custom pointer */ + curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, sock_cb); + curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, &setup); +} +.fi .SH AVAILABILITY Added in 7.15.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 index 5196197..3e4ea8f 100644 --- a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 +++ b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_SOCKETFUNCTION 3 "3 Nov 2016" "libcurl 7.39.0" "curl_multi_setopt options" +.TH CURLMOPT_SOCKETFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for .SH SYNOPSIS @@ -63,7 +64,34 @@ NULL (no callback) .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) +{ + GlobalInfo *g = (GlobalInfo*) cbp; + SockInfo *fdp = (SockInfo*) sockp; + + if(what == CURL_POLL_REMOVE) { + remsock(fdp); + } + else { + if(!fdp) { + addsock(s, e, what, g); + } + else { + setsock(fdp, s, e, what, g); + } + } + return 0; +} + +main() +{ + GlobalInfo setup; + /* ... use socket callback and custom pointer */ + curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, sock_cb); + curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, &setup); +} +.fi .SH AVAILABILITY Added in 7.15.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 index 9d2b66f..cc9ed5a 100644 --- a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 +++ b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_TIMERDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" +.TH CURLMOPT_TIMERDATA 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback .SH SYNOPSIS @@ -39,7 +40,41 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +static gboolean timeout_cb(gpointer user_data) +{ + int running; + if(user_data) { + g_free(user_data); + curl_multi_setopt(curl_handle, CURLMOPT_TIMERDATA, NULL); + } + curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &running); + return G_SOURCE_REMOVE; +} + +static int timerfunc(CURLM *multi, long timeout_ms, void *userp) +{ + guint *id = userp; + + if(id) + g_source_remove(*id); + + /* -1 means we should just delete our timer. */ + if(timeout_ms == -1) { + g_free(id); + id = NULL; + } + else { + if(!id) + id = g_new(guint, 1); + *id = g_timeout_add(timeout_ms, timeout_cb, id); + } + curl_multi_setopt(multi, CURLMOPT_TIMERDATA, id); + return 0; +} + +curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, timerfunc); +.fi .SH AVAILABILITY Added in 7.16.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 index 7fcb7a5..b512098 100644 --- a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 +++ b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLMOPT_TIMERFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options" +.TH CURLMOPT_TIMERFUNCTION 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options" + .SH NAME CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values .SH SYNOPSIS @@ -62,33 +63,36 @@ NULL All .SH EXAMPLE .nf -static gboolean timeout_cb(gpointer user_data) { - if (user_data) { - g_free(user_data); - curl_multi_setopt(curl_handle, CURLMOPT_TIMERDATA, NULL); - } - int running; - curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &running); - return G_SOURCE_REMOVE; +static gboolean timeout_cb(gpointer user_data) +{ + int running; + if(user_data) { + g_free(user_data); + curl_multi_setopt(curl_handle, CURLMOPT_TIMERDATA, NULL); + } + curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &running); + return G_SOURCE_REMOVE; } -static int timerfunc(CURLM *multi, long timeout_ms, void *userp) { - guint *id = userp; +static int timerfunc(CURLM *multi, long timeout_ms, void *userp) +{ + guint *id = userp; - if (id) - g_source_remove(*id); + if(id) + g_source_remove(*id); - // -1 means we should just delete our timer. - if (timeout_ms == -1) { - g_free(id); - id = NULL; - } else { - if (!id) - id = g_new(guint, 1); - *id = g_timeout_add(timeout_ms, timeout_cb, id); - } - curl_multi_setopt(multi, CURLMOPT_TIMERDATA, id); - return 0; + /* -1 means we should just delete our timer. */ + if(timeout_ms == -1) { + g_free(id); + id = NULL; + } + else { + if(!id) + id = g_new(guint, 1); + *id = g_timeout_add(timeout_ms, timeout_cb, id); + } + curl_multi_setopt(multi, CURLMOPT_TIMERDATA, id); + return 0; } curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, timerfunc); diff --git a/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 b/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 index 8b61854..b5976a0 100644 --- a/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 +++ b/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "08 Jan 2017" "libcurl 7.53.0" "curl_easy_setopt options" +.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "January 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 index 70325fd..836a5e5 100644 --- a/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "March 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 index 3a5fc16..682e250 100644 --- a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 +++ b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ACCEPT_ENCODING 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_ACCEPT_ENCODING 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 index f323279..30d0834 100644 --- a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 +++ b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ADDRESS_SCOPE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_ADDRESS_SCOPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_ADDRESS_SCOPE \- set scope for local IPv6 addresses .SH SYNOPSIS @@ -35,7 +36,20 @@ link-local or site-local addresses. .SH PROTOCOLS All, when using IPv6 .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* 0x2 link-local + 0x5 site-local + 0x8 organization-local + 0xe global ... */ + curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, 0xEL); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_APPEND.3 b/docs/libcurl/opts/CURLOPT_APPEND.3 index c22acf7..7f8ab63 100644 --- a/docs/libcurl/opts/CURLOPT_APPEND.3 +++ b/docs/libcurl/opts/CURLOPT_APPEND.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_APPEND 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_APPEND 3 "March 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_APPEND \- enable appending to the remote file .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 index e6a3a08..8e01d65 100644 --- a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 +++ b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_AUTOREFERER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_AUTOREFERER 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_AUTOREFERER \- automatically update the referer header .SH SYNOPSIS @@ -36,7 +37,22 @@ a Location: redirect. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* follow redirects */ + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + + /* set Referer: automatically when following redirects */ + curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1L); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 index dc5bf74..3be6aaf 100644 --- a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_BUFFERSIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_BUFFERSIZE 3 "May 13, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_BUFFERSIZE \- set preferred receive buffer size .SH SYNOPSIS @@ -37,13 +38,26 @@ This is just treated as a request, not an order. You cannot be guaranteed to actually get the given size. This buffer size is by default \fICURL_MAX_WRITE_SIZE\fP (16kB). The maximum -buffer size allowed to set is \fICURL_MAX_READ_SIZE\fP (512kB). +buffer size allowed to be set is \fICURL_MAX_READ_SIZE\fP (512kB). The minimum +buffer size allowed to be set is 1024. .SH DEFAULT CURL_MAX_WRITE_SIZE (16kB) .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/foo.bin"); + + /* ask libcurl to allocate a larger receive buffer */ + curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 120000L); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.10. Growing the buffer was added in 7.53.0. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CAINFO.3 b/docs/libcurl/opts/CURLOPT_CAINFO.3 index 127b904..9e159eb 100644 --- a/docs/libcurl/opts/CURLOPT_CAINFO.3 +++ b/docs/libcurl/opts/CURLOPT_CAINFO.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CAINFO 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CAINFO 3 "May 27, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle .SH SYNOPSIS @@ -40,6 +41,11 @@ is assumed to be stored, as established at build time. If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available for this option to work properly. +Starting with curl-7.55.0, if both \fICURLOPT_CAINFO(3)\fP and +\fICURLOPT_CAPATH(3)\fP are unset, NSS-linked libcurl tries to load +libnssckbi.so, which contains a more comprehensive set of trust information +than supported by nss-pem, because libnssckbi.so also includes information +about distrusted certificates. (iOS and macOS only) If curl is built against Secure Transport, then this option is supported for backward compatibility with other SSL engines, but it @@ -54,7 +60,15 @@ Built-in system specific .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_CAINFO, "/etc/certs/cabundle.pem"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY For SSL engines that don't support certificate files the CURLOPT_CAINFO option is ignored. Refer to https://curl.haxx.se/docs/ssl-compared.html diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.3 b/docs/libcurl/opts/CURLOPT_CAPATH.3 index b19994b..dd85be5 100644 --- a/docs/libcurl/opts/CURLOPT_CAPATH.3 +++ b/docs/libcurl/opts/CURLOPT_CAPATH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CAPATH 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CAPATH 3 "September 10, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CAPATH \- specify directory holding CA certificates .SH SYNOPSIS @@ -44,10 +45,19 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/cert-dir"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY -This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS -backend provides the option only for backward compatibility. +This option is supported by the OpenSSL, GnuTLS, PolarSSL and mbedTLS +(since 7.56.0) backends. The NSS backend provides the option only for +backward compatibility. .SH RETURN VALUE CURLE_OK if supported; or an error such as: diff --git a/docs/libcurl/opts/CURLOPT_CERTINFO.3 b/docs/libcurl/opts/CURLOPT_CERTINFO.3 index e836e40..2333d9a 100644 --- a/docs/libcurl/opts/CURLOPT_CERTINFO.3 +++ b/docs/libcurl/opts/CURLOPT_CERTINFO.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CERTINFO 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CERTINFO 3 "May 27, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CERTINFO \- request SSL certificate information .SH SYNOPSIS @@ -38,7 +39,37 @@ its option \fICURLINFO_CERTINFO(3)\fP. .SH PROTOCOLS All TLS-based .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/"); + + /* connect to any HTTPS site, trusted or not */ + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); + + curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L); + + res = curl_easy_perform(curl); + + if (!res) { + struct curl_certinfo *ci; + res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci); + + if (!res) { + printf("%d certs!\\n", ci->num_of_certs); + + for(i = 0; i < ci->num_of_certs; i++) { + struct curl_slist *slist; + + for(slist = ci->certinfo[i]; slist; slist = slist->next) + printf("%s\\n", slist->data); + } + } + } + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option is supported by the OpenSSL, GnuTLS, NSS and GSKit backends. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 index d31412d..19c6c2a 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch .SH SYNOPSIS @@ -60,7 +61,52 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +static long file_is_coming(struct curl_fileinfo *finfo, + struct callback_data *data, + int remains) +{ + printf("%3d %40s %10luB ", remains, finfo->filename, + (unsigned long)finfo->size); + + switch(finfo->filetype) { + case CURLFILETYPE_DIRECTORY: + printf(" DIR\n"); + break; + case CURLFILETYPE_FILE: + printf("FILE "); + break; + default: + printf("OTHER\n"); + break; + } + + if(finfo->filetype == CURLFILETYPE_FILE) { + /* do not transfer files >= 50B */ + if(finfo->size > 50) { + printf("SKIPPED\n"); + return CURL_CHUNK_BGN_FUNC_SKIP; + } + + data->output = fopen(finfo->filename, "wb"); + if(!data->output) { + return CURL_CHUNK_BGN_FUNC_FAIL; + } + } + + return CURL_CHUNK_BGN_FUNC_OK; +} + +int main() +{ + /* data for callback */ + struct callback_data callback_info; + + /* callback is called before download of concrete file started */ + curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming); + curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, &callback_info); +} +.fi .SH AVAILABILITY This was added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 index 1ceb2ce..9636a11 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 +++ b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CHUNK_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CHUNK_DATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CHUNK_DATA \- custom pointer to the FTP chunk callbacks .SH SYNOPSIS @@ -36,7 +37,52 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +static long file_is_coming(struct curl_fileinfo *finfo, + struct callback_data *data, + int remains) +{ + printf("%3d %40s %10luB ", remains, finfo->filename, + (unsigned long)finfo->size); + + switch(finfo->filetype) { + case CURLFILETYPE_DIRECTORY: + printf(" DIR\n"); + break; + case CURLFILETYPE_FILE: + printf("FILE "); + break; + default: + printf("OTHER\n"); + break; + } + + if(finfo->filetype == CURLFILETYPE_FILE) { + /* do not transfer files >= 50B */ + if(finfo->size > 50) { + printf("SKIPPED\n"); + return CURL_CHUNK_BGN_FUNC_SKIP; + } + + data->output = fopen(finfo->filename, "wb"); + if(!data->output) { + return CURL_CHUNK_BGN_FUNC_FAIL; + } + } + + return CURL_CHUNK_BGN_FUNC_OK; +} + +int main() +{ + /* data for callback */ + struct callback_data callback_info; + + /* callback is called before download of concrete file started */ + curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming); + curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, &callback_info); +} +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 index d2b6c55..d1621e4 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CHUNK_END_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CHUNK_END_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcardmatch .SH SYNOPSIS @@ -45,7 +46,24 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +static long file_is_downloaded(struct callback_data *data) +{ + if(data->output) { + fclose(data->output); + data->output = 0x0; + } + return CURL_CHUNK_END_FUNC_OK; +} + +int main() +{ + /* data for callback */ + struct callback_data callback_info; + curl_easy_setopt(curl, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded); + curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, &callback_info); +} +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 index 1d6ca06..019a259 100644 --- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 +++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CLOSESOCKETDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CLOSESOCKETDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CLOSESOCKETDATA \- pointer passed to the socket close callback .SH SYNOPSIS @@ -36,7 +37,17 @@ The default value of this parameter is NULL. .SH PROTOCOLS All except file: .SH EXAMPLE -TODO +.nf +static int closesocket(void *clientp, curl_socket_t item) +{ + printf("libcurl wants to close %d now\n", (int)item); + return 0; +} + +/* call this function to close sockets */ +curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closesocket); +curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &sockfd); +.fi .SH AVAILABILITY Added in 7.21.7 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 index f4e8bd9..4bf2b7f 100644 --- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CLOSESOCKETFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CLOSESOCKETFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CLOSESOCKETFUNCTION \- callback to socket close replacement function .SH SYNOPSIS @@ -47,7 +48,17 @@ By default libcurl uses the standard socket close function. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +static int closesocket(void *clientp, curl_socket_t item) +{ + printf("libcurl wants to close %d now\n", (int)item); + return 0; +} + +/* call this function to close sockets */ +curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closesocket); +curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &sockfd); +.fi .SH AVAILABILITY Added in 7.21.7 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 index f186948..3d54b27 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECTTIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECTTIMEOUT 3 "October 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase .SH SYNOPSIS @@ -36,6 +37,9 @@ default built-in connection timeout - 300 seconds. See also the In unix-like systems, this might cause signals to be used unless \fICURLOPT_NOSIGNAL(3)\fP is set. + +If both \fICURLOPT_CONNECTTIMEOUT(3)\fP and \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP +are set, the value set last will be used. .SH DEFAULT 300 .SH PROTOCOLS @@ -55,6 +59,8 @@ if(curl) { .SH AVAILABILITY Always .SH RETURN VALUE -Returns CURLE_OK +Returns CURLE_OK. Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative +value or a value that when converted to milliseconds is too large. .SH "SEE ALSO" +.BR CURLOPT_CONNECTTIMEOUT_MS "(3), " .BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), " diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 index 7a24a8b..f6c8255 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECTTIMEOUT_MS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECTTIMEOUT_MS 3 "September 24, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CONNECTTIMEOUT_MS \- timeout for the connect phase .SH SYNOPSIS @@ -36,6 +37,9 @@ default built-in connection timeout - 300 seconds. See also the In unix-like systems, this might cause signals to be used unless \fICURLOPT_NOSIGNAL(3)\fP is set. + +If both \fICURLOPT_CONNECTTIMEOUT(3)\fP and \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP +are set, the value set last will be used. .SH DEFAULT 300000 .SH PROTOCOLS @@ -57,4 +61,5 @@ Always .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" +.BR CURLOPT_CONNECTTIMEOUT "(3), " .BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), " diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 index 973c2ae..0cf889a 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECT_ONLY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECT_ONLY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CONNECT_ONLY \- stop when connected to target server .SH SYNOPSIS @@ -42,7 +43,18 @@ transfers. .SH PROTOCOLS HTTP, SMTP, POP3 and IMAP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L); + ret = curl_easy_perform(curl); + if(ret == CURLE_OK) { + /* only connected! */ + } +} +.fi .SH AVAILABILITY Added in 7.15.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 index 3025021..bfab71c 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 +++ b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONNECT_TO 3 "10 April 2016" "libcurl 7.49.0" "curl_easy_setopt options" +.TH CURLOPT_CONNECT_TO 3 "May 20, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CONNECT_TO \- Connect to a specific host and port instead of the URL's host and port .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 index 1ff300e..94dc6b8 100644 --- a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CONV_FROM_NETWORK_FUNCTION \- convert data from network to host encoding .SH SYNOPSIS @@ -73,7 +74,26 @@ NULL .SH PROTOCOLS FTP, SMTP, IMAP, POP3 .SH EXAMPLE -TODO +.nf +static CURLcode my_conv_from_ascii_to_ebcdic(char *buffer, size_t length) +{ + char *tempptrin, *tempptrout; + size_t bytes = length; + int rc; + tempptrin = tempptrout = buffer; + rc = platform_a2e(&tempptrin, &bytes, &tempptrout, &bytes); + if(rc == PLATFORM_CONV_OK) { + return CURLE_OK; + } + else { + return CURLE_CONV_FAILED; + } +} + +/* use platform-specific functions for codeset conversions */ +curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION, + my_conv_from_ascii_to_ebcdic); +.fi .SH AVAILABILITY Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 index 487492c..66dd8ae 100644 --- a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CONV_FROM_UTF8_FUNCTION \- convert data from UTF8 to host encoding .SH SYNOPSIS @@ -72,7 +73,25 @@ NULL .SH PROTOCOLS TLS-based protocols. .SH EXAMPLE -TODO +.nf +static CURLcode my_conv_from_utf8_to_ebcdic(char *buffer, size_t length) +{ + char *tempptrin, *tempptrout; + size_t bytes = length; + int rc; + tempptrin = tempptrout = buffer; + rc = platform_u2e(&tempptrin, &bytes, &tempptrout, &bytes); + if(rc == PLATFORM_CONV_OK) { + return CURLE_OK; + } + else { + return CURLE_CONV_FAILED; + } +} + +curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION, + my_conv_from_utf8_to_ebcdic); +.fi .SH AVAILABILITY Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 index a1d6a1a..2ab7647 100644 --- a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CONV_TO_NETWORK_FUNCTION \- convert data to network from host encoding .SH SYNOPSIS @@ -73,7 +74,25 @@ NULL .SH PROTOCOLS FTP, SMTP, IMAP, POP3 .SH EXAMPLE -TODO +.nf +static CURLcode my_conv_from_ebcdic_to_ascii(char *buffer, size_t length) +{ + char *tempptrin, *tempptrout; + size_t bytes = length; + int rc; + tempptrin = tempptrout = buffer; + rc = platform_e2a(&tempptrin, &bytes, &tempptrout, &bytes); + if(rc == PLATFORM_CONV_OK) { + return CURLE_OK; + } + else { + return CURLE_CONV_FAILED; + } +} + +curl_easy_setopt(curl, CURLOPT_CONV_TO_NETWORK_FUNCTION, + my_conv_from_ebcdic_to_ascii); +.fi .SH AVAILABILITY Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_COOKIE.3 b/docs/libcurl/opts/CURLOPT_COOKIE.3 index d0da3f1..b76ac25 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIE.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIE 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_COOKIE \- set contents of HTTP Cookie header .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 index ba2d1e3..a298196 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIEFILE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIEFILE 3 "March 13, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_COOKIEFILE \- file name to read cookies from .SH SYNOPSIS @@ -38,7 +39,8 @@ subsequent requests with this handle. Given an empty or non-existing file or by passing the empty string ("") to this option, you can enable the cookie engine without reading any initial -cookies. +cookies. If you tell libcurl the file name is "-" (just a single minus sign), +libcurl will instead read from stdin. This option only \fBreads\fP cookies. To make libcurl write cookies to file, see \fICURLOPT_COOKIEJAR(3)\fP. @@ -61,7 +63,19 @@ NULL .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* get cookies from an existing file */ + curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "/tmp/cookies.txt"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY As long as HTTP is supported .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 index 3c1f541..16036cb 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIEJAR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIEJAR 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_COOKIEJAR \- file name to store cookies to .SH SYNOPSIS @@ -54,7 +55,20 @@ NULL .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* export cookies to this file when closing the handle */ + curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "/tmp/cookies.txt"); + + ret = curl_easy_perform(curl); + + /* close the handle, write the cookies! */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 index 7de4da8..402b743 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIELIST 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIELIST 3 "April 26, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_COOKIELIST \- add to or manipulate cookies held in memory .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 index ecc3757..cb49bae 100644 --- a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 +++ b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COOKIESESSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_COOKIESESSION 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_COOKIESESSION \- start a new cookie session .SH SYNOPSIS @@ -42,7 +43,22 @@ browser up, more or less. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* new "session", don't load session cookies */ + curl_easy_setopt(curl, CURLOPT_COOKIESESSION, 1L); + + /* get the (non session) cookies from this file */ + curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "/tmp/cookies.txt"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 index 001d6fe..07ecad1 100644 --- a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 +++ b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_COPYPOSTFIELDS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_COPYPOSTFIELDS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_CRLF.3 b/docs/libcurl/opts/CURLOPT_CRLF.3 index b13a06e..56d71bf 100644 --- a/docs/libcurl/opts/CURLOPT_CRLF.3 +++ b/docs/libcurl/opts/CURLOPT_CRLF.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CRLF 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CRLF 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CRLF \- enable/disable CRLF conversion .SH SYNOPSIS @@ -38,7 +39,16 @@ This is a legacy option of questionable use. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/"); + curl_easy_setopt(curl, CURLOPT_CRLF, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY SMTP since 7.40.0, other protocols since they were introduced .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_CRLFILE.3 index 4ab7a64..3e3d5ce 100644 --- a/docs/libcurl/opts/CURLOPT_CRLFILE.3 +++ b/docs/libcurl/opts/CURLOPT_CRLFILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CRLFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CRLFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CRLFILE \- specify a Certificate Revocation List file .SH SYNOPSIS @@ -53,7 +54,15 @@ NULL .SH PROTOCOLS All TLS-based protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_CRLFILE, "/etc/certs/crl.pem"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.0 .SH RETURN VALUE @@ -61,3 +70,4 @@ Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" .BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), " +.BR CURLOPT_PROXY_CRLFILE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 index 2bd3517..16e413e 100644 --- a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 +++ b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_CUSTOMREQUEST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_CUSTOMREQUEST 3 "June 21, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_CUSTOMREQUEST \- custom string for request .SH SYNOPSIS @@ -88,7 +89,19 @@ NULL .SH PROTOCOLS HTTP, FTP, IMAP, POP3 and SMTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* DELETE the given path */ + curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY IMAP is supported since 7.30.0, POP3 since 7.26.0 and SMTP since 7.34.0. .SH RETURN VALUE @@ -96,3 +109,4 @@ Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" .BR CURLOPT_HTTPHEADER "(3), " CURLOPT_NOBODY "(3), " +.BR CURLOPT_REQUEST_TARGET "(3), " diff --git a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 index 27b9cbb..6253302 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 +++ b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DEBUGDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DEBUGDATA 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DEBUGDATA \- custom pointer for debug callback .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 index 535c530..b491c1c 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DEBUGFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DEBUGFUNCTION 3 "October 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DEBUGFUNCTION \- debug callback .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 b/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 index a39c6b3..20ba393 100644 --- a/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 +++ b/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DEFAULT_PROTOCOL 3 "18 Aug 2015" "libcurl 7.45.0" "curl_easy_setopt options" +.TH CURLOPT_DEFAULT_PROTOCOL 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DEFAULT_PROTOCOL \- default protocol to use if the URL is missing a scheme name diff --git a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 index 07b8ac3..26c3a5a 100644 --- a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 +++ b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DIRLISTONLY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DIRLISTONLY 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DIRLISTONLY \- ask for names only in a directory listing .SH SYNOPSIS @@ -51,7 +52,19 @@ will effectively break that feature then. .SH PROTOCOLS FTP, SFTP and POP3 .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/"); + + /* list only */ + curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, 1L); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option was known as CURLOPT_FTPLISTONLY up to 7.16.4. POP3 is supported since 7.21.5. diff --git a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 index 0607410..4dc7731 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "December 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries .SH SYNOPSIS @@ -47,10 +48,27 @@ address for a certain small amount of time into the future. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* only reuse addresses for a very short time */ + curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, 2L); + + ret = curl_easy_perform(curl); + + /* in this second request, the cache will not be used if more than + two seconds have passed since the previous name resolve */ + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" .BR CURLOPT_DNS_USE_GLOBAL_CACHE "(3), " CURLOPT_DNS_SERVERS "(3), " +.BR CURLOPT_RESOLVE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 index 8df700a..8105451 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_INTERFACE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_INTERFACE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DNS_INTERFACE \- set interface to speak DNS over .SH SYNOPSIS @@ -39,7 +40,15 @@ option. NULL .SH PROTOCOLS .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_DNS_INTERFACE, "eth0"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.33.0. This option also requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 index 1c4470e..c995ef5 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_LOCAL_IP4 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_LOCAL_IP4 3 "December 10, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to .SH SYNOPSIS @@ -40,7 +41,15 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP4, "192.168.0.14"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. @@ -51,4 +60,4 @@ Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, CURLE_NOT_BUILT_IN if support was disabled at compile-time, or CURLE_BAD_FUNCTION_ARGUMENT when given a bad address. .SH "SEE ALSO" -.BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), " +.BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP6 "(3), " diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 index 3c78347..17c32c2 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_LOCAL_IP6 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_LOCAL_IP6 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to .SH SYNOPSIS @@ -40,7 +41,15 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, "fe80::a9ff:fe46:b619"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. diff --git a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 index 522eabc..94c8505 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_SERVERS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_SERVERS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DNS_SERVERS \- set preferred DNS servers .SH SYNOPSIS @@ -44,7 +45,15 @@ NULL - use system default .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_DNS_SERVERS, "192.168.1.100:53,192.168.1.101"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. diff --git a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 index 87f686a..4c88127 100644 --- a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 +++ b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache .SH SYNOPSIS @@ -41,7 +42,17 @@ to using the share interface instead! See \fICURLOPT_SHARE(3)\fP and .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* switch off the use of a global, thread unsafe, cache */ + curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 0L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Subject for removal in the future. Do not use! .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 index 117ed3b..3e4797f 100644 --- a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 +++ b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_EGDSOCKET 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_EGDSOCKET 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_EGDSOCKET \- set EGD socket path .SH SYNOPSIS @@ -38,7 +39,15 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_EGDSOCKET, "/var/egd.socket"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If built TLS enabled. Only the OpenSSL and GnuTLS backends will use this. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 index b64a2a3..2e7efa8 100644 --- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 +++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ERRORBUFFER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_ERRORBUFFER 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_ERRORBUFFER \- set error buffer for error messages .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 index 10f3c06..e74f42f 100644 --- a/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_EXPECT_100_TIMEOUT_MS \- timeout for Expect: 100-continue response .SH SYNOPSIS @@ -40,7 +41,17 @@ sent anyway. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* wait 3 seconds for 100-continue */ + curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, 3000L); + + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.36.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FAILONERROR.3 b/docs/libcurl/opts/CURLOPT_FAILONERROR.3 index 93d8ba6..8f57c99 100644 --- a/docs/libcurl/opts/CURLOPT_FAILONERROR.3 +++ b/docs/libcurl/opts/CURLOPT_FAILONERROR.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FAILONERROR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FAILONERROR 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FAILONERROR \- request failure on HTTP response >= 400 .SH SYNOPSIS @@ -41,15 +42,26 @@ detected, like when a "100-continue" is received as a response to a POST/PUT and a 401 or 407 is received immediately afterwards. When this option is used and an error is detected, it will cause the -connection to get closed. +connection to get closed and \fICURLE_HTTP_RETURNED_ERROR\fP is returned. .SH DEFAULT 0, do not fail on error .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L); + ret = curl_easy_perform(curl); + if(ret == CURLE_HTTP_RETURNED_ERROR) { + /* a HTTP response error problem */ + } +} +.fi .SH AVAILABILITY -Along with HTTP +Along with HTTP. .SH RETURN VALUE Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLOPT_FILETIME.3 b/docs/libcurl/opts/CURLOPT_FILETIME.3 index 99ba7f7..df5773c 100644 --- a/docs/libcurl/opts/CURLOPT_FILETIME.3 +++ b/docs/libcurl/opts/CURLOPT_FILETIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FILETIME 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FILETIME 3 "April 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FILETIME \- get the modification time of the remote resource .SH SYNOPSIS @@ -38,7 +39,24 @@ argument can be used after a transfer to extract the received time (if any). .SH PROTOCOLS HTTP, FTP, SFTP, FILE .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, url); + /* Ask for filetime */ + curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); + if((CURLE_OK == res) && (filetime >= 0)) { + time_t file_time = (time_t)filetime; + printf("filetime %s: %s", filename, ctime(&file_time)); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always, for SFTP since 7.49.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 index 236c19d..537d4c5 100644 --- a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 +++ b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FNMATCH_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FNMATCH_DATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FNMATCH_DATA \- custom pointer to fnmatch callback .SH SYNOPSIS @@ -37,7 +38,25 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +static int my_fnmatch(void *clientp, + const char *pattern, const char *string) +{ + struct local_stuff *data = (struct local_stuff *)clientp; + if(string_match(pattern, string)) + return CURL_FNMATCHFUNC_MATCH; + else + return CURL_FNMATCHFUNC_NOMATCH; +} + +{ + struct local_stuff local_data; + curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.example.com/file*"); + curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 1L); + curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION, my_fnmatch); + curl_easy_setopt(curl, CURLOPT_FNMATCH_DATA, &local_data); +} +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 index 04967b8..43f256a 100644 --- a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FNMATCH_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FNMATCH_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback .SH SYNOPSIS @@ -47,7 +48,25 @@ NULL == an internal function for wildcard matching. .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +static int my_fnmatch(void *clientp, + const char *pattern, const char *string) +{ + struct local_stuff *data = (struct local_stuff *)clientp; + if(string_match(pattern, string)) + return CURL_FNMATCHFUNC_MATCH; + else + return CURL_FNMATCHFUNC_NOMATCH; +} + +{ + struct local_stuff local_data; + curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.example.com/file*"); + curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 1L); + curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION, my_fnmatch); + curl_easy_setopt(curl, CURLOPT_FNMATCH_DATA, &local_data); +} +.fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 index 094ee05..5422bea 100644 --- a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 +++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FOLLOWLOCATION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FOLLOWLOCATION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 index b8464df..48e5c7c 100644 --- a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 +++ b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FORBID_REUSE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FORBID_REUSE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FORBID_REUSE \- make connection get closed at once after use .SH SYNOPSIS @@ -41,7 +42,16 @@ Set to 0 to have libcurl keep the connection open for possible later re-use .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +{ + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 1L); + curl_easy_perform(curl); + + /* this second transfer may not reuse the same connection */ + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 index ce6e6fe..9760c9a 100644 --- a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 +++ b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FRESH_CONNECT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FRESH_CONNECT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FRESH_CONNECT \- force a new connection to be used .SH SYNOPSIS @@ -43,7 +44,14 @@ Set \fIfresh\fP to 0 to have libcurl attempt re-using an existing connection .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +{ + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1L); + /* this transfer must use a new connection, not reuse an existing */ + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTPPORT.3 b/docs/libcurl/opts/CURLOPT_FTPPORT.3 index 0f2a9f7..8251a0c 100644 --- a/docs/libcurl/opts/CURLOPT_FTPPORT.3 +++ b/docs/libcurl/opts/CURLOPT_FTPPORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTPPORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTPPORT 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTPPORT \- make FTP transfer active .SH SYNOPSIS @@ -65,7 +66,15 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt"); + curl_easy_setopt(curl, CURLOPT_FTPPORT, "-"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Port range support was added in 7.19.5 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 index 5437b0c..c199bd9 100644 --- a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTPSSLAUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTPSSLAUTH 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTPSSLAUTH \- set order in which to attempt TLS vs SSL when using FTP .SH SYNOPSIS @@ -44,7 +45,17 @@ CURLFTPAUTH_DEFAULT .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt"); + curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY); + /* funny server, ask for SSL before TLS */ + curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.12.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 index 5422a6b..efc0c70 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_ACCOUNT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_ACCOUNT 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_ACCOUNT \- set account info for FTP .SH SYNOPSIS @@ -39,7 +40,18 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); + + curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.13.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 index cd444b6..4b6415d 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_ALTERNATIVE_TO_USER \- command to use instead of USER with FTP .SH SYNOPSIS @@ -43,7 +44,18 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); + + curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "two users"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.15.5 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 index d28a646..6a5c842 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP .SH SYNOPSIS @@ -59,7 +60,18 @@ CURLFTP_CREATE_DIR_NONE (0) .SH PROTOCOLS FTP and SFTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/non-existing/new.txt"); + curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, + CURLFTP_CREATE_DIR_RETRY); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.10.7. SFTP support added in 7.16.3. The retry option was added in 7.19.4. diff --git a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 index 280e8f1..4ec634a 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_FILEMETHOD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_FILEMETHOD 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_FILEMETHOD \- select directory traversing method for FTP .SH SYNOPSIS @@ -53,7 +54,18 @@ CURLFTPMETHOD_MULTICWD .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/1/2/3/4/new.txt"); + curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, + CURLFTPMETHOD_SINGLECWD); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.15.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 index 45ec304..eea39bb 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "October 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response .SH SYNOPSIS @@ -40,11 +41,23 @@ None .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt"); + /* wait no more than 23 seconds */ + curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, 23L); + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.10.8 .SH RETURN VALUE -Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not. +Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not. Returns +CURLE_BAD_FUNCTION_ARGUMENT if set to a negative value or a value that when +converted to milliseconds is too large. .SH "SEE ALSO" .BR CURLOPT_TIMEOUT "(3), " CURLOPT_CONNECTTIMEOUT "(3), " .BR CURLOPT_LOW_SPEED_LIMIT "(3), " diff --git a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 index b60c3b1..46e630d 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_SKIP_PASV_IP 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_SKIP_PASV_IP 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_SKIP_PASV_IP \- ignore the IP address in the PASV response .SH SYNOPSIS @@ -43,7 +44,18 @@ This option has no effect if PORT, EPRT or EPSV is used instead of PASV. .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt"); + + /* please ignore the IP in the PASV response */ + curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 1L); + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.14.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 index 4737114..488a02f 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_SSL_CCC 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_SSL_CCC 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth .SH SYNOPSIS @@ -45,7 +46,17 @@ CURLFTPSSL_CCC_NONE .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt"); + curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL); + /* go back to clear-text FTP after authenticating */ + curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.16.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 index 181f5a1..feee2c5 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_USE_EPRT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_USE_EPRT 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_USE_EPRT \- enable/disable use of EPRT with FTP .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 index af7a45e..0ad62d0 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_USE_EPSV 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_USE_EPSV 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_USE_EPSV \- enable/disable use of EPSV .SH SYNOPSIS @@ -39,7 +40,19 @@ If the server is an IPv6 host, this option will have no effect as of 7.12.3. .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt"); + + /* let's shut off this modern feature */ + curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Along with FTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 index 10f713b..f2e2ab4 100644 --- a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 +++ b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_FTP_USE_PRET 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_FTP_USE_PRET 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_FTP_USE_PRET \- enable the PRET command .SH SYNOPSIS @@ -37,7 +38,19 @@ no effect when using the active FTP transfers mode. .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt"); + + /* a drftpd server, do it! */ + curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, 1L); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 index 65ea6ec..44d1928 100644 --- a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 +++ b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_GSSAPI_DELEGATION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_GSSAPI_DELEGATION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation .SH SYNOPSIS @@ -28,18 +29,30 @@ CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long level); .SH DESCRIPTION -Set the long parameter \fIlevel\fP to CURLGSSAPI_DELEGATION_FLAG to allow -unconditional GSSAPI credential delegation. The delegation is disabled by -default since 7.21.7. Set the parameter to CURLGSSAPI_DELEGATION_POLICY_FLAG -to delegate only if the OK-AS-DELEGATE flag is set in the service ticket in -case this feature is supported by the GSS-API implementation and the definition -of GSS_C_DELEG_POLICY_FLAG was available at compile-time. +Set the long parameter \fIlevel\fP to \fBCURLGSSAPI_DELEGATION_FLAG\fP to +allow unconditional GSSAPI credential delegation. The delegation is disabled +by default since 7.21.7. Set the parameter to +\fBCURLGSSAPI_DELEGATION_POLICY_FLAG\fP to delegate only if the OK-AS-DELEGATE +flag is set in the service ticket in case this feature is supported by the +GSS-API implementation and the definition of GSS_C_DELEG_POLICY_FLAG was +available at compile-time. .SH DEFAULT CURLGSSAPI_DELEGATION_NONE .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* delegate if okayed by policy */ + curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION, + CURLGSSAPI_DELEGATION_POLICY_FLAG); + ret = curl_easy_perform(curl); +} +.fi + .SH AVAILABILITY Added in 7.22.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 new file mode 100644 index 0000000..8510d3e --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 @@ -0,0 +1,60 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "February 21, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS \- head start for ipv6 for happy eyeballs +.SH SYNOPSIS +#include + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, long timeout); +.SH DESCRIPTION +Happy eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6 +addresses for dual-stack hosts, preferring IPv6 first for \fItimeout\fP +milliseconds. If the IPv6 address cannot be connected to within that time then +a connection attempt is made to the IPv4 address in parallel. The first +connection to be established is the one that is used. + +The range of suggested useful values for \fItimeout\fP is limited. Happy +Eyeballs RFC 6555 says "It is RECOMMENDED that connection attempts be paced +150-250 ms apart to balance human factors against network load." libcurl +currently defaults to 200 ms. Firefox and Chrome currently default to 300 ms. +.SH DEFAULT +CURL_HET_DEFAULT (currently defined as 200L) +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + curl_easy_setopt(curl, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, 300L); + + curl_easy_perform(curl); + + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi +.SH AVAILABILITY +Added in 7.59.0 +.SH RETURN VALUE +Returns CURLE_OK diff --git a/docs/libcurl/opts/CURLOPT_HEADER.3 b/docs/libcurl/opts/CURLOPT_HEADER.3 index b650163..7d352d5 100644 --- a/docs/libcurl/opts/CURLOPT_HEADER.3 +++ b/docs/libcurl/opts/CURLOPT_HEADER.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADER 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HEADER 3 "February 16, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HEADER \- pass headers to the data stream .SH SYNOPSIS @@ -28,14 +29,20 @@ CURLOPT_HEADER \- pass headers to the data stream CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADER, long onoff); .SH DESCRIPTION -Pass in \fIonoff\fP set to 1 to tell the library to include the header in the -body output for requests with this \fIhandle\fP. This option is relevant for -protocols that actually have headers or other meta-data (like HTTP and FTP). +Pass the long value \fIonoff\fP set to 1 to ask libcurl to include the headers +in the write callback (\fICURLOPT_WRITEFUNCTION(3)\fP). This option is +relevant for protocols that actually have headers or other meta-data (like +HTTP and FTP). -When asking to get the header info passed to the same callback as the body, it -is not possible to accurately separate them again without detailed knowledge +When asking to get the headers passed to the same callback as the body, it is +not possible to accurately separate them again without detailed knowledge about the protocol in use. +Further: the \fCURLOPT_WRITEFUNCTION(3)\fP callback is limited to only ever +get a maximum of \fICURL_MAX_WRITE_SIZE\fP bytes passed to it (16KB), while a +header can be longer and the \fICURLOPT_HEADERFUNCTION(3)\fP supports getting +called with headers up to \fICURL_MAX_HTTP_HEADER\fP bytes big (100KB). + It is often better to use \fICURLOPT_HEADERFUNCTION(3)\fP to get the header data separately. diff --git a/docs/libcurl/opts/CURLOPT_HEADERDATA.3 b/docs/libcurl/opts/CURLOPT_HEADERDATA.3 index c865c86..014e323 100644 --- a/docs/libcurl/opts/CURLOPT_HEADERDATA.3 +++ b/docs/libcurl/opts/CURLOPT_HEADERDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADERDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HEADERDATA 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HEADERDATA \- pointer to pass to header callback .SH SYNOPSIS @@ -41,7 +42,35 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +struct my_info { + int shoesize; + char *secret; +}; + +static size_t header_callback(char *buffer, size_t size, + size_t nitems, void *userdata) +{ + struct my_info *i = (struct my_info *)userdata; + + /* now this callback can access the my_info struct */ + + return nitems * size; +} + +CURL *curl = curl_easy_init(); +if(curl) { + struct my_info my = { 10, "the cookies are in the cupboard" }; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback); + + /* pass in custom data to the callback */ + curl_easy_setopt(curl, CURLOPT_HEADERDATA, &my); + + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 index b8596d8..fe7febc 100644 --- a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADERFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HEADERFUNCTION 3 "February 16, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HEADERFUNCTION \- callback that receives header data .SH SYNOPSIS @@ -74,6 +75,11 @@ the trailer. For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get called with the server responses to the commands that libcurl sends. +.SH LIMITATIONS +libcurl does not unfold HTTP "folded headers" (deprecated since RFC 7230). A +folded header is a header that continues on a subsequent line and starts with +a whitespace. Such folds will be passed to the header callback as a separate +one, although strictly it is just a continuation of the previous line. .SH DEFAULT Nothing. .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 b/docs/libcurl/opts/CURLOPT_HEADEROPT.3 index 7053a3a..79ba6d0 100644 --- a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 +++ b/docs/libcurl/opts/CURLOPT_HEADEROPT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HEADEROPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HEADEROPT 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HEADEROPT \- set how to send HTTP headers .SH SYNOPSIS @@ -48,7 +49,24 @@ CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then) .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + struct curl_slist *list; + list = curl_slist_append(NULL, "Shoesize: 10"); + list = curl_slist_append(list, "Accept:"); + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080"); + + /* HTTPS over a proxy makes a separate CONNECT to the proxy, so tell + libcurl to not send the custom headers to the proxy. Keep them + separate! */ + curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.37.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 index 17f1dd3..6ee762f 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP200ALIASES 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP200ALIASES 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTP200ALIASES \- specify alternative matches for HTTP 200 OK .SH SYNOPSIS @@ -49,7 +50,20 @@ NULL .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + struct curl_slist *list; + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + list = curl_slist_append(NULL, "ICY 200 OK"); + list = curl_slist_append(list, "WEIRDO 99 FINE"); + + curl_easy_setopt(curl, CURLOPT_HTTP200ALIASES, list); + curl_easy_perform(curl); + curl_slist_free_all(list); /* free the list again */ +} +.fi .SH AVAILABILITY Added in 7.10.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 index fc7a3a4..ac7eca2 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPAUTH 3 "2 Aug 2014" "libcurl 7.38.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPAUTH 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try .SH SYNOPSIS @@ -99,7 +100,17 @@ CURLAUTH_BASIC .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* allow whatever auth the server speaks */ + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); + curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond"); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Option Added in 7.10.6. diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3 b/docs/libcurl/opts/CURLOPT_HTTPGET.3 index 01de1f3..e9d9c40 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPGET.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPGET 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPGET 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTPGET \- ask for a HTTP GET request .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 index c5ccb1a..3708144 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPHEADER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPHEADER 3 "January 23, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTPHEADER \- set custom HTTP headers .SH SYNOPSIS @@ -77,6 +78,16 @@ the headers. They may be private or otherwise sensitive to leak. Use \fICURLOPT_HEADEROPT(3)\fP to make the headers only get sent to where you intend them to get sent. + +Custom headers are sent in all requests done by the easy handles, which +implies that if you tell libcurl to follow redirects +(\fICURLOPT_FOLLOWLOCATION(3)\fP), the same set of custom headers will be sent +in the subsequent request. Redirects can of course go to other hosts and thus +those servers will get all the contents of your custom headers too. + +Starting in 7.58.0, libcurl will specifically prevent "Authorization:" headers +from being sent to other hosts than the first used one, unless specifically +permitted with the \fICURLOPT_UNRESTRICTED_AUTH(3)\fP option. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 b/docs/libcurl/opts/CURLOPT_HTTPPOST.3 index 974f9f3..7957820 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPPOST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPPOST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPPOST 3 "September 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTPPOST \- specify the multipart formpost content .SH SYNOPSIS @@ -42,6 +43,9 @@ You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP. When setting \fICURLOPT_HTTPPOST(3)\fP, it will automatically set \fICURLOPT_NOBODY(3)\fP to 0. + +This option is deprecated! Do not use it. Use \fICURLOPT_MIMEPOST(3)\fP +instead after having prepared mime data. .SH DEFAULT NULL .SH PROTOCOLS @@ -71,9 +75,9 @@ curl_formadd(&formpost, CURLFORM_END); .fi .SH AVAILABILITY -As long as HTTP is enabled +As long as HTTP is enabled. Deprecated in 7.56.0. .SH RETURN VALUE Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" -.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_POST "(3), " -.BR curl_formadd "(3), " curl_formfree "(3), " +.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_POST "(3), " CURLOPT_MIMEPOST "(3)," +.BR curl_formadd "(3), " curl_formfree "(3), " curl_mime_init "(3)" diff --git a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 index 6b48a05..8c3a288 100644 --- a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 +++ b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTPPROXYTUNNEL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTPPROXYTUNNEL 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy .SH SYNOPSIS @@ -28,24 +29,38 @@ CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPROXYTUNNEL, long tunnel); .SH DESCRIPTION -Set the parameter to 1 to make libcurl tunnel all operations through the HTTP -proxy. There is a big difference between using a proxy and to tunnel through -it. If you don't know what this means, you probably don't want this tunneling -option. +Set the \fBtunnel\fP parameter to 1L to make libcurl tunnel all operations +through the HTTP proxy (set with \fICURLOPT_PROXY(3)\fP). There is a big +difference between using a proxy and to tunnel through it. -Tunneling essentially means that a CONNECT is sent to the proxy, asking it to -connect to a remote host on a specific port number and then the traffic is -just passed through the proxy. Proxies tend to whitelist specific port numbers +Tunneling means that a HTTP CONNECT request is sent to the proxy, asking it +to connect to a remote host on a specific port number and then the traffic is +just passed through the proxy. Proxies tend to white-list specific port numbers it allows CONNECT requests to and often only port 80 and 443 are allowed. -When using this, it only makes sense to use \fICURLOPT_PROXYTYPE(3)\fP set to -a HTTP proxy. +To suppress proxy CONNECT response headers from user callbacks use +\fICURLOPT_SUPPRESS_CONNECT_HEADERS(3)\fP. + +HTTP proxies can generally only speak HTTP (for obvious reasons), which makes +libcurl convert non-HTTP requests to HTTP when using an HTTP proxy without +this tunnel option set. For example, asking for an FTP URL and specifying an +HTTP proxy will make libcurl send an FTP URL in a HTTP GET request to the +proxy. By instead tunneling through the proxy, you avoid that conversion (that +rarely works through the proxy anyway). .SH DEFAULT 0 .SH PROTOCOLS All network protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1:80"); + curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 index 9338b24..56dc547 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP_CONTENT_DECODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP_CONTENT_DECODING 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTP_CONTENT_DECODING \- enable/disable HTTP content decoding .SH SYNOPSIS @@ -39,7 +40,15 @@ default content decoding but requires you to use .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.16.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 index ddd59d2..4766056 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTP_TRANSFER_DECODING \- enable/disable HTTP transfer decoding .SH SYNOPSIS @@ -39,7 +40,15 @@ option is set to zero. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.16.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 index 96dd4b6..c1de4ff 100644 --- a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 +++ b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_HTTP_VERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_HTTP_VERSION 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use .SH SYNOPSIS @@ -64,7 +65,18 @@ CURL_HTTP_VERSION_NONE .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS); + ret = curl_easy_perform(curl); + if(ret == CURLE_HTTP_RETURNED_ERROR) { + /* a HTTP response error problem */ + } +} +.fi .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 index 413ee57..f027243 100644 --- a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 +++ b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_IGNORE_CONTENT_LENGTH \- ignore content length .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE.3 index 088f45d..6ab2007 100644 --- a/docs/libcurl/opts/CURLOPT_INFILESIZE.3 +++ b/docs/libcurl/opts/CURLOPT_INFILESIZE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INFILESIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_INFILESIZE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_INFILESIZE \- set size of the input file to send off .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 index f866cd4..c988e58 100644 --- a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INFILESIZE_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_INFILESIZE_LARGE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_INFILESIZE_LARGE \- set size of the input file to send off .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_INTERFACE.3 index 8b7aff0..9b1dfab 100644 --- a/docs/libcurl/opts/CURLOPT_INTERFACE.3 +++ b/docs/libcurl/opts/CURLOPT_INTERFACE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INTERFACE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_INTERFACE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_INTERFACE \- source interface for outgoing traffic .SH SYNOPSIS @@ -48,7 +49,18 @@ NULL, use whatever the TCP stack finds suitable .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + curl_easy_setopt(curl, CURLOPT_INTERFACE, "eth0"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY The "if!" and "host!" syntax was added in 7.24.0. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 index b47d21d..272c28f 100644 --- a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 +++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,23 +20,37 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INTERLEAVEDATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_INTERLEAVEDATA 3 "September 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME -CURLOPT_INTERLEAVEDATA \- custom pointer to RTSP interleave callback +CURLOPT_INTERLEAVEDATA \- custom pointer passed to RTSP interleave callback .SH SYNOPSIS #include CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEDATA, void *pointer); .SH DESCRIPTION This is the userdata \fIpointer\fP that will be passed to -\fICURLOPT_INTERLEAVEFUNCTION(3)\fP when interleaved RTP data is -received. +\fICURLOPT_INTERLEAVEFUNCTION(3)\fP when interleaved RTP data is received. If +the interleave function callback is not set, this pointer is not used +anywhere. .SH DEFAULT NULL .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *user) +{ + struct local *l = (struct local *)user; + /* take care of the packet in 'ptr', then return... */ + return size * nmemb; +} +{ + struct local rtp_data; + curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write); + curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 index 95e6fe5..e036478 100644 --- a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_INTERLEAVEFUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_INTERLEAVEFUNCTION 3 "September 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data .SH SYNOPSIS @@ -54,15 +55,31 @@ connection may close. The application may use \fICURL_RTSPREQ_RECEIVE\fP to service RTP data when no requests are desired. If the application makes a request, (e.g. \fICURL_RTSPREQ_PAUSE\fP) then the response handler will process any pending RTP data before marking the request as finished. + +The \fICURLOPT_WRITEDATA(3)\fP is passed in the \fIuserdata\fP argument in the +callback. .SH DEFAULT -NULL +NULL, the interleave data is then passed to the regular write function: +\fICURLOPT_WRITEFUNCTION(3)\fP. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *user) +{ + struct local *l = (struct local *)user; + /* take care of the packet in 'ptr', then return... */ + return size * nmemb; +} +{ + struct local rtp_data; + curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write); + curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" -.BR CURLOPT_INTERLEAVEFUNCTION "(3), " CURLOPT_RTSP_REQUEST "(3), " +.BR CURLOPT_INTERLEAVEDATA "(3), " CURLOPT_RTSP_REQUEST "(3), " diff --git a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 index 0ef96e2..2c9948c 100644 --- a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 +++ b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IOCTLDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_IOCTLDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_IOCTLDATA \- custom pointer passed to I/O callback .SH SYNOPSIS @@ -35,7 +36,23 @@ By default, the value of this parameter is NULL. .SH PROTOCOLS Used with HTTP .SH EXAMPLE -TODO +.nf +static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp) +{ + struct data *io = (struct data *)clientp; + if(cmd == CURLIOCMD_RESTARTREAD) { + lseek(fd, 0, SEEK_SET); + current_offset = 0; + return CURLIOE_OK; + } + return CURLIOE_UNKNOWNCMD; +} +{ + struct data ioctl_data; + curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctl_callback); + curl_easy_setopt(curl, CURLOPT_IOCTLDATA, &ioctl_data); +} +.fi .SH AVAILABILITY Added in 7.12.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 index f2dd42e..eba85e1 100644 --- a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IOCTLFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_IOCTLFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_IOCTLFUNCTION \- callback for I/O operations .SH SYNOPSIS @@ -67,7 +68,23 @@ By default, this parameter is set to NULL. Not used. .SH PROTOCOLS Used with HTTP .SH EXAMPLE -TODO +.nf +static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp) +{ + struct data *io = (struct data *)clientp; + if(cmd == CURLIOCMD_RESTARTREAD) { + lseek(fd, 0, SEEK_SET); + current_offset = 0; + return CURLIOE_OK; + } + return CURLIOE_UNKNOWNCMD; +} +{ + struct data ioctl_data; + curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctl_callback); + curl_easy_setopt(curl, CURLOPT_IOCTLDATA, &ioctl_data); +} +.fi .SH AVAILABILITY Added in 7.12.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 index 817f34d..bb2bc5a 100644 --- a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 +++ b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_IPRESOLVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_IPRESOLVE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_IPRESOLVE \- specify which IP protocol version to use .SH SYNOPSIS @@ -42,7 +43,20 @@ CURL_IPRESOLVE_WHATEVER .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + /* resolve host name using IPv6-names only */ + curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi + .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 index 8919039..cf936cd 100644 --- a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 +++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_ISSUERCERT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_ISSUERCERT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_ISSUERCERT \- issuer SSL certificate filename .SH SYNOPSIS @@ -51,7 +52,15 @@ NULL .SH PROTOCOLS All TLS-based protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_ISSUERCERT, "/etc/certs/cacert.pem"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If built TLS enabled .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 index 277125b..2c74ff0 100644 --- a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 +++ b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "22 Sep 2016" "libcurl 7.51.0" "curl_easy_setopt options" +.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_KEEP_SENDING_ON_ERROR \- keep sending on early HTTP response >= 300 .SH SYNOPSIS @@ -43,7 +44,16 @@ Most applications do not need this option. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "sending data"); + curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, 1L); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Along with HTTP. Added in 7.51.0. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 index 45f6aca..2f0b872 100644 --- a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 +++ b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_KEYPASSWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_KEYPASSWD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_KEYPASSWD \- set passphrase to private key .SH SYNOPSIS @@ -40,7 +41,17 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "superman"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and CURLOPT_SSLCERTPASSWD up to 7.9.2. diff --git a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 index f23d72c..a276a55 100644 --- a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 +++ b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_KRBLEVEL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_KRBLEVEL 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_KRBLEVEL \- set FTP kerberos security level .SH SYNOPSIS @@ -41,7 +42,15 @@ NULL .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_KRBLEVEL, "private"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY This option was known as CURLOPT_KRB4LEVEL up to 7.16.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORT.3 b/docs/libcurl/opts/CURLOPT_LOCALPORT.3 index e56f012..4707b22 100644 --- a/docs/libcurl/opts/CURLOPT_LOCALPORT.3 +++ b/docs/libcurl/opts/CURLOPT_LOCALPORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOCALPORT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_LOCALPORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_LOCALPORT \- set local port number to use for socket .SH SYNOPSIS @@ -37,7 +38,17 @@ this option is set. Valid port numbers are 1 - 65535. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_LOCALPORT, 8080L); + /* and try 20 more ports following that */ + curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.15.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 index e54a1c8..3a8d3b8 100644 --- a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 +++ b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOCALPORTRANGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_LOCALPORTRANGE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_LOCALPORTRANGE \- number of additional local ports to try .SH SYNOPSIS @@ -41,7 +42,17 @@ setup failures. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_LOCALPORT, 8080L); + /* and try 20 more ports following that */ + curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.15.2 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 index 5688bb9..8a240d3 100644 --- a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOGIN_OPTIONS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_LOGIN_OPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_LOGIN_OPTIONS \- set login options .SH SYNOPSIS @@ -46,7 +47,15 @@ NULL .SH PROTOCOLS Only IMAP, POP3 and SMTP support login options. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/"); + curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.34.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 index 890ea72..aac176b 100644 --- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 +++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOW_SPEED_LIMIT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_LOW_SPEED_LIMIT 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_LOW_SPEED_LIMIT \- set low speed limit in bytes per second .SH SYNOPSIS @@ -37,7 +38,21 @@ slow and abort. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, url); + /* abort if slower than 30 bytes/sec during 60 seconds */ + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L); + res = curl_easy_perform(curl); + if(CURLE_OPERATION_TIMEDOUT == res) { + printf("Timeout!\\n"); + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 index ed3b829..c5b7ddf 100644 --- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 +++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_LOW_SPEED_TIME 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_LOW_SPEED_TIME 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_LOW_SPEED_TIME \- set low speed limit time period .SH SYNOPSIS @@ -36,7 +37,21 @@ library to consider it too slow and abort. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, url); + /* abort if slower than 30 bytes/sec during 60 seconds */ + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L); + res = curl_easy_perform(curl); + if(CURLE_OPERATION_TIMEDOUT == res) { + printf("Timeout!\\n"); + } + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 index ef91779..184883d 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAIL_AUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAIL_AUTH 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAIL_AUTH \- SMTP authentication address .SH SYNOPSIS @@ -51,7 +52,15 @@ NULL .SH PROTOCOLS SMTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/"); + curl_easy_setopt(curl, CURLOPT_MAIL_AUTH, ""); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.25.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 index 4283f90..096bbd2 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAIL_FROM 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAIL_FROM 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAIL_FROM \- SMTP sender address .SH SYNOPSIS @@ -44,7 +45,15 @@ blank .SH PROTOCOLS SMTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/"); + curl_easy_setopt(curl, CURLOPT_MAIL_FROM, "president@example.com"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 index 01fa62a..ca43f55 100644 --- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 +++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAIL_RCPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAIL_RCPT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAIL_RCPT \- list of SMTP mail recipients .SH SYNOPSIS @@ -51,7 +52,19 @@ NULL .SH PROTOCOLS SMTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + struct curl_slist *list; + list = curl_slist_append(NULL, "root@localhost"); + list = curl_slist_append(list, "person@example.com"); + curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/"); + curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, list); + ret = curl_easy_perform(curl); + curl_slist_free_all(list); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0. The VRFY and EXPN logic was added in 7.34.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 index 8e90a9d..66231fd 100644 --- a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 +++ b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAXCONNECTS 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAXCONNECTS \- maximum connection cache size .SH SYNOPSIS @@ -50,7 +51,16 @@ acknowledged, and you must instead use \fIcurl_multi_setopt(3)\fP and the .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* limit the connection cache for this handle to no more than 3 */ + curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 index 5f5959a..202fb41 100644 --- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 +++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXFILESIZE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAXFILESIZE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAXFILESIZE \- maximum file size allowed to download .SH SYNOPSIS @@ -43,7 +44,16 @@ None .SH PROTOCOLS FTP and HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* refuse to download if larger than 1000 bytes! */ + curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 1000L); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 index 630c0b5..b81a6ee 100644 --- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXFILESIZE_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAXFILESIZE_LARGE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAXFILESIZE_LARGE \- maximum file size allowed to download .SH SYNOPSIS @@ -43,7 +44,17 @@ None .SH PROTOCOLS FTP and HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_off_t ridiculous = 1 << 48; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* refuse to download if larger than ridiculous */ + curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, ridiculous); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.11.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 index ce62553..c4c59bc 100644 --- a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 +++ b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAXREDIRS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAXREDIRS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAXREDIRS \- maximum number of redirects allowed .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 index c99ff61..3ff0bd6 100644 --- a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAX_RECV_SPEED_LARGE \- rate limit data download speed .SH SYNOPSIS @@ -40,6 +41,16 @@ This option doesn't affect transfer speeds done with FILE:// URLs. .SH PROTOCOLS All but file:// .SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* cap the download speed to 31415 bytes/sec */ + curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t)31415); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.15.5 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 index 7f3efe5..ae26aaf 100644 --- a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_MAX_SEND_SPEED_LARGE \- rate limit data upload speed .SH SYNOPSIS @@ -41,7 +42,17 @@ This option doesn't affect transfer speeds done with FILE:// URLs. .SH PROTOCOLS All except file:// .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* cap the upload speed to 1000 bytes/sec */ + curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)1000); + /* (set some upload options as well!) */ + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.15.5 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_MIMEPOST.3 b/docs/libcurl/opts/CURLOPT_MIMEPOST.3 new file mode 100644 index 0000000..fbc42c7 --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_MIMEPOST.3 @@ -0,0 +1,53 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_MIMEPOST 3 "September 04, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_MIMEPOST \- set post/send data from mime structure +.SH SYNOPSIS +.nf +#include + +curl_mime *mime; + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MIMEPOST, mime); +.SH DESCRIPTION +Pass a mime handle previously obtained from \fIcurl_mime_init(3)\fP. + +This setting is supported by the HTTP protocol to post forms and by the +SMTP and IMAP protocols to provide the e-mail data to send/upload. + +This option is the preferred way of posting an HTTP form, replacing and +extending the deprecated \fICURLOPT_HTTPPOST(3)\fP option. +.SH PROTOCOLS +HTTP, SMTP, IMAP. +.SH AVAILABILITY +Since 7.56.0. +.SH RETURN VALUE +This will return CURLE_OK. +.SH EXAMPLE +Using this option implies the use of several mime structure building +functions: see https://curl.haxx.se/libcurl/c/smtp-mime.html for a complete +example. +.SH "SEE ALSO" +.BR curl_mime_init "(3)" diff --git a/docs/libcurl/opts/CURLOPT_NETRC.3 b/docs/libcurl/opts/CURLOPT_NETRC.3 index c453dd3..7723d6b 100644 --- a/docs/libcurl/opts/CURLOPT_NETRC.3 +++ b/docs/libcurl/opts/CURLOPT_NETRC.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NETRC 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NETRC 3 "August 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NETRC \- request that .netrc is used .SH SYNOPSIS @@ -30,7 +31,9 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC, long level); .SH DESCRIPTION This parameter controls the preference \fIlevel\fP of libcurl between using user names and passwords from your \fI~/.netrc\fP file, relative to user names -and passwords in the URL supplied with \fICURLOPT_URL(3)\fP. +and passwords in the URL supplied with \fICURLOPT_URL(3)\fP. On Windows, +libcurl will use the file as \fI%HOME%/_netrc\fP, but you can also tell +libcurl a different file name to use with \fICURLOPT_NETRC_FILE(3)\fP. libcurl uses a user name (and supplied or prompted password) supplied with \fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP in preference to any of @@ -64,10 +67,18 @@ CURL_NETRC_IGNORED .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/"); + curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" -.BR CURLOPT_USERPWD "(3), " CURLOPT_USERNAME "(3), " +.BR CURLOPT_USERPWD "(3), " CURLOPT_USERNAME "(3), ", CURLOPT_NETRC_FILE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 index b713256..32d4896 100644 --- a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 +++ b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NETRC_FILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NETRC_FILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NETRC_FILE \- file name to read .netrc info from .SH SYNOPSIS @@ -41,7 +42,16 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/"); + curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); + curl_easy_setopt(curl, CURLOPT_NETRC_FILE, "/tmp/magic-netrc"); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.10.9 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 index f195fab..c885ab8 100644 --- a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 +++ b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NEW_DIRECTORY_PERMS \- permissions for remotely created directories .SH SYNOPSIS @@ -39,7 +40,16 @@ this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP. .SH PROTOCOLS SFTP, SCP and FILE .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "sftp://upload.example.com/newdir/file.zip"); + curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L); + curl_easy_setopt(curl, CURLOPT_NEW_DIRECTORY_PERMS, 0644L); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.16.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 index 2a41aba..6283b2f 100644 --- a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 +++ b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NEW_FILE_PERMS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NEW_FILE_PERMS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NEW_FILE_PERMS \- permissions for remotely created files .SH SYNOPSIS @@ -39,7 +40,15 @@ this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP. .SH PROTOCOLS SFTP, SCP and FILE .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "sftp://upload.example.com/file.txt"); + curl_easy_setopt(curl, CURLOPT_NEW_FILE_PERMS, 0664L); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.16.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_NOBODY.3 b/docs/libcurl/opts/CURLOPT_NOBODY.3 index 340b9f4..9f072d3 100644 --- a/docs/libcurl/opts/CURLOPT_NOBODY.3 +++ b/docs/libcurl/opts/CURLOPT_NOBODY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOBODY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NOBODY 3 "June 21, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NOBODY \- do the download request without getting the body .SH SYNOPSIS @@ -44,10 +45,10 @@ curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - /* get us the resource without a body! */ + /* get us the resource without a body! */ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); - /* Perform the request */ + /* Perform the request */ curl_easy_perform(curl); } .fi @@ -57,3 +58,4 @@ Always Returns CURLE_OK .SH "SEE ALSO" .BR CURLOPT_HTTPGET "(3), " CURLOPT_POST "(3), " +.BR CURLOPT_REQUEST_TARGET "(3), " diff --git a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 index 8194a5e..95858e0 100644 --- a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 +++ b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOPROGRESS 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NOPROGRESS 3 "October 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NOPROGRESS \- switch off the progress meter .SH SYNOPSIS @@ -30,10 +31,8 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROGRESS, long onoff); .SH DESCRIPTION If \fIonoff\fP is to 1, it tells the library to shut off the progress meter completely for requests done with this \fIhandle\fP. It will also prevent the -\fICURLOPT_PROGRESSFUNCTION(3)\fP from getting called. - -Future versions of libcurl are likely to not have any built-in progress meter -at all. +\fICURLOPT_XFERINFOFUNCTION(3)\fP or \fICURLOPT_PROGRESSFUNCTION(3)\fP from +getting called. .SH DEFAULT 1, meaning it normally runs without a progress meter. .SH PROTOCOLS @@ -56,4 +55,6 @@ Always .SH RETURN VALUE Returns CURLE_OK. .SH "SEE ALSO" +.BR CURLOPT_XFERINFOFUNCTION "(3), " .BR CURLOPT_PROGRESSFUNCTION "(3), " +.BR CURLOPT_VERBOSE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_NOPROXY.3 b/docs/libcurl/opts/CURLOPT_NOPROXY.3 index 1048b55..f69eee2 100644 --- a/docs/libcurl/opts/CURLOPT_NOPROXY.3 +++ b/docs/libcurl/opts/CURLOPT_NOPROXY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOPROXY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NOPROXY 3 "March 03, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NOPROXY \- disable proxy use for specific hosts .SH SYNOPSIS @@ -37,14 +38,39 @@ hostname itself. For example, example.com would match example.com, example.com:80, and www.example.com, but not www.notanexample.com or example.com.othertld. +If the name in the noproxy list has a leading period, it is a domain match +against the provided host name. This way ".example.com" will switch off proxy +use for both "www.example.com" as well as for "foo.example.com". + +Setting the noproxy string to "" (an empty string) will explicitly enable the +proxy for all host names, even if there is an environment variable set for it. + +Enter IPv6 numerical addresses in the list of host names without enclosing +brackets: + + "example.com,::1,localhost" + The application does not have to keep the string around after setting this option. +.SH "Environment variables" +See \fICURLOPT_PROXY(3)\fP .SH DEFAULT NULL .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + /* accept various URLs */ + curl_easy_setopt(curl, CURLOPT_URL, input); + /* use this proxy */ + curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80"); + /* ... but make sure this host name is not proxied */ + curl_easy_setopt(curl, CURLOPT_NOPROXY, "www.example.com"); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.19.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 index dac0710..4afaf88 100644 --- a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 +++ b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_NOSIGNAL 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_NOSIGNAL 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_NOSIGNAL \- skip all signal handling .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 index 869b7f6..c4e2c2a 100644 --- a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 +++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_OPENSOCKETDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_OPENSOCKETDATA 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_OPENSOCKETDATA \- custom pointer passed to open socket callback .SH SYNOPSIS @@ -35,7 +36,44 @@ The default value of this parameter is NULL. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +/* make libcurl use the already established socket 'sockfd' */ + +static curl_socket_t opensocket(void *clientp, + curlsocktype purpose, + struct curl_sockaddr *address) +{ + curl_socket_t sockfd; + sockfd = *(curl_socket_t *)clientp; + /* the actual externally set socket is passed in via the OPENSOCKETDATA + option */ + return sockfd; +} + +static int sockopt_callback(void *clientp, curl_socket_t curlfd, + curlsocktype purpose) +{ + /* This return code was added in libcurl 7.21.5 */ + return CURL_SOCKOPT_ALREADY_CONNECTED; +} + +curl = curl_easy_init(); +if(curl) { + /* libcurl will internally think that you connect to the host + * and port that you specify in the URL option. */ + curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999"); + /* call this function to get a socket */ + curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket); + curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd); + + /* call this function to set options for the socket */ + curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback); + + res = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.17.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 index 314e0c4..6f912a5 100644 --- a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_OPENSOCKETFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_OPENSOCKETFUNCTION 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets .SH SYNOPSIS @@ -81,6 +82,44 @@ The default behavior is the equivalent of this: .SH PROTOCOLS All .SH EXAMPLE +.nf +/* make libcurl use the already established socket 'sockfd' */ + +static curl_socket_t opensocket(void *clientp, + curlsocktype purpose, + struct curl_sockaddr *address) +{ + curl_socket_t sockfd; + sockfd = *(curl_socket_t *)clientp; + /* the actual externally set socket is passed in via the OPENSOCKETDATA + option */ + return sockfd; +} + +static int sockopt_callback(void *clientp, curl_socket_t curlfd, + curlsocktype purpose) +{ + /* This return code was added in libcurl 7.21.5 */ + return CURL_SOCKOPT_ALREADY_CONNECTED; +} + +curl = curl_easy_init(); +if(curl) { + /* libcurl will internally think that you connect to the host + * and port that you specify in the URL option. */ + curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999"); + /* call this function to get a socket */ + curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket); + curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd); + + /* call this function to set options for the socket */ + curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback); + + res = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.17.1. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PASSWORD.3 index e9f6d06..a13374e 100644 --- a/docs/libcurl/opts/CURLOPT_PASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_PASSWORD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PASSWORD 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PASSWORD \- password to use in authentication .SH SYNOPSIS @@ -41,7 +42,18 @@ blank .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + curl_easy_setopt(curl, CURLOPT_PASSWORD, "qwerty"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 index 9b0d3d5..f666a79 100644 --- a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 +++ b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PATH_AS_IS 3 "17 Jun 2014" "libcurl 7.42.0" "curl_easy_setopt options" +.TH CURLOPT_PATH_AS_IS 3 "February 14, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PATH_AS_IS \- do not handle dot dot sequences .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 index 1951c88..cb08cd4 100644 --- a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 +++ b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PINNEDPUBLICKEY 3 "27 Aug 2014" "libcurl 7.38.0" "curl_easy_setopt options" +.TH CURLOPT_PINNEDPUBLICKEY 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PINNEDPUBLICKEY \- set pinned public key .SH SYNOPSIS @@ -95,7 +96,9 @@ footer: .SH AVAILABILITY PEM/DER support: - 7.39.0: OpenSSL, GnuTLS and GSKit + 7.39.0: OpenSSL, GnuTLS + + 7.39.0-7.48.0,7.58.1+: GSKit 7.43.0: NSS and wolfSSL/CyaSSL @@ -103,6 +106,10 @@ PEM/DER support: 7.49.0: PolarSSL + 7.54.1: SecureTransport/DarwinSSL on macOS 10.7+/iOS 10+ + + 7.58.1: SChannel/WinSSL + sha256 support: 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL @@ -111,6 +118,10 @@ sha256 support: 7.49.0: PolarSSL + 7.54.1: SecureTransport/DarwinSSL on macOS 10.7+/iOS 10+ + + 7.58.1: SChannel/WinSSL Windows XP SP3+ + Other SSL backends not supported. .SH RETURN VALUE Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or diff --git a/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 index 6d0f14e..e5e03f5 100644 --- a/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 +++ b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PIPEWAIT 3 "12 May 2015" "libcurl 7.43.0" "curl_easy_setopt options" +.TH CURLOPT_PIPEWAIT 3 "May 01, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PORT.3 b/docs/libcurl/opts/CURLOPT_PORT.3 index f47b243..2c84f83 100644 --- a/docs/libcurl/opts/CURLOPT_PORT.3 +++ b/docs/libcurl/opts/CURLOPT_PORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PORT \- set remote port number to work with .SH SYNOPSIS @@ -42,7 +43,15 @@ By default this is 0 which makes it not used. .SH PROTOCOLS Used for all protocols that speak to a port number. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_PORT, 8080L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_POST.3 b/docs/libcurl/opts/CURLOPT_POST.3 index 7754c7d..84a33d3 100644 --- a/docs/libcurl/opts/CURLOPT_POST.3 +++ b/docs/libcurl/opts/CURLOPT_POST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_POST 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_POST \- request a HTTP POST .SH SYNOPSIS @@ -68,7 +69,19 @@ re-used handle, you must explicitly set the new request type using .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_POST, 1L); + + /* set up the read callback with CURLOPT_READFUNCTION */ + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 index 17ec2d7..d52a4f0 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTFIELDS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_POSTFIELDS 3 "July 07, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_POSTFIELDS \- specify data to POST to server .SH SYNOPSIS @@ -52,8 +53,10 @@ the POST data from the read callback. If you want to send a zero-byte POST set \fICURLOPT_POSTFIELDS(3)\fP to an empty string, or set \fICURLOPT_POST(3)\fP to 1 and \fICURLOPT_POSTFIELDSIZE(3)\fP to 0. -Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. -You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual. +Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header, +and libcurl will add that header automatically if the POST is either known to +be larger than 1024 bytes or if the expected size is unknown. You can disable +this header with \fICURLOPT_HTTPHEADER(3)\fP as usual. To make multipart/formdata posts (aka RFC2388-posts), check out the \fICURLOPT_HTTPPOST(3)\fP option combined with \fIcurl_formadd(3)\fP. diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 index 8db05c6..4b55762 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTFIELDSIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_POSTFIELDSIZE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_POSTFIELDSIZE \- size of POST data pointed to .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 index 9d0c401..7725c60 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 index 3283a1a..75e2c62 100644 --- a/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTQUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_POSTQUOTE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer .SH SYNOPSIS @@ -39,7 +40,23 @@ NULL .SH PROTOCOLS SFTP and FTP .SH EXAMPLE -TODO +.nf +struct curl_slist *h = NULL; +h = curl_slist_append(h, "RNFR source-name"); +h = curl_slist_append(h, "RNTO new-name"); + +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); + + /* pass in the FTP commands to run after the transfer */ + curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If support for the protocols are built-in. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 b/docs/libcurl/opts/CURLOPT_POSTREDIR.3 index 07aea6e..7be0953 100644 --- a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 +++ b/docs/libcurl/opts/CURLOPT_POSTREDIR.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_POSTREDIR 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_POSTREDIR 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_POSTREDIR \- how to act on a HTTP POST redirect .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PREQUOTE.3 b/docs/libcurl/opts/CURLOPT_PREQUOTE.3 index 2e77e99..ac1cadc 100644 --- a/docs/libcurl/opts/CURLOPT_PREQUOTE.3 +++ b/docs/libcurl/opts/CURLOPT_PREQUOTE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,26 +20,45 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PREQUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PREQUOTE 3 "June 18, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME -CURLOPT_PREQUOTE \- commands to run before FTP or SFTP transfer +CURLOPT_PREQUOTE \- commands to run before an FTP transfer .SH SYNOPSIS #include CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE, struct curl_slist *cmds); .SH DESCRIPTION -Pass a pointer to a linked list of FTP or SFTP commands to pass to the server -after the transfer type is set. The linked list should be a fully valid list -of struct curl_slist structs properly filled in as described for +Pass a pointer to a linked list of FTP commands to pass to the server after +the transfer type is set. The linked list should be a fully valid list of +struct curl_slist structs properly filled in as described for \fICURLOPT_QUOTE(3)\fP. Disable this operation again by setting a NULL to this option. + +While \fICURLOPT_QUOTE(3)\fP and \fICURLOPT_POSTQUOTE(3)\fP work for SFTP, +this option does not. .SH DEFAULT NULL .SH PROTOCOLS -FTP and SFTP +FTP .SH EXAMPLE -TODO +.nf +struct curl_slist *h = NULL; +h = curl_slist_append(h, "SYST"); + +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); + + /* pass in the FTP commands to run */ + curl_easy_setopt(curl, CURLOPT_PREQUOTE, headerlist); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Along with the protocol support .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 b/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 index c5f6dcf..287dcf3 100644 --- a/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 +++ b/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PRE_PROXY 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PRE_PROXY 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PRE_PROXY \- set pre-proxy to use .SH SYNOPSIS @@ -61,7 +62,15 @@ single port number used widely for proxies. Specify it! .SH PROTOCOLS All except file://. Note that some protocols don't do very well over proxy. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/file.txt"); + curl_easy_setopt(curl, CURLOPT_PREPROXY, "socks4://socks-proxy:1080"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80"); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PRIVATE.3 b/docs/libcurl/opts/CURLOPT_PRIVATE.3 index 80f2c6b..5a31e3d 100644 --- a/docs/libcurl/opts/CURLOPT_PRIVATE.3 +++ b/docs/libcurl/opts/CURLOPT_PRIVATE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PRIVATE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PRIVATE 3 "December 08, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PRIVATE \- store a private pointer .SH SYNOPSIS @@ -31,7 +32,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRIVATE, void *pointer); Pass a void * as parameter, pointing to data that should be associated with this curl handle. The pointer can subsequently be retrieved using \fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself -never does nothing with this data. +never does anything with this data. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 index 7dc70f1..12fba23 100644 --- a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 +++ b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROGRESSDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROGRESSDATA 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROGRESSDATA \- custom pointer passed to the progress callback .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 index b077e3b..2b38fad 100644 --- a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROGRESSFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROGRESSFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROGRESSFUNCTION \- callback to progress meter function .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 index 4fecb81..8bf93a6 100644 --- a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 +++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROTOCOLS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROTOCOLS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROTOCOLS \- set allowed protocols .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PROXY.3 b/docs/libcurl/opts/CURLOPT_PROXY.3 index 65f84f5..6d12533 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY 3 "September 24, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY \- set proxy to use .SH SYNOPSIS @@ -65,10 +66,6 @@ an impact on what other features of the library you can use, such as tunnel through the HTTP proxy. Such tunneling is activated with \fICURLOPT_HTTPPROXYTUNNEL(3)\fP. -libcurl respects the environment variables \fBhttp_proxy\fP, \fBftp_proxy\fP, -\fBall_proxy\fP etc, if any of those are set. The \fICURLOPT_PROXY(3)\fP -option does however override any possibly set environment variables. - Setting the proxy string to "" (an empty string) will explicitly disable the use of a proxy, even if there is an environment variable set for it. @@ -77,6 +74,19 @@ user + password. The application does not have to keep the string around after setting this option. +.SH "Environment variables" +libcurl respects the proxy environment variables named \fBhttp_proxy\fP, +\fBftp_proxy\fP, \fBsftp_proxy\fP etc. If set, libcurl will use the specified +proxy for that URL scheme. So for a "FTP://" URL, the \fBftp_proxy\fP is +considered. \fBall_proxy\fP is used if no protocol specific proxy was set. + +If \fBno_proxy\fP (or \fBNO_PROXY\fP) is set, it can specify a list of host +names to not use a proxy for (even if one of the previous mention variables +are set). That is the exact equivalent of setting the \fICURLOPT_NOPROXY(3)\fP +option. + +The \fICURLOPT_PROXY(3)\fP and \fICURLOPT_NOPROXY(3)\fP options override +environment variables. .SH DEFAULT Default is NULL, meaning no proxy is used. @@ -85,7 +95,14 @@ single port number used widely for proxies. Specify it! .SH PROTOCOLS All except file://. Note that some protocols don't do very well over proxy. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/file.txt"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80"); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Since 7.14.1 the proxy environment variable names can include the protocol scheme. diff --git a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 index 24dbca5..e626191 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYAUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYAUTH 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try .SH SYNOPSIS @@ -43,7 +44,21 @@ CURLAUTH_BASIC .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* use this proxy */ + curl_easy_setopt(curl, CURLOPT_PROXY, "http://local.example.com:1080"); + /* allow whatever auth the proxy speaks */ + curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY); + /* set the proxy credentials */ + curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "james:007"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.10.7 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 index bfec629..4cf770b 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYHEADER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYHEADER 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXYHEADER \- custom HTTP headers to pass to proxy .SH SYNOPSIS @@ -48,7 +49,25 @@ NULL .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); + +struct curl_slist *list; + +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy.example.com:80"); + + list = curl_slist_append(NULL, "Shoesize: 10"); + list = curl_slist_append(list, "Accept:"); + + curl_easy_setopt(curl, CURLOPT_PROXYHEADER, list); + + curl_easy_perform(curl); + + curl_slist_free_all(list); /* free the list again */ +} +.fi .SH AVAILABILITY Added in 7.37.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 index c7fbb17..456bac3 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYPASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYPASSWORD 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXYPASSWORD \- password to use with proxy authentication .SH SYNOPSIS @@ -41,7 +42,17 @@ blank .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080"); + curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith"); + curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXYPORT.3 b/docs/libcurl/opts/CURLOPT_PROXYPORT.3 index 0e22289..cfd6610 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYPORT.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYPORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYPORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYPORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXYPORT \- port number the proxy listens on .SH SYNOPSIS @@ -39,7 +40,16 @@ than 65535. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_PROXY, "localhost"); + curl_easy_setopt(curl, CURLOPT_PROXYPORT, 8080L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 index 1985619..33aa01c 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYTYPE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXYTYPE \- proxy protocol type .SH SYNOPSIS @@ -56,7 +57,18 @@ CURLPROXY_HTTP .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "local.example.com:1080"); + /* set the proxy type */ + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 index 46ecac6..a8ae3b4 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYUSERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYUSERNAME 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication .SH SYNOPSIS @@ -45,7 +46,17 @@ blank .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080"); + curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith"); + curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 index ebfcfcc..26de326 100644 --- a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXYUSERPWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXYUSERPWD 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXYUSERPWD \- user name and password to use for proxy authentication .SH SYNOPSIS @@ -43,7 +44,16 @@ This is NULL by default. .SH PROTOCOLS Used with all protocols that can use a proxy .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080"); + curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "clark%20kent:superman"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 index 43bc32b..f19e2e1 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_CAINFO 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_CAINFO 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_CAINFO \- path to proxy Certificate Authority (CA) bundle .SH SYNOPSIS @@ -56,7 +57,17 @@ Built-in system specific .SH PROTOCOLS Used with HTTPS proxy .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* using a HTTPS proxy */ + curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443"); + curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 index dc317f0..d8dc42b 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_CAPATH 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_CAPATH 3 "September 10, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_CAPATH \- specify directory holding proxy CA certificates .SH SYNOPSIS @@ -31,8 +32,8 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAPATH, char *capath); Pass a char * to a zero terminated string naming a directory holding multiple CA certificates to verify the HTTPS proxy with. If libcurl is built against OpenSSL, the certificate directory must be prepared using the openssl c_rehash -utility. This makes sense only when \fICURLOPT_SSL_VERIFYPEER(3)\fP is enabled -(which it is by default). +utility. This makes sense only when \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is +enabled (which it is by default). The application does not have to keep the string around after setting this option. @@ -41,12 +42,23 @@ NULL .SH PROTOCOLS Everything used over an HTTPS proxy .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* using a HTTPS proxy */ + curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443"); + curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 -This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS -backend provides the option only for backward compatibility. +This option is supported by the OpenSSL, GnuTLS, PolarSSL and mbedTLS +(since 7.56.0) backends. The NSS backend provides the option only for +backward compatibility. .SH RETURN VALUE CURLE_OK if supported; or an error such as: @@ -56,5 +68,6 @@ CURLE_UNKNOWN_OPTION CURLE_OUT_OF_MEMORY .SH "SEE ALSO" -.BR CURLOPT_CAINFO "(3), " +.BR CURLOPT_PROXY_CAINFO "(3), " +.Br CURLOPT_CAINFO "(3), " CURLOPT_PROXY_SSL_VERIFYHOST "(3), " .BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 index 9a079a9..76a44e1 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_CRLFILE 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_CRLFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_CRLFILE \- specify a proxy Certificate Revocation List file .SH SYNOPSIS @@ -55,7 +56,16 @@ NULL .SH PROTOCOLS Used with HTTPS proxy. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:80"); + curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, "/etc/certs/crl.pem"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 index 50019e1..885016e 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_KEYPASSWD 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_KEYPASSWD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_KEYPASSWD \- set passphrase to proxy private key .SH SYNOPSIS @@ -42,7 +43,16 @@ NULL .SH PROTOCOLS Used with HTTPS proxy .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443"); + curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "superman"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 index ebe3d7f..bbbb06e 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "24 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_PINNEDPUBLICKEY \- set pinned public key for https proxy .SH SYNOPSIS @@ -48,7 +49,16 @@ NULL All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE .nf -TODO +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443"); + curl_easy_setopt(curl, CURLOPT_PROXY_PINNEDPUBLICKEY, + "sha256//YhKJKSzoTt2b5FP18fvpHo7fJYqQCjAa3HWY3tvRMwE=;sha256//t62CeU2tQiqkexU74Gxa2eg7fRbEgoChTociMee9wno="); + + /* Perform the request */ + curl_easy_perform(curl); +} .fi .SH PUBLIC KEY EXTRACTION If you do not have the https proxy server's public key file you can extract it diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 index 27467d9..102df16 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SERVICE_NAME 3 "17 Jun 2015" "libcurl 7.43.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SERVICE_NAME \- proxy authentication service name .SH SYNOPSIS @@ -39,7 +40,15 @@ See above .SH PROTOCOLS All network protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, "custom"); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.43.0 for HTTP proxies, 7.49.0 for SOCKS5 proxies. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 index c1b7f27..67936bf 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLCERT 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLCERT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSLCERT \- set SSL proxy client certificate .SH SYNOPSIS @@ -50,7 +51,18 @@ NULL .SH PROTOCOLS Used with HTTPS proxy .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 index 5e8aa4b..2e85d62 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLCERTTYPE 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLCERTTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSLCERTTYPE \- specify type of the proxy client SSL certificate .SH SYNOPSIS @@ -42,7 +43,19 @@ option. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "PEM"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 index b38f8c0..3c6cbb4 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLKEY 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLKEY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSLKEY \- specify private keyfile for TLS and SSL proxy client cert .SH SYNOPSIS @@ -44,7 +45,18 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 index 66e7ce8..673b29d 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLKEYTYPE 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLKEYTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSLKEYTYPE \- set type of the proxy private key file .SH SYNOPSIS @@ -38,7 +39,19 @@ option. .SH PROTOCOLS Used with HTTPS proxy .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM"); + curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 index f96a9e6..5c34eef 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSLVERSION 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSLVERSION 3 "January 10, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version .SH SYNOPSIS @@ -47,6 +48,28 @@ TLSv1.2 .IP CURL_SSLVERSION_TLSv1_3 TLSv1.3 .RE +The maximum TLS version can be set by using \fIone\fP of the +CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the +CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros. +The MAX macros are not supported for SSL backends axTLS or wolfSSL. +.RS +.IP CURL_SSLVERSION_MAX_DEFAULT +The flag defines the maximum supported TLS version as TLSv1.2, or the default +value from the SSL library. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_0 +The flag defines maximum supported TLS version as TLSv1.0. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_1 +The flag defines maximum supported TLS version as TLSv1.1. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_2 +The flag defines maximum supported TLS version as TLSv1.2. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_3 +The flag defines maximum supported TLS version as TLSv1.3. +(Added in 7.54.0) +.RE .SH DEFAULT CURL_SSLVERSION_DEFAULT .SH PROTOCOLS @@ -58,7 +81,7 @@ if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); /* ask libcurl to use TLS version 1.0 or later */ - curl_easy_setopt(curl, CURLOPT_PROXY_SSLVERSION, CURL_SSLVERSION_TLSv1); + curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); /* Perform the request */ curl_easy_perform(curl); diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 index 5cff16d..48b7b65 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSL_CIPHER_LIST \- specify ciphers to use for proxy TLS .SH SYNOPSIS @@ -58,7 +59,16 @@ NULL, use internal default .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost"); + curl_easy_setopt(curl, CURLOPT_PROXY_SSL_CIPHER_LIST, "TLSv1"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 index bed10da..3d9de26 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_OPTIONS 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSL_OPTIONS \- set proxy SSL behavior options .SH SYNOPSIS @@ -53,7 +54,18 @@ All .SH AVAILABLE Added in 7.52.0 .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + /* weaken TLS only for use with silly proxies */ + curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS, CURLSSLOPT_ALLOW_BEAST | + CURLSSLOPT_NO_REVOKE); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH RETURN VALUE Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. .SH "SEE ALSO" diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 index de4b15b..476438c 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "December 16, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSL_VERIFYHOST \- verify the proxy certificate's name against host .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 index 9473495..82fae8b 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "December 16, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_SSL_VERIFYPEER \- verify the proxy's SSL certificate .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 index b9b6232..711224d 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_TLSAUTH_PASSWORD \- password to use for proxy TLS authentication .SH SYNOPSIS @@ -40,7 +41,18 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 index 5a30a78..d1bd6db 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_TLSAUTH_TYPE \- set proxy TLS authentication methods .SH SYNOPSIS @@ -46,7 +47,18 @@ blank .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 index 3ba4ef9..2c20d07 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "16 Nov 2016" "libcurl 7.52.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_TLSAUTH_USERNAME \- user name to use for proxy TLS authentication .SH SYNOPSIS @@ -40,7 +41,18 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.52.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 index 2e5c33a..2e4435c 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY_TRANSFER_MODE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY_TRANSFER_MODE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY_TRANSFER_MODE \- append FTP transfer mode to URL for proxy .SH SYNOPSIS @@ -38,7 +39,17 @@ doing FTP via a proxy. Beware that not all proxies support this feature. .SH PROTOCOLS FTP over proxy .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:80"); + curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1L); + curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.18.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_PUT.3 b/docs/libcurl/opts/CURLOPT_PUT.3 index 87c6e06..36525ed 100644 --- a/docs/libcurl/opts/CURLOPT_PUT.3 +++ b/docs/libcurl/opts/CURLOPT_PUT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PUT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_PUT \- make a HTTP PUT request .SH SYNOPSIS @@ -38,8 +39,6 @@ This option is \fBdeprecated\fP since version 7.12.1. Use 0, disabled .SH PROTOCOLS HTTP -.SH EXAMPLE -TODO .SH AVAILABILITY Deprecated since 7.12.1. Do not use. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_QUOTE.3 b/docs/libcurl/opts/CURLOPT_QUOTE.3 index 4dce76d..30bd461 100644 --- a/docs/libcurl/opts/CURLOPT_QUOTE.3 +++ b/docs/libcurl/opts/CURLOPT_QUOTE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_QUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_QUOTE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_QUOTE \- (S)FTP commands to run before transfer .SH SYNOPSIS @@ -80,7 +81,23 @@ NULL .SH PROTOCOLS SFTP and FTP .SH EXAMPLE -TODO +.nf +struct curl_slist *h = NULL; +h = curl_slist_append(h, "RNFR source-name"); +h = curl_slist_append(h, "RNTO new-name"); + +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); + + /* pass in the FTP commands to run before the transfer */ + curl_easy_setopt(curl, CURLOPT_QUOTE, headerlist); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY SFTP support added in 7.16.3. *-prefix for SFTP added in 7.24.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 index 4c3e13f..de08059 100644 --- a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 +++ b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RANDOM_FILE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RANDOM_FILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RANDOM_FILE \- specify a source for random data .SH SYNOPSIS @@ -28,7 +29,7 @@ CURLOPT_RANDOM_FILE \- specify a source for random data CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path); .SH DESCRIPTION -Pass a char * to a zero terminated file name. The file will be used to read +Pass a char * to a zero terminated file name. The file might be used to read from to seed the random engine for SSL and more. The application does not have to keep the string around after setting this @@ -38,7 +39,15 @@ NULL, not used .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, "junk.txt"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RANGE.3 b/docs/libcurl/opts/CURLOPT_RANGE.3 index e90696c..1cdb170 100644 --- a/docs/libcurl/opts/CURLOPT_RANGE.3 +++ b/docs/libcurl/opts/CURLOPT_RANGE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RANGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RANGE 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RANGE \- set byte range to request .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_READDATA.3 b/docs/libcurl/opts/CURLOPT_READDATA.3 index ef51264..5e26ffb 100644 --- a/docs/libcurl/opts/CURLOPT_READDATA.3 +++ b/docs/libcurl/opts/CURLOPT_READDATA.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_READDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_READDATA 3 "May 01, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_READDATA \- custom pointer passed to the read callback .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_READFUNCTION.3 b/docs/libcurl/opts/CURLOPT_READFUNCTION.3 index a43e68b..85a8741 100644 --- a/docs/libcurl/opts/CURLOPT_READFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_READFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_READFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_READFUNCTION 3 "December 13, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_READFUNCTION \- read callback for data uploads .SH SYNOPSIS @@ -36,7 +37,7 @@ Pass a pointer to your callback function, as the prototype shows above. This callback function gets called by libcurl as soon as it needs to read data in order to send it to the peer - like if you ask it to upload or post data to the server. The data area pointed at by the pointer \fIbuffer\fP should be -filled up with at most \fIsize\fP multiplied with \fInmemb\fP number of bytes +filled up with at most \fIsize\fP multiplied with \fInitems\fP number of bytes by your function. Your function must then return the actual number of bytes that it stored in diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 index 3a5c3fc..ed4ba3b 100644 --- a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 +++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_REDIR_PROTOCOLS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_REDIR_PROTOCOLS 3 "September 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_REFERER.3 b/docs/libcurl/opts/CURLOPT_REFERER.3 index 881f48c..d056aae 100644 --- a/docs/libcurl/opts/CURLOPT_REFERER.3 +++ b/docs/libcurl/opts/CURLOPT_REFERER.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_REFERER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_REFERER 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_REFERER \- set the HTTP referer header .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 b/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 new file mode 100644 index 0000000..4cfe9f2 --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 @@ -0,0 +1,57 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_REQUEST_TARGET 3 "June 21, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_REQUEST_TARGET \- specify an alternative target for this request +.SH SYNOPSIS +#include + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REQUEST_TARGET, string); +.SH DESCRIPTION +Pass a char * to string which libcurl uses in the upcoming request instead of +the path as extracted from the URL. +.SH DEFAULT +NULL +.SH PROTOCOLS +HTTP +.SH EXAMPLE +.nf +curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/*"); + curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "OPTIONS"); + + /* issue an OPTIONS * request (no leading slash) */ + curl_easy_setopt(curl, CURLOPT_REQUEST_TARGET, "*"); + + /* Perform the request */ + curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +.SH "SEE ALSO" +.BR CURLOPT_CUSTOMREQUEST "(3), " CURLOPT_HTTPGET "(3), " diff --git a/docs/libcurl/opts/CURLOPT_RESOLVE.3 b/docs/libcurl/opts/CURLOPT_RESOLVE.3 index 21027d4..59d3c8c 100644 --- a/docs/libcurl/opts/CURLOPT_RESOLVE.3 +++ b/docs/libcurl/opts/CURLOPT_RESOLVE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESOLVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RESOLVE 3 "January 30, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RESOLVE \- provide custom host name to IP address resolves .SH SYNOPSIS @@ -37,10 +38,12 @@ list of \fBstruct curl_slist\fP structs properly filled in. Use to clean up an entire list. Each single name resolve string should be written using the format -HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve, PORT is -the port number of the service where libcurl wants to connect to the HOST and -ADDRESS is the numerical IP address. If libcurl is built to support IPv6, -ADDRESS can of course be either IPv4 or IPv6 style addressing. +HOST:PORT:ADDRESS[,ADDRESS]... where HOST is the name libcurl will try +to resolve, PORT is the port number of the service where libcurl wants +to connect to the HOST and ADDRESS is one or more numerical IP +addresses. If you specify multiple ip addresses they need to be +separated by comma. If libcurl is built to support IPv6, each of the +ADDRESS entries can of course be either IPv4 or IPv6 style addressing. This option effectively pre-populates the DNS cache with entries for the host+port pair so redirects and everything that operations against the @@ -55,6 +58,10 @@ Remove names from the DNS cache again, to stop providing these fake resolves, by including a string in the linked list that uses the format \&"-HOST:PORT". The host name must be prefixed with a dash, and the host name and port number must exactly match what was already added previously. + +Support for providing the ADDRESS within [brackets] was added in 7.57.0. + +Support for providing multiple IP addresses per entry was added in 7.59.0. .SH DEFAULT NULL .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 b/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 new file mode 100644 index 0000000..e8dd3cf --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 @@ -0,0 +1,64 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_RESOLVER_START_DATA 3 "February 14, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_RESOLVER_START_DATA \- custom pointer passed to the resolver start callback +.SH SYNOPSIS +#include + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVER_START_DATA, void *pointer); +.SH DESCRIPTION +Pass a \fIpointer\fP that will be untouched by libcurl and passed as the third +argument in the resolver start callback set with +\fICURLOPT_RESOLVER_START_FUNCTION(3)\fP. +.SH DEFAULT +NULL +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +static int resolver_start_cb(void *resolver_state, void *reserved, + void *userdata) +{ + (void)reserved; + printf("Received resolver_state=%p userdata=%p\\n", + resolver_state, userdata); + return 0; +} + +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_start_cb); + curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, curl); + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi +.SH AVAILABILITY +Added in 7.59.0 +.SH RETURN VALUE +Returns CURLE_OK +.SH "SEE ALSO" +.BR CURLOPT_RESOLVER_START_FUNCTION "(3) " diff --git a/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 new file mode 100644 index 0000000..468e216 --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 @@ -0,0 +1,84 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_RESOLVER_START_FUNCTION 3 "February 14, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_RESOLVER_START_FUNCTION \- set callback to be called before a new resolve request is started +.SH SYNOPSIS +.nf +#include + +int resolver_start_cb(void *resolver_state, void *reserved, void *userdata); + +CURLcode curl_easy_setopt(CURL *handle, + CURLOPT_RESOLVER_START_FUNCTION, + resolver_start_cb); +.SH DESCRIPTION +Pass a pointer to your callback function, which should match the prototype +shown above. + +This callback function gets called by libcurl every time before a new resolve +request is started. + +\fIresolver_state\fP points to a backend-specific resolver state. Currently +only the ares resolver backend has a resolver state. It can be used to set up +any desired option on the ares channel before it's used, for example setting up +socket callback options. + +\fIreserved\fP is reserved. + +\fIuserdata\fP is the user pointer set with the +\fICURLOPT_RESOLVER_START_DATA(3)\fP option. + +The callback must return 0 on success. Returning a non-zero value will cause +the resolve to fail. +.SH DEFAULT +NULL (No callback) +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +static int resolver_start_cb(void *resolver_state, void *reserved, + void *userdata) +{ + (void)reserved; + printf("Received resolver_state=%p userdata=%p\\n", + resolver_state, userdata); + return 0; +} + +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_start_cb); + curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, curl); + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi +.SH AVAILABILITY +Added in 7.59.0 +.SH RETURN VALUE +Returns CURLE_OK +.SH "SEE ALSO" +.BR CURLOPT_RESOLVER_START_DATA "(3) " diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 index ac6986f..076a80a 100644 --- a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 +++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESUME_FROM 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RESUME_FROM 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RESUME_FROM \- set a point to resume transfer from .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 index 4905f39..8140fe6 100644 --- a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RESUME_FROM_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RESUME_FROM_LARGE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RESUME_FROM_LARGE \- set a point to resume transfer from .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 index 92536b9..3672703 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RTSP_CLIENT_CSEQ \- set the RTSP client CSEQ number .SH SYNOPSIS @@ -36,7 +37,15 @@ connection. The CSEQ will increment from this new number henceforth. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); + curl_easy_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 1234L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 index 60d1d8b..aeeeea0 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_REQUEST 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_REQUEST 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RTSP_REQUEST \- specify RTSP request .SH SYNOPSIS @@ -91,8 +92,18 @@ data. It will return after processing one read buffer of data in order to give the application a chance to run. .SH DEFAULT .SH PROTOCOLS +RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); + /* ask for options! */ + curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 index 70c5055..1d58711 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_SERVER_CSEQ 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RTSP_SERVER_CSEQ \- set the RTSP server CSEQ number .SH SYNOPSIS @@ -36,7 +37,15 @@ unimplemented. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); + curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, 1234L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 index 8f5cdff..cd31b6e 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_SESSION_ID 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RTSP_SESSION_ID \- set RTSP session ID .SH SYNOPSIS @@ -42,7 +43,16 @@ NULL .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + char *prev_id; /* saved from before somehow */ + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); + curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, prev_id); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 index 356455b..d7168f1 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_STREAM_URI 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_STREAM_URI 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RTSP_STREAM_URI \- set RTSP stream URI .SH SYNOPSIS @@ -46,7 +47,17 @@ option. .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + char *prev_id; /* saved from before somehow */ + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); + curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, + "rtsp://foo.example.com/twister/video"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 index 52d6078..74fde2f 100644 --- a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 +++ b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_RTSP_TRANSPORT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_RTSP_TRANSPORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_RTSP_TRANSPORT \- set RTSP Transport: header .SH SYNOPSIS @@ -42,7 +43,17 @@ NULL .SH PROTOCOLS RTSP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); + curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP); + curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT, + "RTP/AVP;unicast;client_port=4588-4589"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.20.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SASL_IR.3 b/docs/libcurl/opts/CURLOPT_SASL_IR.3 index 8fe4ee6..76a669f 100644 --- a/docs/libcurl/opts/CURLOPT_SASL_IR.3 +++ b/docs/libcurl/opts/CURLOPT_SASL_IR.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SASL_IR 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SASL_IR 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SASL_IR \- enable sending initial response in first packet .SH SYNOPSIS @@ -47,7 +48,15 @@ SASL-IR CAPABILITY. .SH PROTOCOLS IMAP, POP3 and SMTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/"); + curl_easy_setopt(curl, CURLOPT_SASL_IR, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.31.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SEEKDATA.3 b/docs/libcurl/opts/CURLOPT_SEEKDATA.3 index d4339ec..d1ce500 100644 --- a/docs/libcurl/opts/CURLOPT_SEEKDATA.3 +++ b/docs/libcurl/opts/CURLOPT_SEEKDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SEEKDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SEEKDATA 3 "August 12, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SEEKDATA \- custom pointer passed to the seek callback .SH SYNOPSIS @@ -36,6 +37,20 @@ If you don't set this, NULL is passed to the callback. .SH PROTOCOLS HTTP, FTP, SFTP .SH EXAMPLE +.nf +static int seek_cb(void *userp, curl_off_t offset, int origin) +{ + struct data *d = (struct data *)userp; + lseek(our_fd, offset, origin); + return CURL_SEEKFUNC_OK; +} + +{ + struct data seek_data; + curl_easy_setopt(CURL *handle, CURLOPT_SEEKFUNCTION, seek_cb); + curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, &seek_data); +} +.fi .SH AVAILABILITY Added in 7.18.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 index 179f0d2..653403c 100644 --- a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SEEKFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SEEKFUNCTION 3 "August 12, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SEEKFUNCTION \- user callback for seeking in input stream .SH SYNOPSIS @@ -67,7 +68,20 @@ By default, this is NULL and unused. .SH PROTOCOLS HTTP, FTP, SFTP .SH EXAMPLE -TODO +.nf +static int seek_cb(void *userp, curl_off_t offset, int origin) +{ + struct data *d = (struct data *)userp; + lseek(our_fd, offset, origin); + return CURL_SEEKFUNC_OK; +} + +{ + struct data seek_data; + curl_easy_setopt(CURL *handle, CURLOPT_SEEKFUNCTION, seek_cb); + curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, &seek_data); +} +.fi .SH AVAILABILITY Added in 7.18.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 index baed963..de2f2e1 100644 --- a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 +++ b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SERVICE_NAME 3 "17 Jun 2015" "libcurl 7.43.0" "curl_easy_setopt options" +.TH CURLOPT_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SERVICE_NAME \- authentication service name .SH SYNOPSIS @@ -40,7 +41,15 @@ See above .SH PROTOCOLS HTTP, FTP, IMAP, POP and SMTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, "custom"); + ret = curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.43.0 for HTTP, 7.49.0 for FTP, IMAP, POP3 and SMTP. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SHARE.3 b/docs/libcurl/opts/CURLOPT_SHARE.3 index 6a0c7b8..d326b4a 100644 --- a/docs/libcurl/opts/CURLOPT_SHARE.3 +++ b/docs/libcurl/opts/CURLOPT_SHARE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SHARE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SHARE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SHARE \- specify share handle to use .SH SYNOPSIS @@ -50,7 +51,29 @@ NULL .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +CURL *curl2 = curl_easy_init(); /* a second handle */ +if(curl) { + CURLSH *shobject = curl_share_init(); + curl_share_setopt(shobject, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); + + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); + curl_easy_setopt(curl, CURLOPT_SHARE, shobject); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); + + /* the second handle shares cookies from the first */ + curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/second"); + curl_easy_setopt(curl2, CURLOPT_COOKIEFILE, ""); + curl_easy_setopt(curl2, CURLOPT_SHARE, shobject); + ret = curl_easy_perform(curl2); + curl_easy_cleanup(curl2); + + curl_share_cleanup(shobject); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 index 00dd316..0dbe8b9 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKOPTDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKOPTDATA 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SOCKOPTDATA \- custom pointer to pass to sockopt callback .SH SYNOPSIS @@ -35,7 +36,30 @@ The default value of this parameter is NULL. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +static int sockopt_callback(void *clientp, curl_socket_t curlfd, + curlsocktype purpose) +{ + int val = *(int *)clientp; + setsockopt(curldfd, SOL_SOCKET, SO_RCVBUF, (const char *)&val, sizeof(val)); + return CURL_SOCKOPT_OK; +} + +curl = curl_easy_init(); +if(curl) { + int recvbuffersize = 256 * 1024; + + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); + + /* call this function to set options for the socket */ + curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback); + curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &recvbuffersize); + + res = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.16.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 index 6262dc5..effb19d 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKOPTFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKOPTFUNCTION 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SOCKOPTFUNCTION \- set callback for setting socket options .SH SYNOPSIS @@ -78,7 +79,43 @@ By default, this callback is NULL and unused. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +/* make libcurl use the already established socket 'sockfd' */ + +static curl_socket_t opensocket(void *clientp, + curlsocktype purpose, + struct curl_sockaddr *address) +{ + curl_socket_t sockfd; + sockfd = *(curl_socket_t *)clientp; + /* the actual externally set socket is passed in via the OPENSOCKETDATA + option */ + return sockfd; +} + +static int sockopt_callback(void *clientp, curl_socket_t curlfd, + curlsocktype purpose) +{ + /* This return code was added in libcurl 7.21.5 */ + return CURL_SOCKOPT_ALREADY_CONNECTED; +} + +curl = curl_easy_init(); +if(curl) { + /* libcurl will internally think that you connect to the host + * and port that you specify in the URL option. */ + curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999"); + /* call this function to get a socket */ + curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket); + curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd); + + /* call this function to set options for the socket */ + curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback); + + res = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +.fi .SH AVAILABILITY Added in 7.16.0. The \fICURL_SOCKOPT_ALREADY_CONNECTED\fP return code was added in 7.21.5. diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 new file mode 100644 index 0000000..681d9e5 --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 @@ -0,0 +1,64 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_SOCKS5_AUTH 3 "April 27, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_SOCKS5_AUTH \- set allowed methods for SOCKS5 proxy authentication +.SH SYNOPSIS +#include + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_AUTH, long bitmask); +.SH DESCRIPTION +Pass a long as parameter, which is set to a bitmask, to tell libcurl which +authentication method(s) are allowed for SOCKS5 proxy authentication. The only +supported flags are \fICURLAUTH_BASIC\fP, which allows username/password +authentication, \fICURLAUTH_GSSAPI\fP, which allows GSS-API authentication, and +\fICURLAUTH_NONE\fP, which allows no authentication. Set the actual user name +and password with the \fICURLOPT_PROXYUSERPWD(3)\fP option. +.SH DEFAULT +CURLAUTH_BASIC|CURLAUTH_GSSAPI +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + + /* request to use a SOCKS5 proxy */ + curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://user:pass@myproxy.com"); + + /* enable username/password authentication only */ + curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, CURLAUTH_BASIC); + + /* Perform the request */ + curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Added in 7.55.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or +CURLE_NOT_BUILT_IN if the bitmask contains unsupported flags. +.SH "SEE ALSO" +.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3)" diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 index ad0863b..448146a 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SOCKS5_GSSAPI_NEC \- set socks proxy gssapi negotiation protection .SH SYNOPSIS @@ -38,7 +39,16 @@ negotiation. .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://proxy"); + curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 index 1eda29c..5ea52db 100644 --- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 +++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SOCKS5_GSSAPI_SERVICE \- SOCKS5 proxy authentication service name .SH SYNOPSIS @@ -41,7 +42,16 @@ See above .SH PROTOCOLS All network protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://proxy"); + curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE, "rcmd-special"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.4, deprecated in 7.49.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 index 2ecca12..c6b6677 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_AUTH_TYPES 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_AUTH_TYPES 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSH_AUTH_TYPES \- set desired auth types for SFTP and SCP .SH SYNOPSIS @@ -41,7 +42,16 @@ None .SH PROTOCOLS SFTP and SCP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file"); + curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, + CURLSSH_AUTH_PUBLICKEY | CURLSSH_AUTH_KEYBOARD); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY CURLSSH_AUTH_HOST was added in 7.16.1, CURLSSH_AUTH_AGENT was added in 7.28.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 b/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 new file mode 100644 index 0000000..196211d --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 @@ -0,0 +1,59 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_SSH_COMPRESSION 3 "August 17, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_SSH_COMPRESSION \- enables automatic decompression of HTTP downloads +.SH SYNOPSIS +#include + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable); +.SH DESCRIPTION +Pass a long as parameter set to 1L to enable or 0L to disable. + +Enables built-in SSH compression. This is a request, not an order; the server +may or may not do it. +.SH DEFAULT +0, disabled +.SH PROTOCOLS +All SSH based protocols: SCP, SFTP +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com"); + + /* enable built-in compression */ + curl_easy_setopt(curl, CURLOPT_SSH_COMPRESSION, 1L); + + /* Perform the request */ + curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Added in 7.56.0 +.SH RETURN VALUE +Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or +CURLE_OUT_OF_MEMORY if there was insufficient heap space. +.SH "SEE ALSO" +.BR CURLOPT_ACCEPT_ENCODING "(3), " CURLOPT_TRANSFER_ENCODING "(3), " diff --git a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 index d9001b5..c44fb49 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 \- checksum of SSH server public key .SH SYNOPSIS @@ -41,7 +42,16 @@ NULL .SH PROTOCOLS SCP and SFTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file"); + curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, + "afe17cd62a0f3b61f1ab9cb22ba269a7"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.17.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 index 67c3673..a68ff1e 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_KEYDATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_KEYDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSH_KEYDATA \- pointer to pass to the SSH key callback .SH SYNOPSIS @@ -35,7 +36,26 @@ NULL .SH PROTOCOLS SFTP and SCP .SH EXAMPLE -TODO +.nf +static int keycb(CURL *easy, + const struct curl_khkey *knownkey, + const struct curl_khkey *foundkey, + enum curl_khmatch, + void *clientp) +{ + /* 'clientp' points to the callback_data struct */ + /* investigate the situation and return the correct value */ + return CURLKHSTAT_FINE_ADD_TO_FILE; +} +{ + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/thisfile.txt"); + curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION, keycb); + curl_easy_setopt(curl, CURLOPT_SSH_KEYDATA, &callback_data); + curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS, "/home/user/known_hosts"); + + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.19.6 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 index 21bc0e5..67ae364 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_KEYFUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_KEYFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSH_KEYFUNCTION \- callback for known host matching logic .SH SYNOPSIS @@ -96,7 +97,26 @@ NULL .SH PROTOCOLS SFTP and SCP .SH EXAMPLE -TODO +.nf +static int keycb(CURL *easy, + const struct curl_khkey *knownkey, + const struct curl_khkey *foundkey, + enum curl_khmatch, + void *clientp) +{ + /* 'clientp' points to the callback_data struct */ + /* investigate the situation and return the correct value */ + return CURLKHSTAT_FINE_ADD_TO_FILE; +} +{ + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/thisfile.txt"); + curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION, keycb); + curl_easy_setopt(curl, CURLOPT_SSH_KEYDATA, &callback_data); + curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS, "/home/user/known_hosts"); + + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.19.6 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 index e82ee42..c1478f9 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_KNOWNHOSTS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_KNOWNHOSTS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSH_KNOWNHOSTS \- file name holding the SSH known hosts .SH SYNOPSIS @@ -42,7 +43,16 @@ NULL .SH PROTOCOLS SFTP and SCP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file"); + curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS, + "/home/clarkkent/.ssh/known_hosts"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.6 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 index 7c24a90..a5ced5e 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSH_PRIVATE_KEYFILE \- set private key file for SSH auth .SH SYNOPSIS @@ -44,7 +45,17 @@ As explained above .SH PROTOCOLS SFTP and SCP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file"); + curl_easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, + "/home/clarkkent/.ssh/id_rsa"); + curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "password"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.16.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 index 1dbdf65..f957965 100644 --- a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 +++ b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSH_PUBLIC_KEYFILE \- set public key file for SSH auth .SH SYNOPSIS @@ -46,7 +47,16 @@ NULL .SH PROTOCOLS SFTP and SCP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file"); + curl_easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE, + "/home/clarkkent/.ssh/id_rsa.pub"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY The "" trick was added in 7.26.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_SSLCERT.3 index dd6e48b..c3d8096 100644 --- a/docs/libcurl/opts/CURLOPT_SSLCERT.3 +++ b/docs/libcurl/opts/CURLOPT_SSLCERT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLCERT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSLCERT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSLCERT \- set SSL client certificate .SH SYNOPSIS @@ -48,7 +49,17 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If built TLS enabled. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 index d68362a..d99921e 100644 --- a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLCERTTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSLCERTTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSLCERTTYPE \- specify type of the client SSL certificate .SH SYNOPSIS @@ -41,7 +42,18 @@ option. .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "PEM"); + curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If built TLS enabled. Added in 7.9.3 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE.3 index c691a85..267b63f 100644 --- a/docs/libcurl/opts/CURLOPT_SSLENGINE.3 +++ b/docs/libcurl/opts/CURLOPT_SSLENGINE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLENGINE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSLENGINE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSLENGINE \- set SSL engine identifier .SH SYNOPSIS @@ -38,7 +39,15 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Only if the SSL backend is OpenSSL built with engine support. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 index 0cd8d22..cd84614 100644 --- a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 +++ b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLENGINE_DEFAULT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSLENGINE_DEFAULT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSLENGINE_DEFAULT \- make SSL engine default .SH SYNOPSIS @@ -37,7 +38,16 @@ None .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic"); + curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Only if the SSL backend is OpenSSL built with engine support. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_SSLKEY.3 index b8027c4..c91837e 100644 --- a/docs/libcurl/opts/CURLOPT_SSLKEY.3 +++ b/docs/libcurl/opts/CURLOPT_SSLKEY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLKEY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSLKEY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSLKEY \- specify private keyfile for TLS and SSL client cert .SH SYNOPSIS @@ -43,7 +44,17 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If built TLS enabled. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 index 2e04434..b7dcfe1 100644 --- a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 +++ b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLKEYTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSLKEYTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSLKEYTYPE \- set type of the private key file .SH SYNOPSIS @@ -43,7 +44,18 @@ option. .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem"); + curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem"); + curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM"); + curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If built TLS enabled. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_SSLVERSION.3 index 77dfcd4..b92871a 100644 --- a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 +++ b/docs/libcurl/opts/CURLOPT_SSLVERSION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSLVERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSLVERSION 3 "January 10, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSLVERSION \- set preferred TLS/SSL version .SH SYNOPSIS @@ -51,6 +52,28 @@ TLSv1.2 (Added in 7.34.0) .IP CURL_SSLVERSION_TLSv1_3 TLSv1.3 (Added in 7.52.0) .RE +The maximum TLS version can be set by using \fIone\fP of the +CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the +CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros. +The MAX macros are not supported for SSL backends axTLS or wolfSSL. +.RS +.IP CURL_SSLVERSION_MAX_DEFAULT +The flag defines the maximum supported TLS version as TLSv1.2, or the default +value from the SSL library. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_0 +The flag defines maximum supported TLS version as TLSv1.0. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_1 +The flag defines maximum supported TLS version as TLSv1.1. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_2 +The flag defines maximum supported TLS version as TLSv1.2. +(Added in 7.54.0) +.IP CURL_SSLVERSION_MAX_TLSv1_3 +The flag defines maximum supported TLS version as TLSv1.3. +(Added in 7.54.0) +.RE .SH DEFAULT CURL_SSLVERSION_DEFAULT .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 index ddf2c05..6666fae 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_CIPHER_LIST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_CIPHER_LIST 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_CIPHER_LIST \- specify ciphers to use for TLS .SH SYNOPSIS @@ -57,7 +58,15 @@ NULL, use internal default .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST, "TLSv1"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY If built TLS enabled. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 index be2cf34..0a678b5 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_CTX_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_CTX_DATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_CTX_DATA \- custom pointer passed to ssl_ctx callback .SH SYNOPSIS @@ -36,11 +37,89 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +/* OpenSSL specific */ + +#include +#include +#include + +static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) +{ + X509_STORE *store; + X509 *cert=NULL; + BIO *bio; + char *mypem = (char *)parm; + /* get a BIO */ + bio=BIO_new_mem_buf(mypem, -1); + /* use it to read the PEM formatted certificate from memory into an + * X509 structure that SSL can use + */ + PEM_read_bio_X509(bio, &cert, 0, NULL); + if(cert == NULL) + printf("PEM_read_bio_X509 failed...\\n"); + + /* get a pointer to the X509 certificate store (which may be empty) */ + store=SSL_CTX_get_cert_store((SSL_CTX *)sslctx); + + /* add our certificate to this store */ + if(X509_STORE_add_cert(store, cert)==0) + printf("error adding certificate\\n"); + + /* decrease reference counts */ + X509_free(cert); + BIO_free(bio); + + /* all set to go */ + return CURLE_OK; +} + +int main(void) +{ + CURL * ch; + CURLcode rv; + char *mypem = /* example CA cert PEM - shortened */ + "-----BEGIN CERTIFICATE-----\\n" + "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\\n" + "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\\n" + "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\\n" + "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\\n" + "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\\n" + "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\\n" + "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\\n" + "-----END CERTIFICATE-----\\n"; + + rv=curl_global_init(CURL_GLOBAL_ALL); + ch=curl_easy_init(); + rv=curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); + rv=curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L); + rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); + + /* Retrieve page using cacerts' certificate -> will succeed + * load the certificate by installing a function doing the necessary + * "modifications" to the SSL CONTEXT just before link init + */ + rv=curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); + rv=curl_easy_setopt(ch, CURLOPT_SSL_CTX_DATA, mypem); + rv=curl_easy_perform(ch); + if(rv==CURLE_OK) + printf("*** transfer succeeded ***\\n"); + else + printf("*** transfer failed ***\\n"); + + curl_easy_cleanup(ch); + curl_global_cleanup(); + return rv; +} +.fi .SH AVAILABILITY Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Other SSL backends not supported. .SH RETURN VALUE -Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +CURLE_OK if supported; or an error such as: + +CURLE_NOT_BUILT_IN - Not supported by the SSL backend + +CURLE_UNKNOWN_OPTION .SH "SEE ALSO" .BR CURLOPT_SSL_CTX_FUNCTION "(3), " CURLOPT_SSLVERSION "(3), " diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 index 177947b..716a9b4 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,9 +20,10 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_CTX_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_CTX_FUNCTION 3 "December 19, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME -CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL or wolfSSL/CyaSSL +CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL/CyaSSL or mbedTLS .SH SYNOPSIS .nf #include @@ -32,8 +33,9 @@ CURLcode ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *userptr); CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_callback); .SH DESCRIPTION -This option only works for libcurl powered by OpenSSL or wolfSSL/CyaSSL. If -libcurl was built against another SSL library this functionality is absent. +This option only works for libcurl powered by OpenSSL, wolfSSL/CyaSSL or +mbedTLS. If libcurl was built against another SSL library this functionality is +absent. Pass a pointer to your callback function, which should match the prototype shown above. @@ -42,13 +44,15 @@ This callback function gets called by libcurl just before the initialization of an SSL connection after having processed all other SSL related options to give a last chance to an application to modify the behaviour of the SSL initialization. The \fIssl_ctx\fP parameter is actually a pointer to the SSL -library's \fISSL_CTX\fP. If an error is returned from the callback no attempt -to establish a connection is made and the perform operation will return the -callback's error code. Set the \fIuserptr\fP argument with the +library's \fISSL_CTX\fP for OpenSSL or wolfSSL/CyaSSL, and a pointer to +\fImbedtls_ssl_config\fP for mbedTLS. If an error is returned from the callback +no attempt to establish a connection is made and the perform operation will +return the callback's error code. Set the \fIuserptr\fP argument with the \fICURLOPT_SSL_CTX_DATA(3)\fP option. This function will get called on all new connections made to a server, during -the SSL negotiation. The SSL_CTX pointer will be a new one every time. +the SSL negotiation. The \fIssl_ctx\fP will point to a newly initialized object +each time, but note the pointer may be the same as from a prior call. To use this properly, a non-trivial amount of knowledge of your SSL library is necessary. For example, you can use this function to call library-specific @@ -59,83 +63,17 @@ NULL .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -.nf -/* OpenSSL specific */ - -#include -#include -#include - -static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm) -{ - X509_STORE *store; - X509 *cert=NULL; - BIO *bio; - char *mypem = /* example CA cert PEM - shortened */ - "-----BEGIN CERTIFICATE-----\n" - "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\n" - "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\n" - "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\n" - "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\n" - "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\n" - "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\n" - "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\n"\ - "-----END CERTIFICATE-----\n"; - /* get a BIO */ - bio=BIO_new_mem_buf(mypem, -1); - /* use it to read the PEM formatted certificate from memory into an X509 - * structure that SSL can use - */ - PEM_read_bio_X509(bio, &cert, 0, NULL); - if(cert == NULL) - printf("PEM_read_bio_X509 failed...\n"); - - /* get a pointer to the X509 certificate store (which may be empty!) */ - store=SSL_CTX_get_cert_store((SSL_CTX *)sslctx); - - /* add our certificate to this store */ - if(X509_STORE_add_cert(store, cert)==0) - printf("error adding certificate\n"); +See cacertinmem.c in docs/examples directory for usage example. - /* decrease reference counts */ - X509_free(cert); - BIO_free(bio); - - /* all set to go */ - return CURLE_OK; -} - -int main(void) -{ - CURL * ch; - CURLcode rv; - - rv=curl_global_init(CURL_GLOBAL_ALL); - ch=curl_easy_init(); - rv=curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM"); - rv=curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L); - rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/"); - - /* Retrieve page using cacerts' certificate -> will succeed - * load the certificate by installing a function doing the nescessary - * "modifications" to the SSL CONTEXT just before link init - */ - rv=curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); - rv=curl_easy_perform(ch); - if(rv==CURLE_OK) - printf("*** transfer succeeded ***\n"); - else - printf("*** transfer failed ***\n"); - - curl_easy_cleanup(ch); - curl_global_cleanup(); - return rv; -} -.fi +https://curl.haxx.se/libcurl/c/cacertinmem.html .SH AVAILABILITY -Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Other SSL -backends not supported. +Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Added in +7.54.0 for mbedTLS. Other SSL backends not supported. .SH RETURN VALUE -Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +CURLE_OK if supported; or an error such as: + +CURLE_NOT_BUILT_IN - Not supported by the SSL backend + +CURLE_UNKNOWN_OPTION .SH "SEE ALSO" .BR CURLOPT_SSL_CTX_DATA "(3), " CURLOPT_SSL_VERIFYPEER "(3), " diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 index 61863c8..ddad456 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_ENABLE_ALPN 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_ENABLE_ALPN 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_ENABLE_ALPN \- enable ALPN .SH SYNOPSIS @@ -36,7 +37,15 @@ is built to use supports it), which can be used to negotiate http2. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.36.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 index 67f0ebe..4f7aa29 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_ENABLE_NPN 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_ENABLE_NPN 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_ENABLE_NPN \- enable NPN .SH SYNOPSIS @@ -36,7 +37,15 @@ is built to use supports it), which can be used to negotiate http2. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.36.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 index 3073dad..dd11cd3 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_FALSESTART 3 "14 Feb 2015" "libcurl 7.41.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_FALSESTART 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_FALSESTART \- enable TLS false start .SH SYNOPSIS @@ -28,7 +29,7 @@ CURLOPT_SSL_FALSESTART \- enable TLS false start CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_FALSESTART, long enable); .SH DESCRIPTION -Pass a long as parameter set to 1 to enable or 0 to disable. +Pass a long as parameter set to 1L to enable or 0 to disable. This option determines whether libcurl should use false start during the TLS handshake. False start is a mode where a TLS client will start sending @@ -39,7 +40,14 @@ round trip when performing a full handshake. .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + curl_easy_setopt(curl, CURLOPT_SSL_FALSESTART, 1L); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.42.0. This option is currently only supported by the NSS and Secure Transport (on iOS 7.0 or later, or OS X 10.9 or later) TLS backends. diff --git a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 index 4943233..30e30a3 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_OPTIONS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_OPTIONS \- set SSL behavior options .SH SYNOPSIS @@ -47,14 +48,22 @@ exception in the case of Windows' Untrusted Publishers blacklist which it seems can't be bypassed.\fP This option may have broader support to accommodate other SSL backends in the future. https://curl.haxx.se/docs/ssl-compared.html - - .SH DEFAULT 0 .SH PROTOCOLS All TLS-based protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* weaken TLS only for use with silly servers */ + curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_ALLOW_BEAST | + CURLSSLOPT_NO_REVOKE); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.25.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 index c939465..89adb48 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_SESSIONID_CACHE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_SESSIONID_CACHE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_SESSIONID_CACHE \- enable/disable use of the SSL session-ID cache .SH SYNOPSIS @@ -40,7 +41,16 @@ wild that may require you to disable this in order for you to succeed. .SH PROTOCOLS All TLS-based .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* switch off session-id use! */ + curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.16.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 index 1591473..07b2854 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_VERIFYHOST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_VERIFYHOST 3 "February 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_VERIFYHOST \- verify the certificate's name against host .SH SYNOPSIS @@ -58,9 +59,16 @@ The default value for this option is 2. This option controls checking the server's certificate's claimed identity. The server could be lying. To control lying, see -\fICURLOPT_SSL_VERIFYPEER(3)\fP. If libcurl is built against NSS and -\fICURLOPT_SSL_VERIFYPEER(3)\fP is zero, \fICURLOPT_SSL_VERIFYHOST(3)\fP is -also set to zero and cannot be overridden. +\fICURLOPT_SSL_VERIFYPEER(3)\fP. +.SH LIMITATIONS +DarwinSSL: If \fIverify\fP value is 0, then SNI is also disabled. SNI is a TLS +extension that sends the hostname to the server. The server may use that +information to do such things as sending back a specific certificate for the +hostname, or forwarding the request to a specific origin server. Some hostnames +may be inaccessible if SNI is not sent. + +NSS: If \fICURLOPT_SSL_VERIFYPEER(3)\fP is zero, +\fICURLOPT_SSL_VERIFYHOST(3)\fP is also set to zero and cannot be overridden. .SH DEFAULT 2 .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 index f7ff1b2..269d8f0 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_VERIFYPEER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_VERIFYPEER 3 "February 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 index 3021225..017e0a3 100644 --- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 +++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_SSL_VERIFYSTATUS 3 "04 Dec 2014" "libcurl 7.40.0" "curl_easy_setopt options" +.TH CURLOPT_SSL_VERIFYSTATUS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_SSL_VERIFYSTATUS \- verify the certificate's status .SH SYNOPSIS @@ -40,7 +41,16 @@ extension, the verification will fail. .SH PROTOCOLS All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + /* ask for OSCP stapling! */ + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.41.0. This option is currently only supported by the OpenSSL, GnuTLS and NSS TLS backends. diff --git a/docs/libcurl/opts/CURLOPT_STDERR.3 b/docs/libcurl/opts/CURLOPT_STDERR.3 index 7dfe371..b7894b7 100644 --- a/docs/libcurl/opts/CURLOPT_STDERR.3 +++ b/docs/libcurl/opts/CURLOPT_STDERR.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STDERR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_STDERR 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_STDERR \- redirect stderr to another stream .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 index 831d211..77463ef 100644 --- a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 +++ b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STREAM_DEPENDS 3 "13 Sep 2015" "libcurl 7.46.0" "curl_easy_setopt options" +.TH CURLOPT_STREAM_DEPENDS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_STREAM_DEPENDS \- set stream this transfer depends on .SH SYNOPSIS @@ -30,7 +31,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS, CURL *dephandle) .SH DESCRIPTION Pass a CURL * pointer in \fIdephandle\fP to identify the stream within the same connection that this stream is depending upon. This option clears the -exclusive it and is mutually exclusive to the +exclusive bit and is mutually exclusive to the \fICURLOPT_STREAM_DEPENDS_E(3)\fP option. The spec says "Including a dependency expresses a preference to allocate @@ -47,7 +48,19 @@ NULL .SH PROTOCOLS HTTP/2 .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +CURL *curl2 = curl_easy_init(); /* a second handle */ +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/one"); + + /* the second depends on the first */ + curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/two"); + curl_easy_setopt(curl2, CURLOPT_STREAM_DEPENDS, curl); + + /* then add both to a multi handle and transfer them! */ +} +.fi .SH AVAILABILITY Added in 7.46.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 index c1d9fd0..e9593f5 100644 --- a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 +++ b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STREAM_DEPENDS_E 3 "13 Sep 2015" "libcurl 7.46.0" "curl_easy_setopt options" +.TH CURLOPT_STREAM_DEPENDS_E 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_STREAM_DEPENDS_E \- set stream this transfer depends on execlusively .SH SYNOPSIS @@ -50,7 +51,19 @@ NULL .SH PROTOCOLS HTTP/2 .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +CURL *curl2 = curl_easy_init(); /* a second handle */ +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/one"); + + /* the second depends on the first */ + curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/two"); + curl_easy_setopt(curl2, CURLOPT_STREAM_DEPENDS_E, curl); + + /* then add both to a multi handle and transfer them! */ +} +.fi .SH AVAILABILITY Added in 7.46.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 b/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 index a2b2472..6808a7d 100644 --- a/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 +++ b/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_STREAM_WEIGHT 3 "13 Sep 2015" "libcurl 7.46.0" "curl_easy_setopt options" +.TH CURLOPT_STREAM_WEIGHT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_STREAM_WEIGHT \- set numerical stream weight .SH SYNOPSIS @@ -53,7 +54,20 @@ is 16. .SH PROTOCOLS HTTP/2 .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +CURL *curl2 = curl_easy_init(); /* a second handle */ +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/one"); + curl_easy_setopt(curl, CURLOPT_STREAM_WEIGHT, 10L); + + /* the second has twice the weight */ + curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/two"); + curl_easy_setopt(curl2, CURLOPT_STREAM_WEIGHT, 20L); + + /* then add both to a multi handle and transfer them! */ +} +.fi .SH AVAILABILITY Added in 7.46.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 b/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 new file mode 100644 index 0000000..bd4d7df --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 @@ -0,0 +1,96 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_SUPPRESS_CONNECT_HEADERS 3 "April 28, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_SUPPRESS_CONNECT_HEADERS \- Suppress proxy CONNECT response headers from user callbacks +.SH SYNOPSIS +.nf +#include + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SUPPRESS_CONNECT_HEADERS, long onoff); +.fi +.SH DESCRIPTION +When \fICURLOPT_HTTPPROXYTUNNEL(3)\fP is used and a CONNECT request is made, +suppress proxy CONNECT response headers from the user callback functions +\fICURLOPT_HEADERFUNCTION(3)\fP and \fICURLOPT_WRITEFUNCTION(3)\fP. + +Proxy CONNECT response headers can complicate header processing since it's +essentially a separate set of headers. You can enable this option to suppress +those headers. + +For example let's assume an HTTPS URL is to be retrieved via CONNECT. On +success there would normally be two sets of headers, and each header line sent +to the header function and/or the write function. The data given to the +callbacks would look like this: + +.nf +HTTP/1.1 200 Connection established +{headers}... + +HTTP/1.1 200 OK +Content-Type: application/json +{headers}... + +{body}... +.fi + +However by enabling this option the CONNECT response headers are suppressed, so +the data given to the callbacks would look like this: + +.nf +HTTP/1.1 200 OK +Content-Type: application/json +{headers}... + +{body}... +.fi + +.SH DEFAULT +0 +.SH PROTOCOLS +All +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + + curl_easy_setopt(curl, CURLOPT_HEADER, 1L); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://foo:3128"); + curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); + curl_easy_setopt(curl, CURLOPT_SUPPRESS_CONNECT_HEADERS, 1L); + + curl_easy_perform(curl); + + /* always cleanup */ + curl_easy_cleanup(curl); +} +.fi +.SH AVAILABILITY +Added in 7.54.0 +.SH RETURN VALUE +CURLE_OK or an error such as CURLE_UNKNOWN_OPTION. +.SH "SEE ALSO" +.BR CURLOPT_HEADER "(3), " CURLOPT_PROXY "(3), " +.BR CURLOPT_HTTPPROXYTUNNEL "(3), " diff --git a/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 b/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 index f8f9343..4e9df6c 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_FASTOPEN 3 "16 Feb 2016" "libcurl 7.49.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_FASTOPEN 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TCP_FASTOPEN \- enable TCP Fast Open .SH SYNOPSIS @@ -28,7 +29,7 @@ CURLOPT_TCP_FASTOPEN \- enable TCP Fast Open CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_FASTOPEN, long enable); .SH DESCRIPTION -Pass a long as parameter set to 1 to enable or 0 to disable. +Pass a long as parameter set to 1L to enable or 0 to disable. TCP Fast Open (RFC7413) is a mechanism that allows data to be carried in the SYN and SYN-ACK packets and consumed by the receiving end during the initial @@ -38,7 +39,14 @@ connection handshake, saving up to one full round-trip time (RTT). .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, 1L); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.49.0. This option is currently only supported on Linux and OS X El Capitan. diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 index cc3642f..405a9f6 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_KEEPALIVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_KEEPALIVE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TCP_KEEPALIVE \- enable TCP keep-alive probing .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 index 4d587a9..97ed655 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_KEEPIDLE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_KEEPIDLE 3 "January 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TCP_KEEPIDLE \- set TCP keep-alive idle time wait .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 index a755c05..19613de 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_KEEPINTVL 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_KEEPINTVL 3 "January 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TCP_KEEPINTVL \- set TCP keep-alive interval .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 index bd19fba..521ca10 100644 --- a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 +++ b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TCP_NODELAY 3 "30 Jun 2016" "libcurl 7.50.0" "curl_easy_setopt options" +.TH CURLOPT_TCP_NODELAY 3 "January 15, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option .SH SYNOPSIS @@ -29,13 +30,13 @@ CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_NODELAY, long nodelay); .SH DESCRIPTION Pass a long specifying whether the TCP_NODELAY option is to be set or cleared -(1 = set, 0 = clear). The option is set by default. This will have no effect +(1L = set, 0 = clear). The option is set by default. This will have no effect after the connection has been established. -Setting this option will disable TCP's Nagle algorithm. The purpose of this -algorithm is to try to minimize the number of small packets on the network -(where "small packets" means TCP segments less than the Maximum Segment Size -(MSS) for the network). +Setting this option to 1L will disable TCP's Nagle algorithm on this +connection. The purpose of this algorithm is to try to minimize the number of +small packets on the network (where "small packets" means TCP segments less +than the Maximum Segment Size (MSS) for the network). Maximizing the amount of data sent per TCP segment is good because it amortizes the overhead of the send. However, in some cases small segments may @@ -47,7 +48,15 @@ overdone. .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + /* disable Nagle */ + curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 0); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Always. The default was changed to 1 from 0 in 7.50.2. .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 index 7a181ed..f20a04c 100644 --- a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TELNETOPTIONS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TELNETOPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TELNETOPTIONS \- custom telnet options .SH SYNOPSIS @@ -38,7 +39,19 @@ NULL .SH PROTOCOLS TELNET .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + struct curl_slist *options; + options = curl_slist_append(NULL, "TTTYPE=vt100"); + options = curl_slist_append(options, "USER=foobar"); + curl_easy_setopt(curl, CURLOPT_URL, "telnet://example.com/"); + curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, options); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); + curl_slist_free_all(options); +} +.fi .SH AVAILABILITY Along with TELNET .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 index 6aafbd1..3c37b7f 100644 --- a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TFTP_BLKSIZE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TFTP_BLKSIZE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TFTP_BLKSIZE \- TFTP block size .SH SYNOPSIS @@ -39,7 +40,16 @@ will be used. .SH PROTOCOLS TFTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "tftp://example.com/bootimage"); + /* try using larger blocks */ + curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 2048L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 index 97940fb..1b76e34 100644 --- a/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 +++ b/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TFTP_NO_OPTIONS 3 "23 Feb 2016" "libcurl 7.48.0" "curl_easy_setopt options" +.TH CURLOPT_TFTP_NO_OPTIONS 3 "April 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TFTP_NO_OPTIONS \- Do not send TFTP options requests. .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 index a8fcea7..b98647e 100644 --- a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 +++ b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMECONDITION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TIMECONDITION 3 "April 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TIMECONDITION \- select condition for a time request .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT.3 index 45e69b4..4ebe37a 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEOUT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TIMEOUT 3 "October 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TIMEOUT \- set maximum time the request is allowed to take .SH SYNOPSIS @@ -64,7 +65,8 @@ if(curl) { .SH AVAILABILITY Always .SH RETURN VALUE -Returns CURLE_OK +Returns CURLE_OK. Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative +value or a value that when converted to milliseconds is too large. .SH "SEE ALSO" -.BR CURLOPT_TIMEOUT_MS "(3), " +.BR CURLOPT_TIMEOUT_MS "(3), " .BR CURLOPT_CONNECTTIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), " diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 index 2a7afb1..4cfd656 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMEOUT_MS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TIMEOUT_MS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TIMEOUT_MS \- set maximum time the request is allowed to take .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 index cd745ff..e1a2e9d 100644 --- a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 +++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TIMEVALUE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TIMEVALUE 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TIMEVALUE \- set time value for conditional .SH SYNOPSIS @@ -31,6 +32,9 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE, long val); Pass a long \fIval\fP as parameter. This should be the time counted as seconds since 1 Jan 1970, and the time will be used in a condition as specified with \fICURLOPT_TIMECONDITION(3)\fP. + +On systems with 32 bit 'long' variables, this option cannot set dates beyond +the year 2038. Consider \fICURLOPT_TIMEVALUE_LARGE(3)\fP instead. .SH DEFAULT 0 .SH PROTOCOLS diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 new file mode 100644 index 0000000..5dbbedd --- /dev/null +++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 @@ -0,0 +1,65 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH CURLOPT_TIMEVALUE_LARGE 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_setopt options" + +.SH NAME +CURLOPT_TIMEVALUE_LARGE \- set time value for conditional +.SH SYNOPSIS +#include + +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE_LARGE, curl_off_t val); +.SH DESCRIPTION +Pass a curl_off_t \fIval\fP as parameter. This should be the time counted as +seconds since 1 Jan 1970, and the time will be used in a condition as +specified with \fICURLOPT_TIMECONDITION(3)\fP. + +The difference between this option and \fICURLOPT_TIMEVALUE(3)\fP is the type +of the argument. On systems where 'long' is only 32 bit wide, this option has +to be used to set dates beyond the year 2038. +.SH DEFAULT +0 +.SH PROTOCOLS +HTTP, FTP, RTSP, and FILE +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + + /* January 1, 2020 is 1577833200 */ + curl_easy_setopt(curl, CURLOPT_TIMEVALUE_LARGE, (curl_off_t)1577833200); + + /* If-Modified-Since the above time stamp */ + curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE); + + /* Perform the request */ + curl_easy_perform(curl); +} +.fi +.SH AVAILABILITY +Added in 7.59.0. +.SH RETURN VALUE +Returns CURLE_OK +.SH "SEE ALSO" +.BR CURLOPT_TIMECONDITION "(3), " +.BR CURLOPT_TIMEVALUE_LARGE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 index c6b6a74..2b74c03 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TLSAUTH_PASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication .SH SYNOPSIS @@ -40,7 +41,17 @@ NULL .SH PROTOCOLS All TLS-based protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.21.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 index 8620423..4138c7d 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TLSAUTH_TYPE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods .SH SYNOPSIS @@ -45,7 +46,17 @@ blank .SH PROTOCOLS All TLS-based protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this to work. Added in 7.21.4 diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 index a9b46e3..e270a44 100644 --- a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TLSAUTH_USERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TLSAUTH_USERNAME \- user name to use for TLS authentication .SH SYNOPSIS @@ -40,7 +41,17 @@ NULL .SH PROTOCOLS All TLS-based protocols .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user"); + curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.21.4 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 index aa1759c..06552db 100644 --- a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 +++ b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TRANSFERTEXT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TRANSFERTEXT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TRANSFERTEXT \- request a text based transfer for FTP .SH SYNOPSIS @@ -42,7 +43,15 @@ simply sets the mode to ASCII and performs a standard transfer. .SH PROTOCOLS FTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/textfile"); + curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Along with FTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 index 242da13..58ad727 100644 --- a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 +++ b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_TRANSFER_ENCODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_TRANSFER_ENCODING 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding .SH SYNOPSIS @@ -28,7 +29,7 @@ CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFER_ENCODING, long enable); .SH DESCRIPTION -Pass a long set to 1 to \fIenable\fP or 0 to disable. +Pass a long set to 1L to \fIenable\fP or 0 to disable. Adds a request for compressed Transfer Encoding in the outgoing HTTP request. If the server supports this and so desires, it can respond with the @@ -45,7 +46,14 @@ by both HTTP clients and HTTP servers. .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, 1L); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Added in 7.21.6 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 index 8cf4d24..00ab609 100644 --- a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 +++ b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_UNIX_SOCKET_PATH 3 "09 Oct 2014" "libcurl 7.40.0" "curl_easy_setopt options" +.TH CURLOPT_UNIX_SOCKET_PATH 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_UNIX_SOCKET_PATH \- set Unix domain socket .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 index 9e4cf26..994cfc6 100644 --- a/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 +++ b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_UNRESTRICTED_AUTH 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_UNRESTRICTED_AUTH 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too .SH SYNOPSIS @@ -30,16 +31,28 @@ CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UNRESTRICTED_AUTH, long goahead); .SH DESCRIPTION -A long parameter set to 1 tells libcurl it can continue to send authentication -(user+password) credentials when following locations, even when hostname -changed. This option is meaningful only when setting +Set the long \fIgohead\fP parameter to 1L to make libcurl continue to send +authentication (user+password) credentials when following locations, even when +hostname changed. This option is meaningful only when setting \fICURLOPT_FOLLOWLOCATION(3)\fP. + +By default, libcurl will only send given credentials to the initial host name +as given in the original URL, to avoid leaking username + password to other +sites. .SH DEFAULT 0 .SH PROTOCOLS HTTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1L); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Along with HTTP .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD.3 b/docs/libcurl/opts/CURLOPT_UPLOAD.3 index 0ad201a..34b45b0 100644 --- a/docs/libcurl/opts/CURLOPT_UPLOAD.3 +++ b/docs/libcurl/opts/CURLOPT_UPLOAD.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_UPLOAD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_UPLOAD 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_UPLOAD \- enable data upload .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_URL.3 b/docs/libcurl/opts/CURLOPT_URL.3 index 879f183..84a2a7a 100644 --- a/docs/libcurl/opts/CURLOPT_URL.3 +++ b/docs/libcurl/opts/CURLOPT_URL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_URL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_URL 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_URL \- provide the URL to use in the request .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_USERAGENT.3 b/docs/libcurl/opts/CURLOPT_USERAGENT.3 index bf58f2b..e21818f 100644 --- a/docs/libcurl/opts/CURLOPT_USERAGENT.3 +++ b/docs/libcurl/opts/CURLOPT_USERAGENT.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USERAGENT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_USERAGENT 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_USERAGENT \- set HTTP user-agent header .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_USERNAME.3 b/docs/libcurl/opts/CURLOPT_USERNAME.3 index 1e4b90f..3e8b7f9 100644 --- a/docs/libcurl/opts/CURLOPT_USERNAME.3 +++ b/docs/libcurl/opts/CURLOPT_USERNAME.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_USERNAME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_USERNAME \- user name to use in authentication .SH SYNOPSIS @@ -63,7 +64,18 @@ blank .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + curl_easy_setopt(curl, CURLOPT_USERNAME, "clark"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.19.1 .SH RETURN VALUE diff --git a/docs/libcurl/opts/CURLOPT_USERPWD.3 b/docs/libcurl/opts/CURLOPT_USERPWD.3 index ad57420..c59ca34 100644 --- a/docs/libcurl/opts/CURLOPT_USERPWD.3 +++ b/docs/libcurl/opts/CURLOPT_USERPWD.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USERPWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_USERPWD 3 "August 24, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_USERPWD \- user name and password to use in authentication .SH SYNOPSIS @@ -69,7 +70,18 @@ NULL .SH PROTOCOLS Most .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); + + curl_easy_setopt(curl, CURLOPT_USERPWD, "clark:kent"); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Always .SH RETURN VALUE @@ -77,3 +89,4 @@ Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" .BR CURLOPT_USERNAME "(3), " CURLOPT_PASSWORD "(3), " +.BR CURLOPT_PROXYUSERPWD "(3), " diff --git a/docs/libcurl/opts/CURLOPT_USE_SSL.3 b/docs/libcurl/opts/CURLOPT_USE_SSL.3 index 37a224d..5d2e796 100644 --- a/docs/libcurl/opts/CURLOPT_USE_SSL.3 +++ b/docs/libcurl/opts/CURLOPT_USE_SSL.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_USE_SSL 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_USE_SSL 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_USE_SSL \- request using SSL / TLS for the transfer .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_VERBOSE.3 b/docs/libcurl/opts/CURLOPT_VERBOSE.3 index e6a6fd1..aaf9128 100644 --- a/docs/libcurl/opts/CURLOPT_VERBOSE.3 +++ b/docs/libcurl/opts/CURLOPT_VERBOSE.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_VERBOSE 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_VERBOSE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_VERBOSE \- set verbose mode on/off .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 index 1ca1bed..c796a5e 100644 --- a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 +++ b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_WILDCARDMATCH 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_WILDCARDMATCH 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_WILDCARDMATCH \- enable directory wildcard transfers .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_WRITEDATA.3 b/docs/libcurl/opts/CURLOPT_WRITEDATA.3 index fdb5886..1999261 100644 --- a/docs/libcurl/opts/CURLOPT_WRITEDATA.3 +++ b/docs/libcurl/opts/CURLOPT_WRITEDATA.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_WRITEDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_WRITEDATA 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_WRITEDATA \- custom pointer passed to the write callback .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 index 2c77a4c..defd98f 100644 --- a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_WRITEFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_WRITEFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_WRITEFUNCTION \- set callback for writing received data .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 index fc1de8c..174f8ce 100644 --- a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 +++ b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_XFERINFODATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_XFERINFODATA 3 "October 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback .SH SYNOPSIS @@ -43,4 +44,4 @@ Added in 7.32.0 .SH RETURN VALUE Returns CURLE_OK .SH "SEE ALSO" -.BR CURLOPT_XFERINFOFUNCTION "(3), " CURLOPT_XFERINFOFUNCTION "(3), " +.BR CURLOPT_XFERINFOFUNCTION "(3), " CURLOPT_VERBOSE "(3), " diff --git a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 index 9bd89db..3167957 100644 --- a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_XFERINFOFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_XFERINFOFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_XFERINFOFUNCTION \- callback to progress meter function .SH SYNOPSIS diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 index f5c59ac..daf2634 100644 --- a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 +++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_XOAUTH2_BEARER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_XOAUTH2_BEARER 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options" + .SH NAME CURLOPT_XOAUTH2_BEARER \- specify OAuth 2.0 access token .SH SYNOPSIS @@ -42,7 +43,15 @@ NULL .SH PROTOCOLS IMAP, POP3 and SMTP .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "pop3://example.com/"); + curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, "1ab9cb22ba269a7"); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.33.0 .SH RETURN VALUE diff --git a/docs/libcurl/opts/Makefile.am b/docs/libcurl/opts/Makefile.am index 80f28ca..3765ea7 100644 --- a/docs/libcurl/opts/Makefile.am +++ b/docs/libcurl/opts/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -22,942 +22,17 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -man_MANS = \ - CURLINFO_ACTIVESOCKET.3 \ - CURLINFO_APPCONNECT_TIME.3 \ - CURLINFO_CERTINFO.3 \ - CURLINFO_CONDITION_UNMET.3 \ - CURLINFO_CONNECT_TIME.3 \ - CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 \ - CURLINFO_CONTENT_LENGTH_UPLOAD.3 \ - CURLINFO_CONTENT_TYPE.3 \ - CURLINFO_COOKIELIST.3 \ - CURLINFO_EFFECTIVE_URL.3 \ - CURLINFO_FILETIME.3 \ - CURLINFO_FTP_ENTRY_PATH.3 \ - CURLINFO_HEADER_SIZE.3 \ - CURLINFO_HTTPAUTH_AVAIL.3 \ - CURLINFO_HTTP_CONNECTCODE.3 \ - CURLINFO_HTTP_VERSION.3 \ - CURLINFO_LASTSOCKET.3 \ - CURLINFO_LOCAL_IP.3 \ - CURLINFO_LOCAL_PORT.3 \ - CURLINFO_NAMELOOKUP_TIME.3 \ - CURLINFO_NUM_CONNECTS.3 \ - CURLINFO_OS_ERRNO.3 \ - CURLINFO_PRETRANSFER_TIME.3 \ - CURLINFO_PRIMARY_IP.3 \ - CURLINFO_PRIMARY_PORT.3 \ - CURLINFO_PRIVATE.3 \ - CURLINFO_PROTOCOL.3 \ - CURLINFO_PROXYAUTH_AVAIL.3 \ - CURLINFO_PROXY_SSL_VERIFYRESULT.3 \ - CURLINFO_REDIRECT_COUNT.3 \ - CURLINFO_REDIRECT_TIME.3 \ - CURLINFO_REDIRECT_URL.3 \ - CURLINFO_REQUEST_SIZE.3 \ - CURLINFO_RESPONSE_CODE.3 \ - CURLINFO_RTSP_CLIENT_CSEQ.3 \ - CURLINFO_RTSP_CSEQ_RECV.3 \ - CURLINFO_RTSP_SERVER_CSEQ.3 \ - CURLINFO_RTSP_SESSION_ID.3 \ - CURLINFO_SCHEME.3 \ - CURLINFO_SIZE_DOWNLOAD.3 \ - CURLINFO_SIZE_UPLOAD.3 \ - CURLINFO_SPEED_DOWNLOAD.3 \ - CURLINFO_SPEED_UPLOAD.3 \ - CURLINFO_SSL_ENGINES.3 \ - CURLINFO_SSL_VERIFYRESULT.3 \ - CURLINFO_STARTTRANSFER_TIME.3 \ - CURLINFO_TLS_SESSION.3 \ - CURLINFO_TLS_SSL_PTR.3 \ - CURLINFO_TOTAL_TIME.3 \ - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 \ - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 \ - CURLMOPT_MAXCONNECTS.3 \ - CURLMOPT_MAX_HOST_CONNECTIONS.3 \ - CURLMOPT_MAX_PIPELINE_LENGTH.3 \ - CURLMOPT_MAX_TOTAL_CONNECTIONS.3 \ - CURLMOPT_PIPELINING.3 \ - CURLMOPT_PIPELINING_SERVER_BL.3 \ - CURLMOPT_PIPELINING_SITE_BL.3 \ - CURLMOPT_PUSHDATA.3 \ - CURLMOPT_PUSHFUNCTION.3 \ - CURLMOPT_SOCKETDATA.3 \ - CURLMOPT_SOCKETFUNCTION.3 \ - CURLMOPT_TIMERDATA.3 \ - CURLMOPT_TIMERFUNCTION.3 \ - CURLOPT_ABSTRACT_UNIX_SOCKET.3 \ - CURLOPT_ACCEPTTIMEOUT_MS.3 \ - CURLOPT_ACCEPT_ENCODING.3 \ - CURLOPT_ADDRESS_SCOPE.3 \ - CURLOPT_APPEND.3 \ - CURLOPT_AUTOREFERER.3 \ - CURLOPT_BUFFERSIZE.3 \ - CURLOPT_CAINFO.3 \ - CURLOPT_CAPATH.3 \ - CURLOPT_CERTINFO.3 \ - CURLOPT_CHUNK_BGN_FUNCTION.3 \ - CURLOPT_CHUNK_DATA.3 \ - CURLOPT_CHUNK_END_FUNCTION.3 \ - CURLOPT_CLOSESOCKETDATA.3 \ - CURLOPT_CLOSESOCKETFUNCTION.3 \ - CURLOPT_CONNECTTIMEOUT.3 \ - CURLOPT_CONNECTTIMEOUT_MS.3 \ - CURLOPT_CONNECT_ONLY.3 \ - CURLOPT_CONNECT_TO.3 \ - CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 \ - CURLOPT_CONV_FROM_UTF8_FUNCTION.3 \ - CURLOPT_CONV_TO_NETWORK_FUNCTION.3 \ - CURLOPT_COOKIE.3 \ - CURLOPT_COOKIEFILE.3 \ - CURLOPT_COOKIEJAR.3 \ - CURLOPT_COOKIELIST.3 \ - CURLOPT_COOKIESESSION.3 \ - CURLOPT_COPYPOSTFIELDS.3 \ - CURLOPT_CRLF.3 \ - CURLOPT_CRLFILE.3 \ - CURLOPT_CUSTOMREQUEST.3 \ - CURLOPT_DEBUGDATA.3 \ - CURLOPT_DEBUGFUNCTION.3 \ - CURLOPT_DEFAULT_PROTOCOL.3 \ - CURLOPT_DIRLISTONLY.3 \ - CURLOPT_DNS_CACHE_TIMEOUT.3 \ - CURLOPT_DNS_INTERFACE.3 \ - CURLOPT_DNS_LOCAL_IP4.3 \ - CURLOPT_DNS_LOCAL_IP6.3 \ - CURLOPT_DNS_SERVERS.3 \ - CURLOPT_DNS_USE_GLOBAL_CACHE.3 \ - CURLOPT_EGDSOCKET.3 \ - CURLOPT_ERRORBUFFER.3 \ - CURLOPT_EXPECT_100_TIMEOUT_MS.3 \ - CURLOPT_FAILONERROR.3 \ - CURLOPT_FILETIME.3 \ - CURLOPT_FNMATCH_DATA.3 \ - CURLOPT_FNMATCH_FUNCTION.3 \ - CURLOPT_FOLLOWLOCATION.3 \ - CURLOPT_FORBID_REUSE.3 \ - CURLOPT_FRESH_CONNECT.3 \ - CURLOPT_FTPPORT.3 \ - CURLOPT_FTPSSLAUTH.3 \ - CURLOPT_FTP_ACCOUNT.3 \ - CURLOPT_FTP_ALTERNATIVE_TO_USER.3 \ - CURLOPT_FTP_CREATE_MISSING_DIRS.3 \ - CURLOPT_FTP_FILEMETHOD.3 \ - CURLOPT_FTP_RESPONSE_TIMEOUT.3 \ - CURLOPT_FTP_SKIP_PASV_IP.3 \ - CURLOPT_FTP_SSL_CCC.3 \ - CURLOPT_FTP_USE_EPRT.3 \ - CURLOPT_FTP_USE_EPSV.3 \ - CURLOPT_FTP_USE_PRET.3 \ - CURLOPT_GSSAPI_DELEGATION.3 \ - CURLOPT_HEADER.3 \ - CURLOPT_HEADERDATA.3 \ - CURLOPT_HEADERFUNCTION.3 \ - CURLOPT_HEADEROPT.3 \ - CURLOPT_HTTP200ALIASES.3 \ - CURLOPT_HTTPAUTH.3 \ - CURLOPT_HTTPGET.3 \ - CURLOPT_HTTPHEADER.3 \ - CURLOPT_HTTPPOST.3 \ - CURLOPT_HTTPPROXYTUNNEL.3 \ - CURLOPT_HTTP_CONTENT_DECODING.3 \ - CURLOPT_HTTP_TRANSFER_DECODING.3 \ - CURLOPT_HTTP_VERSION.3 \ - CURLOPT_IGNORE_CONTENT_LENGTH.3 \ - CURLOPT_INFILESIZE.3 \ - CURLOPT_INFILESIZE_LARGE.3 \ - CURLOPT_INTERFACE.3 \ - CURLOPT_INTERLEAVEDATA.3 \ - CURLOPT_INTERLEAVEFUNCTION.3 \ - CURLOPT_IOCTLDATA.3 \ - CURLOPT_IOCTLFUNCTION.3 \ - CURLOPT_IPRESOLVE.3 \ - CURLOPT_ISSUERCERT.3 \ - CURLOPT_KEEP_SENDING_ON_ERROR.3 \ - CURLOPT_KEYPASSWD.3 \ - CURLOPT_KRBLEVEL.3 \ - CURLOPT_LOCALPORT.3 \ - CURLOPT_LOCALPORTRANGE.3 \ - CURLOPT_LOGIN_OPTIONS.3 \ - CURLOPT_LOW_SPEED_LIMIT.3 \ - CURLOPT_LOW_SPEED_TIME.3 \ - CURLOPT_MAIL_AUTH.3 \ - CURLOPT_MAIL_FROM.3 \ - CURLOPT_MAIL_RCPT.3 \ - CURLOPT_MAXCONNECTS.3 \ - CURLOPT_MAXFILESIZE.3 \ - CURLOPT_MAXFILESIZE_LARGE.3 \ - CURLOPT_MAXREDIRS.3 \ - CURLOPT_MAX_RECV_SPEED_LARGE.3 \ - CURLOPT_MAX_SEND_SPEED_LARGE.3 \ - CURLOPT_NETRC.3 \ - CURLOPT_NETRC_FILE.3 \ - CURLOPT_NEW_DIRECTORY_PERMS.3 \ - CURLOPT_NEW_FILE_PERMS.3 \ - CURLOPT_NOBODY.3 \ - CURLOPT_NOPROGRESS.3 \ - CURLOPT_NOPROXY.3 \ - CURLOPT_NOSIGNAL.3 \ - CURLOPT_OPENSOCKETDATA.3 \ - CURLOPT_OPENSOCKETFUNCTION.3 \ - CURLOPT_PASSWORD.3 \ - CURLOPT_PATH_AS_IS.3 \ - CURLOPT_PINNEDPUBLICKEY.3 \ - CURLOPT_PIPEWAIT.3 \ - CURLOPT_PORT.3 \ - CURLOPT_POST.3 \ - CURLOPT_POSTFIELDS.3 \ - CURLOPT_POSTFIELDSIZE.3 \ - CURLOPT_POSTFIELDSIZE_LARGE.3 \ - CURLOPT_POSTQUOTE.3 \ - CURLOPT_POSTREDIR.3 \ - CURLOPT_PREQUOTE.3 \ - CURLOPT_PRE_PROXY.3 \ - CURLOPT_PRIVATE.3 \ - CURLOPT_PROGRESSDATA.3 \ - CURLOPT_PROGRESSFUNCTION.3 \ - CURLOPT_PROTOCOLS.3 \ - CURLOPT_PROXY.3 \ - CURLOPT_PROXYAUTH.3 \ - CURLOPT_PROXYHEADER.3 \ - CURLOPT_PROXYPASSWORD.3 \ - CURLOPT_PROXYPORT.3 \ - CURLOPT_PROXYTYPE.3 \ - CURLOPT_PROXYUSERNAME.3 \ - CURLOPT_PROXYUSERPWD.3 \ - CURLOPT_PROXY_CAINFO.3 \ - CURLOPT_PROXY_CAPATH.3 \ - CURLOPT_PROXY_CRLFILE.3 \ - CURLOPT_PROXY_KEYPASSWD.3 \ - CURLOPT_PROXY_PINNEDPUBLICKEY.3 \ - CURLOPT_PROXY_SERVICE_NAME.3 \ - CURLOPT_PROXY_SSLCERT.3 \ - CURLOPT_PROXY_SSLCERTTYPE.3 \ - CURLOPT_PROXY_SSLKEY.3 \ - CURLOPT_PROXY_SSLKEYTYPE.3 \ - CURLOPT_PROXY_SSLVERSION.3 \ - CURLOPT_PROXY_SSL_CIPHER_LIST.3 \ - CURLOPT_PROXY_SSL_OPTIONS.3 \ - CURLOPT_PROXY_SSL_VERIFYHOST.3 \ - CURLOPT_PROXY_SSL_VERIFYPEER.3 \ - CURLOPT_PROXY_TLSAUTH_PASSWORD.3 \ - CURLOPT_PROXY_TLSAUTH_TYPE.3 \ - CURLOPT_PROXY_TLSAUTH_USERNAME.3 \ - CURLOPT_PROXY_TRANSFER_MODE.3 \ - CURLOPT_PUT.3 \ - CURLOPT_QUOTE.3 \ - CURLOPT_RANDOM_FILE.3 \ - CURLOPT_RANGE.3 \ - CURLOPT_READDATA.3 \ - CURLOPT_READFUNCTION.3 \ - CURLOPT_REDIR_PROTOCOLS.3 \ - CURLOPT_REFERER.3 \ - CURLOPT_RESOLVE.3 \ - CURLOPT_RESUME_FROM.3 \ - CURLOPT_RESUME_FROM_LARGE.3 \ - CURLOPT_RTSP_CLIENT_CSEQ.3 \ - CURLOPT_RTSP_REQUEST.3 \ - CURLOPT_RTSP_SERVER_CSEQ.3 \ - CURLOPT_RTSP_SESSION_ID.3 \ - CURLOPT_RTSP_STREAM_URI.3 \ - CURLOPT_RTSP_TRANSPORT.3 \ - CURLOPT_SASL_IR.3 \ - CURLOPT_SEEKDATA.3 \ - CURLOPT_SEEKFUNCTION.3 \ - CURLOPT_SERVICE_NAME.3 \ - CURLOPT_SHARE.3 \ - CURLOPT_SOCKOPTDATA.3 \ - CURLOPT_SOCKOPTFUNCTION.3 \ - CURLOPT_SOCKS5_GSSAPI_NEC.3 \ - CURLOPT_SOCKS5_GSSAPI_SERVICE.3 \ - CURLOPT_SSH_AUTH_TYPES.3 \ - CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 \ - CURLOPT_SSH_KEYDATA.3 \ - CURLOPT_SSH_KEYFUNCTION.3 \ - CURLOPT_SSH_KNOWNHOSTS.3 \ - CURLOPT_SSH_PRIVATE_KEYFILE.3 \ - CURLOPT_SSH_PUBLIC_KEYFILE.3 \ - CURLOPT_SSLCERT.3 \ - CURLOPT_SSLCERTTYPE.3 \ - CURLOPT_SSLENGINE.3 \ - CURLOPT_SSLENGINE_DEFAULT.3 \ - CURLOPT_SSLKEY.3 \ - CURLOPT_SSLKEYTYPE.3 \ - CURLOPT_SSLVERSION.3 \ - CURLOPT_SSL_CIPHER_LIST.3 \ - CURLOPT_SSL_CTX_DATA.3 \ - CURLOPT_SSL_CTX_FUNCTION.3 \ - CURLOPT_SSL_ENABLE_ALPN.3 \ - CURLOPT_SSL_ENABLE_NPN.3 \ - CURLOPT_SSL_FALSESTART.3 \ - CURLOPT_SSL_OPTIONS.3 \ - CURLOPT_SSL_SESSIONID_CACHE.3 \ - CURLOPT_SSL_VERIFYHOST.3 \ - CURLOPT_SSL_VERIFYPEER.3 \ - CURLOPT_SSL_VERIFYSTATUS.3 \ - CURLOPT_STDERR.3 \ - CURLOPT_STREAM_DEPENDS.3 \ - CURLOPT_STREAM_DEPENDS_E.3 \ - CURLOPT_STREAM_WEIGHT.3 \ - CURLOPT_TCP_FASTOPEN.3 \ - CURLOPT_TCP_KEEPALIVE.3 \ - CURLOPT_TCP_KEEPIDLE.3 \ - CURLOPT_TCP_KEEPINTVL.3 \ - CURLOPT_TCP_NODELAY.3 \ - CURLOPT_TELNETOPTIONS.3 \ - CURLOPT_TFTP_BLKSIZE.3 \ - CURLOPT_TFTP_NO_OPTIONS.3 \ - CURLOPT_TIMECONDITION.3 \ - CURLOPT_TIMEOUT.3 \ - CURLOPT_TIMEOUT_MS.3 \ - CURLOPT_TIMEVALUE.3 \ - CURLOPT_TLSAUTH_PASSWORD.3 \ - CURLOPT_TLSAUTH_TYPE.3 \ - CURLOPT_TLSAUTH_USERNAME.3 \ - CURLOPT_TRANSFERTEXT.3 \ - CURLOPT_TRANSFER_ENCODING.3 \ - CURLOPT_UNIX_SOCKET_PATH.3 \ - CURLOPT_UNRESTRICTED_AUTH.3 \ - CURLOPT_UPLOAD.3 \ - CURLOPT_URL.3 \ - CURLOPT_USERAGENT.3 \ - CURLOPT_USERNAME.3 \ - CURLOPT_USERPWD.3 \ - CURLOPT_USE_SSL.3 \ - CURLOPT_VERBOSE.3 \ - CURLOPT_WILDCARDMATCH.3 \ - CURLOPT_WRITEDATA.3 \ - CURLOPT_WRITEFUNCTION.3 \ - CURLOPT_XFERINFODATA.3 \ - CURLOPT_XFERINFOFUNCTION.3 \ - CURLOPT_XOAUTH2_BEARER.3 +include Makefile.inc -HTMLPAGES = \ - CURLINFO_ACTIVESOCKET.html \ - CURLINFO_APPCONNECT_TIME.html \ - CURLINFO_CERTINFO.html \ - CURLINFO_CONDITION_UNMET.html \ - CURLINFO_CONNECT_TIME.html \ - CURLINFO_CONTENT_LENGTH_DOWNLOAD.html \ - CURLINFO_CONTENT_LENGTH_UPLOAD.html \ - CURLINFO_CONTENT_TYPE.html \ - CURLINFO_COOKIELIST.html \ - CURLINFO_EFFECTIVE_URL.html \ - CURLINFO_FILETIME.html \ - CURLINFO_FTP_ENTRY_PATH.html \ - CURLINFO_HEADER_SIZE.html \ - CURLINFO_HTTPAUTH_AVAIL.html \ - CURLINFO_HTTP_CONNECTCODE.html \ - CURLINFO_HTTP_VERSION.html \ - CURLINFO_LASTSOCKET.html \ - CURLINFO_LOCAL_IP.html \ - CURLINFO_LOCAL_PORT.html \ - CURLINFO_NAMELOOKUP_TIME.html \ - CURLINFO_NUM_CONNECTS.html \ - CURLINFO_OS_ERRNO.html \ - CURLINFO_PRETRANSFER_TIME.html \ - CURLINFO_PRIMARY_IP.html \ - CURLINFO_PRIMARY_PORT.html \ - CURLINFO_PRIVATE.html \ - CURLINFO_PROTOCOL.html \ - CURLINFO_PROXYAUTH_AVAIL.html \ - CURLINFO_PROXY_SSL_VERIFYRESULT.html \ - CURLINFO_REDIRECT_COUNT.html \ - CURLINFO_REDIRECT_TIME.html \ - CURLINFO_REDIRECT_URL.html \ - CURLINFO_REQUEST_SIZE.html \ - CURLINFO_RESPONSE_CODE.html \ - CURLINFO_RTSP_CLIENT_CSEQ.html \ - CURLINFO_RTSP_CSEQ_RECV.html \ - CURLINFO_RTSP_SERVER_CSEQ.html \ - CURLINFO_RTSP_SESSION_ID.html \ - CURLINFO_SCHEME.html \ - CURLINFO_SIZE_DOWNLOAD.html \ - CURLINFO_SIZE_UPLOAD.html \ - CURLINFO_SPEED_DOWNLOAD.html \ - CURLINFO_SPEED_UPLOAD.html \ - CURLINFO_SSL_ENGINES.html \ - CURLINFO_SSL_VERIFYRESULT.html \ - CURLINFO_STARTTRANSFER_TIME.html \ - CURLINFO_TLS_SESSION.html \ - CURLINFO_TLS_SSL_PTR.html \ - CURLINFO_TOTAL_TIME.html \ - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.html \ - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.html \ - CURLMOPT_MAXCONNECTS.html \ - CURLMOPT_MAX_HOST_CONNECTIONS.html \ - CURLMOPT_MAX_PIPELINE_LENGTH.html \ - CURLMOPT_MAX_TOTAL_CONNECTIONS.html \ - CURLMOPT_PIPELINING.html \ - CURLMOPT_PIPELINING_SERVER_BL.html \ - CURLMOPT_PIPELINING_SITE_BL.html \ - CURLMOPT_PUSHDATA.html \ - CURLMOPT_PUSHFUNCTION.html \ - CURLMOPT_SOCKETDATA.html \ - CURLMOPT_SOCKETFUNCTION.html \ - CURLMOPT_TIMERDATA.html \ - CURLMOPT_TIMERFUNCTION.html \ - CURLOPT_ABSTRACT_UNIX_SOCKET.html \ - CURLOPT_ACCEPTTIMEOUT_MS.html \ - CURLOPT_ACCEPT_ENCODING.html \ - CURLOPT_ADDRESS_SCOPE.html \ - CURLOPT_APPEND.html \ - CURLOPT_AUTOREFERER.html \ - CURLOPT_BUFFERSIZE.html \ - CURLOPT_CAINFO.html \ - CURLOPT_CAPATH.html \ - CURLOPT_CERTINFO.html \ - CURLOPT_CHUNK_BGN_FUNCTION.html \ - CURLOPT_CHUNK_DATA.html \ - CURLOPT_CHUNK_END_FUNCTION.html \ - CURLOPT_CLOSESOCKETDATA.html \ - CURLOPT_CLOSESOCKETFUNCTION.html \ - CURLOPT_CONNECTTIMEOUT.html \ - CURLOPT_CONNECTTIMEOUT_MS.html \ - CURLOPT_CONNECT_ONLY.html \ - CURLOPT_CONNECT_TO.html \ - CURLOPT_CONV_FROM_NETWORK_FUNCTION.html \ - CURLOPT_CONV_FROM_UTF8_FUNCTION.html \ - CURLOPT_CONV_TO_NETWORK_FUNCTION.html \ - CURLOPT_COOKIE.html \ - CURLOPT_COOKIEFILE.html \ - CURLOPT_COOKIEJAR.html \ - CURLOPT_COOKIELIST.html \ - CURLOPT_COOKIESESSION.html \ - CURLOPT_COPYPOSTFIELDS.html \ - CURLOPT_CRLF.html \ - CURLOPT_CRLFILE.html \ - CURLOPT_CUSTOMREQUEST.html \ - CURLOPT_DEBUGDATA.html \ - CURLOPT_DEBUGFUNCTION.html \ - CURLOPT_DEFAULT_PROTOCOL.html \ - CURLOPT_DIRLISTONLY.html \ - CURLOPT_DNS_CACHE_TIMEOUT.html \ - CURLOPT_DNS_INTERFACE.html \ - CURLOPT_DNS_LOCAL_IP4.html \ - CURLOPT_DNS_LOCAL_IP6.html \ - CURLOPT_DNS_SERVERS.html \ - CURLOPT_DNS_USE_GLOBAL_CACHE.html \ - CURLOPT_EGDSOCKET.html \ - CURLOPT_ERRORBUFFER.html \ - CURLOPT_EXPECT_100_TIMEOUT_MS.html \ - CURLOPT_FAILONERROR.html \ - CURLOPT_FILETIME.html \ - CURLOPT_FNMATCH_DATA.html \ - CURLOPT_FNMATCH_FUNCTION.html \ - CURLOPT_FOLLOWLOCATION.html \ - CURLOPT_FORBID_REUSE.html \ - CURLOPT_FRESH_CONNECT.html \ - CURLOPT_FTPPORT.html \ - CURLOPT_FTPSSLAUTH.html \ - CURLOPT_FTP_ACCOUNT.html \ - CURLOPT_FTP_ALTERNATIVE_TO_USER.html \ - CURLOPT_FTP_CREATE_MISSING_DIRS.html \ - CURLOPT_FTP_FILEMETHOD.html \ - CURLOPT_FTP_RESPONSE_TIMEOUT.html \ - CURLOPT_FTP_SKIP_PASV_IP.html \ - CURLOPT_FTP_SSL_CCC.html \ - CURLOPT_FTP_USE_EPRT.html \ - CURLOPT_FTP_USE_EPSV.html \ - CURLOPT_FTP_USE_PRET.html \ - CURLOPT_GSSAPI_DELEGATION.html \ - CURLOPT_HEADER.html \ - CURLOPT_HEADERDATA.html \ - CURLOPT_HEADERFUNCTION.html \ - CURLOPT_HEADEROPT.html \ - CURLOPT_HTTP200ALIASES.html \ - CURLOPT_HTTPAUTH.html \ - CURLOPT_HTTPGET.html \ - CURLOPT_HTTPHEADER.html \ - CURLOPT_HTTPPOST.html \ - CURLOPT_HTTPPROXYTUNNEL.html \ - CURLOPT_HTTP_CONTENT_DECODING.html \ - CURLOPT_HTTP_TRANSFER_DECODING.html \ - CURLOPT_HTTP_VERSION.html \ - CURLOPT_IGNORE_CONTENT_LENGTH.html \ - CURLOPT_INFILESIZE.html \ - CURLOPT_INFILESIZE_LARGE.html \ - CURLOPT_INTERFACE.html \ - CURLOPT_INTERLEAVEDATA.html \ - CURLOPT_INTERLEAVEFUNCTION.html \ - CURLOPT_IOCTLDATA.html \ - CURLOPT_IOCTLFUNCTION.html \ - CURLOPT_IPRESOLVE.html \ - CURLOPT_ISSUERCERT.html \ - CURLOPT_KEEP_SENDING_ON_ERROR.html \ - CURLOPT_KEYPASSWD.html \ - CURLOPT_KRBLEVEL.html \ - CURLOPT_LOCALPORT.html \ - CURLOPT_LOCALPORTRANGE.html \ - CURLOPT_LOGIN_OPTIONS.html \ - CURLOPT_LOW_SPEED_LIMIT.html \ - CURLOPT_LOW_SPEED_TIME.html \ - CURLOPT_MAIL_AUTH.html \ - CURLOPT_MAIL_FROM.html \ - CURLOPT_MAIL_RCPT.html \ - CURLOPT_MAXCONNECTS.html \ - CURLOPT_MAXFILESIZE.html \ - CURLOPT_MAXFILESIZE_LARGE.html \ - CURLOPT_MAXREDIRS.html \ - CURLOPT_MAX_RECV_SPEED_LARGE.html \ - CURLOPT_MAX_SEND_SPEED_LARGE.html \ - CURLOPT_NETRC.html \ - CURLOPT_NETRC_FILE.html \ - CURLOPT_NEW_DIRECTORY_PERMS.html \ - CURLOPT_NEW_FILE_PERMS.html \ - CURLOPT_NOBODY.html \ - CURLOPT_NOPROGRESS.html \ - CURLOPT_NOPROXY.html \ - CURLOPT_NOSIGNAL.html \ - CURLOPT_OPENSOCKETDATA.html \ - CURLOPT_OPENSOCKETFUNCTION.html \ - CURLOPT_PASSWORD.html \ - CURLOPT_PATH_AS_IS.html \ - CURLOPT_PINNEDPUBLICKEY.html \ - CURLOPT_PIPEWAIT.html \ - CURLOPT_PORT.html \ - CURLOPT_POST.html \ - CURLOPT_POSTFIELDS.html \ - CURLOPT_POSTFIELDSIZE.html \ - CURLOPT_POSTFIELDSIZE_LARGE.html \ - CURLOPT_POSTQUOTE.html \ - CURLOPT_POSTREDIR.html \ - CURLOPT_PREQUOTE.html \ - CURLOPT_PRE_PROXY.html \ - CURLOPT_PRIVATE.html \ - CURLOPT_PROGRESSDATA.html \ - CURLOPT_PROGRESSFUNCTION.html \ - CURLOPT_PROTOCOLS.html \ - CURLOPT_PROXY.html \ - CURLOPT_PROXYAUTH.html \ - CURLOPT_PROXYHEADER.html \ - CURLOPT_PROXYPASSWORD.html \ - CURLOPT_PROXYPORT.html \ - CURLOPT_PROXYTYPE.html \ - CURLOPT_PROXYUSERNAME.html \ - CURLOPT_PROXYUSERPWD.html \ - CURLOPT_PROXY_CAINFO.html \ - CURLOPT_PROXY_CAPATH.html \ - CURLOPT_PROXY_CRLFILE.html \ - CURLOPT_PROXY_KEYPASSWD.html \ - CURLOPT_PROXY_PINNEDPUBLICKEY.html \ - CURLOPT_PROXY_SERVICE_NAME.html \ - CURLOPT_PROXY_SSLCERT.html \ - CURLOPT_PROXY_SSLCERTTYPE.html \ - CURLOPT_PROXY_SSLKEY.html \ - CURLOPT_PROXY_SSLKEYTYPE.html \ - CURLOPT_PROXY_SSLVERSION.html \ - CURLOPT_PROXY_SSL_CIPHER_LIST.html \ - CURLOPT_PROXY_SSL_OPTIONS.html \ - CURLOPT_PROXY_SSL_VERIFYHOST.html \ - CURLOPT_PROXY_SSL_VERIFYPEER.html \ - CURLOPT_PROXY_TLSAUTH_PASSWORD.html \ - CURLOPT_PROXY_TLSAUTH_TYPE.html \ - CURLOPT_PROXY_TLSAUTH_USERNAME.html \ - CURLOPT_PROXY_TRANSFER_MODE.html \ - CURLOPT_PUT.html \ - CURLOPT_QUOTE.html \ - CURLOPT_RANDOM_FILE.html \ - CURLOPT_RANGE.html \ - CURLOPT_READDATA.html \ - CURLOPT_READFUNCTION.html \ - CURLOPT_REDIR_PROTOCOLS.html \ - CURLOPT_REFERER.html \ - CURLOPT_RESOLVE.html \ - CURLOPT_RESUME_FROM.html \ - CURLOPT_RESUME_FROM_LARGE.html \ - CURLOPT_RTSP_CLIENT_CSEQ.html \ - CURLOPT_RTSP_REQUEST.html \ - CURLOPT_RTSP_SERVER_CSEQ.html \ - CURLOPT_RTSP_SESSION_ID.html \ - CURLOPT_RTSP_STREAM_URI.html \ - CURLOPT_RTSP_TRANSPORT.html \ - CURLOPT_SASL_IR.html \ - CURLOPT_SEEKDATA.html \ - CURLOPT_SEEKFUNCTION.html \ - CURLOPT_SERVICE_NAME.html \ - CURLOPT_SHARE.html \ - CURLOPT_SOCKOPTDATA.html \ - CURLOPT_SOCKOPTFUNCTION.html \ - CURLOPT_SOCKS5_GSSAPI_NEC.html \ - CURLOPT_SOCKS5_GSSAPI_SERVICE.html \ - CURLOPT_SSH_AUTH_TYPES.html \ - CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.html \ - CURLOPT_SSH_KEYDATA.html \ - CURLOPT_SSH_KEYFUNCTION.html \ - CURLOPT_SSH_KNOWNHOSTS.html \ - CURLOPT_SSH_PRIVATE_KEYFILE.html \ - CURLOPT_SSH_PUBLIC_KEYFILE.html \ - CURLOPT_SSLCERT.html \ - CURLOPT_SSLCERTTYPE.html \ - CURLOPT_SSLENGINE.html \ - CURLOPT_SSLENGINE_DEFAULT.html \ - CURLOPT_SSLKEY.html \ - CURLOPT_SSLKEYTYPE.html \ - CURLOPT_SSLVERSION.html \ - CURLOPT_SSL_CIPHER_LIST.html \ - CURLOPT_SSL_CTX_DATA.html \ - CURLOPT_SSL_CTX_FUNCTION.html \ - CURLOPT_SSL_ENABLE_ALPN.html \ - CURLOPT_SSL_ENABLE_NPN.html \ - CURLOPT_SSL_FALSESTART.html \ - CURLOPT_SSL_OPTIONS.html \ - CURLOPT_SSL_SESSIONID_CACHE.html \ - CURLOPT_SSL_VERIFYHOST.html \ - CURLOPT_SSL_VERIFYPEER.html \ - CURLOPT_SSL_VERIFYSTATUS.html \ - CURLOPT_STDERR.html \ - CURLOPT_STREAM_DEPENDS.html \ - CURLOPT_STREAM_DEPENDS_E.html \ - CURLOPT_STREAM_WEIGHT.html \ - CURLOPT_TCP_FASTOPEN.html \ - CURLOPT_TCP_KEEPALIVE.html \ - CURLOPT_TCP_KEEPIDLE.html \ - CURLOPT_TCP_KEEPINTVL.html \ - CURLOPT_TCP_NODELAY.html \ - CURLOPT_TELNETOPTIONS.html \ - CURLOPT_TFTP_BLKSIZE.html \ - CURLOPT_TFTP_NO_OPTIONS.html \ - CURLOPT_TIMECONDITION.html \ - CURLOPT_TIMEOUT.html \ - CURLOPT_TIMEOUT_MS.html \ - CURLOPT_TIMEVALUE.html \ - CURLOPT_TLSAUTH_PASSWORD.html \ - CURLOPT_TLSAUTH_TYPE.html \ - CURLOPT_TLSAUTH_USERNAME.html \ - CURLOPT_TRANSFERTEXT.html \ - CURLOPT_TRANSFER_ENCODING.html \ - CURLOPT_UNIX_SOCKET_PATH.html \ - CURLOPT_UNRESTRICTED_AUTH.html \ - CURLOPT_UPLOAD.html \ - CURLOPT_URL.html \ - CURLOPT_USERAGENT.html \ - CURLOPT_USERNAME.html \ - CURLOPT_USERPWD.html \ - CURLOPT_USE_SSL.html \ - CURLOPT_VERBOSE.html \ - CURLOPT_WILDCARDMATCH.html \ - CURLOPT_WRITEDATA.html \ - CURLOPT_WRITEFUNCTION.html \ - CURLOPT_XFERINFODATA.html \ - CURLOPT_XFERINFOFUNCTION.html \ - CURLOPT_XOAUTH2_BEARER.html +man_DISTMANS = $(man_MANS:.3=.3.dist) -PDFPAGES = \ - CURLINFO_ACTIVESOCKET.pdf \ - CURLINFO_APPCONNECT_TIME.pdf \ - CURLINFO_CERTINFO.pdf \ - CURLINFO_CONDITION_UNMET.pdf \ - CURLINFO_CONNECT_TIME.pdf \ - CURLINFO_CONTENT_LENGTH_DOWNLOAD.pdf \ - CURLINFO_CONTENT_LENGTH_UPLOAD.pdf \ - CURLINFO_CONTENT_TYPE.pdf \ - CURLINFO_COOKIELIST.pdf \ - CURLINFO_EFFECTIVE_URL.pdf \ - CURLINFO_FILETIME.pdf \ - CURLINFO_FTP_ENTRY_PATH.pdf \ - CURLINFO_HEADER_SIZE.pdf \ - CURLINFO_HTTPAUTH_AVAIL.pdf \ - CURLINFO_HTTP_CONNECTCODE.pdf \ - CURLINFO_HTTP_VERSION.pdf \ - CURLINFO_LASTSOCKET.pdf \ - CURLINFO_LOCAL_IP.pdf \ - CURLINFO_LOCAL_PORT.pdf \ - CURLINFO_NAMELOOKUP_TIME.pdf \ - CURLINFO_NUM_CONNECTS.pdf \ - CURLINFO_OS_ERRNO.pdf \ - CURLINFO_PRETRANSFER_TIME.pdf \ - CURLINFO_PRIMARY_IP.pdf \ - CURLINFO_PRIMARY_PORT.pdf \ - CURLINFO_PRIVATE.pdf \ - CURLINFO_PROTOCOL.pdf \ - CURLINFO_PROXYAUTH_AVAIL.pdf \ - CURLINFO_PROXY_SSL_VERIFYRESULT.pdf \ - CURLINFO_REDIRECT_COUNT.pdf \ - CURLINFO_REDIRECT_TIME.pdf \ - CURLINFO_REDIRECT_URL.pdf \ - CURLINFO_REQUEST_SIZE.pdf \ - CURLINFO_RESPONSE_CODE.pdf \ - CURLINFO_RTSP_CLIENT_CSEQ.pdf \ - CURLINFO_RTSP_CSEQ_RECV.pdf \ - CURLINFO_RTSP_SERVER_CSEQ.pdf \ - CURLINFO_RTSP_SESSION_ID.pdf \ - CURLINFO_SCHEME.pdf \ - CURLINFO_SIZE_DOWNLOAD.pdf \ - CURLINFO_SIZE_UPLOAD.pdf \ - CURLINFO_SPEED_DOWNLOAD.pdf \ - CURLINFO_SPEED_UPLOAD.pdf \ - CURLINFO_SSL_ENGINES.pdf \ - CURLINFO_SSL_VERIFYRESULT.pdf \ - CURLINFO_STARTTRANSFER_TIME.pdf \ - CURLINFO_TLS_SESSION.pdf \ - CURLINFO_TLS_SSL_PTR.pdf \ - CURLINFO_TOTAL_TIME.pdf \ - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.pdf \ - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.pdf \ - CURLMOPT_MAXCONNECTS.pdf \ - CURLMOPT_MAX_HOST_CONNECTIONS.pdf \ - CURLMOPT_MAX_PIPELINE_LENGTH.pdf \ - CURLMOPT_MAX_TOTAL_CONNECTIONS.pdf \ - CURLMOPT_PIPELINING.pdf \ - CURLMOPT_PIPELINING_SERVER_BL.pdf \ - CURLMOPT_PIPELINING_SITE_BL.pdf \ - CURLMOPT_PUSHDATA.pdf \ - CURLMOPT_PUSHFUNCTION.pdf \ - CURLMOPT_SOCKETDATA.pdf \ - CURLMOPT_SOCKETFUNCTION.pdf \ - CURLMOPT_TIMERDATA.pdf \ - CURLMOPT_TIMERFUNCTION.pdf \ - CURLOPT_ABSTRACT_UNIX_SOCKET.pdf \ - CURLOPT_ACCEPTTIMEOUT_MS.pdf \ - CURLOPT_ACCEPT_ENCODING.pdf \ - CURLOPT_ADDRESS_SCOPE.pdf \ - CURLOPT_APPEND.pdf \ - CURLOPT_AUTOREFERER.pdf \ - CURLOPT_BUFFERSIZE.pdf \ - CURLOPT_CAINFO.pdf \ - CURLOPT_CAPATH.pdf \ - CURLOPT_CERTINFO.pdf \ - CURLOPT_CHUNK_BGN_FUNCTION.pdf \ - CURLOPT_CHUNK_DATA.pdf \ - CURLOPT_CHUNK_END_FUNCTION.pdf \ - CURLOPT_CLOSESOCKETDATA.pdf \ - CURLOPT_CLOSESOCKETFUNCTION.pdf \ - CURLOPT_CONNECTTIMEOUT.pdf \ - CURLOPT_CONNECTTIMEOUT_MS.pdf \ - CURLOPT_CONNECT_ONLY.pdf \ - CURLOPT_CONNECT_TO.pdf \ - CURLOPT_CONV_FROM_NETWORK_FUNCTION.pdf \ - CURLOPT_CONV_FROM_UTF8_FUNCTION.pdf \ - CURLOPT_CONV_TO_NETWORK_FUNCTION.pdf \ - CURLOPT_COOKIE.pdf \ - CURLOPT_COOKIEFILE.pdf \ - CURLOPT_COOKIEJAR.pdf \ - CURLOPT_COOKIELIST.pdf \ - CURLOPT_COOKIESESSION.pdf \ - CURLOPT_COPYPOSTFIELDS.pdf \ - CURLOPT_CRLF.pdf \ - CURLOPT_CRLFILE.pdf \ - CURLOPT_CUSTOMREQUEST.pdf \ - CURLOPT_DEBUGDATA.pdf \ - CURLOPT_DEBUGFUNCTION.pdf \ - CURLOPT_DEFAULT_PROTOCOL.pdf \ - CURLOPT_DIRLISTONLY.pdf \ - CURLOPT_DNS_CACHE_TIMEOUT.pdf \ - CURLOPT_DNS_INTERFACE.pdf \ - CURLOPT_DNS_LOCAL_IP4.pdf \ - CURLOPT_DNS_LOCAL_IP6.pdf \ - CURLOPT_DNS_SERVERS.pdf \ - CURLOPT_DNS_USE_GLOBAL_CACHE.pdf \ - CURLOPT_EGDSOCKET.pdf \ - CURLOPT_ERRORBUFFER.pdf \ - CURLOPT_EXPECT_100_TIMEOUT_MS.pdf \ - CURLOPT_FAILONERROR.pdf \ - CURLOPT_FILETIME.pdf \ - CURLOPT_FNMATCH_DATA.pdf \ - CURLOPT_FNMATCH_FUNCTION.pdf \ - CURLOPT_FOLLOWLOCATION.pdf \ - CURLOPT_FORBID_REUSE.pdf \ - CURLOPT_FRESH_CONNECT.pdf \ - CURLOPT_FTPPORT.pdf \ - CURLOPT_FTPSSLAUTH.pdf \ - CURLOPT_FTP_ACCOUNT.pdf \ - CURLOPT_FTP_ALTERNATIVE_TO_USER.pdf \ - CURLOPT_FTP_CREATE_MISSING_DIRS.pdf \ - CURLOPT_FTP_FILEMETHOD.pdf \ - CURLOPT_FTP_RESPONSE_TIMEOUT.pdf \ - CURLOPT_FTP_SKIP_PASV_IP.pdf \ - CURLOPT_FTP_SSL_CCC.pdf \ - CURLOPT_FTP_USE_EPRT.pdf \ - CURLOPT_FTP_USE_EPSV.pdf \ - CURLOPT_FTP_USE_PRET.pdf \ - CURLOPT_GSSAPI_DELEGATION.pdf \ - CURLOPT_HEADER.pdf \ - CURLOPT_HEADERDATA.pdf \ - CURLOPT_HEADERFUNCTION.pdf \ - CURLOPT_HEADEROPT.pdf \ - CURLOPT_HTTP200ALIASES.pdf \ - CURLOPT_HTTPAUTH.pdf \ - CURLOPT_HTTPGET.pdf \ - CURLOPT_HTTPHEADER.pdf \ - CURLOPT_HTTPPOST.pdf \ - CURLOPT_HTTPPROXYTUNNEL.pdf \ - CURLOPT_HTTP_CONTENT_DECODING.pdf \ - CURLOPT_HTTP_TRANSFER_DECODING.pdf \ - CURLOPT_HTTP_VERSION.pdf \ - CURLOPT_IGNORE_CONTENT_LENGTH.pdf \ - CURLOPT_INFILESIZE.pdf \ - CURLOPT_INFILESIZE_LARGE.pdf \ - CURLOPT_INTERFACE.pdf \ - CURLOPT_INTERLEAVEDATA.pdf \ - CURLOPT_INTERLEAVEFUNCTION.pdf \ - CURLOPT_IOCTLDATA.pdf \ - CURLOPT_IOCTLFUNCTION.pdf \ - CURLOPT_IPRESOLVE.pdf \ - CURLOPT_ISSUERCERT.pdf \ - CURLOPT_KEEP_SENDING_ON_ERROR.pdf \ - CURLOPT_KEYPASSWD.pdf \ - CURLOPT_KRBLEVEL.pdf \ - CURLOPT_LOCALPORT.pdf \ - CURLOPT_LOCALPORTRANGE.pdf \ - CURLOPT_LOGIN_OPTIONS.pdf \ - CURLOPT_LOW_SPEED_LIMIT.pdf \ - CURLOPT_LOW_SPEED_TIME.pdf \ - CURLOPT_MAIL_AUTH.pdf \ - CURLOPT_MAIL_FROM.pdf \ - CURLOPT_MAIL_RCPT.pdf \ - CURLOPT_MAXCONNECTS.pdf \ - CURLOPT_MAXFILESIZE.pdf \ - CURLOPT_MAXFILESIZE_LARGE.pdf \ - CURLOPT_MAXREDIRS.pdf \ - CURLOPT_MAX_RECV_SPEED_LARGE.pdf \ - CURLOPT_MAX_SEND_SPEED_LARGE.pdf \ - CURLOPT_NETRC.pdf \ - CURLOPT_NETRC_FILE.pdf \ - CURLOPT_NEW_DIRECTORY_PERMS.pdf \ - CURLOPT_NEW_FILE_PERMS.pdf \ - CURLOPT_NOBODY.pdf \ - CURLOPT_NOPROGRESS.pdf \ - CURLOPT_NOPROXY.pdf \ - CURLOPT_NOSIGNAL.pdf \ - CURLOPT_OPENSOCKETDATA.pdf \ - CURLOPT_OPENSOCKETFUNCTION.pdf \ - CURLOPT_PASSWORD.pdf \ - CURLOPT_PATH_AS_IS.pdf \ - CURLOPT_PINNEDPUBLICKEY.pdf \ - CURLOPT_PIPEWAIT.pdf \ - CURLOPT_PORT.pdf \ - CURLOPT_POST.pdf \ - CURLOPT_POSTFIELDS.pdf \ - CURLOPT_POSTFIELDSIZE.pdf \ - CURLOPT_POSTFIELDSIZE_LARGE.pdf \ - CURLOPT_POSTQUOTE.pdf \ - CURLOPT_POSTREDIR.pdf \ - CURLOPT_PREQUOTE.pdf \ - CURLOPT_PRE_PROXY.pdf \ - CURLOPT_PRIVATE.pdf \ - CURLOPT_PROGRESSDATA.pdf \ - CURLOPT_PROGRESSFUNCTION.pdf \ - CURLOPT_PROTOCOLS.pdf \ - CURLOPT_PROXY.pdf \ - CURLOPT_PROXYAUTH.pdf \ - CURLOPT_PROXYHEADER.pdf \ - CURLOPT_PROXYPASSWORD.pdf \ - CURLOPT_PROXYPORT.pdf \ - CURLOPT_PROXYTYPE.pdf \ - CURLOPT_PROXYUSERNAME.pdf \ - CURLOPT_PROXYUSERPWD.pdf \ - CURLOPT_PROXY_CAINFO.pdf \ - CURLOPT_PROXY_CAPATH.pdf \ - CURLOPT_PROXY_CRLFILE.pdf \ - CURLOPT_PROXY_KEYPASSWD.pdf \ - CURLOPT_PROXY_PINNEDPUBLICKEY.pdf \ - CURLOPT_PROXY_SERVICE_NAME.pdf \ - CURLOPT_PROXY_SSLCERT.pdf \ - CURLOPT_PROXY_SSLCERTTYPE.pdf \ - CURLOPT_PROXY_SSLKEY.pdf \ - CURLOPT_PROXY_SSLKEYTYPE.pdf \ - CURLOPT_PROXY_SSLVERSION.pdf \ - CURLOPT_PROXY_SSL_CIPHER_LIST.pdf \ - CURLOPT_PROXY_SSL_OPTIONS.pdf \ - CURLOPT_PROXY_SSL_VERIFYHOST.pdf \ - CURLOPT_PROXY_SSL_VERIFYPEER.pdf \ - CURLOPT_PROXY_TLSAUTH_PASSWORD.pdf \ - CURLOPT_PROXY_TLSAUTH_TYPE.pdf \ - CURLOPT_PROXY_TLSAUTH_USERNAME.pdf \ - CURLOPT_PROXY_TRANSFER_MODE.pdf \ - CURLOPT_PUT.pdf \ - CURLOPT_QUOTE.pdf \ - CURLOPT_RANDOM_FILE.pdf \ - CURLOPT_RANGE.pdf \ - CURLOPT_READDATA.pdf \ - CURLOPT_READFUNCTION.pdf \ - CURLOPT_REDIR_PROTOCOLS.pdf \ - CURLOPT_REFERER.pdf \ - CURLOPT_RESOLVE.pdf \ - CURLOPT_RESUME_FROM.pdf \ - CURLOPT_RESUME_FROM_LARGE.pdf \ - CURLOPT_RTSP_CLIENT_CSEQ.pdf \ - CURLOPT_RTSP_REQUEST.pdf \ - CURLOPT_RTSP_SERVER_CSEQ.pdf \ - CURLOPT_RTSP_SESSION_ID.pdf \ - CURLOPT_RTSP_STREAM_URI.pdf \ - CURLOPT_RTSP_TRANSPORT.pdf \ - CURLOPT_SASL_IR.pdf \ - CURLOPT_SEEKDATA.pdf \ - CURLOPT_SEEKFUNCTION.pdf \ - CURLOPT_SERVICE_NAME.pdf \ - CURLOPT_SHARE.pdf \ - CURLOPT_SOCKOPTDATA.pdf \ - CURLOPT_SOCKOPTFUNCTION.pdf \ - CURLOPT_SOCKS5_GSSAPI_NEC.pdf \ - CURLOPT_SOCKS5_GSSAPI_SERVICE.pdf \ - CURLOPT_SSH_AUTH_TYPES.pdf \ - CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.pdf \ - CURLOPT_SSH_KEYDATA.pdf \ - CURLOPT_SSH_KEYFUNCTION.pdf \ - CURLOPT_SSH_KNOWNHOSTS.pdf \ - CURLOPT_SSH_PRIVATE_KEYFILE.pdf \ - CURLOPT_SSH_PUBLIC_KEYFILE.pdf \ - CURLOPT_SSLCERT.pdf \ - CURLOPT_SSLCERTTYPE.pdf \ - CURLOPT_SSLENGINE.pdf \ - CURLOPT_SSLENGINE_DEFAULT.pdf \ - CURLOPT_SSLKEY.pdf \ - CURLOPT_SSLKEYTYPE.pdf \ - CURLOPT_SSLVERSION.pdf \ - CURLOPT_SSL_CIPHER_LIST.pdf \ - CURLOPT_SSL_CTX_DATA.pdf \ - CURLOPT_SSL_CTX_FUNCTION.pdf \ - CURLOPT_SSL_ENABLE_ALPN.pdf \ - CURLOPT_SSL_ENABLE_NPN.pdf \ - CURLOPT_SSL_FALSESTART.pdf \ - CURLOPT_SSL_OPTIONS.pdf \ - CURLOPT_SSL_SESSIONID_CACHE.pdf \ - CURLOPT_SSL_VERIFYHOST.pdf \ - CURLOPT_SSL_VERIFYPEER.pdf \ - CURLOPT_SSL_VERIFYSTATUS.pdf \ - CURLOPT_STDERR.pdf \ - CURLOPT_STREAM_DEPENDS.pdf \ - CURLOPT_STREAM_DEPENDS_E.pdf \ - CURLOPT_STREAM_WEIGHT.pdf \ - CURLOPT_TCP_FASTOPEN.pdf \ - CURLOPT_TCP_KEEPALIVE.pdf \ - CURLOPT_TCP_KEEPIDLE.pdf \ - CURLOPT_TCP_KEEPINTVL.pdf \ - CURLOPT_TCP_NODELAY.pdf \ - CURLOPT_TELNETOPTIONS.pdf \ - CURLOPT_TFTP_BLKSIZE.pdf \ - CURLOPT_TFTP_NO_OPTIONS.pdf \ - CURLOPT_TIMECONDITION.pdf \ - CURLOPT_TIMEOUT.pdf \ - CURLOPT_TIMEOUT_MS.pdf \ - CURLOPT_TIMEVALUE.pdf \ - CURLOPT_TLSAUTH_PASSWORD.pdf \ - CURLOPT_TLSAUTH_TYPE.pdf \ - CURLOPT_TLSAUTH_USERNAME.pdf \ - CURLOPT_TRANSFERTEXT.pdf \ - CURLOPT_TRANSFER_ENCODING.pdf \ - CURLOPT_UNIX_SOCKET_PATH.pdf \ - CURLOPT_UNRESTRICTED_AUTH.pdf \ - CURLOPT_UPLOAD.pdf \ - CURLOPT_URL.pdf \ - CURLOPT_USERAGENT.pdf \ - CURLOPT_USERNAME.pdf \ - CURLOPT_USERPWD.pdf \ - CURLOPT_USE_SSL.pdf \ - CURLOPT_VERBOSE.pdf \ - CURLOPT_WILDCARDMATCH.pdf \ - CURLOPT_WRITEDATA.pdf \ - CURLOPT_WRITEFUNCTION.pdf \ - CURLOPT_XFERINFODATA.pdf \ - CURLOPT_XFERINFOFUNCTION.pdf \ - CURLOPT_XOAUTH2_BEARER.pdf +HTMLPAGES = $(man_MANS:.3=.html) -CLEANFILES = $(HTMLPAGES) $(PDFPAGES) +PDFPAGES = $(man_MANS:.3=.pdf) -EXTRA_DIST = $(man_MANS) +CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(man_DISTMANS) + +EXTRA_DIST = $(man_MANS) CMakeLists.txt MAN2HTML= roffit --mandir=. $< >$@ SUFFIXES = .3 .html diff --git a/docs/libcurl/opts/Makefile.in b/docs/libcurl/opts/Makefile.in index 65db42e..99f6bb1 100644 --- a/docs/libcurl/opts/Makefile.in +++ b/docs/libcurl/opts/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -35,6 +35,8 @@ # KIND, either express or implied. # ########################################################################### + +# Shared between Makefile.am and CMakeLists.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -111,7 +113,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = docs/libcurl/opts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -132,8 +135,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -188,7 +190,7 @@ man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -204,6 +206,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -229,7 +237,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -243,7 +253,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -255,6 +268,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -300,6 +314,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -312,6 +327,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -382,947 +398,344 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies man_MANS = \ - CURLINFO_ACTIVESOCKET.3 \ - CURLINFO_APPCONNECT_TIME.3 \ - CURLINFO_CERTINFO.3 \ - CURLINFO_CONDITION_UNMET.3 \ - CURLINFO_CONNECT_TIME.3 \ - CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 \ - CURLINFO_CONTENT_LENGTH_UPLOAD.3 \ - CURLINFO_CONTENT_TYPE.3 \ - CURLINFO_COOKIELIST.3 \ - CURLINFO_EFFECTIVE_URL.3 \ - CURLINFO_FILETIME.3 \ - CURLINFO_FTP_ENTRY_PATH.3 \ - CURLINFO_HEADER_SIZE.3 \ - CURLINFO_HTTPAUTH_AVAIL.3 \ - CURLINFO_HTTP_CONNECTCODE.3 \ - CURLINFO_HTTP_VERSION.3 \ - CURLINFO_LASTSOCKET.3 \ - CURLINFO_LOCAL_IP.3 \ - CURLINFO_LOCAL_PORT.3 \ - CURLINFO_NAMELOOKUP_TIME.3 \ - CURLINFO_NUM_CONNECTS.3 \ - CURLINFO_OS_ERRNO.3 \ - CURLINFO_PRETRANSFER_TIME.3 \ - CURLINFO_PRIMARY_IP.3 \ - CURLINFO_PRIMARY_PORT.3 \ - CURLINFO_PRIVATE.3 \ - CURLINFO_PROTOCOL.3 \ - CURLINFO_PROXYAUTH_AVAIL.3 \ - CURLINFO_PROXY_SSL_VERIFYRESULT.3 \ - CURLINFO_REDIRECT_COUNT.3 \ - CURLINFO_REDIRECT_TIME.3 \ - CURLINFO_REDIRECT_URL.3 \ - CURLINFO_REQUEST_SIZE.3 \ - CURLINFO_RESPONSE_CODE.3 \ - CURLINFO_RTSP_CLIENT_CSEQ.3 \ - CURLINFO_RTSP_CSEQ_RECV.3 \ - CURLINFO_RTSP_SERVER_CSEQ.3 \ - CURLINFO_RTSP_SESSION_ID.3 \ - CURLINFO_SCHEME.3 \ - CURLINFO_SIZE_DOWNLOAD.3 \ - CURLINFO_SIZE_UPLOAD.3 \ - CURLINFO_SPEED_DOWNLOAD.3 \ - CURLINFO_SPEED_UPLOAD.3 \ - CURLINFO_SSL_ENGINES.3 \ - CURLINFO_SSL_VERIFYRESULT.3 \ - CURLINFO_STARTTRANSFER_TIME.3 \ - CURLINFO_TLS_SESSION.3 \ - CURLINFO_TLS_SSL_PTR.3 \ - CURLINFO_TOTAL_TIME.3 \ - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 \ - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 \ - CURLMOPT_MAXCONNECTS.3 \ - CURLMOPT_MAX_HOST_CONNECTIONS.3 \ - CURLMOPT_MAX_PIPELINE_LENGTH.3 \ - CURLMOPT_MAX_TOTAL_CONNECTIONS.3 \ - CURLMOPT_PIPELINING.3 \ - CURLMOPT_PIPELINING_SERVER_BL.3 \ - CURLMOPT_PIPELINING_SITE_BL.3 \ - CURLMOPT_PUSHDATA.3 \ - CURLMOPT_PUSHFUNCTION.3 \ - CURLMOPT_SOCKETDATA.3 \ - CURLMOPT_SOCKETFUNCTION.3 \ - CURLMOPT_TIMERDATA.3 \ - CURLMOPT_TIMERFUNCTION.3 \ - CURLOPT_ABSTRACT_UNIX_SOCKET.3 \ - CURLOPT_ACCEPTTIMEOUT_MS.3 \ - CURLOPT_ACCEPT_ENCODING.3 \ - CURLOPT_ADDRESS_SCOPE.3 \ - CURLOPT_APPEND.3 \ - CURLOPT_AUTOREFERER.3 \ - CURLOPT_BUFFERSIZE.3 \ - CURLOPT_CAINFO.3 \ - CURLOPT_CAPATH.3 \ - CURLOPT_CERTINFO.3 \ - CURLOPT_CHUNK_BGN_FUNCTION.3 \ - CURLOPT_CHUNK_DATA.3 \ - CURLOPT_CHUNK_END_FUNCTION.3 \ - CURLOPT_CLOSESOCKETDATA.3 \ - CURLOPT_CLOSESOCKETFUNCTION.3 \ - CURLOPT_CONNECTTIMEOUT.3 \ - CURLOPT_CONNECTTIMEOUT_MS.3 \ - CURLOPT_CONNECT_ONLY.3 \ - CURLOPT_CONNECT_TO.3 \ - CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 \ - CURLOPT_CONV_FROM_UTF8_FUNCTION.3 \ - CURLOPT_CONV_TO_NETWORK_FUNCTION.3 \ - CURLOPT_COOKIE.3 \ - CURLOPT_COOKIEFILE.3 \ - CURLOPT_COOKIEJAR.3 \ - CURLOPT_COOKIELIST.3 \ - CURLOPT_COOKIESESSION.3 \ - CURLOPT_COPYPOSTFIELDS.3 \ - CURLOPT_CRLF.3 \ - CURLOPT_CRLFILE.3 \ - CURLOPT_CUSTOMREQUEST.3 \ - CURLOPT_DEBUGDATA.3 \ - CURLOPT_DEBUGFUNCTION.3 \ - CURLOPT_DEFAULT_PROTOCOL.3 \ - CURLOPT_DIRLISTONLY.3 \ - CURLOPT_DNS_CACHE_TIMEOUT.3 \ - CURLOPT_DNS_INTERFACE.3 \ - CURLOPT_DNS_LOCAL_IP4.3 \ - CURLOPT_DNS_LOCAL_IP6.3 \ - CURLOPT_DNS_SERVERS.3 \ - CURLOPT_DNS_USE_GLOBAL_CACHE.3 \ - CURLOPT_EGDSOCKET.3 \ - CURLOPT_ERRORBUFFER.3 \ - CURLOPT_EXPECT_100_TIMEOUT_MS.3 \ - CURLOPT_FAILONERROR.3 \ - CURLOPT_FILETIME.3 \ - CURLOPT_FNMATCH_DATA.3 \ - CURLOPT_FNMATCH_FUNCTION.3 \ - CURLOPT_FOLLOWLOCATION.3 \ - CURLOPT_FORBID_REUSE.3 \ - CURLOPT_FRESH_CONNECT.3 \ - CURLOPT_FTPPORT.3 \ - CURLOPT_FTPSSLAUTH.3 \ - CURLOPT_FTP_ACCOUNT.3 \ - CURLOPT_FTP_ALTERNATIVE_TO_USER.3 \ - CURLOPT_FTP_CREATE_MISSING_DIRS.3 \ - CURLOPT_FTP_FILEMETHOD.3 \ - CURLOPT_FTP_RESPONSE_TIMEOUT.3 \ - CURLOPT_FTP_SKIP_PASV_IP.3 \ - CURLOPT_FTP_SSL_CCC.3 \ - CURLOPT_FTP_USE_EPRT.3 \ - CURLOPT_FTP_USE_EPSV.3 \ - CURLOPT_FTP_USE_PRET.3 \ - CURLOPT_GSSAPI_DELEGATION.3 \ - CURLOPT_HEADER.3 \ - CURLOPT_HEADERDATA.3 \ - CURLOPT_HEADERFUNCTION.3 \ - CURLOPT_HEADEROPT.3 \ - CURLOPT_HTTP200ALIASES.3 \ - CURLOPT_HTTPAUTH.3 \ - CURLOPT_HTTPGET.3 \ - CURLOPT_HTTPHEADER.3 \ - CURLOPT_HTTPPOST.3 \ - CURLOPT_HTTPPROXYTUNNEL.3 \ - CURLOPT_HTTP_CONTENT_DECODING.3 \ - CURLOPT_HTTP_TRANSFER_DECODING.3 \ - CURLOPT_HTTP_VERSION.3 \ - CURLOPT_IGNORE_CONTENT_LENGTH.3 \ - CURLOPT_INFILESIZE.3 \ - CURLOPT_INFILESIZE_LARGE.3 \ - CURLOPT_INTERFACE.3 \ - CURLOPT_INTERLEAVEDATA.3 \ - CURLOPT_INTERLEAVEFUNCTION.3 \ - CURLOPT_IOCTLDATA.3 \ - CURLOPT_IOCTLFUNCTION.3 \ - CURLOPT_IPRESOLVE.3 \ - CURLOPT_ISSUERCERT.3 \ - CURLOPT_KEEP_SENDING_ON_ERROR.3 \ - CURLOPT_KEYPASSWD.3 \ - CURLOPT_KRBLEVEL.3 \ - CURLOPT_LOCALPORT.3 \ - CURLOPT_LOCALPORTRANGE.3 \ - CURLOPT_LOGIN_OPTIONS.3 \ - CURLOPT_LOW_SPEED_LIMIT.3 \ - CURLOPT_LOW_SPEED_TIME.3 \ - CURLOPT_MAIL_AUTH.3 \ - CURLOPT_MAIL_FROM.3 \ - CURLOPT_MAIL_RCPT.3 \ - CURLOPT_MAXCONNECTS.3 \ - CURLOPT_MAXFILESIZE.3 \ - CURLOPT_MAXFILESIZE_LARGE.3 \ - CURLOPT_MAXREDIRS.3 \ - CURLOPT_MAX_RECV_SPEED_LARGE.3 \ - CURLOPT_MAX_SEND_SPEED_LARGE.3 \ - CURLOPT_NETRC.3 \ - CURLOPT_NETRC_FILE.3 \ - CURLOPT_NEW_DIRECTORY_PERMS.3 \ - CURLOPT_NEW_FILE_PERMS.3 \ - CURLOPT_NOBODY.3 \ - CURLOPT_NOPROGRESS.3 \ - CURLOPT_NOPROXY.3 \ - CURLOPT_NOSIGNAL.3 \ - CURLOPT_OPENSOCKETDATA.3 \ - CURLOPT_OPENSOCKETFUNCTION.3 \ - CURLOPT_PASSWORD.3 \ - CURLOPT_PATH_AS_IS.3 \ - CURLOPT_PINNEDPUBLICKEY.3 \ - CURLOPT_PIPEWAIT.3 \ - CURLOPT_PORT.3 \ - CURLOPT_POST.3 \ - CURLOPT_POSTFIELDS.3 \ - CURLOPT_POSTFIELDSIZE.3 \ - CURLOPT_POSTFIELDSIZE_LARGE.3 \ - CURLOPT_POSTQUOTE.3 \ - CURLOPT_POSTREDIR.3 \ - CURLOPT_PREQUOTE.3 \ - CURLOPT_PRE_PROXY.3 \ - CURLOPT_PRIVATE.3 \ - CURLOPT_PROGRESSDATA.3 \ - CURLOPT_PROGRESSFUNCTION.3 \ - CURLOPT_PROTOCOLS.3 \ - CURLOPT_PROXY.3 \ - CURLOPT_PROXYAUTH.3 \ - CURLOPT_PROXYHEADER.3 \ - CURLOPT_PROXYPASSWORD.3 \ - CURLOPT_PROXYPORT.3 \ - CURLOPT_PROXYTYPE.3 \ - CURLOPT_PROXYUSERNAME.3 \ - CURLOPT_PROXYUSERPWD.3 \ - CURLOPT_PROXY_CAINFO.3 \ - CURLOPT_PROXY_CAPATH.3 \ - CURLOPT_PROXY_CRLFILE.3 \ - CURLOPT_PROXY_KEYPASSWD.3 \ - CURLOPT_PROXY_PINNEDPUBLICKEY.3 \ - CURLOPT_PROXY_SERVICE_NAME.3 \ - CURLOPT_PROXY_SSLCERT.3 \ - CURLOPT_PROXY_SSLCERTTYPE.3 \ - CURLOPT_PROXY_SSLKEY.3 \ - CURLOPT_PROXY_SSLKEYTYPE.3 \ - CURLOPT_PROXY_SSLVERSION.3 \ - CURLOPT_PROXY_SSL_CIPHER_LIST.3 \ - CURLOPT_PROXY_SSL_OPTIONS.3 \ - CURLOPT_PROXY_SSL_VERIFYHOST.3 \ - CURLOPT_PROXY_SSL_VERIFYPEER.3 \ - CURLOPT_PROXY_TLSAUTH_PASSWORD.3 \ - CURLOPT_PROXY_TLSAUTH_TYPE.3 \ - CURLOPT_PROXY_TLSAUTH_USERNAME.3 \ - CURLOPT_PROXY_TRANSFER_MODE.3 \ - CURLOPT_PUT.3 \ - CURLOPT_QUOTE.3 \ - CURLOPT_RANDOM_FILE.3 \ - CURLOPT_RANGE.3 \ - CURLOPT_READDATA.3 \ - CURLOPT_READFUNCTION.3 \ - CURLOPT_REDIR_PROTOCOLS.3 \ - CURLOPT_REFERER.3 \ - CURLOPT_RESOLVE.3 \ - CURLOPT_RESUME_FROM.3 \ - CURLOPT_RESUME_FROM_LARGE.3 \ - CURLOPT_RTSP_CLIENT_CSEQ.3 \ - CURLOPT_RTSP_REQUEST.3 \ - CURLOPT_RTSP_SERVER_CSEQ.3 \ - CURLOPT_RTSP_SESSION_ID.3 \ - CURLOPT_RTSP_STREAM_URI.3 \ - CURLOPT_RTSP_TRANSPORT.3 \ - CURLOPT_SASL_IR.3 \ - CURLOPT_SEEKDATA.3 \ - CURLOPT_SEEKFUNCTION.3 \ - CURLOPT_SERVICE_NAME.3 \ - CURLOPT_SHARE.3 \ - CURLOPT_SOCKOPTDATA.3 \ - CURLOPT_SOCKOPTFUNCTION.3 \ - CURLOPT_SOCKS5_GSSAPI_NEC.3 \ - CURLOPT_SOCKS5_GSSAPI_SERVICE.3 \ - CURLOPT_SSH_AUTH_TYPES.3 \ - CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 \ - CURLOPT_SSH_KEYDATA.3 \ - CURLOPT_SSH_KEYFUNCTION.3 \ - CURLOPT_SSH_KNOWNHOSTS.3 \ - CURLOPT_SSH_PRIVATE_KEYFILE.3 \ - CURLOPT_SSH_PUBLIC_KEYFILE.3 \ - CURLOPT_SSLCERT.3 \ - CURLOPT_SSLCERTTYPE.3 \ - CURLOPT_SSLENGINE.3 \ - CURLOPT_SSLENGINE_DEFAULT.3 \ - CURLOPT_SSLKEY.3 \ - CURLOPT_SSLKEYTYPE.3 \ - CURLOPT_SSLVERSION.3 \ - CURLOPT_SSL_CIPHER_LIST.3 \ - CURLOPT_SSL_CTX_DATA.3 \ - CURLOPT_SSL_CTX_FUNCTION.3 \ - CURLOPT_SSL_ENABLE_ALPN.3 \ - CURLOPT_SSL_ENABLE_NPN.3 \ - CURLOPT_SSL_FALSESTART.3 \ - CURLOPT_SSL_OPTIONS.3 \ - CURLOPT_SSL_SESSIONID_CACHE.3 \ - CURLOPT_SSL_VERIFYHOST.3 \ - CURLOPT_SSL_VERIFYPEER.3 \ - CURLOPT_SSL_VERIFYSTATUS.3 \ - CURLOPT_STDERR.3 \ - CURLOPT_STREAM_DEPENDS.3 \ - CURLOPT_STREAM_DEPENDS_E.3 \ - CURLOPT_STREAM_WEIGHT.3 \ - CURLOPT_TCP_FASTOPEN.3 \ - CURLOPT_TCP_KEEPALIVE.3 \ - CURLOPT_TCP_KEEPIDLE.3 \ - CURLOPT_TCP_KEEPINTVL.3 \ - CURLOPT_TCP_NODELAY.3 \ - CURLOPT_TELNETOPTIONS.3 \ - CURLOPT_TFTP_BLKSIZE.3 \ - CURLOPT_TFTP_NO_OPTIONS.3 \ - CURLOPT_TIMECONDITION.3 \ - CURLOPT_TIMEOUT.3 \ - CURLOPT_TIMEOUT_MS.3 \ - CURLOPT_TIMEVALUE.3 \ - CURLOPT_TLSAUTH_PASSWORD.3 \ - CURLOPT_TLSAUTH_TYPE.3 \ - CURLOPT_TLSAUTH_USERNAME.3 \ - CURLOPT_TRANSFERTEXT.3 \ - CURLOPT_TRANSFER_ENCODING.3 \ - CURLOPT_UNIX_SOCKET_PATH.3 \ - CURLOPT_UNRESTRICTED_AUTH.3 \ - CURLOPT_UPLOAD.3 \ - CURLOPT_URL.3 \ - CURLOPT_USERAGENT.3 \ - CURLOPT_USERNAME.3 \ - CURLOPT_USERPWD.3 \ - CURLOPT_USE_SSL.3 \ - CURLOPT_VERBOSE.3 \ - CURLOPT_WILDCARDMATCH.3 \ - CURLOPT_WRITEDATA.3 \ - CURLOPT_WRITEFUNCTION.3 \ - CURLOPT_XFERINFODATA.3 \ - CURLOPT_XFERINFOFUNCTION.3 \ - CURLOPT_XOAUTH2_BEARER.3 - -HTMLPAGES = \ - CURLINFO_ACTIVESOCKET.html \ - CURLINFO_APPCONNECT_TIME.html \ - CURLINFO_CERTINFO.html \ - CURLINFO_CONDITION_UNMET.html \ - CURLINFO_CONNECT_TIME.html \ - CURLINFO_CONTENT_LENGTH_DOWNLOAD.html \ - CURLINFO_CONTENT_LENGTH_UPLOAD.html \ - CURLINFO_CONTENT_TYPE.html \ - CURLINFO_COOKIELIST.html \ - CURLINFO_EFFECTIVE_URL.html \ - CURLINFO_FILETIME.html \ - CURLINFO_FTP_ENTRY_PATH.html \ - CURLINFO_HEADER_SIZE.html \ - CURLINFO_HTTPAUTH_AVAIL.html \ - CURLINFO_HTTP_CONNECTCODE.html \ - CURLINFO_HTTP_VERSION.html \ - CURLINFO_LASTSOCKET.html \ - CURLINFO_LOCAL_IP.html \ - CURLINFO_LOCAL_PORT.html \ - CURLINFO_NAMELOOKUP_TIME.html \ - CURLINFO_NUM_CONNECTS.html \ - CURLINFO_OS_ERRNO.html \ - CURLINFO_PRETRANSFER_TIME.html \ - CURLINFO_PRIMARY_IP.html \ - CURLINFO_PRIMARY_PORT.html \ - CURLINFO_PRIVATE.html \ - CURLINFO_PROTOCOL.html \ - CURLINFO_PROXYAUTH_AVAIL.html \ - CURLINFO_PROXY_SSL_VERIFYRESULT.html \ - CURLINFO_REDIRECT_COUNT.html \ - CURLINFO_REDIRECT_TIME.html \ - CURLINFO_REDIRECT_URL.html \ - CURLINFO_REQUEST_SIZE.html \ - CURLINFO_RESPONSE_CODE.html \ - CURLINFO_RTSP_CLIENT_CSEQ.html \ - CURLINFO_RTSP_CSEQ_RECV.html \ - CURLINFO_RTSP_SERVER_CSEQ.html \ - CURLINFO_RTSP_SESSION_ID.html \ - CURLINFO_SCHEME.html \ - CURLINFO_SIZE_DOWNLOAD.html \ - CURLINFO_SIZE_UPLOAD.html \ - CURLINFO_SPEED_DOWNLOAD.html \ - CURLINFO_SPEED_UPLOAD.html \ - CURLINFO_SSL_ENGINES.html \ - CURLINFO_SSL_VERIFYRESULT.html \ - CURLINFO_STARTTRANSFER_TIME.html \ - CURLINFO_TLS_SESSION.html \ - CURLINFO_TLS_SSL_PTR.html \ - CURLINFO_TOTAL_TIME.html \ - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.html \ - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.html \ - CURLMOPT_MAXCONNECTS.html \ - CURLMOPT_MAX_HOST_CONNECTIONS.html \ - CURLMOPT_MAX_PIPELINE_LENGTH.html \ - CURLMOPT_MAX_TOTAL_CONNECTIONS.html \ - CURLMOPT_PIPELINING.html \ - CURLMOPT_PIPELINING_SERVER_BL.html \ - CURLMOPT_PIPELINING_SITE_BL.html \ - CURLMOPT_PUSHDATA.html \ - CURLMOPT_PUSHFUNCTION.html \ - CURLMOPT_SOCKETDATA.html \ - CURLMOPT_SOCKETFUNCTION.html \ - CURLMOPT_TIMERDATA.html \ - CURLMOPT_TIMERFUNCTION.html \ - CURLOPT_ABSTRACT_UNIX_SOCKET.html \ - CURLOPT_ACCEPTTIMEOUT_MS.html \ - CURLOPT_ACCEPT_ENCODING.html \ - CURLOPT_ADDRESS_SCOPE.html \ - CURLOPT_APPEND.html \ - CURLOPT_AUTOREFERER.html \ - CURLOPT_BUFFERSIZE.html \ - CURLOPT_CAINFO.html \ - CURLOPT_CAPATH.html \ - CURLOPT_CERTINFO.html \ - CURLOPT_CHUNK_BGN_FUNCTION.html \ - CURLOPT_CHUNK_DATA.html \ - CURLOPT_CHUNK_END_FUNCTION.html \ - CURLOPT_CLOSESOCKETDATA.html \ - CURLOPT_CLOSESOCKETFUNCTION.html \ - CURLOPT_CONNECTTIMEOUT.html \ - CURLOPT_CONNECTTIMEOUT_MS.html \ - CURLOPT_CONNECT_ONLY.html \ - CURLOPT_CONNECT_TO.html \ - CURLOPT_CONV_FROM_NETWORK_FUNCTION.html \ - CURLOPT_CONV_FROM_UTF8_FUNCTION.html \ - CURLOPT_CONV_TO_NETWORK_FUNCTION.html \ - CURLOPT_COOKIE.html \ - CURLOPT_COOKIEFILE.html \ - CURLOPT_COOKIEJAR.html \ - CURLOPT_COOKIELIST.html \ - CURLOPT_COOKIESESSION.html \ - CURLOPT_COPYPOSTFIELDS.html \ - CURLOPT_CRLF.html \ - CURLOPT_CRLFILE.html \ - CURLOPT_CUSTOMREQUEST.html \ - CURLOPT_DEBUGDATA.html \ - CURLOPT_DEBUGFUNCTION.html \ - CURLOPT_DEFAULT_PROTOCOL.html \ - CURLOPT_DIRLISTONLY.html \ - CURLOPT_DNS_CACHE_TIMEOUT.html \ - CURLOPT_DNS_INTERFACE.html \ - CURLOPT_DNS_LOCAL_IP4.html \ - CURLOPT_DNS_LOCAL_IP6.html \ - CURLOPT_DNS_SERVERS.html \ - CURLOPT_DNS_USE_GLOBAL_CACHE.html \ - CURLOPT_EGDSOCKET.html \ - CURLOPT_ERRORBUFFER.html \ - CURLOPT_EXPECT_100_TIMEOUT_MS.html \ - CURLOPT_FAILONERROR.html \ - CURLOPT_FILETIME.html \ - CURLOPT_FNMATCH_DATA.html \ - CURLOPT_FNMATCH_FUNCTION.html \ - CURLOPT_FOLLOWLOCATION.html \ - CURLOPT_FORBID_REUSE.html \ - CURLOPT_FRESH_CONNECT.html \ - CURLOPT_FTPPORT.html \ - CURLOPT_FTPSSLAUTH.html \ - CURLOPT_FTP_ACCOUNT.html \ - CURLOPT_FTP_ALTERNATIVE_TO_USER.html \ - CURLOPT_FTP_CREATE_MISSING_DIRS.html \ - CURLOPT_FTP_FILEMETHOD.html \ - CURLOPT_FTP_RESPONSE_TIMEOUT.html \ - CURLOPT_FTP_SKIP_PASV_IP.html \ - CURLOPT_FTP_SSL_CCC.html \ - CURLOPT_FTP_USE_EPRT.html \ - CURLOPT_FTP_USE_EPSV.html \ - CURLOPT_FTP_USE_PRET.html \ - CURLOPT_GSSAPI_DELEGATION.html \ - CURLOPT_HEADER.html \ - CURLOPT_HEADERDATA.html \ - CURLOPT_HEADERFUNCTION.html \ - CURLOPT_HEADEROPT.html \ - CURLOPT_HTTP200ALIASES.html \ - CURLOPT_HTTPAUTH.html \ - CURLOPT_HTTPGET.html \ - CURLOPT_HTTPHEADER.html \ - CURLOPT_HTTPPOST.html \ - CURLOPT_HTTPPROXYTUNNEL.html \ - CURLOPT_HTTP_CONTENT_DECODING.html \ - CURLOPT_HTTP_TRANSFER_DECODING.html \ - CURLOPT_HTTP_VERSION.html \ - CURLOPT_IGNORE_CONTENT_LENGTH.html \ - CURLOPT_INFILESIZE.html \ - CURLOPT_INFILESIZE_LARGE.html \ - CURLOPT_INTERFACE.html \ - CURLOPT_INTERLEAVEDATA.html \ - CURLOPT_INTERLEAVEFUNCTION.html \ - CURLOPT_IOCTLDATA.html \ - CURLOPT_IOCTLFUNCTION.html \ - CURLOPT_IPRESOLVE.html \ - CURLOPT_ISSUERCERT.html \ - CURLOPT_KEEP_SENDING_ON_ERROR.html \ - CURLOPT_KEYPASSWD.html \ - CURLOPT_KRBLEVEL.html \ - CURLOPT_LOCALPORT.html \ - CURLOPT_LOCALPORTRANGE.html \ - CURLOPT_LOGIN_OPTIONS.html \ - CURLOPT_LOW_SPEED_LIMIT.html \ - CURLOPT_LOW_SPEED_TIME.html \ - CURLOPT_MAIL_AUTH.html \ - CURLOPT_MAIL_FROM.html \ - CURLOPT_MAIL_RCPT.html \ - CURLOPT_MAXCONNECTS.html \ - CURLOPT_MAXFILESIZE.html \ - CURLOPT_MAXFILESIZE_LARGE.html \ - CURLOPT_MAXREDIRS.html \ - CURLOPT_MAX_RECV_SPEED_LARGE.html \ - CURLOPT_MAX_SEND_SPEED_LARGE.html \ - CURLOPT_NETRC.html \ - CURLOPT_NETRC_FILE.html \ - CURLOPT_NEW_DIRECTORY_PERMS.html \ - CURLOPT_NEW_FILE_PERMS.html \ - CURLOPT_NOBODY.html \ - CURLOPT_NOPROGRESS.html \ - CURLOPT_NOPROXY.html \ - CURLOPT_NOSIGNAL.html \ - CURLOPT_OPENSOCKETDATA.html \ - CURLOPT_OPENSOCKETFUNCTION.html \ - CURLOPT_PASSWORD.html \ - CURLOPT_PATH_AS_IS.html \ - CURLOPT_PINNEDPUBLICKEY.html \ - CURLOPT_PIPEWAIT.html \ - CURLOPT_PORT.html \ - CURLOPT_POST.html \ - CURLOPT_POSTFIELDS.html \ - CURLOPT_POSTFIELDSIZE.html \ - CURLOPT_POSTFIELDSIZE_LARGE.html \ - CURLOPT_POSTQUOTE.html \ - CURLOPT_POSTREDIR.html \ - CURLOPT_PREQUOTE.html \ - CURLOPT_PRE_PROXY.html \ - CURLOPT_PRIVATE.html \ - CURLOPT_PROGRESSDATA.html \ - CURLOPT_PROGRESSFUNCTION.html \ - CURLOPT_PROTOCOLS.html \ - CURLOPT_PROXY.html \ - CURLOPT_PROXYAUTH.html \ - CURLOPT_PROXYHEADER.html \ - CURLOPT_PROXYPASSWORD.html \ - CURLOPT_PROXYPORT.html \ - CURLOPT_PROXYTYPE.html \ - CURLOPT_PROXYUSERNAME.html \ - CURLOPT_PROXYUSERPWD.html \ - CURLOPT_PROXY_CAINFO.html \ - CURLOPT_PROXY_CAPATH.html \ - CURLOPT_PROXY_CRLFILE.html \ - CURLOPT_PROXY_KEYPASSWD.html \ - CURLOPT_PROXY_PINNEDPUBLICKEY.html \ - CURLOPT_PROXY_SERVICE_NAME.html \ - CURLOPT_PROXY_SSLCERT.html \ - CURLOPT_PROXY_SSLCERTTYPE.html \ - CURLOPT_PROXY_SSLKEY.html \ - CURLOPT_PROXY_SSLKEYTYPE.html \ - CURLOPT_PROXY_SSLVERSION.html \ - CURLOPT_PROXY_SSL_CIPHER_LIST.html \ - CURLOPT_PROXY_SSL_OPTIONS.html \ - CURLOPT_PROXY_SSL_VERIFYHOST.html \ - CURLOPT_PROXY_SSL_VERIFYPEER.html \ - CURLOPT_PROXY_TLSAUTH_PASSWORD.html \ - CURLOPT_PROXY_TLSAUTH_TYPE.html \ - CURLOPT_PROXY_TLSAUTH_USERNAME.html \ - CURLOPT_PROXY_TRANSFER_MODE.html \ - CURLOPT_PUT.html \ - CURLOPT_QUOTE.html \ - CURLOPT_RANDOM_FILE.html \ - CURLOPT_RANGE.html \ - CURLOPT_READDATA.html \ - CURLOPT_READFUNCTION.html \ - CURLOPT_REDIR_PROTOCOLS.html \ - CURLOPT_REFERER.html \ - CURLOPT_RESOLVE.html \ - CURLOPT_RESUME_FROM.html \ - CURLOPT_RESUME_FROM_LARGE.html \ - CURLOPT_RTSP_CLIENT_CSEQ.html \ - CURLOPT_RTSP_REQUEST.html \ - CURLOPT_RTSP_SERVER_CSEQ.html \ - CURLOPT_RTSP_SESSION_ID.html \ - CURLOPT_RTSP_STREAM_URI.html \ - CURLOPT_RTSP_TRANSPORT.html \ - CURLOPT_SASL_IR.html \ - CURLOPT_SEEKDATA.html \ - CURLOPT_SEEKFUNCTION.html \ - CURLOPT_SERVICE_NAME.html \ - CURLOPT_SHARE.html \ - CURLOPT_SOCKOPTDATA.html \ - CURLOPT_SOCKOPTFUNCTION.html \ - CURLOPT_SOCKS5_GSSAPI_NEC.html \ - CURLOPT_SOCKS5_GSSAPI_SERVICE.html \ - CURLOPT_SSH_AUTH_TYPES.html \ - CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.html \ - CURLOPT_SSH_KEYDATA.html \ - CURLOPT_SSH_KEYFUNCTION.html \ - CURLOPT_SSH_KNOWNHOSTS.html \ - CURLOPT_SSH_PRIVATE_KEYFILE.html \ - CURLOPT_SSH_PUBLIC_KEYFILE.html \ - CURLOPT_SSLCERT.html \ - CURLOPT_SSLCERTTYPE.html \ - CURLOPT_SSLENGINE.html \ - CURLOPT_SSLENGINE_DEFAULT.html \ - CURLOPT_SSLKEY.html \ - CURLOPT_SSLKEYTYPE.html \ - CURLOPT_SSLVERSION.html \ - CURLOPT_SSL_CIPHER_LIST.html \ - CURLOPT_SSL_CTX_DATA.html \ - CURLOPT_SSL_CTX_FUNCTION.html \ - CURLOPT_SSL_ENABLE_ALPN.html \ - CURLOPT_SSL_ENABLE_NPN.html \ - CURLOPT_SSL_FALSESTART.html \ - CURLOPT_SSL_OPTIONS.html \ - CURLOPT_SSL_SESSIONID_CACHE.html \ - CURLOPT_SSL_VERIFYHOST.html \ - CURLOPT_SSL_VERIFYPEER.html \ - CURLOPT_SSL_VERIFYSTATUS.html \ - CURLOPT_STDERR.html \ - CURLOPT_STREAM_DEPENDS.html \ - CURLOPT_STREAM_DEPENDS_E.html \ - CURLOPT_STREAM_WEIGHT.html \ - CURLOPT_TCP_FASTOPEN.html \ - CURLOPT_TCP_KEEPALIVE.html \ - CURLOPT_TCP_KEEPIDLE.html \ - CURLOPT_TCP_KEEPINTVL.html \ - CURLOPT_TCP_NODELAY.html \ - CURLOPT_TELNETOPTIONS.html \ - CURLOPT_TFTP_BLKSIZE.html \ - CURLOPT_TFTP_NO_OPTIONS.html \ - CURLOPT_TIMECONDITION.html \ - CURLOPT_TIMEOUT.html \ - CURLOPT_TIMEOUT_MS.html \ - CURLOPT_TIMEVALUE.html \ - CURLOPT_TLSAUTH_PASSWORD.html \ - CURLOPT_TLSAUTH_TYPE.html \ - CURLOPT_TLSAUTH_USERNAME.html \ - CURLOPT_TRANSFERTEXT.html \ - CURLOPT_TRANSFER_ENCODING.html \ - CURLOPT_UNIX_SOCKET_PATH.html \ - CURLOPT_UNRESTRICTED_AUTH.html \ - CURLOPT_UPLOAD.html \ - CURLOPT_URL.html \ - CURLOPT_USERAGENT.html \ - CURLOPT_USERNAME.html \ - CURLOPT_USERPWD.html \ - CURLOPT_USE_SSL.html \ - CURLOPT_VERBOSE.html \ - CURLOPT_WILDCARDMATCH.html \ - CURLOPT_WRITEDATA.html \ - CURLOPT_WRITEFUNCTION.html \ - CURLOPT_XFERINFODATA.html \ - CURLOPT_XFERINFOFUNCTION.html \ - CURLOPT_XOAUTH2_BEARER.html - -PDFPAGES = \ - CURLINFO_ACTIVESOCKET.pdf \ - CURLINFO_APPCONNECT_TIME.pdf \ - CURLINFO_CERTINFO.pdf \ - CURLINFO_CONDITION_UNMET.pdf \ - CURLINFO_CONNECT_TIME.pdf \ - CURLINFO_CONTENT_LENGTH_DOWNLOAD.pdf \ - CURLINFO_CONTENT_LENGTH_UPLOAD.pdf \ - CURLINFO_CONTENT_TYPE.pdf \ - CURLINFO_COOKIELIST.pdf \ - CURLINFO_EFFECTIVE_URL.pdf \ - CURLINFO_FILETIME.pdf \ - CURLINFO_FTP_ENTRY_PATH.pdf \ - CURLINFO_HEADER_SIZE.pdf \ - CURLINFO_HTTPAUTH_AVAIL.pdf \ - CURLINFO_HTTP_CONNECTCODE.pdf \ - CURLINFO_HTTP_VERSION.pdf \ - CURLINFO_LASTSOCKET.pdf \ - CURLINFO_LOCAL_IP.pdf \ - CURLINFO_LOCAL_PORT.pdf \ - CURLINFO_NAMELOOKUP_TIME.pdf \ - CURLINFO_NUM_CONNECTS.pdf \ - CURLINFO_OS_ERRNO.pdf \ - CURLINFO_PRETRANSFER_TIME.pdf \ - CURLINFO_PRIMARY_IP.pdf \ - CURLINFO_PRIMARY_PORT.pdf \ - CURLINFO_PRIVATE.pdf \ - CURLINFO_PROTOCOL.pdf \ - CURLINFO_PROXYAUTH_AVAIL.pdf \ - CURLINFO_PROXY_SSL_VERIFYRESULT.pdf \ - CURLINFO_REDIRECT_COUNT.pdf \ - CURLINFO_REDIRECT_TIME.pdf \ - CURLINFO_REDIRECT_URL.pdf \ - CURLINFO_REQUEST_SIZE.pdf \ - CURLINFO_RESPONSE_CODE.pdf \ - CURLINFO_RTSP_CLIENT_CSEQ.pdf \ - CURLINFO_RTSP_CSEQ_RECV.pdf \ - CURLINFO_RTSP_SERVER_CSEQ.pdf \ - CURLINFO_RTSP_SESSION_ID.pdf \ - CURLINFO_SCHEME.pdf \ - CURLINFO_SIZE_DOWNLOAD.pdf \ - CURLINFO_SIZE_UPLOAD.pdf \ - CURLINFO_SPEED_DOWNLOAD.pdf \ - CURLINFO_SPEED_UPLOAD.pdf \ - CURLINFO_SSL_ENGINES.pdf \ - CURLINFO_SSL_VERIFYRESULT.pdf \ - CURLINFO_STARTTRANSFER_TIME.pdf \ - CURLINFO_TLS_SESSION.pdf \ - CURLINFO_TLS_SSL_PTR.pdf \ - CURLINFO_TOTAL_TIME.pdf \ - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.pdf \ - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.pdf \ - CURLMOPT_MAXCONNECTS.pdf \ - CURLMOPT_MAX_HOST_CONNECTIONS.pdf \ - CURLMOPT_MAX_PIPELINE_LENGTH.pdf \ - CURLMOPT_MAX_TOTAL_CONNECTIONS.pdf \ - CURLMOPT_PIPELINING.pdf \ - CURLMOPT_PIPELINING_SERVER_BL.pdf \ - CURLMOPT_PIPELINING_SITE_BL.pdf \ - CURLMOPT_PUSHDATA.pdf \ - CURLMOPT_PUSHFUNCTION.pdf \ - CURLMOPT_SOCKETDATA.pdf \ - CURLMOPT_SOCKETFUNCTION.pdf \ - CURLMOPT_TIMERDATA.pdf \ - CURLMOPT_TIMERFUNCTION.pdf \ - CURLOPT_ABSTRACT_UNIX_SOCKET.pdf \ - CURLOPT_ACCEPTTIMEOUT_MS.pdf \ - CURLOPT_ACCEPT_ENCODING.pdf \ - CURLOPT_ADDRESS_SCOPE.pdf \ - CURLOPT_APPEND.pdf \ - CURLOPT_AUTOREFERER.pdf \ - CURLOPT_BUFFERSIZE.pdf \ - CURLOPT_CAINFO.pdf \ - CURLOPT_CAPATH.pdf \ - CURLOPT_CERTINFO.pdf \ - CURLOPT_CHUNK_BGN_FUNCTION.pdf \ - CURLOPT_CHUNK_DATA.pdf \ - CURLOPT_CHUNK_END_FUNCTION.pdf \ - CURLOPT_CLOSESOCKETDATA.pdf \ - CURLOPT_CLOSESOCKETFUNCTION.pdf \ - CURLOPT_CONNECTTIMEOUT.pdf \ - CURLOPT_CONNECTTIMEOUT_MS.pdf \ - CURLOPT_CONNECT_ONLY.pdf \ - CURLOPT_CONNECT_TO.pdf \ - CURLOPT_CONV_FROM_NETWORK_FUNCTION.pdf \ - CURLOPT_CONV_FROM_UTF8_FUNCTION.pdf \ - CURLOPT_CONV_TO_NETWORK_FUNCTION.pdf \ - CURLOPT_COOKIE.pdf \ - CURLOPT_COOKIEFILE.pdf \ - CURLOPT_COOKIEJAR.pdf \ - CURLOPT_COOKIELIST.pdf \ - CURLOPT_COOKIESESSION.pdf \ - CURLOPT_COPYPOSTFIELDS.pdf \ - CURLOPT_CRLF.pdf \ - CURLOPT_CRLFILE.pdf \ - CURLOPT_CUSTOMREQUEST.pdf \ - CURLOPT_DEBUGDATA.pdf \ - CURLOPT_DEBUGFUNCTION.pdf \ - CURLOPT_DEFAULT_PROTOCOL.pdf \ - CURLOPT_DIRLISTONLY.pdf \ - CURLOPT_DNS_CACHE_TIMEOUT.pdf \ - CURLOPT_DNS_INTERFACE.pdf \ - CURLOPT_DNS_LOCAL_IP4.pdf \ - CURLOPT_DNS_LOCAL_IP6.pdf \ - CURLOPT_DNS_SERVERS.pdf \ - CURLOPT_DNS_USE_GLOBAL_CACHE.pdf \ - CURLOPT_EGDSOCKET.pdf \ - CURLOPT_ERRORBUFFER.pdf \ - CURLOPT_EXPECT_100_TIMEOUT_MS.pdf \ - CURLOPT_FAILONERROR.pdf \ - CURLOPT_FILETIME.pdf \ - CURLOPT_FNMATCH_DATA.pdf \ - CURLOPT_FNMATCH_FUNCTION.pdf \ - CURLOPT_FOLLOWLOCATION.pdf \ - CURLOPT_FORBID_REUSE.pdf \ - CURLOPT_FRESH_CONNECT.pdf \ - CURLOPT_FTPPORT.pdf \ - CURLOPT_FTPSSLAUTH.pdf \ - CURLOPT_FTP_ACCOUNT.pdf \ - CURLOPT_FTP_ALTERNATIVE_TO_USER.pdf \ - CURLOPT_FTP_CREATE_MISSING_DIRS.pdf \ - CURLOPT_FTP_FILEMETHOD.pdf \ - CURLOPT_FTP_RESPONSE_TIMEOUT.pdf \ - CURLOPT_FTP_SKIP_PASV_IP.pdf \ - CURLOPT_FTP_SSL_CCC.pdf \ - CURLOPT_FTP_USE_EPRT.pdf \ - CURLOPT_FTP_USE_EPSV.pdf \ - CURLOPT_FTP_USE_PRET.pdf \ - CURLOPT_GSSAPI_DELEGATION.pdf \ - CURLOPT_HEADER.pdf \ - CURLOPT_HEADERDATA.pdf \ - CURLOPT_HEADERFUNCTION.pdf \ - CURLOPT_HEADEROPT.pdf \ - CURLOPT_HTTP200ALIASES.pdf \ - CURLOPT_HTTPAUTH.pdf \ - CURLOPT_HTTPGET.pdf \ - CURLOPT_HTTPHEADER.pdf \ - CURLOPT_HTTPPOST.pdf \ - CURLOPT_HTTPPROXYTUNNEL.pdf \ - CURLOPT_HTTP_CONTENT_DECODING.pdf \ - CURLOPT_HTTP_TRANSFER_DECODING.pdf \ - CURLOPT_HTTP_VERSION.pdf \ - CURLOPT_IGNORE_CONTENT_LENGTH.pdf \ - CURLOPT_INFILESIZE.pdf \ - CURLOPT_INFILESIZE_LARGE.pdf \ - CURLOPT_INTERFACE.pdf \ - CURLOPT_INTERLEAVEDATA.pdf \ - CURLOPT_INTERLEAVEFUNCTION.pdf \ - CURLOPT_IOCTLDATA.pdf \ - CURLOPT_IOCTLFUNCTION.pdf \ - CURLOPT_IPRESOLVE.pdf \ - CURLOPT_ISSUERCERT.pdf \ - CURLOPT_KEEP_SENDING_ON_ERROR.pdf \ - CURLOPT_KEYPASSWD.pdf \ - CURLOPT_KRBLEVEL.pdf \ - CURLOPT_LOCALPORT.pdf \ - CURLOPT_LOCALPORTRANGE.pdf \ - CURLOPT_LOGIN_OPTIONS.pdf \ - CURLOPT_LOW_SPEED_LIMIT.pdf \ - CURLOPT_LOW_SPEED_TIME.pdf \ - CURLOPT_MAIL_AUTH.pdf \ - CURLOPT_MAIL_FROM.pdf \ - CURLOPT_MAIL_RCPT.pdf \ - CURLOPT_MAXCONNECTS.pdf \ - CURLOPT_MAXFILESIZE.pdf \ - CURLOPT_MAXFILESIZE_LARGE.pdf \ - CURLOPT_MAXREDIRS.pdf \ - CURLOPT_MAX_RECV_SPEED_LARGE.pdf \ - CURLOPT_MAX_SEND_SPEED_LARGE.pdf \ - CURLOPT_NETRC.pdf \ - CURLOPT_NETRC_FILE.pdf \ - CURLOPT_NEW_DIRECTORY_PERMS.pdf \ - CURLOPT_NEW_FILE_PERMS.pdf \ - CURLOPT_NOBODY.pdf \ - CURLOPT_NOPROGRESS.pdf \ - CURLOPT_NOPROXY.pdf \ - CURLOPT_NOSIGNAL.pdf \ - CURLOPT_OPENSOCKETDATA.pdf \ - CURLOPT_OPENSOCKETFUNCTION.pdf \ - CURLOPT_PASSWORD.pdf \ - CURLOPT_PATH_AS_IS.pdf \ - CURLOPT_PINNEDPUBLICKEY.pdf \ - CURLOPT_PIPEWAIT.pdf \ - CURLOPT_PORT.pdf \ - CURLOPT_POST.pdf \ - CURLOPT_POSTFIELDS.pdf \ - CURLOPT_POSTFIELDSIZE.pdf \ - CURLOPT_POSTFIELDSIZE_LARGE.pdf \ - CURLOPT_POSTQUOTE.pdf \ - CURLOPT_POSTREDIR.pdf \ - CURLOPT_PREQUOTE.pdf \ - CURLOPT_PRE_PROXY.pdf \ - CURLOPT_PRIVATE.pdf \ - CURLOPT_PROGRESSDATA.pdf \ - CURLOPT_PROGRESSFUNCTION.pdf \ - CURLOPT_PROTOCOLS.pdf \ - CURLOPT_PROXY.pdf \ - CURLOPT_PROXYAUTH.pdf \ - CURLOPT_PROXYHEADER.pdf \ - CURLOPT_PROXYPASSWORD.pdf \ - CURLOPT_PROXYPORT.pdf \ - CURLOPT_PROXYTYPE.pdf \ - CURLOPT_PROXYUSERNAME.pdf \ - CURLOPT_PROXYUSERPWD.pdf \ - CURLOPT_PROXY_CAINFO.pdf \ - CURLOPT_PROXY_CAPATH.pdf \ - CURLOPT_PROXY_CRLFILE.pdf \ - CURLOPT_PROXY_KEYPASSWD.pdf \ - CURLOPT_PROXY_PINNEDPUBLICKEY.pdf \ - CURLOPT_PROXY_SERVICE_NAME.pdf \ - CURLOPT_PROXY_SSLCERT.pdf \ - CURLOPT_PROXY_SSLCERTTYPE.pdf \ - CURLOPT_PROXY_SSLKEY.pdf \ - CURLOPT_PROXY_SSLKEYTYPE.pdf \ - CURLOPT_PROXY_SSLVERSION.pdf \ - CURLOPT_PROXY_SSL_CIPHER_LIST.pdf \ - CURLOPT_PROXY_SSL_OPTIONS.pdf \ - CURLOPT_PROXY_SSL_VERIFYHOST.pdf \ - CURLOPT_PROXY_SSL_VERIFYPEER.pdf \ - CURLOPT_PROXY_TLSAUTH_PASSWORD.pdf \ - CURLOPT_PROXY_TLSAUTH_TYPE.pdf \ - CURLOPT_PROXY_TLSAUTH_USERNAME.pdf \ - CURLOPT_PROXY_TRANSFER_MODE.pdf \ - CURLOPT_PUT.pdf \ - CURLOPT_QUOTE.pdf \ - CURLOPT_RANDOM_FILE.pdf \ - CURLOPT_RANGE.pdf \ - CURLOPT_READDATA.pdf \ - CURLOPT_READFUNCTION.pdf \ - CURLOPT_REDIR_PROTOCOLS.pdf \ - CURLOPT_REFERER.pdf \ - CURLOPT_RESOLVE.pdf \ - CURLOPT_RESUME_FROM.pdf \ - CURLOPT_RESUME_FROM_LARGE.pdf \ - CURLOPT_RTSP_CLIENT_CSEQ.pdf \ - CURLOPT_RTSP_REQUEST.pdf \ - CURLOPT_RTSP_SERVER_CSEQ.pdf \ - CURLOPT_RTSP_SESSION_ID.pdf \ - CURLOPT_RTSP_STREAM_URI.pdf \ - CURLOPT_RTSP_TRANSPORT.pdf \ - CURLOPT_SASL_IR.pdf \ - CURLOPT_SEEKDATA.pdf \ - CURLOPT_SEEKFUNCTION.pdf \ - CURLOPT_SERVICE_NAME.pdf \ - CURLOPT_SHARE.pdf \ - CURLOPT_SOCKOPTDATA.pdf \ - CURLOPT_SOCKOPTFUNCTION.pdf \ - CURLOPT_SOCKS5_GSSAPI_NEC.pdf \ - CURLOPT_SOCKS5_GSSAPI_SERVICE.pdf \ - CURLOPT_SSH_AUTH_TYPES.pdf \ - CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.pdf \ - CURLOPT_SSH_KEYDATA.pdf \ - CURLOPT_SSH_KEYFUNCTION.pdf \ - CURLOPT_SSH_KNOWNHOSTS.pdf \ - CURLOPT_SSH_PRIVATE_KEYFILE.pdf \ - CURLOPT_SSH_PUBLIC_KEYFILE.pdf \ - CURLOPT_SSLCERT.pdf \ - CURLOPT_SSLCERTTYPE.pdf \ - CURLOPT_SSLENGINE.pdf \ - CURLOPT_SSLENGINE_DEFAULT.pdf \ - CURLOPT_SSLKEY.pdf \ - CURLOPT_SSLKEYTYPE.pdf \ - CURLOPT_SSLVERSION.pdf \ - CURLOPT_SSL_CIPHER_LIST.pdf \ - CURLOPT_SSL_CTX_DATA.pdf \ - CURLOPT_SSL_CTX_FUNCTION.pdf \ - CURLOPT_SSL_ENABLE_ALPN.pdf \ - CURLOPT_SSL_ENABLE_NPN.pdf \ - CURLOPT_SSL_FALSESTART.pdf \ - CURLOPT_SSL_OPTIONS.pdf \ - CURLOPT_SSL_SESSIONID_CACHE.pdf \ - CURLOPT_SSL_VERIFYHOST.pdf \ - CURLOPT_SSL_VERIFYPEER.pdf \ - CURLOPT_SSL_VERIFYSTATUS.pdf \ - CURLOPT_STDERR.pdf \ - CURLOPT_STREAM_DEPENDS.pdf \ - CURLOPT_STREAM_DEPENDS_E.pdf \ - CURLOPT_STREAM_WEIGHT.pdf \ - CURLOPT_TCP_FASTOPEN.pdf \ - CURLOPT_TCP_KEEPALIVE.pdf \ - CURLOPT_TCP_KEEPIDLE.pdf \ - CURLOPT_TCP_KEEPINTVL.pdf \ - CURLOPT_TCP_NODELAY.pdf \ - CURLOPT_TELNETOPTIONS.pdf \ - CURLOPT_TFTP_BLKSIZE.pdf \ - CURLOPT_TFTP_NO_OPTIONS.pdf \ - CURLOPT_TIMECONDITION.pdf \ - CURLOPT_TIMEOUT.pdf \ - CURLOPT_TIMEOUT_MS.pdf \ - CURLOPT_TIMEVALUE.pdf \ - CURLOPT_TLSAUTH_PASSWORD.pdf \ - CURLOPT_TLSAUTH_TYPE.pdf \ - CURLOPT_TLSAUTH_USERNAME.pdf \ - CURLOPT_TRANSFERTEXT.pdf \ - CURLOPT_TRANSFER_ENCODING.pdf \ - CURLOPT_UNIX_SOCKET_PATH.pdf \ - CURLOPT_UNRESTRICTED_AUTH.pdf \ - CURLOPT_UPLOAD.pdf \ - CURLOPT_URL.pdf \ - CURLOPT_USERAGENT.pdf \ - CURLOPT_USERNAME.pdf \ - CURLOPT_USERPWD.pdf \ - CURLOPT_USE_SSL.pdf \ - CURLOPT_VERBOSE.pdf \ - CURLOPT_WILDCARDMATCH.pdf \ - CURLOPT_WRITEDATA.pdf \ - CURLOPT_WRITEFUNCTION.pdf \ - CURLOPT_XFERINFODATA.pdf \ - CURLOPT_XFERINFOFUNCTION.pdf \ - CURLOPT_XOAUTH2_BEARER.pdf - -CLEANFILES = $(HTMLPAGES) $(PDFPAGES) -EXTRA_DIST = $(man_MANS) + CURLINFO_ACTIVESOCKET.3 \ + CURLINFO_APPCONNECT_TIME.3 \ + CURLINFO_CERTINFO.3 \ + CURLINFO_CONDITION_UNMET.3 \ + CURLINFO_CONNECT_TIME.3 \ + CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 \ + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 \ + CURLINFO_CONTENT_LENGTH_UPLOAD.3 \ + CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 \ + CURLINFO_CONTENT_TYPE.3 \ + CURLINFO_COOKIELIST.3 \ + CURLINFO_EFFECTIVE_URL.3 \ + CURLINFO_FILETIME.3 \ + CURLINFO_FILETIME_T.3 \ + CURLINFO_FTP_ENTRY_PATH.3 \ + CURLINFO_HEADER_SIZE.3 \ + CURLINFO_HTTPAUTH_AVAIL.3 \ + CURLINFO_HTTP_CONNECTCODE.3 \ + CURLINFO_HTTP_VERSION.3 \ + CURLINFO_LASTSOCKET.3 \ + CURLINFO_LOCAL_IP.3 \ + CURLINFO_LOCAL_PORT.3 \ + CURLINFO_NAMELOOKUP_TIME.3 \ + CURLINFO_NUM_CONNECTS.3 \ + CURLINFO_OS_ERRNO.3 \ + CURLINFO_PRETRANSFER_TIME.3 \ + CURLINFO_PRIMARY_IP.3 \ + CURLINFO_PRIMARY_PORT.3 \ + CURLINFO_PRIVATE.3 \ + CURLINFO_PROTOCOL.3 \ + CURLINFO_PROXYAUTH_AVAIL.3 \ + CURLINFO_PROXY_SSL_VERIFYRESULT.3 \ + CURLINFO_REDIRECT_COUNT.3 \ + CURLINFO_REDIRECT_TIME.3 \ + CURLINFO_REDIRECT_URL.3 \ + CURLINFO_REQUEST_SIZE.3 \ + CURLINFO_RESPONSE_CODE.3 \ + CURLINFO_RTSP_CLIENT_CSEQ.3 \ + CURLINFO_RTSP_CSEQ_RECV.3 \ + CURLINFO_RTSP_SERVER_CSEQ.3 \ + CURLINFO_RTSP_SESSION_ID.3 \ + CURLINFO_SCHEME.3 \ + CURLINFO_SIZE_DOWNLOAD.3 \ + CURLINFO_SIZE_DOWNLOAD_T.3 \ + CURLINFO_SIZE_UPLOAD.3 \ + CURLINFO_SIZE_UPLOAD_T.3 \ + CURLINFO_SPEED_DOWNLOAD.3 \ + CURLINFO_SPEED_DOWNLOAD_T.3 \ + CURLINFO_SPEED_UPLOAD.3 \ + CURLINFO_SPEED_UPLOAD_T.3 \ + CURLINFO_SSL_ENGINES.3 \ + CURLINFO_SSL_VERIFYRESULT.3 \ + CURLINFO_STARTTRANSFER_TIME.3 \ + CURLINFO_TLS_SESSION.3 \ + CURLINFO_TLS_SSL_PTR.3 \ + CURLINFO_TOTAL_TIME.3 \ + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 \ + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 \ + CURLMOPT_MAXCONNECTS.3 \ + CURLMOPT_MAX_HOST_CONNECTIONS.3 \ + CURLMOPT_MAX_PIPELINE_LENGTH.3 \ + CURLMOPT_MAX_TOTAL_CONNECTIONS.3 \ + CURLMOPT_PIPELINING.3 \ + CURLMOPT_PIPELINING_SERVER_BL.3 \ + CURLMOPT_PIPELINING_SITE_BL.3 \ + CURLMOPT_PUSHDATA.3 \ + CURLMOPT_PUSHFUNCTION.3 \ + CURLMOPT_SOCKETDATA.3 \ + CURLMOPT_SOCKETFUNCTION.3 \ + CURLMOPT_TIMERDATA.3 \ + CURLMOPT_TIMERFUNCTION.3 \ + CURLOPT_ABSTRACT_UNIX_SOCKET.3 \ + CURLOPT_ACCEPTTIMEOUT_MS.3 \ + CURLOPT_ACCEPT_ENCODING.3 \ + CURLOPT_ADDRESS_SCOPE.3 \ + CURLOPT_APPEND.3 \ + CURLOPT_AUTOREFERER.3 \ + CURLOPT_BUFFERSIZE.3 \ + CURLOPT_CAINFO.3 \ + CURLOPT_CAPATH.3 \ + CURLOPT_CERTINFO.3 \ + CURLOPT_CHUNK_BGN_FUNCTION.3 \ + CURLOPT_CHUNK_DATA.3 \ + CURLOPT_CHUNK_END_FUNCTION.3 \ + CURLOPT_CLOSESOCKETDATA.3 \ + CURLOPT_CLOSESOCKETFUNCTION.3 \ + CURLOPT_CONNECTTIMEOUT.3 \ + CURLOPT_CONNECTTIMEOUT_MS.3 \ + CURLOPT_CONNECT_ONLY.3 \ + CURLOPT_CONNECT_TO.3 \ + CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 \ + CURLOPT_CONV_FROM_UTF8_FUNCTION.3 \ + CURLOPT_CONV_TO_NETWORK_FUNCTION.3 \ + CURLOPT_COOKIE.3 \ + CURLOPT_COOKIEFILE.3 \ + CURLOPT_COOKIEJAR.3 \ + CURLOPT_COOKIELIST.3 \ + CURLOPT_COOKIESESSION.3 \ + CURLOPT_COPYPOSTFIELDS.3 \ + CURLOPT_CRLF.3 \ + CURLOPT_CRLFILE.3 \ + CURLOPT_CUSTOMREQUEST.3 \ + CURLOPT_DEBUGDATA.3 \ + CURLOPT_DEBUGFUNCTION.3 \ + CURLOPT_DEFAULT_PROTOCOL.3 \ + CURLOPT_DIRLISTONLY.3 \ + CURLOPT_DNS_CACHE_TIMEOUT.3 \ + CURLOPT_DNS_INTERFACE.3 \ + CURLOPT_DNS_LOCAL_IP4.3 \ + CURLOPT_DNS_LOCAL_IP6.3 \ + CURLOPT_DNS_SERVERS.3 \ + CURLOPT_DNS_USE_GLOBAL_CACHE.3 \ + CURLOPT_EGDSOCKET.3 \ + CURLOPT_ERRORBUFFER.3 \ + CURLOPT_EXPECT_100_TIMEOUT_MS.3 \ + CURLOPT_FAILONERROR.3 \ + CURLOPT_FILETIME.3 \ + CURLOPT_FNMATCH_DATA.3 \ + CURLOPT_FNMATCH_FUNCTION.3 \ + CURLOPT_FOLLOWLOCATION.3 \ + CURLOPT_FORBID_REUSE.3 \ + CURLOPT_FRESH_CONNECT.3 \ + CURLOPT_FTPPORT.3 \ + CURLOPT_FTPSSLAUTH.3 \ + CURLOPT_FTP_ACCOUNT.3 \ + CURLOPT_FTP_ALTERNATIVE_TO_USER.3 \ + CURLOPT_FTP_CREATE_MISSING_DIRS.3 \ + CURLOPT_FTP_FILEMETHOD.3 \ + CURLOPT_FTP_RESPONSE_TIMEOUT.3 \ + CURLOPT_FTP_SKIP_PASV_IP.3 \ + CURLOPT_FTP_SSL_CCC.3 \ + CURLOPT_FTP_USE_EPRT.3 \ + CURLOPT_FTP_USE_EPSV.3 \ + CURLOPT_FTP_USE_PRET.3 \ + CURLOPT_GSSAPI_DELEGATION.3 \ + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 \ + CURLOPT_HEADER.3 \ + CURLOPT_HEADERDATA.3 \ + CURLOPT_HEADERFUNCTION.3 \ + CURLOPT_HEADEROPT.3 \ + CURLOPT_HTTP200ALIASES.3 \ + CURLOPT_HTTPAUTH.3 \ + CURLOPT_HTTPGET.3 \ + CURLOPT_HTTPHEADER.3 \ + CURLOPT_HTTPPOST.3 \ + CURLOPT_HTTPPROXYTUNNEL.3 \ + CURLOPT_HTTP_CONTENT_DECODING.3 \ + CURLOPT_HTTP_TRANSFER_DECODING.3 \ + CURLOPT_HTTP_VERSION.3 \ + CURLOPT_IGNORE_CONTENT_LENGTH.3 \ + CURLOPT_INFILESIZE.3 \ + CURLOPT_INFILESIZE_LARGE.3 \ + CURLOPT_INTERFACE.3 \ + CURLOPT_INTERLEAVEDATA.3 \ + CURLOPT_INTERLEAVEFUNCTION.3 \ + CURLOPT_IOCTLDATA.3 \ + CURLOPT_IOCTLFUNCTION.3 \ + CURLOPT_IPRESOLVE.3 \ + CURLOPT_ISSUERCERT.3 \ + CURLOPT_KEEP_SENDING_ON_ERROR.3 \ + CURLOPT_KEYPASSWD.3 \ + CURLOPT_KRBLEVEL.3 \ + CURLOPT_LOCALPORT.3 \ + CURLOPT_LOCALPORTRANGE.3 \ + CURLOPT_LOGIN_OPTIONS.3 \ + CURLOPT_LOW_SPEED_LIMIT.3 \ + CURLOPT_LOW_SPEED_TIME.3 \ + CURLOPT_MAIL_AUTH.3 \ + CURLOPT_MAIL_FROM.3 \ + CURLOPT_MAIL_RCPT.3 \ + CURLOPT_MAXCONNECTS.3 \ + CURLOPT_MAXFILESIZE.3 \ + CURLOPT_MAXFILESIZE_LARGE.3 \ + CURLOPT_MAXREDIRS.3 \ + CURLOPT_MAX_RECV_SPEED_LARGE.3 \ + CURLOPT_MAX_SEND_SPEED_LARGE.3 \ + CURLOPT_MIMEPOST.3 \ + CURLOPT_NETRC.3 \ + CURLOPT_NETRC_FILE.3 \ + CURLOPT_NEW_DIRECTORY_PERMS.3 \ + CURLOPT_NEW_FILE_PERMS.3 \ + CURLOPT_NOBODY.3 \ + CURLOPT_NOPROGRESS.3 \ + CURLOPT_NOPROXY.3 \ + CURLOPT_NOSIGNAL.3 \ + CURLOPT_OPENSOCKETDATA.3 \ + CURLOPT_OPENSOCKETFUNCTION.3 \ + CURLOPT_PASSWORD.3 \ + CURLOPT_PATH_AS_IS.3 \ + CURLOPT_PINNEDPUBLICKEY.3 \ + CURLOPT_PIPEWAIT.3 \ + CURLOPT_PORT.3 \ + CURLOPT_POST.3 \ + CURLOPT_POSTFIELDS.3 \ + CURLOPT_POSTFIELDSIZE.3 \ + CURLOPT_POSTFIELDSIZE_LARGE.3 \ + CURLOPT_POSTQUOTE.3 \ + CURLOPT_POSTREDIR.3 \ + CURLOPT_PREQUOTE.3 \ + CURLOPT_PRE_PROXY.3 \ + CURLOPT_PRIVATE.3 \ + CURLOPT_PROGRESSDATA.3 \ + CURLOPT_PROGRESSFUNCTION.3 \ + CURLOPT_PROTOCOLS.3 \ + CURLOPT_PROXY.3 \ + CURLOPT_PROXYAUTH.3 \ + CURLOPT_PROXYHEADER.3 \ + CURLOPT_PROXYPASSWORD.3 \ + CURLOPT_PROXYPORT.3 \ + CURLOPT_PROXYTYPE.3 \ + CURLOPT_PROXYUSERNAME.3 \ + CURLOPT_PROXYUSERPWD.3 \ + CURLOPT_PROXY_CAINFO.3 \ + CURLOPT_PROXY_CAPATH.3 \ + CURLOPT_PROXY_CRLFILE.3 \ + CURLOPT_PROXY_KEYPASSWD.3 \ + CURLOPT_PROXY_PINNEDPUBLICKEY.3 \ + CURLOPT_PROXY_SERVICE_NAME.3 \ + CURLOPT_PROXY_SSLCERT.3 \ + CURLOPT_PROXY_SSLCERTTYPE.3 \ + CURLOPT_PROXY_SSLKEY.3 \ + CURLOPT_PROXY_SSLKEYTYPE.3 \ + CURLOPT_PROXY_SSLVERSION.3 \ + CURLOPT_PROXY_SSL_CIPHER_LIST.3 \ + CURLOPT_PROXY_SSL_OPTIONS.3 \ + CURLOPT_PROXY_SSL_VERIFYHOST.3 \ + CURLOPT_PROXY_SSL_VERIFYPEER.3 \ + CURLOPT_PROXY_TLSAUTH_PASSWORD.3 \ + CURLOPT_PROXY_TLSAUTH_TYPE.3 \ + CURLOPT_PROXY_TLSAUTH_USERNAME.3 \ + CURLOPT_PROXY_TRANSFER_MODE.3 \ + CURLOPT_PUT.3 \ + CURLOPT_QUOTE.3 \ + CURLOPT_RANDOM_FILE.3 \ + CURLOPT_RANGE.3 \ + CURLOPT_READDATA.3 \ + CURLOPT_READFUNCTION.3 \ + CURLOPT_REDIR_PROTOCOLS.3 \ + CURLOPT_REFERER.3 \ + CURLOPT_REQUEST_TARGET.3 \ + CURLOPT_RESOLVE.3 \ + CURLOPT_RESOLVER_START_DATA.3 \ + CURLOPT_RESOLVER_START_FUNCTION.3 \ + CURLOPT_RESUME_FROM.3 \ + CURLOPT_RESUME_FROM_LARGE.3 \ + CURLOPT_RTSP_CLIENT_CSEQ.3 \ + CURLOPT_RTSP_REQUEST.3 \ + CURLOPT_RTSP_SERVER_CSEQ.3 \ + CURLOPT_RTSP_SESSION_ID.3 \ + CURLOPT_RTSP_STREAM_URI.3 \ + CURLOPT_RTSP_TRANSPORT.3 \ + CURLOPT_SASL_IR.3 \ + CURLOPT_SEEKDATA.3 \ + CURLOPT_SEEKFUNCTION.3 \ + CURLOPT_SERVICE_NAME.3 \ + CURLOPT_SHARE.3 \ + CURLOPT_SOCKOPTDATA.3 \ + CURLOPT_SOCKOPTFUNCTION.3 \ + CURLOPT_SOCKS5_AUTH.3 \ + CURLOPT_SOCKS5_GSSAPI_NEC.3 \ + CURLOPT_SOCKS5_GSSAPI_SERVICE.3 \ + CURLOPT_SSH_AUTH_TYPES.3 \ + CURLOPT_SSH_COMPRESSION.3 \ + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 \ + CURLOPT_SSH_KEYDATA.3 \ + CURLOPT_SSH_KEYFUNCTION.3 \ + CURLOPT_SSH_KNOWNHOSTS.3 \ + CURLOPT_SSH_PRIVATE_KEYFILE.3 \ + CURLOPT_SSH_PUBLIC_KEYFILE.3 \ + CURLOPT_SSLCERT.3 \ + CURLOPT_SSLCERTTYPE.3 \ + CURLOPT_SSLENGINE.3 \ + CURLOPT_SSLENGINE_DEFAULT.3 \ + CURLOPT_SSLKEY.3 \ + CURLOPT_SSLKEYTYPE.3 \ + CURLOPT_SSLVERSION.3 \ + CURLOPT_SSL_CIPHER_LIST.3 \ + CURLOPT_SSL_CTX_DATA.3 \ + CURLOPT_SSL_CTX_FUNCTION.3 \ + CURLOPT_SSL_ENABLE_ALPN.3 \ + CURLOPT_SSL_ENABLE_NPN.3 \ + CURLOPT_SSL_FALSESTART.3 \ + CURLOPT_SSL_OPTIONS.3 \ + CURLOPT_SSL_SESSIONID_CACHE.3 \ + CURLOPT_SSL_VERIFYHOST.3 \ + CURLOPT_SSL_VERIFYPEER.3 \ + CURLOPT_SSL_VERIFYSTATUS.3 \ + CURLOPT_STDERR.3 \ + CURLOPT_STREAM_DEPENDS.3 \ + CURLOPT_STREAM_DEPENDS_E.3 \ + CURLOPT_STREAM_WEIGHT.3 \ + CURLOPT_SUPPRESS_CONNECT_HEADERS.3 \ + CURLOPT_TCP_FASTOPEN.3 \ + CURLOPT_TCP_KEEPALIVE.3 \ + CURLOPT_TCP_KEEPIDLE.3 \ + CURLOPT_TCP_KEEPINTVL.3 \ + CURLOPT_TCP_NODELAY.3 \ + CURLOPT_TELNETOPTIONS.3 \ + CURLOPT_TFTP_BLKSIZE.3 \ + CURLOPT_TFTP_NO_OPTIONS.3 \ + CURLOPT_TIMECONDITION.3 \ + CURLOPT_TIMEOUT.3 \ + CURLOPT_TIMEOUT_MS.3 \ + CURLOPT_TIMEVALUE.3 \ + CURLOPT_TIMEVALUE_LARGE.3 \ + CURLOPT_TLSAUTH_PASSWORD.3 \ + CURLOPT_TLSAUTH_TYPE.3 \ + CURLOPT_TLSAUTH_USERNAME.3 \ + CURLOPT_TRANSFERTEXT.3 \ + CURLOPT_TRANSFER_ENCODING.3 \ + CURLOPT_UNIX_SOCKET_PATH.3 \ + CURLOPT_UNRESTRICTED_AUTH.3 \ + CURLOPT_UPLOAD.3 \ + CURLOPT_URL.3 \ + CURLOPT_USERAGENT.3 \ + CURLOPT_USERNAME.3 \ + CURLOPT_USERPWD.3 \ + CURLOPT_USE_SSL.3 \ + CURLOPT_VERBOSE.3 \ + CURLOPT_WILDCARDMATCH.3 \ + CURLOPT_WRITEDATA.3 \ + CURLOPT_WRITEFUNCTION.3 \ + CURLOPT_XFERINFODATA.3 \ + CURLOPT_XFERINFOFUNCTION.3 \ + CURLOPT_XOAUTH2_BEARER.3 + +man_DISTMANS = $(man_MANS:.3=.3.dist) +HTMLPAGES = $(man_MANS:.3=.html) +PDFPAGES = $(man_MANS:.3=.pdf) +CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(man_DISTMANS) +EXTRA_DIST = $(man_MANS) CMakeLists.txt MAN2HTML = roffit --mandir=. $< >$@ SUFFIXES = .3 .html all: all-am .SUFFIXES: .SUFFIXES: .3 .html .pdf -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -1342,6 +755,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(srcdir)/Makefile.inc $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff --git a/docs/libcurl/opts/Makefile.inc b/docs/libcurl/opts/Makefile.inc new file mode 100644 index 0000000..2aa1acf --- /dev/null +++ b/docs/libcurl/opts/Makefile.inc @@ -0,0 +1,328 @@ +# Shared between Makefile.am and CMakeLists.txt + +man_MANS = \ + CURLINFO_ACTIVESOCKET.3 \ + CURLINFO_APPCONNECT_TIME.3 \ + CURLINFO_CERTINFO.3 \ + CURLINFO_CONDITION_UNMET.3 \ + CURLINFO_CONNECT_TIME.3 \ + CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 \ + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 \ + CURLINFO_CONTENT_LENGTH_UPLOAD.3 \ + CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 \ + CURLINFO_CONTENT_TYPE.3 \ + CURLINFO_COOKIELIST.3 \ + CURLINFO_EFFECTIVE_URL.3 \ + CURLINFO_FILETIME.3 \ + CURLINFO_FILETIME_T.3 \ + CURLINFO_FTP_ENTRY_PATH.3 \ + CURLINFO_HEADER_SIZE.3 \ + CURLINFO_HTTPAUTH_AVAIL.3 \ + CURLINFO_HTTP_CONNECTCODE.3 \ + CURLINFO_HTTP_VERSION.3 \ + CURLINFO_LASTSOCKET.3 \ + CURLINFO_LOCAL_IP.3 \ + CURLINFO_LOCAL_PORT.3 \ + CURLINFO_NAMELOOKUP_TIME.3 \ + CURLINFO_NUM_CONNECTS.3 \ + CURLINFO_OS_ERRNO.3 \ + CURLINFO_PRETRANSFER_TIME.3 \ + CURLINFO_PRIMARY_IP.3 \ + CURLINFO_PRIMARY_PORT.3 \ + CURLINFO_PRIVATE.3 \ + CURLINFO_PROTOCOL.3 \ + CURLINFO_PROXYAUTH_AVAIL.3 \ + CURLINFO_PROXY_SSL_VERIFYRESULT.3 \ + CURLINFO_REDIRECT_COUNT.3 \ + CURLINFO_REDIRECT_TIME.3 \ + CURLINFO_REDIRECT_URL.3 \ + CURLINFO_REQUEST_SIZE.3 \ + CURLINFO_RESPONSE_CODE.3 \ + CURLINFO_RTSP_CLIENT_CSEQ.3 \ + CURLINFO_RTSP_CSEQ_RECV.3 \ + CURLINFO_RTSP_SERVER_CSEQ.3 \ + CURLINFO_RTSP_SESSION_ID.3 \ + CURLINFO_SCHEME.3 \ + CURLINFO_SIZE_DOWNLOAD.3 \ + CURLINFO_SIZE_DOWNLOAD_T.3 \ + CURLINFO_SIZE_UPLOAD.3 \ + CURLINFO_SIZE_UPLOAD_T.3 \ + CURLINFO_SPEED_DOWNLOAD.3 \ + CURLINFO_SPEED_DOWNLOAD_T.3 \ + CURLINFO_SPEED_UPLOAD.3 \ + CURLINFO_SPEED_UPLOAD_T.3 \ + CURLINFO_SSL_ENGINES.3 \ + CURLINFO_SSL_VERIFYRESULT.3 \ + CURLINFO_STARTTRANSFER_TIME.3 \ + CURLINFO_TLS_SESSION.3 \ + CURLINFO_TLS_SSL_PTR.3 \ + CURLINFO_TOTAL_TIME.3 \ + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 \ + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 \ + CURLMOPT_MAXCONNECTS.3 \ + CURLMOPT_MAX_HOST_CONNECTIONS.3 \ + CURLMOPT_MAX_PIPELINE_LENGTH.3 \ + CURLMOPT_MAX_TOTAL_CONNECTIONS.3 \ + CURLMOPT_PIPELINING.3 \ + CURLMOPT_PIPELINING_SERVER_BL.3 \ + CURLMOPT_PIPELINING_SITE_BL.3 \ + CURLMOPT_PUSHDATA.3 \ + CURLMOPT_PUSHFUNCTION.3 \ + CURLMOPT_SOCKETDATA.3 \ + CURLMOPT_SOCKETFUNCTION.3 \ + CURLMOPT_TIMERDATA.3 \ + CURLMOPT_TIMERFUNCTION.3 \ + CURLOPT_ABSTRACT_UNIX_SOCKET.3 \ + CURLOPT_ACCEPTTIMEOUT_MS.3 \ + CURLOPT_ACCEPT_ENCODING.3 \ + CURLOPT_ADDRESS_SCOPE.3 \ + CURLOPT_APPEND.3 \ + CURLOPT_AUTOREFERER.3 \ + CURLOPT_BUFFERSIZE.3 \ + CURLOPT_CAINFO.3 \ + CURLOPT_CAPATH.3 \ + CURLOPT_CERTINFO.3 \ + CURLOPT_CHUNK_BGN_FUNCTION.3 \ + CURLOPT_CHUNK_DATA.3 \ + CURLOPT_CHUNK_END_FUNCTION.3 \ + CURLOPT_CLOSESOCKETDATA.3 \ + CURLOPT_CLOSESOCKETFUNCTION.3 \ + CURLOPT_CONNECTTIMEOUT.3 \ + CURLOPT_CONNECTTIMEOUT_MS.3 \ + CURLOPT_CONNECT_ONLY.3 \ + CURLOPT_CONNECT_TO.3 \ + CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 \ + CURLOPT_CONV_FROM_UTF8_FUNCTION.3 \ + CURLOPT_CONV_TO_NETWORK_FUNCTION.3 \ + CURLOPT_COOKIE.3 \ + CURLOPT_COOKIEFILE.3 \ + CURLOPT_COOKIEJAR.3 \ + CURLOPT_COOKIELIST.3 \ + CURLOPT_COOKIESESSION.3 \ + CURLOPT_COPYPOSTFIELDS.3 \ + CURLOPT_CRLF.3 \ + CURLOPT_CRLFILE.3 \ + CURLOPT_CUSTOMREQUEST.3 \ + CURLOPT_DEBUGDATA.3 \ + CURLOPT_DEBUGFUNCTION.3 \ + CURLOPT_DEFAULT_PROTOCOL.3 \ + CURLOPT_DIRLISTONLY.3 \ + CURLOPT_DNS_CACHE_TIMEOUT.3 \ + CURLOPT_DNS_INTERFACE.3 \ + CURLOPT_DNS_LOCAL_IP4.3 \ + CURLOPT_DNS_LOCAL_IP6.3 \ + CURLOPT_DNS_SERVERS.3 \ + CURLOPT_DNS_USE_GLOBAL_CACHE.3 \ + CURLOPT_EGDSOCKET.3 \ + CURLOPT_ERRORBUFFER.3 \ + CURLOPT_EXPECT_100_TIMEOUT_MS.3 \ + CURLOPT_FAILONERROR.3 \ + CURLOPT_FILETIME.3 \ + CURLOPT_FNMATCH_DATA.3 \ + CURLOPT_FNMATCH_FUNCTION.3 \ + CURLOPT_FOLLOWLOCATION.3 \ + CURLOPT_FORBID_REUSE.3 \ + CURLOPT_FRESH_CONNECT.3 \ + CURLOPT_FTPPORT.3 \ + CURLOPT_FTPSSLAUTH.3 \ + CURLOPT_FTP_ACCOUNT.3 \ + CURLOPT_FTP_ALTERNATIVE_TO_USER.3 \ + CURLOPT_FTP_CREATE_MISSING_DIRS.3 \ + CURLOPT_FTP_FILEMETHOD.3 \ + CURLOPT_FTP_RESPONSE_TIMEOUT.3 \ + CURLOPT_FTP_SKIP_PASV_IP.3 \ + CURLOPT_FTP_SSL_CCC.3 \ + CURLOPT_FTP_USE_EPRT.3 \ + CURLOPT_FTP_USE_EPSV.3 \ + CURLOPT_FTP_USE_PRET.3 \ + CURLOPT_GSSAPI_DELEGATION.3 \ + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 \ + CURLOPT_HEADER.3 \ + CURLOPT_HEADERDATA.3 \ + CURLOPT_HEADERFUNCTION.3 \ + CURLOPT_HEADEROPT.3 \ + CURLOPT_HTTP200ALIASES.3 \ + CURLOPT_HTTPAUTH.3 \ + CURLOPT_HTTPGET.3 \ + CURLOPT_HTTPHEADER.3 \ + CURLOPT_HTTPPOST.3 \ + CURLOPT_HTTPPROXYTUNNEL.3 \ + CURLOPT_HTTP_CONTENT_DECODING.3 \ + CURLOPT_HTTP_TRANSFER_DECODING.3 \ + CURLOPT_HTTP_VERSION.3 \ + CURLOPT_IGNORE_CONTENT_LENGTH.3 \ + CURLOPT_INFILESIZE.3 \ + CURLOPT_INFILESIZE_LARGE.3 \ + CURLOPT_INTERFACE.3 \ + CURLOPT_INTERLEAVEDATA.3 \ + CURLOPT_INTERLEAVEFUNCTION.3 \ + CURLOPT_IOCTLDATA.3 \ + CURLOPT_IOCTLFUNCTION.3 \ + CURLOPT_IPRESOLVE.3 \ + CURLOPT_ISSUERCERT.3 \ + CURLOPT_KEEP_SENDING_ON_ERROR.3 \ + CURLOPT_KEYPASSWD.3 \ + CURLOPT_KRBLEVEL.3 \ + CURLOPT_LOCALPORT.3 \ + CURLOPT_LOCALPORTRANGE.3 \ + CURLOPT_LOGIN_OPTIONS.3 \ + CURLOPT_LOW_SPEED_LIMIT.3 \ + CURLOPT_LOW_SPEED_TIME.3 \ + CURLOPT_MAIL_AUTH.3 \ + CURLOPT_MAIL_FROM.3 \ + CURLOPT_MAIL_RCPT.3 \ + CURLOPT_MAXCONNECTS.3 \ + CURLOPT_MAXFILESIZE.3 \ + CURLOPT_MAXFILESIZE_LARGE.3 \ + CURLOPT_MAXREDIRS.3 \ + CURLOPT_MAX_RECV_SPEED_LARGE.3 \ + CURLOPT_MAX_SEND_SPEED_LARGE.3 \ + CURLOPT_MIMEPOST.3 \ + CURLOPT_NETRC.3 \ + CURLOPT_NETRC_FILE.3 \ + CURLOPT_NEW_DIRECTORY_PERMS.3 \ + CURLOPT_NEW_FILE_PERMS.3 \ + CURLOPT_NOBODY.3 \ + CURLOPT_NOPROGRESS.3 \ + CURLOPT_NOPROXY.3 \ + CURLOPT_NOSIGNAL.3 \ + CURLOPT_OPENSOCKETDATA.3 \ + CURLOPT_OPENSOCKETFUNCTION.3 \ + CURLOPT_PASSWORD.3 \ + CURLOPT_PATH_AS_IS.3 \ + CURLOPT_PINNEDPUBLICKEY.3 \ + CURLOPT_PIPEWAIT.3 \ + CURLOPT_PORT.3 \ + CURLOPT_POST.3 \ + CURLOPT_POSTFIELDS.3 \ + CURLOPT_POSTFIELDSIZE.3 \ + CURLOPT_POSTFIELDSIZE_LARGE.3 \ + CURLOPT_POSTQUOTE.3 \ + CURLOPT_POSTREDIR.3 \ + CURLOPT_PREQUOTE.3 \ + CURLOPT_PRE_PROXY.3 \ + CURLOPT_PRIVATE.3 \ + CURLOPT_PROGRESSDATA.3 \ + CURLOPT_PROGRESSFUNCTION.3 \ + CURLOPT_PROTOCOLS.3 \ + CURLOPT_PROXY.3 \ + CURLOPT_PROXYAUTH.3 \ + CURLOPT_PROXYHEADER.3 \ + CURLOPT_PROXYPASSWORD.3 \ + CURLOPT_PROXYPORT.3 \ + CURLOPT_PROXYTYPE.3 \ + CURLOPT_PROXYUSERNAME.3 \ + CURLOPT_PROXYUSERPWD.3 \ + CURLOPT_PROXY_CAINFO.3 \ + CURLOPT_PROXY_CAPATH.3 \ + CURLOPT_PROXY_CRLFILE.3 \ + CURLOPT_PROXY_KEYPASSWD.3 \ + CURLOPT_PROXY_PINNEDPUBLICKEY.3 \ + CURLOPT_PROXY_SERVICE_NAME.3 \ + CURLOPT_PROXY_SSLCERT.3 \ + CURLOPT_PROXY_SSLCERTTYPE.3 \ + CURLOPT_PROXY_SSLKEY.3 \ + CURLOPT_PROXY_SSLKEYTYPE.3 \ + CURLOPT_PROXY_SSLVERSION.3 \ + CURLOPT_PROXY_SSL_CIPHER_LIST.3 \ + CURLOPT_PROXY_SSL_OPTIONS.3 \ + CURLOPT_PROXY_SSL_VERIFYHOST.3 \ + CURLOPT_PROXY_SSL_VERIFYPEER.3 \ + CURLOPT_PROXY_TLSAUTH_PASSWORD.3 \ + CURLOPT_PROXY_TLSAUTH_TYPE.3 \ + CURLOPT_PROXY_TLSAUTH_USERNAME.3 \ + CURLOPT_PROXY_TRANSFER_MODE.3 \ + CURLOPT_PUT.3 \ + CURLOPT_QUOTE.3 \ + CURLOPT_RANDOM_FILE.3 \ + CURLOPT_RANGE.3 \ + CURLOPT_READDATA.3 \ + CURLOPT_READFUNCTION.3 \ + CURLOPT_REDIR_PROTOCOLS.3 \ + CURLOPT_REFERER.3 \ + CURLOPT_REQUEST_TARGET.3 \ + CURLOPT_RESOLVE.3 \ + CURLOPT_RESOLVER_START_DATA.3 \ + CURLOPT_RESOLVER_START_FUNCTION.3 \ + CURLOPT_RESUME_FROM.3 \ + CURLOPT_RESUME_FROM_LARGE.3 \ + CURLOPT_RTSP_CLIENT_CSEQ.3 \ + CURLOPT_RTSP_REQUEST.3 \ + CURLOPT_RTSP_SERVER_CSEQ.3 \ + CURLOPT_RTSP_SESSION_ID.3 \ + CURLOPT_RTSP_STREAM_URI.3 \ + CURLOPT_RTSP_TRANSPORT.3 \ + CURLOPT_SASL_IR.3 \ + CURLOPT_SEEKDATA.3 \ + CURLOPT_SEEKFUNCTION.3 \ + CURLOPT_SERVICE_NAME.3 \ + CURLOPT_SHARE.3 \ + CURLOPT_SOCKOPTDATA.3 \ + CURLOPT_SOCKOPTFUNCTION.3 \ + CURLOPT_SOCKS5_AUTH.3 \ + CURLOPT_SOCKS5_GSSAPI_NEC.3 \ + CURLOPT_SOCKS5_GSSAPI_SERVICE.3 \ + CURLOPT_SSH_AUTH_TYPES.3 \ + CURLOPT_SSH_COMPRESSION.3 \ + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 \ + CURLOPT_SSH_KEYDATA.3 \ + CURLOPT_SSH_KEYFUNCTION.3 \ + CURLOPT_SSH_KNOWNHOSTS.3 \ + CURLOPT_SSH_PRIVATE_KEYFILE.3 \ + CURLOPT_SSH_PUBLIC_KEYFILE.3 \ + CURLOPT_SSLCERT.3 \ + CURLOPT_SSLCERTTYPE.3 \ + CURLOPT_SSLENGINE.3 \ + CURLOPT_SSLENGINE_DEFAULT.3 \ + CURLOPT_SSLKEY.3 \ + CURLOPT_SSLKEYTYPE.3 \ + CURLOPT_SSLVERSION.3 \ + CURLOPT_SSL_CIPHER_LIST.3 \ + CURLOPT_SSL_CTX_DATA.3 \ + CURLOPT_SSL_CTX_FUNCTION.3 \ + CURLOPT_SSL_ENABLE_ALPN.3 \ + CURLOPT_SSL_ENABLE_NPN.3 \ + CURLOPT_SSL_FALSESTART.3 \ + CURLOPT_SSL_OPTIONS.3 \ + CURLOPT_SSL_SESSIONID_CACHE.3 \ + CURLOPT_SSL_VERIFYHOST.3 \ + CURLOPT_SSL_VERIFYPEER.3 \ + CURLOPT_SSL_VERIFYSTATUS.3 \ + CURLOPT_STDERR.3 \ + CURLOPT_STREAM_DEPENDS.3 \ + CURLOPT_STREAM_DEPENDS_E.3 \ + CURLOPT_STREAM_WEIGHT.3 \ + CURLOPT_SUPPRESS_CONNECT_HEADERS.3 \ + CURLOPT_TCP_FASTOPEN.3 \ + CURLOPT_TCP_KEEPALIVE.3 \ + CURLOPT_TCP_KEEPIDLE.3 \ + CURLOPT_TCP_KEEPINTVL.3 \ + CURLOPT_TCP_NODELAY.3 \ + CURLOPT_TELNETOPTIONS.3 \ + CURLOPT_TFTP_BLKSIZE.3 \ + CURLOPT_TFTP_NO_OPTIONS.3 \ + CURLOPT_TIMECONDITION.3 \ + CURLOPT_TIMEOUT.3 \ + CURLOPT_TIMEOUT_MS.3 \ + CURLOPT_TIMEVALUE.3 \ + CURLOPT_TIMEVALUE_LARGE.3 \ + CURLOPT_TLSAUTH_PASSWORD.3 \ + CURLOPT_TLSAUTH_TYPE.3 \ + CURLOPT_TLSAUTH_USERNAME.3 \ + CURLOPT_TRANSFERTEXT.3 \ + CURLOPT_TRANSFER_ENCODING.3 \ + CURLOPT_UNIX_SOCKET_PATH.3 \ + CURLOPT_UNRESTRICTED_AUTH.3 \ + CURLOPT_UPLOAD.3 \ + CURLOPT_URL.3 \ + CURLOPT_USERAGENT.3 \ + CURLOPT_USERNAME.3 \ + CURLOPT_USERPWD.3 \ + CURLOPT_USE_SSL.3 \ + CURLOPT_VERBOSE.3 \ + CURLOPT_WILDCARDMATCH.3 \ + CURLOPT_WRITEDATA.3 \ + CURLOPT_WRITEFUNCTION.3 \ + CURLOPT_XFERINFODATA.3 \ + CURLOPT_XFERINFOFUNCTION.3 \ + CURLOPT_XOAUTH2_BEARER.3 diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index 8834ada..c58086f 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -17,6 +17,7 @@ CURLAUTH_ANYSAFE 7.10.6 CURLAUTH_BASIC 7.10.6 CURLAUTH_DIGEST 7.10.6 CURLAUTH_DIGEST_IE 7.19.3 +CURLAUTH_GSSAPI 7.55.0 CURLAUTH_GSSNEGOTIATE 7.10.6 7.38.0 CURLAUTH_NEGOTIATE 7.38.0 CURLAUTH_NONE 7.10.6 @@ -100,6 +101,7 @@ CURLE_QUOTE_ERROR 7.17.0 CURLE_RANGE_ERROR 7.17.0 CURLE_READ_ERROR 7.1 CURLE_RECV_ERROR 7.10 +CURLE_RECURSIVE_API_CALL 7.59.0 CURLE_REMOTE_ACCESS_DENIED 7.17.0 CURLE_REMOTE_DISK_FULL 7.17.0 CURLE_REMOTE_FILE_EXISTS 7.17.0 @@ -159,27 +161,27 @@ CURLFINFOFLAG_KNOWN_PERM 7.21.0 CURLFINFOFLAG_KNOWN_SIZE 7.21.0 CURLFINFOFLAG_KNOWN_TIME 7.21.0 CURLFINFOFLAG_KNOWN_UID 7.21.0 -CURLFORM_ARRAY 7.9.1 +CURLFORM_ARRAY 7.9.1 7.56.0 CURLFORM_ARRAY_END 7.9.1 7.9.5 7.9.6 CURLFORM_ARRAY_START 7.9.1 7.9.5 7.9.6 -CURLFORM_BUFFER 7.9.8 -CURLFORM_BUFFERLENGTH 7.9.8 -CURLFORM_BUFFERPTR 7.9.8 -CURLFORM_CONTENTHEADER 7.9.3 -CURLFORM_CONTENTLEN 7.46.0 -CURLFORM_CONTENTSLENGTH 7.9 -CURLFORM_CONTENTTYPE 7.9 -CURLFORM_COPYCONTENTS 7.9 -CURLFORM_COPYNAME 7.9 -CURLFORM_END 7.9 -CURLFORM_FILE 7.9 -CURLFORM_FILECONTENT 7.9.1 -CURLFORM_FILENAME 7.9.6 -CURLFORM_NAMELENGTH 7.9 -CURLFORM_NOTHING 7.9 -CURLFORM_PTRCONTENTS 7.9 -CURLFORM_PTRNAME 7.9 -CURLFORM_STREAM 7.18.2 +CURLFORM_BUFFER 7.9.8 7.56.0 +CURLFORM_BUFFERLENGTH 7.9.8 7.56.0 +CURLFORM_BUFFERPTR 7.9.8 7.56.0 +CURLFORM_CONTENTHEADER 7.9.3 7.56.0 +CURLFORM_CONTENTLEN 7.46.0 7.56.0 +CURLFORM_CONTENTSLENGTH 7.9 7.56.0 +CURLFORM_CONTENTTYPE 7.9 7.56.0 +CURLFORM_COPYCONTENTS 7.9 7.56.0 +CURLFORM_COPYNAME 7.9 7.56.0 +CURLFORM_END 7.9 7.56.0 +CURLFORM_FILE 7.9 7.56.0 +CURLFORM_FILECONTENT 7.9.1 7.56.0 +CURLFORM_FILENAME 7.9.6 7.56.0 +CURLFORM_NAMELENGTH 7.9 7.56.0 +CURLFORM_NOTHING 7.9 7.56.0 +CURLFORM_PTRCONTENTS 7.9 7.56.0 +CURLFORM_PTRNAME 7.9 7.56.0 +CURLFORM_STREAM 7.18.2 7.56.0 CURLFTPAUTH_DEFAULT 7.12.2 CURLFTPAUTH_SSL 7.12.2 CURLFTPAUTH_TLS 7.12.2 @@ -208,7 +210,9 @@ CURLINFO_CERTINFO 7.19.1 CURLINFO_CONDITION_UNMET 7.19.4 CURLINFO_CONNECT_TIME 7.4.1 CURLINFO_CONTENT_LENGTH_DOWNLOAD 7.6.1 +CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 7.55.0 CURLINFO_CONTENT_LENGTH_UPLOAD 7.6.1 +CURLINFO_CONTENT_LENGTH_UPLOAD_T 7.55.0 CURLINFO_CONTENT_TYPE 7.9.4 CURLINFO_COOKIELIST 7.14.1 CURLINFO_DATA_IN 7.9.6 @@ -217,6 +221,7 @@ CURLINFO_DOUBLE 7.4.1 CURLINFO_EFFECTIVE_URL 7.4 CURLINFO_END 7.9.6 CURLINFO_FILETIME 7.5 +CURLINFO_FILETIME_T 7.59.0 CURLINFO_FTP_ENTRY_PATH 7.15.4 CURLINFO_HEADER_IN 7.9.6 CURLINFO_HEADER_OUT 7.9.6 @@ -234,6 +239,7 @@ CURLINFO_MASK 7.4.1 CURLINFO_NAMELOOKUP_TIME 7.4.1 CURLINFO_NONE 7.4.1 CURLINFO_NUM_CONNECTS 7.12.3 +CURLINFO_OFF_T 7.55.0 CURLINFO_OS_ERRNO 7.12.2 CURLINFO_PRETRANSFER_TIME 7.4.1 CURLINFO_PRIMARY_IP 7.19.0 @@ -242,6 +248,7 @@ CURLINFO_PRIVATE 7.10.3 CURLINFO_PROTOCOL 7.52.0 CURLINFO_PROXYAUTH_AVAIL 7.10.8 CURLINFO_PROXY_SSL_VERIFYRESULT 7.52.0 +CURLINFO_PTR 7.54.1 CURLINFO_REDIRECT_COUNT 7.9.7 CURLINFO_REDIRECT_TIME 7.9.7 CURLINFO_REDIRECT_URL 7.18.2 @@ -253,11 +260,15 @@ CURLINFO_RTSP_SERVER_CSEQ 7.20.0 CURLINFO_RTSP_SESSION_ID 7.20.0 CURLINFO_SCHEME 7.52.0 CURLINFO_SIZE_DOWNLOAD 7.4.1 +CURLINFO_SIZE_DOWNLOAD_T 7.55.0 CURLINFO_SIZE_UPLOAD 7.4.1 +CURLINFO_SIZE_UPLOAD_T 7.55.0 CURLINFO_SLIST 7.12.3 CURLINFO_SOCKET 7.45.0 CURLINFO_SPEED_DOWNLOAD 7.4.1 +CURLINFO_SPEED_DOWNLOAD_T 7.55.0 CURLINFO_SPEED_UPLOAD 7.4.1 +CURLINFO_SPEED_UPLOAD_T 7.55.0 CURLINFO_SSL_DATA_IN 7.12.1 CURLINFO_SSL_DATA_OUT 7.12.1 CURLINFO_SSL_ENGINES 7.12.3 @@ -282,6 +293,8 @@ CURLKHSTAT_FINE 7.19.6 CURLKHSTAT_FINE_ADD_TO_FILE 7.19.6 CURLKHSTAT_REJECT 7.19.6 CURLKHTYPE_DSS 7.19.6 +CURLKHTYPE_ECDSA 7.58.0 +CURLKHTYPE_ED25519 7.58.0 CURLKHTYPE_RSA 7.19.6 CURLKHTYPE_RSA1 7.19.6 CURLKHTYPE_UNKNOWN 7.19.6 @@ -311,6 +324,7 @@ CURLM_CALL_MULTI_SOCKET 7.15.5 CURLM_INTERNAL_ERROR 7.9.6 CURLM_OK 7.9.6 CURLM_OUT_OF_MEMORY 7.9.6 +CURLM_RECURSIVE_API_CALL 7.59.0 CURLM_UNKNOWN_OPTION 7.15.4 CURLOPTTYPE_FUNCTIONPOINT 7.1 CURLOPTTYPE_LONG 7.1 @@ -389,6 +403,7 @@ CURLOPT_FTP_USE_EPRT 7.10.5 CURLOPT_FTP_USE_EPSV 7.9.2 CURLOPT_FTP_USE_PRET 7.20.0 CURLOPT_GSSAPI_DELEGATION 7.22.0 +CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 7.59.0 CURLOPT_HEADER 7.1 CURLOPT_HEADERDATA 7.10 CURLOPT_HEADERFUNCTION 7.7.2 @@ -397,7 +412,7 @@ CURLOPT_HTTP200ALIASES 7.10.3 CURLOPT_HTTPAUTH 7.10.6 CURLOPT_HTTPGET 7.8.1 CURLOPT_HTTPHEADER 7.1 -CURLOPT_HTTPPOST 7.1 +CURLOPT_HTTPPOST 7.1 7.56.0 CURLOPT_HTTPPROXYTUNNEL 7.3 CURLOPT_HTTPREQUEST 7.1 - 7.15.5 CURLOPT_HTTP_CONTENT_DECODING 7.16.2 @@ -414,8 +429,8 @@ CURLOPT_IOCTLDATA 7.12.3 CURLOPT_IOCTLFUNCTION 7.12.3 CURLOPT_IPRESOLVE 7.10.8 CURLOPT_ISSUERCERT 7.19.0 -CURLOPT_KEYPASSWD 7.17.0 CURLOPT_KEEP_SENDING_ON_ERROR 7.51.0 +CURLOPT_KEYPASSWD 7.17.0 CURLOPT_KRB4LEVEL 7.3 7.17.0 CURLOPT_KRBLEVEL 7.16.4 CURLOPT_LOCALPORT 7.15.2 @@ -432,6 +447,7 @@ CURLOPT_MAXFILESIZE_LARGE 7.11.0 CURLOPT_MAXREDIRS 7.5 CURLOPT_MAX_RECV_SPEED_LARGE 7.15.5 CURLOPT_MAX_SEND_SPEED_LARGE 7.15.5 +CURLOPT_MIMEPOST 7.56.0 CURLOPT_MUTE 7.1 7.8 7.15.5 CURLOPT_NETRC 7.1 CURLOPT_NETRC_FILE 7.11.0 @@ -500,6 +516,7 @@ CURLOPT_READDATA 7.9.7 CURLOPT_READFUNCTION 7.1 CURLOPT_REDIR_PROTOCOLS 7.19.4 CURLOPT_REFERER 7.1 +CURLOPT_REQUEST_TARGET 7.55.0 CURLOPT_RESOLVE 7.21.3 CURLOPT_RESUME_FROM 7.1 CURLOPT_RESUME_FROM_LARGE 7.11.0 @@ -518,6 +535,7 @@ CURLOPT_SERVICE_NAME 7.43.0 CURLOPT_SHARE 7.10 CURLOPT_SOCKOPTDATA 7.16.0 CURLOPT_SOCKOPTFUNCTION 7.16.0 +CURLOPT_SOCKS5_AUTH 7.55.0 CURLOPT_SOCKS5_GSSAPI_NEC 7.19.4 CURLOPT_SOCKS5_GSSAPI_SERVICE 7.19.4 7.49.0 CURLOPT_SOURCE_HOST 7.12.1 - 7.15.5 @@ -529,6 +547,7 @@ CURLOPT_SOURCE_QUOTE 7.13.0 - 7.15.5 CURLOPT_SOURCE_URL 7.13.0 - 7.15.5 CURLOPT_SOURCE_USERPWD 7.12.1 - 7.15.5 CURLOPT_SSH_AUTH_TYPES 7.16.1 +CURLOPT_SSH_COMPRESSION 7.56.0 CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 7.17.1 CURLOPT_SSH_KEYDATA 7.19.6 CURLOPT_SSH_KEYFUNCTION 7.19.6 @@ -559,11 +578,12 @@ CURLOPT_STDERR 7.1 CURLOPT_STREAM_DEPENDS 7.46.0 CURLOPT_STREAM_DEPENDS_E 7.46.0 CURLOPT_STREAM_WEIGHT 7.46.0 +CURLOPT_SUPPRESS_CONNECT_HEADERS 7.54.0 +CURLOPT_TCP_FASTOPEN 7.49.0 CURLOPT_TCP_KEEPALIVE 7.25.0 CURLOPT_TCP_KEEPIDLE 7.25.0 CURLOPT_TCP_KEEPINTVL 7.25.0 CURLOPT_TCP_NODELAY 7.11.2 -CURLOPT_TCP_FASTOPEN 7.49.0 CURLOPT_TELNETOPTIONS 7.7 CURLOPT_TFTP_BLKSIZE 7.19.4 CURLOPT_TFTP_NO_OPTIONS 7.48.0 @@ -571,11 +591,14 @@ CURLOPT_TIMECONDITION 7.1 CURLOPT_TIMEOUT 7.1 CURLOPT_TIMEOUT_MS 7.16.2 CURLOPT_TIMEVALUE 7.1 +CURLOPT_TIMEVALUE_LARGE 7.59.0 CURLOPT_TLSAUTH_PASSWORD 7.21.4 CURLOPT_TLSAUTH_TYPE 7.21.4 CURLOPT_TLSAUTH_USERNAME 7.21.4 CURLOPT_TRANSFERTEXT 7.1.1 CURLOPT_TRANSFER_ENCODING 7.21.6 +CURLOPT_RESOLVER_START_FUNCTION 7.59.0 +CURLOPT_RESOLVER_START_DATA 7.59.0 CURLOPT_UNIX_SOCKET_PATH 7.40.0 CURLOPT_UNRESTRICTED_AUTH 7.10.4 CURLOPT_UPLOAD 7.1 @@ -632,8 +655,8 @@ CURLPROTO_SMTPS 7.20.0 CURLPROTO_TELNET 7.19.4 CURLPROTO_TFTP 7.19.4 CURLPROXY_HTTP 7.10 -CURLPROXY_HTTP_1_0 7.19.4 CURLPROXY_HTTPS 7.52.0 +CURLPROXY_HTTP_1_0 7.19.4 CURLPROXY_SOCKS4 7.10 CURLPROXY_SOCKS4A 7.18.0 CURLPROXY_SOCKS5 7.10 @@ -655,6 +678,7 @@ CURLSOCKTYPE_IPCXN 7.16.0 CURLSSH_AUTH_AGENT 7.28.0 CURLSSH_AUTH_ANY 7.16.1 CURLSSH_AUTH_DEFAULT 7.16.1 +CURLSSH_AUTH_GSSAPI 7.58.0 CURLSSH_AUTH_HOST 7.16.1 CURLSSH_AUTH_KEYBOARD 7.16.1 CURLSSH_AUTH_NONE 7.16.1 @@ -677,10 +701,15 @@ CURLSSLBACKEND_SCHANNEL 7.34.0 CURLSSLBACKEND_WOLFSSL 7.49.0 CURLSSLOPT_ALLOW_BEAST 7.25.0 CURLSSLOPT_NO_REVOKE 7.44.0 +CURLSSLSET_NO_BACKENDS 7.56.0 +CURLSSLSET_OK 7.56.0 +CURLSSLSET_TOO_LATE 7.56.0 +CURLSSLSET_UNKNOWN_BACKEND 7.56.0 CURLUSESSL_ALL 7.17.0 CURLUSESSL_CONTROL 7.17.0 CURLUSESSL_NONE 7.17.0 CURLUSESSL_TRY 7.17.0 +CURLVERSION_FIFTH 7.57.0 CURLVERSION_FIRST 7.10 CURLVERSION_FOURTH 7.16.1 CURLVERSION_NOW 7.10 @@ -701,20 +730,21 @@ CURL_ERROR_SIZE 7.1 CURL_FNMATCHFUNC_FAIL 7.21.0 CURL_FNMATCHFUNC_MATCH 7.21.0 CURL_FNMATCHFUNC_NOMATCH 7.21.0 -CURL_FORMADD_DISABLED 7.12.1 -CURL_FORMADD_ILLEGAL_ARRAY 7.9.8 -CURL_FORMADD_INCOMPLETE 7.9.8 -CURL_FORMADD_MEMORY 7.9.8 -CURL_FORMADD_NULL 7.9.8 -CURL_FORMADD_OK 7.9.8 -CURL_FORMADD_OPTION_TWICE 7.9.8 -CURL_FORMADD_UNKNOWN_OPTION 7.9.8 +CURL_FORMADD_DISABLED 7.12.1 7.56.0 +CURL_FORMADD_ILLEGAL_ARRAY 7.9.8 7.56.0 +CURL_FORMADD_INCOMPLETE 7.9.8 7.56.0 +CURL_FORMADD_MEMORY 7.9.8 7.56.0 +CURL_FORMADD_NULL 7.9.8 7.56.0 +CURL_FORMADD_OK 7.9.8 7.56.0 +CURL_FORMADD_OPTION_TWICE 7.9.8 7.56.0 +CURL_FORMADD_UNKNOWN_OPTION 7.9.8 7.56.0 CURL_GLOBAL_ACK_EINTR 7.30.0 CURL_GLOBAL_ALL 7.8 CURL_GLOBAL_DEFAULT 7.8 CURL_GLOBAL_NOTHING 7.8 CURL_GLOBAL_SSL 7.8 CURL_GLOBAL_WIN32 7.8.1 +CURL_HET_DEFAULT 7.59.0 CURL_HTTPPOST_BUFFER 7.46.0 CURL_HTTPPOST_CALLBACK 7.46.0 CURL_HTTPPOST_FILENAME 7.46.0 @@ -726,8 +756,8 @@ CURL_HTTPPOST_READFILE 7.46.0 CURL_HTTP_VERSION_1_0 7.9.1 CURL_HTTP_VERSION_1_1 7.9.1 CURL_HTTP_VERSION_2 7.43.0 -CURL_HTTP_VERSION_2_0 7.33.0 CURL_HTTP_VERSION_2TLS 7.47.0 +CURL_HTTP_VERSION_2_0 7.33.0 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 7.49.0 CURL_HTTP_VERSION_NONE 7.9.1 CURL_IPRESOLVE_V4 7.10.8 @@ -789,8 +819,13 @@ CURL_SOCKET_TIMEOUT 7.14.0 CURL_SOCKOPT_ALREADY_CONNECTED 7.21.5 CURL_SOCKOPT_ERROR 7.21.5 CURL_SOCKOPT_OK 7.21.5 -CURL_STRICTER 7.50.2 CURL_SSLVERSION_DEFAULT 7.9.2 +CURL_SSLVERSION_MAX_DEFAULT 7.54.0 +CURL_SSLVERSION_MAX_NONE 7.54.0 +CURL_SSLVERSION_MAX_TLSv1_0 7.54.0 +CURL_SSLVERSION_MAX_TLSv1_1 7.54.0 +CURL_SSLVERSION_MAX_TLSv1_2 7.54.0 +CURL_SSLVERSION_MAX_TLSv1_3 7.54.0 CURL_SSLVERSION_SSLv2 7.9.2 CURL_SSLVERSION_SSLv3 7.9.2 CURL_SSLVERSION_TLSv1 7.9.2 @@ -798,6 +833,7 @@ CURL_SSLVERSION_TLSv1_0 7.34.0 CURL_SSLVERSION_TLSv1_1 7.34.0 CURL_SSLVERSION_TLSv1_2 7.34.0 CURL_SSLVERSION_TLSv1_3 7.52.0 +CURL_STRICTER 7.50.2 CURL_TIMECOND_IFMODSINCE 7.9.7 CURL_TIMECOND_IFUNMODSINCE 7.9.7 CURL_TIMECOND_LASTMOD 7.9.7 @@ -805,6 +841,7 @@ CURL_TIMECOND_NONE 7.9.7 CURL_TLSAUTH_NONE 7.21.4 CURL_TLSAUTH_SRP 7.21.4 CURL_VERSION_ASYNCHDNS 7.10.7 +CURL_VERSION_BROTLI 7.57.0 CURL_VERSION_CONV 7.15.4 CURL_VERSION_CURLDEBUG 7.19.6 CURL_VERSION_DEBUG 7.10.6 @@ -818,6 +855,7 @@ CURL_VERSION_KERBEROS4 7.10 7.33.0 CURL_VERSION_KERBEROS5 7.40.0 CURL_VERSION_LARGEFILE 7.11.1 CURL_VERSION_LIBZ 7.10 +CURL_VERSION_MULTI_SSL 7.56.0 CURL_VERSION_NTLM 7.10.6 CURL_VERSION_NTLM_WB 7.22.0 CURL_VERSION_PSL 7.47.0 @@ -830,3 +868,4 @@ CURL_WAIT_POLLIN 7.28.0 CURL_WAIT_POLLOUT 7.28.0 CURL_WAIT_POLLPRI 7.28.0 CURL_WRITEFUNC_PAUSE 7.18.0 +CURL_ZERO_TERMINATED 7.56.0 diff --git a/docs/libcurl/symbols.pl b/docs/libcurl/symbols.pl index cfcecd0..d61bd04 100755 --- a/docs/libcurl/symbols.pl +++ b/docs/libcurl/symbols.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | diff --git a/docs/mk-ca-bundle.1 b/docs/mk-ca-bundle.1 new file mode 100644 index 0000000..f754e74 --- /dev/null +++ b/docs/mk-ca-bundle.1 @@ -0,0 +1,119 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 2008 - 2016, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.TH mk-ca-bundle 1 "24 Oct 2016" "version 1.27" "mk-ca-bundle manual" +.SH NAME +mk-ca-bundle \- convert mozilla's certdata.txt to PEM format +.SH SYNOPSIS +mk-ca-bundle [options] +.I [outputfile] +.SH DESCRIPTION +The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source +tree over HTTPS, then parses certdata.txt and extracts certificates into PEM +format. By default, only CA root certificates trusted to issue SSL server +authentication certificates are extracted. These are then processed with the +OpenSSL commandline tool to produce the final ca-bundle file. + +The default \fIoutputfile\fP name is \fBca-bundle.crt\fP. By setting it to '-' +(a single dash) you will get the output sent to STDOUT instead of a file. + +The PEM format this scripts uses for output makes the result readily available +for use by just about all OpenSSL or GnuTLS powered applications, such as +curl, wget and more. +.SH OPTIONS +The following options are supported: +.IP -b +backup an existing version of \fIoutputfilename\fP +.IP "-d [name]" +specify which Mozilla tree to pull certdata.txt from (or a custom URL). Valid +names are: aurora, beta, central, mozilla, nss, release (default). They are +shortcuts for which source tree to get the cert data from. +.IP -f +force rebuild even if certdata.txt is current (Added in version 1.17) +.IP -i +print version info about used modules +.IP -k +Allow insecure data transfer. By default (since 1.27) this command will fail +if the HTTPS transfer fails. This overrides that decision (and opens for +man-in-the-middle attacks). +.IP -l +print license info about certdata.txt +.IP -m +(Added in 1.26) Include meta data comments in the output. The meta data is +specific information about each certificate that is stored in the original +file as comments and using this option will make those comments get passed on +to the output file. The meta data is not parsed in any way by mk-ca-bundle. +.IP -n +no download of certdata.txt (to use existing) +.IP "-p [purposes]:[levels]" +list of Mozilla trust purposes and levels for certificates to include in output. +Takes the form of a comma separated list of purposes, a colon, and a comma +separated list of levels. The default is to include all certificates trusted +to issue SSL Server certificates (SERVER_AUTH:TRUSTED_DELEGATOR). + +(Added in version 1.21, Perl only) + +Valid purposes are: +.RS +ALL, DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT, +DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, CRL_SIGN, +SERVER_AUTH (default), CLIENT_AUTH, CODE_SIGNING, EMAIL_PROTECTION, +IPSEC_END_SYSTEM, IPSEC_TUNNEL, IPSEC_USER, TIME_STAMPING, STEP_UP_APPROVED +.RE +.IP +Valid trust levels are: +.RS +ALL, TRUSTED_DELEGATOR (default), NOT_TRUSTED, MUST_VERIFY_TRUST, TRUSTED +.RE +.IP -q +be really quiet (no progress output at all) +.IP -t +include plain text listing of certificates +.IP "-s [algorithms]" +comma separated list of signature algorithms with which to hash/fingerprint +each certificate and output when run in plain text mode. + +(Added in version 1.21, Perl only) + +Valid algorithms are: +.RS +ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512 +.RE +.IP -u +unlink (remove) certdata.txt after processing +.IP -v +be verbose and print out processed CAs +.SH EXIT STATUS +Returns 0 on success. Returns 1 if it fails to download data. +.SH CERTDATA FORMAT +The file format used by Mozilla for this trust information seems to be documented here: +.nf +https://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html +.fi +.SH SEE ALSO +.BR curl (1) +.SH HISTORY +\fBmk-ca-bundle\fP is a command line tool that is shipped as part of every +curl and libcurl release (see https://curl.haxx.se/). It was originally based +on the parse-certs script written by Roland Krikava and was later much +improved by Guenter Knauf. This manual page was initially written by Jan +Schaumann \&. diff --git a/include/Makefile.in b/include/Makefile.in index b1a2980..1352924 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -212,6 +212,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -237,7 +243,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -251,7 +259,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -263,6 +274,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -308,6 +320,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -320,6 +333,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ diff --git a/include/README b/include/README index 6eb73b2..c2589ec 100644 --- a/include/README +++ b/include/README @@ -16,31 +16,9 @@ curl subdirectory. It makes it more likely to survive future modifications. NOTE FOR LIBCURL HACKERS -The following notes apply to libcurl version 7.19.0 and later. - -* The distributed curl/curlbuild.h file is only intended to be used on systems - which can not run the also distributed configure script. - -* The distributed curlbuild.h file is generated as a copy of curlbuild.h.dist - when the libcurl source code distribution archive file is originally created. - * If you check out from git on a non-configure platform, you must run the - appropriate buildconf* script to set up curlbuild.h and other local files - before being able of compiling the library. - -* On systems capable of running the configure script, the configure process - will overwrite the distributed include/curl/curlbuild.h file with one that - is suitable and specific to the library being configured and built, which - is generated from the include/curl/curlbuild.h.in template file. - -* If you intend to distribute an already compiled libcurl library you _MUST_ - also distribute along with it the generated curl/curlbuild.h which has been - used to compile it. Otherwise the library will be of no use for the users of - the library that you have built. It is _your_ responsibility to provide this - file. No one at the curl project can know how you have built the library. - -* File curl/curlbuild.h includes platform and configuration dependent info, - and must not be modified by anyone. Configure script generates it for you. + appropriate buildconf* script to set up files before being able of compiling + the library. * We cannot assume anything else but very basic compiler features being present. While libcurl requires an ANSI C compiler to build, some of the @@ -52,4 +30,4 @@ The following notes apply to libcurl version 7.19.0 and later. To figure out how to do good and portable checks for features, operating systems or specific hardwarare, a very good resource is Bjorn Reese's -collection at http://predef.sf.net/ +collection at https://sourceforge.net/p/predef/wiki/ diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am index 7c924fc..989d4a2 100644 --- a/include/curl/Makefile.am +++ b/include/curl/Makefile.am @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -21,31 +21,12 @@ ########################################################################### pkginclude_HEADERS = \ curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \ - typecheck-gcc.h curlbuild.h curlrules.h + typecheck-gcc.h system.h pkgincludedir= $(includedir)/curl -# curlbuild.h does not exist in the git tree. When the original libcurl -# source code distribution archive file is created, curlbuild.h.dist is -# renamed to curlbuild.h and included in the tarball so that it can be -# used directly on non-configure systems. -# -# The distributed curlbuild.h will be overwritten on configure systems -# when the configure script runs, with one that is suitable and specific -# to the library being configured and built. -# -# curlbuild.h.in is the distributed template file from which the configure -# script creates curlbuild.h at library configuration time, overwiting the -# one included in the distribution archive. -# -# curlbuild.h.dist is not included in the source code distribution archive. - -EXTRA_DIST = curlbuild.h.in - -DISTCLEANFILES = curlbuild.h - checksrc: - @@PERL@ $(top_srcdir)/lib/checksrc.pl -Wcurlbuild.h -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(EXTRA_DIST) + @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) if CURLDEBUG # for debug builds, we scan the sources on all regular make invokes diff --git a/include/curl/Makefile.in b/include/curl/Makefile.in index dc790db..e1fb093 100644 --- a/include/curl/Makefile.in +++ b/include/curl/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = include/curl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -111,7 +112,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -162,8 +163,7 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)curlbuild.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -182,7 +182,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/curlbuild.h.in +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkgincludedir = $(includedir)/curl ACLOCAL = @ACLOCAL@ @@ -199,6 +199,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -224,7 +230,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -238,7 +246,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -250,6 +261,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -295,6 +307,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -307,6 +320,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -383,7 +397,7 @@ top_srcdir = @top_srcdir@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -399,27 +413,9 @@ top_srcdir = @top_srcdir@ ########################################################################### pkginclude_HEADERS = \ curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \ - typecheck-gcc.h curlbuild.h curlrules.h + typecheck-gcc.h system.h - -# curlbuild.h does not exist in the git tree. When the original libcurl -# source code distribution archive file is created, curlbuild.h.dist is -# renamed to curlbuild.h and included in the tarball so that it can be -# used directly on non-configure systems. -# -# The distributed curlbuild.h will be overwritten on configure systems -# when the configure script runs, with one that is suitable and specific -# to the library being configured and built. -# -# curlbuild.h.in is the distributed template file from which the configure -# script creates curlbuild.h at library configuration time, overwiting the -# one included in the distribution archive. -# -# curlbuild.h.dist is not included in the source code distribution archive. -EXTRA_DIST = curlbuild.h.in -DISTCLEANFILES = curlbuild.h -all: curlbuild.h - $(MAKE) $(AM_MAKEFLAGS) all-am +all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -431,9 +427,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/curl/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/curl/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/curl/Makefile + $(AUTOMAKE) --foreign include/curl/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -452,17 +448,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -curlbuild.h: stamp-h2 - @test -f $@ || rm -f stamp-h2 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 - -stamp-h2: $(srcdir)/curlbuild.h.in $(top_builddir)/config.status - @rm -f stamp-h2 - cd $(top_builddir) && $(SHELL) ./config.status include/curl/curlbuild.h - -distclean-hdr: - -rm -f curlbuild.h stamp-h2 - mostlyclean-libtool: -rm -f *.lo @@ -575,7 +560,7 @@ distdir: $(DISTFILES) check-am: all-am check: check-am @CURLDEBUG_FALSE@all-local: -all-am: Makefile $(HEADERS) curlbuild.h all-local +all-am: Makefile $(HEADERS) all-local installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -606,7 +591,6 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -617,7 +601,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr distclean-tags +distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am @@ -677,13 +661,13 @@ ps-am: uninstall-am: uninstall-pkgincludeHEADERS -.MAKE: all install-am install-strip +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \ clean-generic clean-libtool cscopelist-am ctags ctags-am \ - distclean distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ + distclean distclean-generic distclean-libtool distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgincludeHEADERS \ @@ -697,7 +681,7 @@ uninstall-am: uninstall-pkgincludeHEADERS checksrc: - @@PERL@ $(top_srcdir)/lib/checksrc.pl -Wcurlbuild.h -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(EXTRA_DIST) + @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) # for debug builds, we scan the sources on all regular make invokes @CURLDEBUG_TRUE@all-local: checksrc diff --git a/include/curl/curl.h b/include/curl/curl.h index 467bb02..fa019ec 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -35,8 +35,7 @@ #endif #include "curlver.h" /* libcurl version defines */ -#include "curlbuild.h" /* libcurl build definitions */ -#include "curlrules.h" /* libcurl rules enforcement */ +#include "system.h" /* determine things run-time */ /* * Define WIN32 when build target is Win32 API @@ -75,6 +74,7 @@ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ + defined(__CYGWIN__) || \ (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) #include #endif @@ -133,6 +133,27 @@ typedef int curl_socket_t; #define curl_socket_typedef #endif /* curl_socket_typedef */ +/* enum for the different supported SSL backends */ +typedef enum { + CURLSSLBACKEND_NONE = 0, + CURLSSLBACKEND_OPENSSL = 1, + CURLSSLBACKEND_GNUTLS = 2, + CURLSSLBACKEND_NSS = 3, + CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ + CURLSSLBACKEND_GSKIT = 5, + CURLSSLBACKEND_POLARSSL = 6, + CURLSSLBACKEND_WOLFSSL = 7, + CURLSSLBACKEND_SCHANNEL = 8, + CURLSSLBACKEND_DARWINSSL = 9, + CURLSSLBACKEND_AXTLS = 10, + CURLSSLBACKEND_MBEDTLS = 11 +} curl_sslbackend; + +/* aliases for library clones and renames */ +#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL +#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL +#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL + struct curl_httppost { struct curl_httppost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ @@ -224,7 +245,9 @@ typedef size_t (*curl_write_callback)(char *buffer, size_t nitems, void *outstream); - +/* This callback will be called when a new resolver request is made */ +typedef int (*curl_resolver_start_callback)(void *resolver_state, + void *reserved, void *userdata); /* enumeration of file types */ typedef enum { @@ -336,7 +359,7 @@ typedef size_t (*curl_read_callback)(char *buffer, size_t nitems, void *instream); -typedef enum { +typedef enum { CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ CURLSOCKTYPE_LAST /* never use */ @@ -378,7 +401,7 @@ typedef enum { CURLIOE_LAST /* never use */ } curlioerr; -typedef enum { +typedef enum { CURLIOCMD_NOP, /* no operation */ CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ CURLIOCMD_LAST /* never use */ @@ -556,6 +579,8 @@ typedef enum { CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer */ + CURLE_RECURSIVE_API_CALL, /* 93 - an api function was called from + inside a callback */ CURL_LAST /* never use! */ } CURLcode; @@ -678,6 +703,8 @@ typedef enum { #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) /* Deprecated since the advent of CURLAUTH_NEGOTIATE */ #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE +/* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */ +#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE #define CURLAUTH_NTLM (((unsigned long)1)<<3) #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) @@ -692,6 +719,7 @@ typedef enum { #define CURLSSH_AUTH_HOST (1<<2) /* host key files */ #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ #define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ +#define CURLSSH_AUTH_GSSAPI (1<<5) /* gssapi (kerberos, ...) */ #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY #define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ @@ -704,7 +732,9 @@ enum curl_khtype { CURLKHTYPE_UNKNOWN, CURLKHTYPE_RSA1, CURLKHTYPE_RSA, - CURLKHTYPE_DSS + CURLKHTYPE_DSS, + CURLKHTYPE_ECDSA, + CURLKHTYPE_ED25519 }; struct curl_khkey { @@ -763,6 +793,11 @@ typedef enum { SSL backends where such behavior is present. */ #define CURLSSLOPT_NO_REVOKE (1<<1) +/* The default connection attempt delay in milliseconds for happy eyeballs. + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document + this value, keep them in sync. */ +#define CURL_HET_DEFAULT 200L + #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ @@ -912,7 +947,7 @@ typedef enum { CINIT(READDATA, OBJECTPOINT, 9), /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE - * bytes big. If this is not used, error messages go to stderr instead: */ + * bytes big. */ CINIT(ERRORBUFFER, OBJECTPOINT, 10), /* Function that will be called to store the output (instead of fwrite). The @@ -1600,7 +1635,7 @@ typedef enum { CINIT(DNS_SERVERS, STRINGPOINT, 211), /* Time-out accept operations (currently for FTP only) after this amount - of miliseconds. */ + of milliseconds. */ CINIT(ACCEPTTIMEOUT_MS, LONG, 212), /* Set TCP keepalive */ @@ -1636,7 +1671,7 @@ typedef enum { * Only supported by the c-ares DNS backend */ CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222), - /* Set the local IPv4 address to use for outgoing DNS requests. + /* Set the local IPv6 address to use for outgoing DNS requests. * Only supported by the c-ares DNS backend */ CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223), @@ -1778,6 +1813,34 @@ typedef enum { /* Path to an abstract Unix domain socket */ CINIT(ABSTRACT_UNIX_SOCKET, STRINGPOINT, 264), + /* Suppress proxy CONNECT response headers from user callbacks */ + CINIT(SUPPRESS_CONNECT_HEADERS, LONG, 265), + + /* The request target, instead of extracted from the URL */ + CINIT(REQUEST_TARGET, STRINGPOINT, 266), + + /* bitmask of allowed auth methods for connections to SOCKS5 proxies */ + CINIT(SOCKS5_AUTH, LONG, 267), + + /* Enable/disable SSH compression */ + CINIT(SSH_COMPRESSION, LONG, 268), + + /* Post MIME data. */ + CINIT(MIMEPOST, OBJECTPOINT, 269), + + /* Time to use with the CURLOPT_TIMECONDITION. Specified in number of + seconds since 1 Jan 1970. */ + CINIT(TIMEVALUE_LARGE, OFF_T, 270), + + /* Head start in milliseconds to give happy eyeballs. */ + CINIT(HAPPY_EYEBALLS_TIMEOUT_MS, LONG, 271), + + /* Function that will be called before a resolver request is made */ + CINIT(RESOLVER_START_FUNCTION, FUNCTIONPOINT, 272), + + /* User data to pass to the resolver start callback. */ + CINIT(RESOLVER_START_DATA, OBJECTPOINT, 273), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1884,6 +1947,18 @@ enum { CURL_SSLVERSION_LAST /* never use, keep last */ }; +enum { + CURL_SSLVERSION_MAX_NONE = 0, + CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16), + CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16), + CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16), + CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16), + CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16), + + /* never use, keep last */ + CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16) +}; + enum CURL_TLSAUTH { CURL_TLSAUTH_NONE, CURL_TLSAUTH_SRP, @@ -1912,15 +1987,140 @@ typedef enum { CURL_TIMECOND_LAST } curl_TimeCond; +/* Special size_t value signaling a zero-terminated string. */ +#define CURL_ZERO_TERMINATED ((size_t) -1) /* curl_strequal() and curl_strnequal() are subject for removal in a future - libcurl, see lib/README.curlx for details + release */ +CURL_EXTERN int curl_strequal(const char *s1, const char *s2); +CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n); + +/* Mime/form handling support. */ +typedef struct curl_mime_s curl_mime; /* Mime context. */ +typedef struct curl_mimepart_s curl_mimepart; /* Mime part context. */ - !checksrc! disable SPACEBEFOREPAREN 2 -*/ -CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); -CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); +/* + * NAME curl_mime_init() + * + * DESCRIPTION + * + * Create a mime context and return its handle. The easy parameter is the + * target handle. + */ +CURL_EXTERN curl_mime *curl_mime_init(CURL *easy); + +/* + * NAME curl_mime_free() + * + * DESCRIPTION + * + * release a mime handle and its substructures. + */ +CURL_EXTERN void curl_mime_free(curl_mime *mime); + +/* + * NAME curl_mime_addpart() + * + * DESCRIPTION + * + * Append a new empty part to the given mime context and return a handle to + * the created part. + */ +CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime); + +/* + * NAME curl_mime_name() + * + * DESCRIPTION + * + * Set mime/form part name. + */ +CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name); + +/* + * NAME curl_mime_filename() + * + * DESCRIPTION + * + * Set mime part remote file name. + */ +CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part, + const char *filename); + +/* + * NAME curl_mime_type() + * + * DESCRIPTION + * + * Set mime part type. + */ +CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype); +/* + * NAME curl_mime_encoder() + * + * DESCRIPTION + * + * Set mime data transfer encoder. + */ +CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part, + const char *encoding); + +/* + * NAME curl_mime_data() + * + * DESCRIPTION + * + * Set mime part data source from memory data, + */ +CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part, + const char *data, size_t datasize); + +/* + * NAME curl_mime_filedata() + * + * DESCRIPTION + * + * Set mime part data source from named file. + */ +CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part, + const char *filename); + +/* + * NAME curl_mime_data_cb() + * + * DESCRIPTION + * + * Set mime part data source from callback function. + */ +CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part, + curl_off_t datasize, + curl_read_callback readfunc, + curl_seek_callback seekfunc, + curl_free_callback freefunc, + void *arg); + +/* + * NAME curl_mime_subparts() + * + * DESCRIPTION + * + * Set mime part data source from subparts. + */ +CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part, + curl_mime *subparts); +/* + * NAME curl_mime_headers() + * + * DESCRIPTION + * + * Set mime part headers. + */ +CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part, + struct curl_slist *headers, + int take_ownership); + +/* Old form API. */ /* name is uppercase CURLFORM_ */ #ifdef CFINIT #undef CFINIT @@ -2163,6 +2363,47 @@ struct curl_slist { }; /* + * NAME curl_global_sslset() + * + * DESCRIPTION + * + * When built with multiple SSL backends, curl_global_sslset() allows to + * choose one. This function can only be called once, and it must be called + * *before* curl_global_init(). + * + * The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The + * backend can also be specified via the name parameter (passing -1 as id). + * If both id and name are specified, the name will be ignored. If neither id + * nor name are specified, the function will fail with + * CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the + * NULL-terminated list of available backends. + * + * Upon success, the function returns CURLSSLSET_OK. + * + * If the specified SSL backend is not available, the function returns + * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated + * list of available SSL backends. + * + * The SSL backend can be set only once. If it has already been set, a + * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE. + */ + +typedef struct { + curl_sslbackend id; + const char *name; +} curl_ssl_backend; + +typedef enum { + CURLSSLSET_OK = 0, + CURLSSLSET_UNKNOWN_BACKEND, + CURLSSLSET_TOO_LATE, + CURLSSLSET_NO_BACKENDS /* libcurl was built without any SSL support */ +} CURLsslset; + +CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name, + const curl_ssl_backend ***avail); + +/* * NAME curl_slist_append() * * DESCRIPTION @@ -2202,27 +2443,6 @@ struct curl_certinfo { format "name: value" */ }; -/* enum for the different supported SSL backends */ -typedef enum { - CURLSSLBACKEND_NONE = 0, - CURLSSLBACKEND_OPENSSL = 1, - CURLSSLBACKEND_GNUTLS = 2, - CURLSSLBACKEND_NSS = 3, - CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ - CURLSSLBACKEND_GSKIT = 5, - CURLSSLBACKEND_POLARSSL = 6, - CURLSSLBACKEND_CYASSL = 7, - CURLSSLBACKEND_SCHANNEL = 8, - CURLSSLBACKEND_DARWINSSL = 9, - CURLSSLBACKEND_AXTLS = 10, - CURLSSLBACKEND_MBEDTLS = 11 -} curl_sslbackend; - -/* aliases for library clones and renames */ -#define CURLSSLBACKEND_LIBRESSL 1 -#define CURLSSLBACKEND_BORINGSSL 1 -#define CURLSSLBACKEND_WOLFSSL 6 - /* Information about the SSL library used and the respective internal SSL handle, which can be used to obtain further information regarding the connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */ @@ -2235,7 +2455,9 @@ struct curl_tlssessioninfo { #define CURLINFO_LONG 0x200000 #define CURLINFO_DOUBLE 0x300000 #define CURLINFO_SLIST 0x400000 +#define CURLINFO_PTR 0x400000 /* same as SLIST */ #define CURLINFO_SOCKET 0x500000 +#define CURLINFO_OFF_T 0x600000 #define CURLINFO_MASK 0x0fffff #define CURLINFO_TYPEMASK 0xf00000 @@ -2248,15 +2470,22 @@ typedef enum { CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, + CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7, CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, + CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8, CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, + CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9, CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, + CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10, CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, CURLINFO_FILETIME = CURLINFO_LONG + 14, + CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14, CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15, CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, + CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16, CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, @@ -2274,7 +2503,7 @@ typedef enum { CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, - CURLINFO_CERTINFO = CURLINFO_SLIST + 34, + CURLINFO_CERTINFO = CURLINFO_PTR + 34, CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, @@ -2283,9 +2512,9 @@ typedef enum { CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, - CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, + CURLINFO_TLS_SESSION = CURLINFO_PTR + 43, CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, - CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, + CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45, CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, CURLINFO_PROTOCOL = CURLINFO_LONG + 48, @@ -2311,7 +2540,7 @@ typedef enum { CURLCLOSEPOLICY_LAST /* last, never use this */ } curl_closepolicy; -#define CURL_GLOBAL_SSL (1<<0) +#define CURL_GLOBAL_SSL (1<<0) /* no purpose since since 7.57.0 */ #define CURL_GLOBAL_WIN32 (1<<1) #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) #define CURL_GLOBAL_NOTHING 0 @@ -2389,6 +2618,7 @@ typedef enum { CURLVERSION_SECOND, CURLVERSION_THIRD, CURLVERSION_FOURTH, + CURLVERSION_FIFTH, CURLVERSION_LAST /* never actually use this */ } CURLversion; @@ -2397,7 +2627,7 @@ typedef enum { meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redefine the NOW to another enum from above. */ -#define CURLVERSION_NOW CURLVERSION_FOURTH +#define CURLVERSION_NOW CURLVERSION_FIFTH typedef struct { CURLversion age; /* age of the returned struct */ @@ -2425,6 +2655,12 @@ typedef struct { const char *libssh_version; /* human readable string */ + /* These fields were added in CURLVERSION_FIFTH */ + + unsigned int brotli_ver_num; /* Numeric Brotli version + (MAJOR << 24) | (MINOR << 12) | PATCH */ + const char *brotli_version; /* human readable string. */ + } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ @@ -2446,7 +2682,7 @@ typedef struct { #define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ #define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper - is suported */ + is supported */ #define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ #define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */ #define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */ @@ -2454,6 +2690,8 @@ typedef struct { #define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used for cookie domain verification */ #define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ +#define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */ +#define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */ /* * NAME curl_version_info() diff --git a/include/curl/curlbuild.h.cmake b/include/curl/curlbuild.h.cmake deleted file mode 100644 index bbb31a9..0000000 --- a/include/curl/curlbuild.h.cmake +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.in or - * at file include/curl/curlbuild.h, this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -#cmakedefine CURL_PULL_WS2TCPIP_H -#ifdef CURL_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#cmakedefine CURL_PULL_SYS_TYPES_H -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file stdint.h must be included by the external interface. */ -#cmakedefine CURL_PULL_STDINT_H -#ifdef CURL_PULL_STDINT_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file inttypes.h must be included by the external interface. */ -#cmakedefine CURL_PULL_INTTYPES_H -#ifdef CURL_PULL_INTTYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#cmakedefine CURL_PULL_SYS_SOCKET_H -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/poll.h must be included by the external interface. */ -#cmakedefine CURL_PULL_SYS_POLL_H -#ifdef CURL_PULL_SYS_POLL_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG} - -/* Integral data type used for curl_socklen_t. */ -#define CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T} - -/* The size of `curl_socklen_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T} - -/* Data type definition of curl_socklen_t. */ -typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; - -/* Signed integral data type used for curl_off_t. */ -#define CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T} - -/* Data type definition of curl_off_t. */ -typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; - -/* curl_off_t formatting string directive without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_T "${CURL_FORMAT_CURL_OFF_T}" - -/* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_TU "${CURL_FORMAT_CURL_OFF_TU}" - -/* curl_off_t formatting string directive with "%" conversion specifier. */ -#define CURL_FORMAT_OFF_T "${CURL_FORMAT_OFF_T}" - -/* The size of `curl_off_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T} - -/* curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T} - -/* unsigned curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU} - -#endif /* __CURL_CURLBUILD_H */ diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in deleted file mode 100644 index ffab356..0000000 --- a/include/curl/curlbuild.h.in +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.in or - * at file include/curl/curlbuild.h, this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -#undef CURL_PULL_WS2TCPIP_H -#ifdef CURL_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#undef CURL_PULL_SYS_TYPES_H -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file stdint.h must be included by the external interface. */ -#undef CURL_PULL_STDINT_H -#ifdef CURL_PULL_STDINT_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file inttypes.h must be included by the external interface. */ -#undef CURL_PULL_INTTYPES_H -#ifdef CURL_PULL_INTTYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#undef CURL_PULL_SYS_SOCKET_H -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/poll.h must be included by the external interface. */ -#undef CURL_PULL_SYS_POLL_H -#ifdef CURL_PULL_SYS_POLL_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#undef CURL_SIZEOF_LONG - -/* Integral data type used for curl_socklen_t. */ -#undef CURL_TYPEOF_CURL_SOCKLEN_T - -/* The size of `curl_socklen_t', as computed by sizeof. */ -#undef CURL_SIZEOF_CURL_SOCKLEN_T - -/* Data type definition of curl_socklen_t. */ -typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; - -/* Signed integral data type used for curl_off_t. */ -#undef CURL_TYPEOF_CURL_OFF_T - -/* Data type definition of curl_off_t. */ -typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; - -/* curl_off_t formatting string directive without "%" conversion specifier. */ -#undef CURL_FORMAT_CURL_OFF_T - -/* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#undef CURL_FORMAT_CURL_OFF_TU - -/* curl_off_t formatting string directive with "%" conversion specifier. */ -#undef CURL_FORMAT_OFF_T - -/* The size of `curl_off_t', as computed by sizeof. */ -#undef CURL_SIZEOF_CURL_OFF_T - -/* curl_off_t constant suffix. */ -#undef CURL_SUFFIX_CURL_OFF_T - -/* unsigned curl_off_t constant suffix. */ -#undef CURL_SUFFIX_CURL_OFF_TU - -#endif /* __CURL_CURLBUILD_H */ diff --git a/include/curl/curlrules.h b/include/curl/curlrules.h deleted file mode 100644 index 55d21f6..0000000 --- a/include/curl/curlrules.h +++ /dev/null @@ -1,262 +0,0 @@ -#ifndef __CURL_CURLRULES_H -#define __CURL_CURLRULES_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* COMPILE TIME SANITY CHECKS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * All checks done in this file are intentionally placed in a public - * header file which is pulled by curl/curl.h when an application is - * being built using an already built libcurl library. Additionally - * this file is also included and used when building the library. - * - * If compilation fails on this file it is certainly sure that the - * problem is elsewhere. It could be a problem in the curlbuild.h - * header file, or simply that you are using different compilation - * settings than those used to build the library. - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * Do not deactivate any check, these are done to make sure that the - * library is properly built and used. - * - * You can find further help on the libcurl development mailing list: - * https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * NOTE 2 - * ------ - * - * Some of the following compile time checks are based on the fact - * that the dimension of a constant array can not be a negative one. - * In this way if the compile time verification fails, the compilation - * will fail issuing an error. The error description wording is compiler - * dependent but it will be quite similar to one of the following: - * - * "negative subscript or subscript is too large" - * "array must have at least one element" - * "-1 is an illegal array size" - * "size of array is negative" - * - * If you are building an application which tries to use an already - * built libcurl library and you are getting this kind of errors on - * this file, it is a clear indication that there is a mismatch between - * how the library was built and how you are trying to use it for your - * application. Your already compiled or binary library provider is the - * only one who can give you the details you need to properly use it. - */ - -/* - * Verify that some macros are actually defined. - */ - -#ifndef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing -#endif - -#ifndef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing -#endif - -/* - * Macros private to this header file. - */ - -#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 - -#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 - -/* - * Verify that the size previously defined and expected for long - * is the same as the one reported by sizeof() at compile time. - */ - -typedef char - __curl_rule_01__ - [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; - -/* - * Verify that the size previously defined and expected for - * curl_off_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_02__ - [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; - -/* - * Verify at compile time that the size of curl_off_t as reported - * by sizeof() is greater or equal than the one reported for long - * for the current compilation. - */ - -typedef char - __curl_rule_03__ - [CurlchkszGE(curl_off_t, long)]; - -/* - * Verify that the size previously defined and expected for - * curl_socklen_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_04__ - [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; - -/* - * Verify at compile time that the size of curl_socklen_t as reported - * by sizeof() is greater or equal than the one reported for int for - * the current compilation. - */ - -typedef char - __curl_rule_05__ - [CurlchkszGE(curl_socklen_t, int)]; - -/* ================================================================ */ -/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ -/* ================================================================ */ - -/* - * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow - * these to be visible and exported by the external libcurl interface API, - * while also making them visible to the library internals, simply including - * curl_setup.h, without actually needing to include curl.h internally. - * If some day this section would grow big enough, all this should be moved - * to its own header file. - */ - -/* - * Figure out if we can use the ## preprocessor operator, which is supported - * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ - * or __cplusplus so we need to carefully check for them too. - */ - -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ - defined(__ILEC400__) - /* This compiler is believed to have an ISO compatible preprocessor */ -#define CURL_ISOCPP -#else - /* This compiler is believed NOT to have an ISO compatible preprocessor */ -#undef CURL_ISOCPP -#endif - -/* - * Macros for minimum-width signed and unsigned curl_off_t integer constants. - */ - -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) -# define __CURL_OFF_T_C_HLPR2(x) x -# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) -# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ - __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ - __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) -#else -# ifdef CURL_ISOCPP -# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix -# else -# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix -# endif -# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) -# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) -#endif - -/* - * Get rid of macros private to this header file. - */ - -#undef CurlchkszEQ -#undef CurlchkszGE - -/* - * Get rid of macros not intended to exist beyond this point. - */ - -#undef CURL_PULL_WS2TCPIP_H -#undef CURL_PULL_SYS_TYPES_H -#undef CURL_PULL_SYS_SOCKET_H -#undef CURL_PULL_SYS_POLL_H -#undef CURL_PULL_STDINT_H -#undef CURL_PULL_INTTYPES_H - -#undef CURL_TYPEOF_CURL_SOCKLEN_T -#undef CURL_TYPEOF_CURL_OFF_T - -#ifdef CURL_NO_OLDIES -#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ -#endif - -#endif /* __CURL_CURLRULES_H */ diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 2bc146f..225f935 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,17 +26,17 @@ a script at release-time. This was made its own header file in 7.11.2 */ /* This is the global package copyright */ -#define LIBCURL_COPYRIGHT "1996 - 2017 Daniel Stenberg, ." +#define LIBCURL_COPYRIGHT "1996 - 2018 Daniel Stenberg, ." /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.53.1" +#define LIBCURL_VERSION "7.59.0" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 53 -#define LIBCURL_VERSION_PATCH 1 +#define LIBCURL_VERSION_MINOR 59 +#define LIBCURL_VERSION_PATCH 0 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -57,18 +57,18 @@ CURL_VERSION_BITS() macro since curl's own configure script greps for it and needs it to contain the full number. */ -#define LIBCURL_VERSION_NUM 0x073501 +#define LIBCURL_VERSION_NUM 0x073b00 /* * This is the date and time when the full source package was created. The * timestamp is not stored in git, as the timestamp is properly set in the * tarballs by the maketgz script. * - * The format of the date should follow this template: + * The format of the date follows this template: * - * "Mon Feb 12 11:35:33 UTC 2007" + * "2007-11-23" */ -#define LIBCURL_TIMESTAMP "Fri Feb 24 07:49:42 UTC 2017" +#define LIBCURL_TIMESTAMP "2018-03-14" #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) #define CURL_AT_LEAST_VERSION(x,y,z) \ diff --git a/include/curl/multi.h b/include/curl/multi.h index d1e00cc..b19dbaf 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -70,6 +70,8 @@ typedef enum { CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was attempted to get added - again */ + CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a + callback */ CURLM_LAST } CURLMcode; @@ -184,8 +186,8 @@ CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, * * Returns: CURLMcode type, general multi error code. *NOTE* that this only * returns errors etc regarding the whole multi stack. There might - * still have occurred problems on invidual transfers even when this - * returns OK. + * still have occurred problems on individual transfers even when + * this returns OK. */ CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles); @@ -218,7 +220,7 @@ CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); * curl_multi_cleanup(). * * The 'CURLMsg' struct is meant to be very simple and only contain - * very basic informations. If more involved information is wanted, + * very basic information. If more involved information is wanted, * we will provide the particular "transfer handle" in that struct * and that should/could/would be used in subsequent * curl_easy_getinfo() calls (or similar). The point being that we diff --git a/include/curl/curlbuild.h b/include/curl/system.h similarity index 53% rename from include/curl/curlbuild.h rename to include/curl/system.h index ae95095..07bbd9c 100644 --- a/include/curl/curlbuild.h +++ b/include/curl/system.h @@ -1,5 +1,5 @@ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H +#ifndef __CURL_SYSTEM_H +#define __CURL_SYSTEM_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,387 +22,201 @@ * ***************************************************************************/ -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * See file include/curl/curlbuild.h.in, run configure, and forget - * that this file exists it is only used for non-configure systems. - * But you can keep reading if you want ;-) - * - */ - -/* ================================================================ */ -/* NOTES FOR NON-CONFIGURE SYSTEMS */ -/* ================================================================ */ - /* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * Try to keep one section per platform, compiler and architecture, - * otherwise, if an existing section is reused for a different one and - * later on the original is adjusted, probably the piggybacking one can - * be adversely changed. - * - * In order to differentiate between platforms/compilers/architectures - * use only compiler built in predefined preprocessor symbols. - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. + * Try to keep one section per platform, compiler and architecture, otherwise, + * if an existing section is reused for a different one and later on the + * original is adjusted, probably the piggybacking one can be adversely + * changed. * - * NOTE 2: - * ------- + * In order to differentiate between platforms/compilers/architectures use + * only compiler built in predefined preprocessor symbols. * - * For any given platform/compiler curl_off_t must be typedef'ed to a - * 64-bit wide signed integral data type. The width of this data type - * must remain constant and independent of any possible large file - * support settings. + * curl_off_t + * ---------- * - * As an exception to the above, curl_off_t shall be typedef'ed to a - * 32-bit wide signed integral data type if there is no 64-bit type. + * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit + * wide signed integral data type. The width of this data type must remain + * constant and independent of any possible large file support settings. * - * As a general rule, curl_off_t shall not be mapped to off_t. This - * rule shall only be violated if off_t is the only 64-bit data type - * available and the size of off_t is independent of large file support - * settings. Keep your build on the safe side avoiding an off_t gating. - * If you have a 64-bit off_t then take for sure that another 64-bit - * data type exists, dig deeper and you will find it. + * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit + * wide signed integral data type if there is no 64-bit type. * - * NOTE 3: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.dist or - * at file include/curl/curlbuild.h, this is due to the following reason: - * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h - * when the libcurl source code distribution archive file is created. - * - * File include/curl/curlbuild.h.dist is not included in the distribution - * archive. File include/curl/curlbuild.h is not present in the git tree. - * - * The distributed include/curl/curlbuild.h file is only intended to be used - * on systems which can not run the also distributed configure script. - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - * If you check out from git on a non-configure platform, you must run the - * appropriate buildconf* script to set up curlbuild.h and other local files. + * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall + * only be violated if off_t is the only 64-bit data type available and the + * size of off_t is independent of large file support settings. Keep your + * build on the safe side avoiding an off_t gating. If you have a 64-bit + * off_t then take for sure that another 64-bit data type exists, dig deeper + * and you will find it. * */ -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ -/* ================================================================ */ - #if defined(__DJGPP__) || defined(__GO32__) # if defined(__DJGPP__) && (__DJGPP__ > 1) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # else -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__SALFORDC__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # endif # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__TURBOC__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__WATCOMC__) # if defined(__386__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__POCC__) # if (__POCC__ < 280) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # elif defined(_MSC_VER) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__LCC__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__SYMBIAN32__) # if defined(__EABI__) /* Treat all ARM compilers equally */ -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__CW32__) # pragma longlong on -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__VC32__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__MWERKS__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(_WIN32_WCE) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__MINGW32__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_WS2TCPIP_H 1 #elif defined(__VMS) # if defined(__VAX) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__OS400__) # if defined(__ILEC400__) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 # define CURL_PULL_SYS_TYPES_H 1 # define CURL_PULL_SYS_SOCKET_H 1 # endif @@ -410,37 +224,28 @@ #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_ILP32) -# define CURL_SIZEOF_LONG 4 # elif defined(_LP64) -# define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 # define CURL_PULL_SYS_TYPES_H 1 # define CURL_PULL_SYS_SOCKET_H 1 # endif @@ -448,52 +253,70 @@ #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_ILP32) -# define CURL_SIZEOF_LONG 4 # elif defined(_LP64) -# define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # else # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 # define CURL_PULL_SYS_TYPES_H 1 # define CURL_PULL_SYS_SOCKET_H 1 # endif #elif defined(TPF) -# define CURL_SIZEOF_LONG 8 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__TINYC__) /* also known as tcc */ + +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 + +#elif defined(__SUNPRO_C) /* Oracle Solaris Studio */ +# if !defined(__LP64) && (defined(__ILP32) || \ + defined(__i386) || defined(__sparcv8)) +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# elif defined(__LP64) || \ + defined(__amd64) || defined(__sparcv9) +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ @@ -501,62 +324,73 @@ #elif defined(_MSC_VER) # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_FORMAT_CURL_OFF_T "I64d" # define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T i64 # define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_SIZEOF_LONG 4 # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 /* ===================================== */ /* KEEP GENERIC GCC THE LAST ENTRY */ /* ===================================== */ #elif defined(__GNUC__) -# if !defined(__LP64__) && (defined(__ILP32__) || \ - defined(__i386__) || defined(__ppc__) || defined(__arm__) || \ - defined(__sparc__) || defined(__mips__) || defined(__sh__)) -# define CURL_SIZEOF_LONG 4 +# if !defined(__LP64__) && \ + (defined(__ILP32__) || defined(__i386__) || defined(__hppa__) || \ + defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \ + defined(__sparc__) || defined(__mips__) || defined(__sh__) || \ + defined(__XTENSA__) || \ + (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \ + (defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L)) # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__LP64__) || \ - defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) -# define CURL_SIZEOF_LONG 8 + defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \ + (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \ + (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L) # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 # define CURL_SUFFIX_CURL_OFF_T L # define CURL_SUFFIX_CURL_OFF_TU UL # endif # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 # define CURL_PULL_SYS_TYPES_H 1 # define CURL_PULL_SYS_SOCKET_H 1 #else -# error "Unknown non-configure build target!" - Error Compilation_aborted_Unknown_non_configure_build_target +/* generic "safe guess" on old 32 bit style */ +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +#endif + +#ifdef _AIX +/* AIX needs */ +#define CURL_PULL_SYS_POLL_H +#endif + + +/* CURL_PULL_WS2TCPIP_H is defined above when inclusion of header file */ +/* ws2tcpip.h is required here to properly make type definitions below. */ +#ifdef CURL_PULL_WS2TCPIP_H +# include +# include +# include #endif /* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ @@ -571,8 +405,13 @@ # include #endif -/* Data type definition of curl_socklen_t. */ +/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */ +/* sys/poll.h is required here to properly make type definitions below. */ +#ifdef CURL_PULL_SYS_POLL_H +# include +#endif +/* Data type definition of curl_socklen_t. */ #ifdef CURL_TYPEOF_CURL_SOCKLEN_T typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; #endif @@ -583,4 +422,52 @@ typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; #endif -#endif /* __CURL_CURLBUILD_H */ +/* + * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow + * these to be visible and exported by the external libcurl interface API, + * while also making them visible to the library internals, simply including + * curl_setup.h, without actually needing to include curl.h internally. + * If some day this section would grow big enough, all this should be moved + * to its own header file. + */ + +/* + * Figure out if we can use the ## preprocessor operator, which is supported + * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ + * or __cplusplus so we need to carefully check for them too. + */ + +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ + defined(__ILEC400__) + /* This compiler is believed to have an ISO compatible preprocessor */ +#define CURL_ISOCPP +#else + /* This compiler is believed NOT to have an ISO compatible preprocessor */ +#undef CURL_ISOCPP +#endif + +/* + * Macros for minimum-width signed and unsigned curl_off_t integer constants. + */ + +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) +# define __CURL_OFF_T_C_HLPR2(x) x +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) +#else +# ifdef CURL_ISOCPP +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix +# else +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix +# endif +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) +#endif + +#endif /* __CURL_SYSTEM_H */ diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 3d68315..3a0f253 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -54,6 +54,9 @@ __extension__ ({ \ if(_curl_is_write_cb_option(_curl_opt)) \ if(!_curl_is_write_cb(value)) \ _curl_easy_setopt_err_write_callback(); \ + if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \ + if(!_curl_is_resolver_start_callback(value)) \ + _curl_easy_setopt_err_resolver_start_callback(); \ if((_curl_opt) == CURLOPT_READFUNCTION) \ if(!_curl_is_read_cb(value)) \ _curl_easy_setopt_err_read_cb(); \ @@ -96,6 +99,9 @@ __extension__ ({ \ if((_curl_opt) == CURLOPT_HTTPPOST) \ if(!_curl_is_arr((value), struct curl_httppost)) \ _curl_easy_setopt_err_curl_httpost(); \ + if((_curl_opt) == CURLOPT_MIMEPOST) \ + if(!_curl_is_ptr((value), curl_mime)) \ + _curl_easy_setopt_err_curl_mimepost(); \ if(_curl_is_slist_option(_curl_opt)) \ if(!_curl_is_arr((value), struct curl_slist)) \ _curl_easy_setopt_err_curl_slist(); \ @@ -110,7 +116,7 @@ __extension__ ({ \ /* FIXME: don't allow const pointers */ #define curl_easy_getinfo(handle, info, arg) \ __extension__ ({ \ - __typeof__(info) _curl_info = info; \ + __typeof__(info) _curl_info = info; \ if(__builtin_constant_p(_curl_info)) { \ if(_curl_is_string_info(_curl_info)) \ if(!_curl_is_arr((arg), char *)) \ @@ -124,6 +130,18 @@ __extension__ ({ \ if(_curl_is_slist_info(_curl_info)) \ if(!_curl_is_arr((arg), struct curl_slist *)) \ _curl_easy_getinfo_err_curl_slist(); \ + if(_curl_is_tlssessioninfo_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_tlssessioninfo *)) \ + _curl_easy_getinfo_err_curl_tlssesssioninfo(); \ + if(_curl_is_certinfo_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_certinfo *)) \ + _curl_easy_getinfo_err_curl_certinfo(); \ + if(_curl_is_socket_info(_curl_info)) \ + if(!_curl_is_arr((arg), curl_socket_t)) \ + _curl_easy_getinfo_err_curl_socket(); \ + if(_curl_is_off_t_info(_curl_info)) \ + if(!_curl_is_arr((arg), curl_off_t)) \ + _curl_easy_getinfo_err_curl_off_t(); \ } \ curl_easy_getinfo(handle, _curl_info, arg); \ }) @@ -155,6 +173,10 @@ _CURL_WARNING(_curl_easy_setopt_err_string, ) _CURL_WARNING(_curl_easy_setopt_err_write_callback, "curl_easy_setopt expects a curl_write_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_resolver_start_callback, + "curl_easy_setopt expects a " + "curl_resolver_start_callback argument for this option" + ) _CURL_WARNING(_curl_easy_setopt_err_read_cb, "curl_easy_setopt expects a curl_read_callback argument for this option") _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, @@ -188,6 +210,9 @@ _CURL_WARNING(_curl_easy_setopt_err_postfields, _CURL_WARNING(_curl_easy_setopt_err_curl_httpost, "curl_easy_setopt expects a 'struct curl_httppost *' " "argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_curl_mimepost, + "curl_easy_setopt expects a 'curl_mime *' " + "argument for this option") _CURL_WARNING(_curl_easy_setopt_err_curl_slist, "curl_easy_setopt expects a 'struct curl_slist *' argument for this option") _CURL_WARNING(_curl_easy_setopt_err_CURLSH, @@ -201,6 +226,16 @@ _CURL_WARNING(_curl_easy_getinfo_err_double, "curl_easy_getinfo expects a pointer to double for this info") _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo, + "curl_easy_getinfo expects a pointer to " + "'struct curl_tlssessioninfo *' for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_certinfo, + "curl_easy_getinfo expects a pointer to " + "'struct curl_certinfo *' for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_socket, + "curl_easy_getinfo expects a pointer to curl_socket_t for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_off_t, + "curl_easy_getinfo expects a pointer to curl_off_t for this info") /* groups of curl_easy_setops options that take the same type of argument */ @@ -249,11 +284,25 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_NOPROXY || \ (option) == CURLOPT_PASSWORD || \ (option) == CURLOPT_PINNEDPUBLICKEY || \ + (option) == CURLOPT_PRE_PROXY || \ (option) == CURLOPT_PROXY || \ (option) == CURLOPT_PROXYPASSWORD || \ (option) == CURLOPT_PROXYUSERNAME || \ (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXY_CAINFO || \ + (option) == CURLOPT_PROXY_CAPATH || \ + (option) == CURLOPT_PROXY_CRLFILE || \ + (option) == CURLOPT_PROXY_KEYPASSWD || \ + (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \ (option) == CURLOPT_PROXY_SERVICE_NAME || \ + (option) == CURLOPT_PROXY_SSLCERT || \ + (option) == CURLOPT_PROXY_SSLCERTTYPE || \ + (option) == CURLOPT_PROXY_SSLKEY || \ + (option) == CURLOPT_PROXY_SSLKEYTYPE || \ + (option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \ + (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \ + (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \ + (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \ (option) == CURLOPT_RANDOM_FILE || \ (option) == CURLOPT_RANGE || \ (option) == CURLOPT_REFERER || \ @@ -312,6 +361,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_SSH_KEYDATA || \ (option) == CURLOPT_SSL_CTX_DATA || \ (option) == CURLOPT_WRITEDATA || \ + (option) == CURLOPT_RESOLVER_START_DATA || \ 0) /* evaluates to true if option takes a POST data argument (void* or char*) */ @@ -348,8 +398,23 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) /* true if info expects a pointer to struct curl_slist * argument */ -#define _curl_is_slist_info(info) \ - (CURLINFO_SLIST < (info)) +#define _curl_is_slist_info(info) \ + (((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST)) + +/* true if info expects a pointer to struct curl_tlssessioninfo * argument */ +#define _curl_is_tlssessioninfo_info(info) \ + (((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION)) + +/* true if info expects a pointer to struct curl_certinfo * argument */ +#define _curl_is_certinfo_info(info) ((info) == CURLINFO_CERTINFO) + +/* true if info expects a pointer to struct curl_socket_t argument */ +#define _curl_is_socket_info(info) \ + (CURLINFO_SOCKET < (info) && (info) < CURLINFO_OFF_T) + +/* true if info expects a pointer to curl_off_t argument */ +#define _curl_is_off_t_info(info) \ + (CURLINFO_OFF_T < (info)) /* typecheck helpers -- check whether given expression has requested type*/ @@ -428,8 +493,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, #endif /* evaluates to true if expr is of type FILE* */ -#define _curl_is_FILE(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), FILE *)) +#define _curl_is_FILE(expr) \ + (_curl_is_NULL(expr) || \ + (__builtin_types_compatible_p(__typeof__(expr), FILE *))) /* evaluates to true if expr can be passed as POST data (void* or char*) */ #define _curl_is_postfields(expr) \ @@ -444,102 +510,107 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, * function pointers, hide it */ #define _curl_callback_compatible(func, type) \ (__builtin_types_compatible_p(__typeof__(func), type) || \ - __builtin_types_compatible_p(__typeof__(func), type*)) + __builtin_types_compatible_p(__typeof__(func) *, type)) + +/* evaluates to true if expr is of type curl_resolver_start_callback */ +#define _curl_is_resolver_start_callback(expr) \ + (_curl_is_NULL(expr) || \ + _curl_callback_compatible((expr), curl_resolver_start_callback)) /* evaluates to true if expr is of type curl_read_callback or "similar" */ #define _curl_is_read_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ + _curl_callback_compatible((expr), __typeof__(fread) *) || \ + _curl_callback_compatible((expr), curl_read_callback) || \ _curl_callback_compatible((expr), _curl_read_callback1) || \ _curl_callback_compatible((expr), _curl_read_callback2) || \ _curl_callback_compatible((expr), _curl_read_callback3) || \ _curl_callback_compatible((expr), _curl_read_callback4) || \ _curl_callback_compatible((expr), _curl_read_callback5) || \ _curl_callback_compatible((expr), _curl_read_callback6)) -typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void *); -typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void *); -typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE *); -typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void *); -typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void *); -typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE *); +typedef size_t (*_curl_read_callback1)(char *, size_t, size_t, void *); +typedef size_t (*_curl_read_callback2)(char *, size_t, size_t, const void *); +typedef size_t (*_curl_read_callback3)(char *, size_t, size_t, FILE *); +typedef size_t (*_curl_read_callback4)(void *, size_t, size_t, void *); +typedef size_t (*_curl_read_callback5)(void *, size_t, size_t, const void *); +typedef size_t (*_curl_read_callback6)(void *, size_t, size_t, FILE *); /* evaluates to true if expr is of type curl_write_callback or "similar" */ #define _curl_is_write_cb(expr) \ (_curl_is_read_cb(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ + _curl_callback_compatible((expr), __typeof__(fwrite) *) || \ + _curl_callback_compatible((expr), curl_write_callback) || \ _curl_callback_compatible((expr), _curl_write_callback1) || \ _curl_callback_compatible((expr), _curl_write_callback2) || \ _curl_callback_compatible((expr), _curl_write_callback3) || \ _curl_callback_compatible((expr), _curl_write_callback4) || \ _curl_callback_compatible((expr), _curl_write_callback5) || \ _curl_callback_compatible((expr), _curl_write_callback6)) -typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void *); -typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, +typedef size_t (*_curl_write_callback1)(const char *, size_t, size_t, void *); +typedef size_t (*_curl_write_callback2)(const char *, size_t, size_t, const void *); -typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE *); -typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void *); -typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, +typedef size_t (*_curl_write_callback3)(const char *, size_t, size_t, FILE *); +typedef size_t (*_curl_write_callback4)(const void *, size_t, size_t, void *); +typedef size_t (*_curl_write_callback5)(const void *, size_t, size_t, const void *); -typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE *); +typedef size_t (*_curl_write_callback6)(const void *, size_t, size_t, FILE *); /* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ #define _curl_is_ioctl_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ + _curl_callback_compatible((expr), curl_ioctl_callback) || \ _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ _curl_callback_compatible((expr), _curl_ioctl_callback4)) -typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void *); -typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void *); -typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void *); -typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void *); +typedef curlioerr (*_curl_ioctl_callback1)(CURL *, int, void *); +typedef curlioerr (*_curl_ioctl_callback2)(CURL *, int, const void *); +typedef curlioerr (*_curl_ioctl_callback3)(CURL *, curliocmd, void *); +typedef curlioerr (*_curl_ioctl_callback4)(CURL *, curliocmd, const void *); /* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ #define _curl_is_sockopt_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ + _curl_callback_compatible((expr), curl_sockopt_callback) || \ _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ _curl_callback_compatible((expr), _curl_sockopt_callback2)) -typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); -typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, +typedef int (*_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); +typedef int (*_curl_sockopt_callback2)(const void *, curl_socket_t, curlsocktype); /* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ #define _curl_is_opensocket_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ + _curl_callback_compatible((expr), curl_opensocket_callback) || \ _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ _curl_callback_compatible((expr), _curl_opensocket_callback4)) -typedef curl_socket_t (_curl_opensocket_callback1) +typedef curl_socket_t (*_curl_opensocket_callback1) (void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback2) +typedef curl_socket_t (*_curl_opensocket_callback2) (void *, curlsocktype, const struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback3) +typedef curl_socket_t (*_curl_opensocket_callback3) (const void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback4) +typedef curl_socket_t (*_curl_opensocket_callback4) (const void *, curlsocktype, const struct curl_sockaddr *); /* evaluates to true if expr is of type curl_progress_callback or "similar" */ #define _curl_is_progress_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ + _curl_callback_compatible((expr), curl_progress_callback) || \ _curl_callback_compatible((expr), _curl_progress_callback1) || \ _curl_callback_compatible((expr), _curl_progress_callback2)) -typedef int (_curl_progress_callback1)(void *, +typedef int (*_curl_progress_callback1)(void *, double, double, double, double); -typedef int (_curl_progress_callback2)(const void *, +typedef int (*_curl_progress_callback2)(const void *, double, double, double, double); /* evaluates to true if expr is of type curl_debug_callback or "similar" */ #define _curl_is_debug_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ + _curl_callback_compatible((expr), curl_debug_callback) || \ _curl_callback_compatible((expr), _curl_debug_callback1) || \ _curl_callback_compatible((expr), _curl_debug_callback2) || \ _curl_callback_compatible((expr), _curl_debug_callback3) || \ @@ -548,28 +619,28 @@ typedef int (_curl_progress_callback2)(const void *, _curl_callback_compatible((expr), _curl_debug_callback6) || \ _curl_callback_compatible((expr), _curl_debug_callback7) || \ _curl_callback_compatible((expr), _curl_debug_callback8)) -typedef int (_curl_debug_callback1) (CURL *, +typedef int (*_curl_debug_callback1) (CURL *, curl_infotype, char *, size_t, void *); -typedef int (_curl_debug_callback2) (CURL *, +typedef int (*_curl_debug_callback2) (CURL *, curl_infotype, char *, size_t, const void *); -typedef int (_curl_debug_callback3) (CURL *, +typedef int (*_curl_debug_callback3) (CURL *, curl_infotype, const char *, size_t, void *); -typedef int (_curl_debug_callback4) (CURL *, +typedef int (*_curl_debug_callback4) (CURL *, curl_infotype, const char *, size_t, const void *); -typedef int (_curl_debug_callback5) (CURL *, +typedef int (*_curl_debug_callback5) (CURL *, curl_infotype, unsigned char *, size_t, void *); -typedef int (_curl_debug_callback6) (CURL *, +typedef int (*_curl_debug_callback6) (CURL *, curl_infotype, unsigned char *, size_t, const void *); -typedef int (_curl_debug_callback7) (CURL *, +typedef int (*_curl_debug_callback7) (CURL *, curl_infotype, const unsigned char *, size_t, void *); -typedef int (_curl_debug_callback8) (CURL *, +typedef int (*_curl_debug_callback8) (CURL *, curl_infotype, const unsigned char *, size_t, const void *); /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ /* this is getting even messier... */ #define _curl_is_ssl_ctx_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ + _curl_callback_compatible((expr), curl_ssl_ctx_callback) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ @@ -578,18 +649,19 @@ typedef int (_curl_debug_callback8) (CURL *, _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) -typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); -typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); +typedef CURLcode (*_curl_ssl_ctx_callback1)(CURL *, void *, void *); +typedef CURLcode (*_curl_ssl_ctx_callback2)(CURL *, void *, const void *); +typedef CURLcode (*_curl_ssl_ctx_callback3)(CURL *, const void *, void *); +typedef CURLcode (*_curl_ssl_ctx_callback4)(CURL *, const void *, + const void *); #ifdef HEADER_SSL_H /* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX * this will of course break if we're included before OpenSSL headers... */ -typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); -typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, +typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); +typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); +typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); +typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); #else typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; @@ -601,7 +673,7 @@ typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; /* evaluates to true if expr is of type curl_conv_callback or "similar" */ #define _curl_is_conv_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ + _curl_callback_compatible((expr), curl_conv_callback) || \ _curl_callback_compatible((expr), _curl_conv_callback1) || \ _curl_callback_compatible((expr), _curl_conv_callback2) || \ _curl_callback_compatible((expr), _curl_conv_callback3) || \ @@ -614,7 +686,7 @@ typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); /* evaluates to true if expr is of type curl_seek_callback or "similar" */ #define _curl_is_seek_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ + _curl_callback_compatible((expr), curl_seek_callback) || \ _curl_callback_compatible((expr), _curl_seek_callback1) || \ _curl_callback_compatible((expr), _curl_seek_callback2)) typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index eb2de6d..1fabdba 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,7 +1,5 @@ set(LIB_NAME libcurl) -configure_file(${CURL_SOURCE_DIR}/include/curl/curlbuild.h.cmake - ${CURL_BINARY_DIR}/include/curl/curlbuild.h) configure_file(curl_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/curl_config.h) @@ -10,11 +8,11 @@ include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake) list(APPEND HHEADERS ${CMAKE_CURRENT_BINARY_DIR}/curl_config.h - ${CURL_BINARY_DIR}/include/curl/curlbuild.h ) if(MSVC) list(APPEND CSOURCES libcurl.rc) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127") endif() # SET(CSOURCES @@ -100,10 +98,34 @@ if(WIN32) if(NOT CURL_STATICLIB) # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib" set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") + + set_target_properties (${LIB_NAME} PROPERTIES + DEBUG_POSTFIX "-d" + # Note: no postfix for release variants, let user choose what style of release he wants + # MINSIZEREL_POSTFIX "-z" + # RELWITHDEBINFO_POSTFIX "-g" + ) endif() endif() +target_include_directories(${LIB_NAME} INTERFACE + $) + install(TARGETS ${LIB_NAME} + EXPORT libcurl-target ARCHIVE DESTINATION lib LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) + RUNTIME DESTINATION bin +) + +export(TARGETS ${LIB_NAME} + APPEND FILE ${PROJECT_BINARY_DIR}/libcurl-target.cmake + NAMESPACE CURL:: +) + +install(EXPORT libcurl-target + FILE libcurl-target.cmake + NAMESPACE CURL:: + DESTINATION ${CURL_INSTALL_CMAKE_DIR} +) + diff --git a/lib/Makefile.Watcom b/lib/Makefile.Watcom index cbc54cf..77e5a6e 100644 --- a/lib/Makefile.Watcom +++ b/lib/Makefile.Watcom @@ -6,7 +6,7 @@ # \___|\___/|_| \_\_____| # # Copyright (C) 2005 - 2009, Gisle Vanem . -# Copyright (C) 2005 - 2015, Daniel Stenberg, , et al. +# Copyright (C) 2005 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -81,7 +81,7 @@ RD = rmdir /q /s 2>NUL SYS_INCL = -I"$(%watcom)/h/nt" -I"$(%watcom)/h" CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm & - -wcd=201 -bt=nt -d+ -dWIN32 -dCURL_WANTS_CA_BUNDLE_ENV & + -wcd=201 -bt=nt -d+ -dWIN32 & -dBUILDING_LIBCURL -I. -I"../include" $(SYS_INCL) !ifdef %debug @@ -192,14 +192,13 @@ OBJS4 = $(OBJS3: = ./) OBJS_STAT = $(OBJS4:./=$(OBJ_STAT)/) OBJS_DYN = $(OBJS4:./=$(OBJ_DYN)/) -CURLBUILDH = ../include/curl/curlbuild.h RESOURCE = $(OBJ_DYN)/libcurl.res DIRS = $(OBJ_BASE) $(OBJ_BASE)/stat $(OBJ_BASE)/dyn .c : vauth vtls -all: $(CURLBUILDH) $(DIRS) $(TARGETS) .SYMBOLIC +all: $(DIRS) $(TARGETS) .SYMBOLIC @echo Welcome to libcurl clean: .SYMBOLIC @@ -216,9 +215,6 @@ vclean distclean: clean .SYMBOLIC $(DIRS): -$(MD) $^@ -$(CURLBUILDH): .EXISTSONLY - $(CP) $^@.dist $^@ - $(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(__MAKEFILES__) %create $(LINK_ARG) @%append $(LINK_ARG) system nt dll diff --git a/lib/Makefile.am b/lib/Makefile.am index cc7ee90..87c64f3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -48,17 +48,13 @@ CFLAGS += @CURL_CFLAG_EXTRAS@ # being currently built and tested are searched before the library which # might possibly already be installed in the system. # -# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h -# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h # $(top_srcdir)/include is for libcurl's external include files # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file # $(top_srcdir)/ares is for in-tree c-ares's external include files -AM_CPPFLAGS = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ +AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib @@ -70,21 +66,7 @@ endif # Prevent LIBS from being used for all link targets LIBS = $(BLANK_AT_MAKETIME) -if SONAME_BUMP -# -# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah -# it is. The problem is that we try to avoid the bump as hard as possible, but -# yet it is still necessary for a few rare situations. The configure script will -# attempt to figure out these situations, and it can be forced to consider this -# to be such a case! See README.curl_off_t for further details. -# -# This conditional soname bump SHOULD be removed at next "proper" bump. -# -VERSIONINFO=-version-info 9:0:4 -else -VERSIONINFO=-version-info 8:0:4 -endif - +VERSIONINFO=-version-info 9:0:5 # This flag accepts an argument of the form current[:revision[:age]]. So, # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to # 1. @@ -106,6 +88,10 @@ libcurl_la_CPPFLAGS_EXTRA = libcurl_la_LDFLAGS_EXTRA = libcurl_la_CFLAGS_EXTRA = +@CODE_COVERAGE_RULES@ +libcurl_la_LDFLAGS_EXTRA += $(CODE_COVERAGE_LDFLAGS) +libcurl_la_CFLAGS_EXTRA += $(CODE_COVERAGE_CFLAGS) + if CURL_LT_SHLIB_USE_VERSION_INFO libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) endif @@ -120,6 +106,8 @@ endif if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers +else +libcurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*' endif if USE_CPPFLAG_CURL_STATICLIB diff --git a/lib/Makefile.b32 b/lib/Makefile.b32 index 4813861..5b5b5fa 100644 --- a/lib/Makefile.b32 +++ b/lib/Makefile.b32 @@ -109,7 +109,7 @@ LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\l !include Makefile.inc # Borland's command line librarian program TLIB version 4.5 is not capable -# of building a library when any of its objects contains an hypen in its +# of building a library when any of its objects contains an hyphen in its # name, due to a command line parsing bug. In order to workaround this, we # build source files with hyphens in their name as objects with underscores # using explicit compilation build rules instead of implicit ones. diff --git a/lib/Makefile.in b/lib/Makefile.in index 10d86a9..aca9edc 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -117,12 +117,14 @@ host_triplet = @host@ @CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_3 = -no-undefined @CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_4 = -mimpure-text @CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE@am__append_5 = -Wl,--version-script=libcurl.vers -@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_6 = -DCURL_STATICLIB -@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_7 = -DCURL_HIDDEN_SYMBOLS -@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_8 = $(CFLAG_CURL_SYMBOL_HIDING) +@CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE@am__append_6 = -export-symbols-regex '^curl_.*' +@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_7 = -DCURL_STATICLIB +@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_8 = -DCURL_HIDDEN_SYMBOLS +@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_9 = $(CFLAG_CURL_SYMBOL_HIDING) subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -143,7 +145,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = curl_config.h $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = curl_config.h CONFIG_CLEAN_FILES = libcurl.vers CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -202,7 +204,7 @@ am__objects_1 = libcurl_la-file.lo libcurl_la-timeval.lo \ libcurl_la-hostsyn.lo libcurl_la-inet_ntop.lo \ libcurl_la-parsedate.lo libcurl_la-select.lo \ libcurl_la-tftp.lo libcurl_la-splay.lo libcurl_la-strdup.lo \ - libcurl_la-socks.lo libcurl_la-ssh.lo \ + libcurl_la-socks.lo libcurl_la-ssh.lo libcurl_la-ssh-libssh.lo \ libcurl_la-curl_addrinfo.lo libcurl_la-socks_gssapi.lo \ libcurl_la-socks_sspi.lo libcurl_la-curl_sspi.lo \ libcurl_la-slist.lo libcurl_la-nonblock.lo \ @@ -222,7 +224,10 @@ am__objects_1 = libcurl_la-file.lo libcurl_la-timeval.lo \ libcurl_la-pipeline.lo libcurl_la-dotdot.lo \ libcurl_la-x509asn1.lo libcurl_la-http2.lo libcurl_la-smb.lo \ libcurl_la-curl_endian.lo libcurl_la-curl_des.lo \ - libcurl_la-system_win32.lo + libcurl_la-system_win32.lo libcurl_la-mime.lo \ + libcurl_la-sha256.lo libcurl_la-setopt.lo \ + libcurl_la-curl_path.lo libcurl_la-curl_ctype.lo \ + libcurl_la-curl_range.lo am__dirstamp = $(am__leading_dot)dirstamp am__objects_2 = vauth/libcurl_la-vauth.lo \ vauth/libcurl_la-cleartext.lo vauth/libcurl_la-cram.lo \ @@ -279,11 +284,11 @@ am__objects_7 = libcurlu_la-file.lo libcurlu_la-timeval.lo \ libcurlu_la-inet_ntop.lo libcurlu_la-parsedate.lo \ libcurlu_la-select.lo libcurlu_la-tftp.lo libcurlu_la-splay.lo \ libcurlu_la-strdup.lo libcurlu_la-socks.lo libcurlu_la-ssh.lo \ - libcurlu_la-curl_addrinfo.lo libcurlu_la-socks_gssapi.lo \ - libcurlu_la-socks_sspi.lo libcurlu_la-curl_sspi.lo \ - libcurlu_la-slist.lo libcurlu_la-nonblock.lo \ - libcurlu_la-curl_memrchr.lo libcurlu_la-imap.lo \ - libcurlu_la-pop3.lo libcurlu_la-smtp.lo \ + libcurlu_la-ssh-libssh.lo libcurlu_la-curl_addrinfo.lo \ + libcurlu_la-socks_gssapi.lo libcurlu_la-socks_sspi.lo \ + libcurlu_la-curl_sspi.lo libcurlu_la-slist.lo \ + libcurlu_la-nonblock.lo libcurlu_la-curl_memrchr.lo \ + libcurlu_la-imap.lo libcurlu_la-pop3.lo libcurlu_la-smtp.lo \ libcurlu_la-pingpong.lo libcurlu_la-rtsp.lo \ libcurlu_la-curl_threads.lo libcurlu_la-warnless.lo \ libcurlu_la-hmac.lo libcurlu_la-curl_rtmp.lo \ @@ -299,7 +304,10 @@ am__objects_7 = libcurlu_la-file.lo libcurlu_la-timeval.lo \ libcurlu_la-dotdot.lo libcurlu_la-x509asn1.lo \ libcurlu_la-http2.lo libcurlu_la-smb.lo \ libcurlu_la-curl_endian.lo libcurlu_la-curl_des.lo \ - libcurlu_la-system_win32.lo + libcurlu_la-system_win32.lo libcurlu_la-mime.lo \ + libcurlu_la-sha256.lo libcurlu_la-setopt.lo \ + libcurlu_la-curl_path.lo libcurlu_la-curl_ctype.lo \ + libcurlu_la-curl_range.lo am__objects_8 = vauth/libcurlu_la-vauth.lo \ vauth/libcurlu_la-cleartext.lo vauth/libcurlu_la-cram.lo \ vauth/libcurlu_la-digest.lo vauth/libcurlu_la-digest_sspi.lo \ @@ -403,6 +411,12 @@ CCDEPMODE = @CCDEPMODE@ # This might hold -Werror CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -428,7 +442,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -442,7 +458,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -454,6 +473,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -501,6 +521,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -513,6 +534,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -623,14 +645,11 @@ lib_LTLIBRARIES = libcurl.la # being currently built and tested are searched before the library which # might possibly already be installed in the system. # -# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h -# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h # $(top_srcdir)/include is for libcurl's external include files # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file # $(top_srcdir)/ares is for in-tree c-ares's external include files - # This flag accepts an argument of the form current[:revision[:age]]. So, # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to # 1. @@ -643,27 +662,16 @@ lib_LTLIBRARIES = libcurl.la # 3. if interfaces were removed, then use C+1:0:0 # # For the full guide on libcurl ABI rules, see docs/libcurl/ABI -AM_CPPFLAGS = -I$(top_builddir)/include/curl -I$(top_builddir)/include \ - -I$(top_srcdir)/include -I$(top_builddir)/lib \ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/lib \ -I$(top_srcdir)/lib $(am__append_1) -DBUILDING_LIBCURL -@SONAME_BUMP_FALSE@VERSIONINFO = -version-info 8:0:4 - -# -# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah -# it is. The problem is that we try to avoid the bump as hard as possible, but -# yet it is still necessary for a few rare situations. The configure script will -# attempt to figure out these situations, and it can be forced to consider this -# to be such a case! See README.curl_off_t for further details. -# -# This conditional soname bump SHOULD be removed at next "proper" bump. -# -@SONAME_BUMP_TRUE@VERSIONINFO = -version-info 9:0:4 +VERSIONINFO = -version-info 9:0:5 AM_LDFLAGS = AM_CFLAGS = -libcurl_la_CPPFLAGS_EXTRA = $(am__append_6) $(am__append_7) -libcurl_la_LDFLAGS_EXTRA = $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) -libcurl_la_CFLAGS_EXTRA = $(am__append_8) +libcurl_la_CPPFLAGS_EXTRA = $(am__append_7) $(am__append_8) +libcurl_la_LDFLAGS_EXTRA = $(CODE_COVERAGE_LDFLAGS) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) \ + $(am__append_6) +libcurl_la_CFLAGS_EXTRA = $(CODE_COVERAGE_CFLAGS) $(am__append_9) libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS) libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) @@ -695,14 +703,15 @@ LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ http_digest.c md4.c md5.c http_negotiate.c inet_pton.c strtoofft.c \ strerror.c amigaos.c hostasyn.c hostip4.c hostip6.c hostsyn.c \ inet_ntop.c parsedate.c select.c tftp.c splay.c strdup.c socks.c \ - ssh.c curl_addrinfo.c socks_gssapi.c socks_sspi.c \ + ssh.c ssh-libssh.c curl_addrinfo.c socks_gssapi.c socks_sspi.c \ curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c \ pingpong.c rtsp.c curl_threads.c warnless.c hmac.c curl_rtmp.c \ openldap.c curl_gethostname.c gopher.c idn_win32.c \ http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c \ http_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_sasl.c rand.c \ curl_multibyte.c hostcheck.c conncache.c pipeline.c dotdot.c \ - x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c + x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c \ + mime.c sha256.c setopt.c curl_path.c curl_ctype.c curl_range.c LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h if2ip.h \ @@ -721,7 +730,8 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ curl_sasl.h curl_multibyte.h hostcheck.h conncache.h \ curl_setup_once.h multihandle.h setup-vms.h pipeline.h dotdot.h \ x509asn1.h http2.h sigpipe.h smb.h curl_endian.h curl_des.h \ - curl_printf.h system_win32.h rand.h + curl_printf.h system_win32.h rand.h mime.h curl_sha256.h setopt.h \ + curl_path.h curl_ctype.h curl_range.h LIB_RCFILES = libcurl.rc CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) @@ -962,6 +972,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-content_encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-cookie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_addrinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_ctype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_des.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_endian.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_fnmatch.Plo@am__quote@ @@ -971,6 +982,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_multibyte.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_ntlm_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_ntlm_wb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_path.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_rtmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_sasl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_sspi.Plo@am__quote@ @@ -1013,6 +1026,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-md4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-memdebug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-mime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-mprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-multi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-netrc.Plo@am__quote@ @@ -1029,6 +1043,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-security.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-sendf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-setopt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-sha256.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-share.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-slist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-smb.Plo@am__quote@ @@ -1038,6 +1054,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-socks_sspi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-speedcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-splay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-ssh-libssh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-ssh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-strcase.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-strdup.Plo@am__quote@ @@ -1063,6 +1080,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-content_encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-cookie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_addrinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_ctype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_des.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_endian.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_fnmatch.Plo@am__quote@ @@ -1072,6 +1090,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_multibyte.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_ntlm_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_ntlm_wb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_path.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_rtmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_sasl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_sspi.Plo@am__quote@ @@ -1114,6 +1134,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-md4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-memdebug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-mime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-mprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-multi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-netrc.Plo@am__quote@ @@ -1130,6 +1151,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-security.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-sendf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-setopt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-sha256.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-share.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-slist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-smb.Plo@am__quote@ @@ -1139,6 +1162,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-socks_sspi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-speedcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-splay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-ssh-libssh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-ssh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-strcase.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-strdup.Plo@am__quote@ @@ -1648,6 +1672,13 @@ libcurl_la-ssh.lo: ssh.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ssh.lo `test -f 'ssh.c' || echo '$(srcdir)/'`ssh.c +libcurl_la-ssh-libssh.lo: ssh-libssh.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ssh-libssh.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ssh-libssh.Tpo -c -o libcurl_la-ssh-libssh.lo `test -f 'ssh-libssh.c' || echo '$(srcdir)/'`ssh-libssh.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-ssh-libssh.Tpo $(DEPDIR)/libcurl_la-ssh-libssh.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ssh-libssh.c' object='libcurl_la-ssh-libssh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ssh-libssh.lo `test -f 'ssh-libssh.c' || echo '$(srcdir)/'`ssh-libssh.c + libcurl_la-curl_addrinfo.lo: curl_addrinfo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_addrinfo.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_addrinfo.Tpo -c -o libcurl_la-curl_addrinfo.lo `test -f 'curl_addrinfo.c' || echo '$(srcdir)/'`curl_addrinfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_addrinfo.Tpo $(DEPDIR)/libcurl_la-curl_addrinfo.Plo @@ -1935,6 +1966,48 @@ libcurl_la-system_win32.lo: system_win32.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-system_win32.lo `test -f 'system_win32.c' || echo '$(srcdir)/'`system_win32.c +libcurl_la-mime.lo: mime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-mime.lo -MD -MP -MF $(DEPDIR)/libcurl_la-mime.Tpo -c -o libcurl_la-mime.lo `test -f 'mime.c' || echo '$(srcdir)/'`mime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-mime.Tpo $(DEPDIR)/libcurl_la-mime.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mime.c' object='libcurl_la-mime.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-mime.lo `test -f 'mime.c' || echo '$(srcdir)/'`mime.c + +libcurl_la-sha256.lo: sha256.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-sha256.lo -MD -MP -MF $(DEPDIR)/libcurl_la-sha256.Tpo -c -o libcurl_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-sha256.Tpo $(DEPDIR)/libcurl_la-sha256.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sha256.c' object='libcurl_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c + +libcurl_la-setopt.lo: setopt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-setopt.lo -MD -MP -MF $(DEPDIR)/libcurl_la-setopt.Tpo -c -o libcurl_la-setopt.lo `test -f 'setopt.c' || echo '$(srcdir)/'`setopt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-setopt.Tpo $(DEPDIR)/libcurl_la-setopt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='setopt.c' object='libcurl_la-setopt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-setopt.lo `test -f 'setopt.c' || echo '$(srcdir)/'`setopt.c + +libcurl_la-curl_path.lo: curl_path.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_path.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_path.Tpo -c -o libcurl_la-curl_path.lo `test -f 'curl_path.c' || echo '$(srcdir)/'`curl_path.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_path.Tpo $(DEPDIR)/libcurl_la-curl_path.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_path.c' object='libcurl_la-curl_path.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_path.lo `test -f 'curl_path.c' || echo '$(srcdir)/'`curl_path.c + +libcurl_la-curl_ctype.lo: curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_ctype.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_ctype.Tpo -c -o libcurl_la-curl_ctype.lo `test -f 'curl_ctype.c' || echo '$(srcdir)/'`curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_ctype.Tpo $(DEPDIR)/libcurl_la-curl_ctype.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_ctype.c' object='libcurl_la-curl_ctype.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_ctype.lo `test -f 'curl_ctype.c' || echo '$(srcdir)/'`curl_ctype.c + +libcurl_la-curl_range.lo: curl_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_range.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_range.Tpo -c -o libcurl_la-curl_range.lo `test -f 'curl_range.c' || echo '$(srcdir)/'`curl_range.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_range.Tpo $(DEPDIR)/libcurl_la-curl_range.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_range.c' object='libcurl_la-curl_range.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_range.lo `test -f 'curl_range.c' || echo '$(srcdir)/'`curl_range.c + vauth/libcurl_la-vauth.lo: vauth/vauth.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT vauth/libcurl_la-vauth.lo -MD -MP -MF vauth/$(DEPDIR)/libcurl_la-vauth.Tpo -c -o vauth/libcurl_la-vauth.lo `test -f 'vauth/vauth.c' || echo '$(srcdir)/'`vauth/vauth.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) vauth/$(DEPDIR)/libcurl_la-vauth.Tpo vauth/$(DEPDIR)/libcurl_la-vauth.Plo @@ -2523,6 +2596,13 @@ libcurlu_la-ssh.lo: ssh.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ssh.lo `test -f 'ssh.c' || echo '$(srcdir)/'`ssh.c +libcurlu_la-ssh-libssh.lo: ssh-libssh.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ssh-libssh.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ssh-libssh.Tpo -c -o libcurlu_la-ssh-libssh.lo `test -f 'ssh-libssh.c' || echo '$(srcdir)/'`ssh-libssh.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-ssh-libssh.Tpo $(DEPDIR)/libcurlu_la-ssh-libssh.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ssh-libssh.c' object='libcurlu_la-ssh-libssh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ssh-libssh.lo `test -f 'ssh-libssh.c' || echo '$(srcdir)/'`ssh-libssh.c + libcurlu_la-curl_addrinfo.lo: curl_addrinfo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_addrinfo.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_addrinfo.Tpo -c -o libcurlu_la-curl_addrinfo.lo `test -f 'curl_addrinfo.c' || echo '$(srcdir)/'`curl_addrinfo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_addrinfo.Tpo $(DEPDIR)/libcurlu_la-curl_addrinfo.Plo @@ -2810,6 +2890,48 @@ libcurlu_la-system_win32.lo: system_win32.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-system_win32.lo `test -f 'system_win32.c' || echo '$(srcdir)/'`system_win32.c +libcurlu_la-mime.lo: mime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-mime.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-mime.Tpo -c -o libcurlu_la-mime.lo `test -f 'mime.c' || echo '$(srcdir)/'`mime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-mime.Tpo $(DEPDIR)/libcurlu_la-mime.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mime.c' object='libcurlu_la-mime.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-mime.lo `test -f 'mime.c' || echo '$(srcdir)/'`mime.c + +libcurlu_la-sha256.lo: sha256.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-sha256.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-sha256.Tpo -c -o libcurlu_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-sha256.Tpo $(DEPDIR)/libcurlu_la-sha256.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sha256.c' object='libcurlu_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c + +libcurlu_la-setopt.lo: setopt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-setopt.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-setopt.Tpo -c -o libcurlu_la-setopt.lo `test -f 'setopt.c' || echo '$(srcdir)/'`setopt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-setopt.Tpo $(DEPDIR)/libcurlu_la-setopt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='setopt.c' object='libcurlu_la-setopt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-setopt.lo `test -f 'setopt.c' || echo '$(srcdir)/'`setopt.c + +libcurlu_la-curl_path.lo: curl_path.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_path.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_path.Tpo -c -o libcurlu_la-curl_path.lo `test -f 'curl_path.c' || echo '$(srcdir)/'`curl_path.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_path.Tpo $(DEPDIR)/libcurlu_la-curl_path.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_path.c' object='libcurlu_la-curl_path.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_path.lo `test -f 'curl_path.c' || echo '$(srcdir)/'`curl_path.c + +libcurlu_la-curl_ctype.lo: curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_ctype.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_ctype.Tpo -c -o libcurlu_la-curl_ctype.lo `test -f 'curl_ctype.c' || echo '$(srcdir)/'`curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_ctype.Tpo $(DEPDIR)/libcurlu_la-curl_ctype.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_ctype.c' object='libcurlu_la-curl_ctype.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_ctype.lo `test -f 'curl_ctype.c' || echo '$(srcdir)/'`curl_ctype.c + +libcurlu_la-curl_range.lo: curl_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_range.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_range.Tpo -c -o libcurlu_la-curl_range.lo `test -f 'curl_range.c' || echo '$(srcdir)/'`curl_range.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_range.Tpo $(DEPDIR)/libcurlu_la-curl_range.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_range.c' object='libcurlu_la-curl_range.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_range.lo `test -f 'curl_range.c' || echo '$(srcdir)/'`curl_range.c + vauth/libcurlu_la-vauth.lo: vauth/vauth.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT vauth/libcurlu_la-vauth.lo -MD -MP -MF vauth/$(DEPDIR)/libcurlu_la-vauth.Tpo -c -o vauth/libcurlu_la-vauth.lo `test -f 'vauth/vauth.c' || echo '$(srcdir)/'`vauth/vauth.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) vauth/$(DEPDIR)/libcurlu_la-vauth.Tpo vauth/$(DEPDIR)/libcurlu_la-vauth.Plo @@ -3201,6 +3323,8 @@ uninstall-am: uninstall-libLTLIBRARIES .PRECIOUS: Makefile +@CODE_COVERAGE_RULES@ + checksrc: @PERL@ $(srcdir)/checksrc.pl -D$(srcdir) -W$(srcdir)/curl_config.h \ $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] $(srcdir)/vtls/*.[ch] diff --git a/lib/Makefile.inc b/lib/Makefile.inc index 19f5800..69f9b40 100644 --- a/lib/Makefile.inc +++ b/lib/Makefile.inc @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -46,14 +46,15 @@ LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ http_digest.c md4.c md5.c http_negotiate.c inet_pton.c strtoofft.c \ strerror.c amigaos.c hostasyn.c hostip4.c hostip6.c hostsyn.c \ inet_ntop.c parsedate.c select.c tftp.c splay.c strdup.c socks.c \ - ssh.c curl_addrinfo.c socks_gssapi.c socks_sspi.c \ + ssh.c ssh-libssh.c curl_addrinfo.c socks_gssapi.c socks_sspi.c \ curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c \ pingpong.c rtsp.c curl_threads.c warnless.c hmac.c curl_rtmp.c \ openldap.c curl_gethostname.c gopher.c idn_win32.c \ http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c \ http_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_sasl.c rand.c \ curl_multibyte.c hostcheck.c conncache.c pipeline.c dotdot.c \ - x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c + x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c \ + mime.c sha256.c setopt.c curl_path.c curl_ctype.c curl_range.c LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h if2ip.h \ @@ -72,7 +73,8 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ curl_sasl.h curl_multibyte.h hostcheck.h conncache.h \ curl_setup_once.h multihandle.h setup-vms.h pipeline.h dotdot.h \ x509asn1.h http2.h sigpipe.h smb.h curl_endian.h curl_des.h \ - curl_printf.h system_win32.h rand.h + curl_printf.h system_win32.h rand.h mime.h curl_sha256.h setopt.h \ + curl_path.h curl_ctype.h curl_range.h LIB_RCFILES = libcurl.rc diff --git a/lib/Makefile.m32 b/lib/Makefile.m32 index 522dbd1..773187a 100644 --- a/lib/Makefile.m32 +++ b/lib/Makefile.m32 @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1999 - 2015, Daniel Stenberg, , et al. +# Copyright (C) 1999 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -22,8 +22,9 @@ ########################################################################### # -## Makefile for building libcurl.a with MingW (GCC-3.2 or later) -## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4) +## Makefile for building libcurl.a with MingW (GCC-3.2 or later or LLVM/Clang) +## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4), +## brotli (1.0.1) ## ## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...] ## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-sspi-winidn @@ -38,6 +39,10 @@ ifndef ZLIB_PATH ZLIB_PATH = ../../zlib-1.2.8 endif +# Edit the path below to point to the base of your Brotli sources. +ifndef BROTLI_PATH +BROTLI_PATH = ../../brotli-1.0.1 +endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH OPENSSL_PATH = ../../openssl-1.0.2a @@ -50,9 +55,9 @@ endif ifndef LIBRTMP_PATH LIBRTMP_PATH = ../../librtmp-2.4 endif -# Edit the path below to point to the base of your libidn package. -ifndef LIBIDN_PATH -LIBIDN_PATH = ../../libidn-1.32 +# Edit the path below to point to the base of your libidn2 package. +ifndef LIBIDN2_PATH +LIBIDN2_PATH = ../../libidn2-2.0.3 endif # Edit the path below to point to the base of your MS IDN package. # Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1 @@ -76,13 +81,23 @@ ifndef LIBCARES_PATH LIBCARES_PATH = $(PROOT)/ares endif -CC = $(CROSSPREFIX)gcc -CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall +ifeq ($(CURL_CC),) +CURL_CC := $(CROSSPREFIX)gcc +endif +ifeq ($(CURL_AR),) +CURL_AR := $(CROSSPREFIX)ar +endif +ifeq ($(CURL_RANLIB),) +CURL_RANLIB := $(CROSSPREFIX)ranlib +endif + +CC = $(CURL_CC) +CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall -W CFLAGS += -fno-strict-aliasing # comment LDFLAGS below to keep debug info LDFLAGS = $(CURL_LDFLAG_EXTRAS) $(CURL_LDFLAG_EXTRAS_DLL) -s -AR = $(CROSSPREFIX)ar -RANLIB = $(CROSSPREFIX)ranlib +AR = $(CURL_AR) +RANLIB = $(CURL_RANLIB) RC = $(CROSSPREFIX)windres RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF STRIP = $(CROSSPREFIX)strip -g @@ -153,9 +168,7 @@ ZLIB = 1 endif ifeq ($(findstring -ssh2,$(CFG)),-ssh2) SSH2 = 1 -ifneq ($(findstring -winssl,$(CFG)),-winssl) SSL = 1 -endif ZLIB = 1 endif ifeq ($(findstring -ssl,$(CFG)),-ssl) @@ -167,8 +180,11 @@ endif ifeq ($(findstring -zlib,$(CFG)),-zlib) ZLIB = 1 endif -ifeq ($(findstring -idn,$(CFG)),-idn) -IDN = 1 +ifeq ($(findstring -brotli,$(CFG)),-brotli) +BROTLI = 1 +endif +ifeq ($(findstring -idn2,$(CFG)),-idn2) +IDN2 = 1 endif ifeq ($(findstring -winidn,$(CFG)),-winidn) WINIDN = 1 @@ -192,6 +208,11 @@ endif INCLUDES = -I. -I../include CFLAGS += -DBUILDING_LIBCURL +ifdef SSL + ifdef WINSSL + CFLAGS += -DCURL_WITH_MULTI_SSL + endif +endif ifdef SYNC CFLAGS += -DUSE_SYNC_DNS @@ -250,28 +271,37 @@ ifdef SSL endif INCLUDES += -I"$(OPENSSL_INCLUDE)" CFLAGS += -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \ - -DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 \ - -DCURL_WANTS_CA_BUNDLE_ENV + -DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 DLL_LIBS += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS) ifdef SRP ifeq "$(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h)" "$(OPENSSL_INCLUDE)/openssl/srp.h" CFLAGS += -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP endif endif -else +endif ifdef WINSSL + CFLAGS += -DUSE_SCHANNEL DLL_LIBS += -lcrypt32 endif -endif ifdef ZLIB INCLUDES += -I"$(ZLIB_PATH)" CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H DLL_LIBS += -L"$(ZLIB_PATH)" -lz endif -ifdef IDN - INCLUDES += -I"$(LIBIDN_PATH)/include" - CFLAGS += -DUSE_LIBIDN - DLL_LIBS += -L"$(LIBIDN_PATH)/lib" -lidn +ifdef BROTLI + INCLUDES += -I"$(BROTLI_PATH)/include" + CFLAGS += -DHAVE_BROTLI + DLL_LIBS += -L"$(BROTLI_PATH)/lib" + ifdef BROTLI_LIBS + DLL_LIBS += $(BROTLI_LIBS) + else + DLL_LIBS += -lbrotlidec + endif +endif +ifdef IDN2 + INCLUDES += -I"$(LIBIDN2_PATH)/include" + CFLAGS += -DUSE_LIBIDN2 + DLL_LIBS += -L"$(LIBIDN2_PATH)/lib" -lidn2 else ifdef WINIDN CFLAGS += -DUSE_WIN32_IDN @@ -281,9 +311,6 @@ endif endif ifdef SSPI CFLAGS += -DUSE_WINDOWS_SSPI - ifdef WINSSL - CFLAGS += -DUSE_SCHANNEL - endif endif ifdef SPNEGO CFLAGS += -DHAVE_SPNEGO @@ -314,8 +341,12 @@ DLL_LIBS += -lws2_32 # Makefile.inc provides the CSOURCES and HHEADERS defines include Makefile.inc -libcurl_dll_LIBRARY = libcurl.dll -libcurl_dll_a_LIBRARY = libcurldll.a +ifeq ($(CURL_DLL_A_SUFFIX),) +CURL_DLL_A_SUFFIX := dll +endif + +libcurl_dll_LIBRARY = libcurl$(CURL_DLL_SUFFIX).dll +libcurl_dll_a_LIBRARY = libcurl$(CURL_DLL_A_SUFFIX).a libcurl_a_LIBRARY = libcurl.a libcurl_a_OBJECTS := $(patsubst %.c,%.o,$(strip $(CSOURCES))) @@ -340,24 +371,17 @@ $(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENC -Wl,--output-def,$(@:.dll=.def),--out-implib,$(libcurl_dll_a_LIBRARY) \ $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS) -%.o: %.c $(PROOT)/include/curl/curlbuild.h +%.o: %.c $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ %.res: %.rc $(RC) $(RCFLAGS) -i $< -o $@ clean: -ifeq "$(wildcard $(PROOT)/include/curl/curlbuild.h.dist)" "$(PROOT)/include/curl/curlbuild.h.dist" - @$(call DEL, $(PROOT)/include/curl/curlbuild.h) -endif @$(call DEL, $(libcurl_a_OBJECTS) $(RESOURCE)) distclean vclean: clean @$(call DEL, $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_LIBRARY:.dll=.def) $(libcurl_dll_a_LIBRARY)) -$(PROOT)/include/curl/curlbuild.h: - @echo Creating $@ - @$(call COPY, $@.dist, $@) - $(LIBCARES_PATH)/libcares.a: $(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32 diff --git a/lib/Makefile.netware b/lib/Makefile.netware index f689a36..f4b6528 100644 --- a/lib/Makefile.netware +++ b/lib/Makefile.netware @@ -6,7 +6,7 @@ # \___|\___/|_| \_\_____| # # Copyright (C) 2004 - 2015, Guenter Knauf, . -# Copyright (C) 2001 - 2015, Daniel Stenberg, , et al. +# Copyright (C) 2001 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -166,7 +166,7 @@ endif CFLAGS += -align 4 else # PRELUDE = $(NDK_CLIB)/imports/clibpre.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # to avoid the __init_* / __deinit_* whoes don't use prelude from NDK PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" CFLAGS += -align 1 @@ -192,7 +192,7 @@ else endif else PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # to avoid the __init_* / __deinit_* whoes don't use prelude from NDK # http://www.gknw.net/development/mk_nlm/gcc_pre.zip # PRELUDE = $(NDK_ROOT)/pre/prelude.o CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h @@ -359,7 +359,7 @@ nlm: prebuild $(TARGET).nlm lib: prebuild $(TARGET).$(LIBEXT) -prebuild: $(OBJDIR) $(CURL_INC)/curl/curlbuild.h $(OBJDIR)/version.inc curl_config.h +prebuild: $(OBJDIR) $(OBJDIR)/version.inc curl_config.h $(OBJDIR)/%.o: %.c # @echo Compiling $< @@ -589,7 +589,6 @@ endif @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@ @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@ @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@ - @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ @echo $(DL)#define HAVE_LL 1$(DL) >> $@ @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@ @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@ @@ -752,44 +751,6 @@ else @echo IPv6 support: no endif -$(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE - @echo Creating $@ - @echo $(DL)/* $@ intended for NetWare target.$(DL) > $@ - @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@ - @echo $(DL)** All your changes will be lost!!$(DL) >> $@ - @echo $(DL)*/$(DL) >> $@ - @echo $(DL)#ifndef NETWARE$(DL) >> $@ - @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@ - @echo $(DL)#endif$(DL) >> $@ - @echo $(DL)#ifndef __CURL_CURLBUILD_H$(DL) >> $@ - @echo $(DL)#define __CURL_CURLBUILD_H$(DL) >> $@ -ifeq ($(LIBARCH),LIBC) - @echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_SOCKLEN_T 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_OFF_T long long$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_T "lld"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "llu"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)lld"$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 8$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T LL$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU ULL$(DL) >> $@ -else - @echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_SOCKLEN_T int$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_SOCKLEN_T 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_OFF_T long$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_T "ld"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "lu"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)ld"$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 4$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T L$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU UL$(DL) >> $@ -endif - @echo $(DL)typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;$(DL) >> $@ - @echo $(DL)typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;$(DL) >> $@ - @echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@ - $(LIBCARES_PATH)/libcares.$(LIBEXT): $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib diff --git a/lib/Makefile.vc10 b/lib/Makefile.vc10 deleted file mode 100644 index d542462..0000000 --- a/lib/Makefile.vc10 +++ /dev/null @@ -1,691 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-library. - -########################################################################### -# -# Makefile for building libcurl with MSVC10 -# -# Usage: see usage message below -# Should be invoked from \lib directory -# Edit the paths and desired library name -# SSL path is only required if you intend compiling -# with SSL. -# -# This make file leaves the result either a .lib or .dll file -# in the \lib directory. It should be called from the \lib -# directory. -# -# An option would have been to allow the source directory to -# be specified, but I saw no requirement. -# -# Another option would have been to leave the .lib and .dll -# files in the "cfg" directory, but then the make file -# in \src would need to be changed. -# -############################################################## - -# ---------------------------------------------- -# Verify that current subdir is libcurl's 'lib' -# ---------------------------------------------- - -!IF ! EXIST(.\curl_addrinfo.c) -! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory. -! MESSAGE Change to libcurl's 'lib' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC10 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -############################################################# -## Nothing more to do below this line! - -CCNODBG = cl.exe /O2 /DNDEBUG -CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1 -CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" -CFLAGSWINSSL = /DUSE_SCHANNEL -CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include" -CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -CFLAGSLIB = /DCURL_STATICLIB -LNKDLL = link.exe /DLL -LNKLIB = link.exe /lib -LFLAGS = /nologo /machine:$(MACHINE) -SSLLIBS = libeay32.lib ssleay32.lib -WINSSLLIBS = crypt32.lib -ZLIBLIBSDLL = zdll.lib -ZLIBLIBS = zlib.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib -CFLAGS = $(CFLAGS) - -CFGSET = FALSE - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -!IFDEF USE_IPV6 -CFLAGS = $(CFLAGS) /DUSE_IPV6 -!ENDIF - -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - -############################################################## -# Runtime library configuration - -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - - -###################### -# release - -!IF "$(CFG)" == "release" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl - -!IF "$(CFG)" == "release-ssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl - -!IF "$(CFG)" == "release-winssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib - -!IF "$(CFG)" == "release-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-zlib - -!IF "$(CFG)" == "release-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl-zlib - -!IF "$(CFG)" == "release-winssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSZLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-ssh2-zlib - -!IF "$(CFG)" == "release-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll - -!IF "$(CFG)" == "release-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib-dll - -!IF "$(CFG)" == "release-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-dll - -!IF "$(CFG)" == "release-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll - -!IF "$(CFG)" == "release-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug - -!IF "$(CFG)" == "debug" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl - -!IF "$(CFG)" == "debug-ssl" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib - -!IF "$(CFG)" == "debug-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-zlib - -!IF "$(CFG)" == "debug-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-ssh2-zlib - -!IF "$(CFG)" == "debug-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll - -!IF "$(CFG)" == "debug-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib-dll - -!IF "$(CFG)" == "debug-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-dll - -!IF "$(CFG)" == "debug-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -####################### -# Usage -# -!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != "" -!MESSAGE Usage: nmake /f makefile.vc10 CFG= -!MESSAGE where is one of: -!MESSAGE release - release static library -!MESSAGE release-ssl - release static library with ssl -!MESSAGE release-zlib - release static library with zlib -!MESSAGE release-ssl-zlib - release static library with ssl and zlib -!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib -!MESSAGE release-ssl-dll - release static library with dynamic ssl -!MESSAGE release-zlib-dll - release static library with dynamic zlib -!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib -!MESSAGE release-dll - release dynamic library -!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl -!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib -!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib -!MESSAGE debug - debug static library -!MESSAGE debug-ssl - debug static library with ssl -!MESSAGE debug-zlib - debug static library with zlib -!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib -!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib -!MESSAGE debug-ssl-dll - debug static library with dynamic ssl -!MESSAGE debug-zlib-dll - debug static library with dynamic zlib -!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib -!MESSAGE debug-dll - debug dynamic library -!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl -!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1 -!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib -!MESSAGE can be left blank in which case all is assumed -!ERROR please choose a valid configuration "$(CFG)" -!ENDIF - -####################### -# Only the clean target can be used if a config was not provided. -# -!IF "$(CFGSET)" == "FALSE" -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE -# A config was provided, so the library can be built. -# -X_OBJS= \ - $(DIROBJ)\amigaos.obj \ - $(DIROBJ)\asyn-ares.obj \ - $(DIROBJ)\asyn-thread.obj \ - $(DIROBJ)\axtls.obj \ - $(DIROBJ)\base64.obj \ - $(DIROBJ)\conncache.obj \ - $(DIROBJ)\connect.obj \ - $(DIROBJ)\content_encoding.obj \ - $(DIROBJ)\cookie.obj \ - $(DIROBJ)\curl_addrinfo.obj \ - $(DIROBJ)\curl_des.obj \ - $(DIROBJ)\curl_endian.obj \ - $(DIROBJ)\curl_fnmatch.obj \ - $(DIROBJ)\curl_gethostname.obj \ - $(DIROBJ)\curl_gssapi.obj \ - $(DIROBJ)\curl_memrchr.obj \ - $(DIROBJ)\curl_multibyte.obj \ - $(DIROBJ)\curl_ntlm_core.obj \ - $(DIROBJ)\curl_ntlm_wb.obj \ - $(DIROBJ)\curl_rtmp.obj \ - $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sspi.obj \ - $(DIROBJ)\curl_threads.obj \ - $(DIROBJ)\cyassl.obj \ - $(DIROBJ)\darwinssl.obj \ - $(DIROBJ)\dict.obj \ - $(DIROBJ)\dotdot.obj \ - $(DIROBJ)\easy.obj \ - $(DIROBJ)\escape.obj \ - $(DIROBJ)\file.obj \ - $(DIROBJ)\fileinfo.obj \ - $(DIROBJ)\formdata.obj \ - $(DIROBJ)\ftp.obj \ - $(DIROBJ)\ftplistparser.obj \ - $(DIROBJ)\getenv.obj \ - $(DIROBJ)\getinfo.obj \ - $(DIROBJ)\gopher.obj \ - $(DIROBJ)\gtls.obj \ - $(DIROBJ)\hash.obj \ - $(DIROBJ)\hmac.obj \ - $(DIROBJ)\hostasyn.obj \ - $(DIROBJ)\hostcheck.obj \ - $(DIROBJ)\hostip.obj \ - $(DIROBJ)\hostip4.obj \ - $(DIROBJ)\hostip6.obj \ - $(DIROBJ)\hostsyn.obj \ - $(DIROBJ)\http.obj \ - $(DIROBJ)\http_chunks.obj \ - $(DIROBJ)\http_digest.obj \ - $(DIROBJ)\http_negotiate.obj \ - $(DIROBJ)\http_ntlm.obj \ - $(DIROBJ)\http_proxy.obj \ - $(DIROBJ)\idn_win32.obj \ - $(DIROBJ)\if2ip.obj \ - $(DIROBJ)\imap.obj \ - $(DIROBJ)\inet_ntop.obj \ - $(DIROBJ)\inet_pton.obj \ - $(DIROBJ)\krb5.obj \ - $(DIROBJ)\ldap.obj \ - $(DIROBJ)\llist.obj \ - $(DIROBJ)\md4.obj \ - $(DIROBJ)\md5.obj \ - $(DIROBJ)\memdebug.obj \ - $(DIROBJ)\mprintf.obj \ - $(DIROBJ)\multi.obj \ - $(DIROBJ)\netrc.obj \ - $(DIROBJ)\non-ascii.obj \ - $(DIROBJ)\nonblock.obj \ - $(DIROBJ)\nss.obj \ - $(DIROBJ)\openldap.obj \ - $(DIROBJ)\parsedate.obj \ - $(DIROBJ)\pingpong.obj \ - $(DIROBJ)\pipeline.obj \ - $(DIROBJ)\polarssl.obj \ - $(DIROBJ)\polarssl_threadlock.obj \ - $(DIROBJ)\pop3.obj \ - $(DIROBJ)\progress.obj \ - $(DIROBJ)\strcase.obj \ - $(DIROBJ)\rand.obj \ - $(DIROBJ)\rtsp.obj \ - $(DIROBJ)\schannel.obj \ - $(DIROBJ)\security.obj \ - $(DIROBJ)\select.obj \ - $(DIROBJ)\sendf.obj \ - $(DIROBJ)\share.obj \ - $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ - $(DIROBJ)\smtp.obj \ - $(DIROBJ)\socks.obj \ - $(DIROBJ)\socks_gssapi.obj \ - $(DIROBJ)\socks_sspi.obj \ - $(DIROBJ)\speedcheck.obj \ - $(DIROBJ)\splay.obj \ - $(DIROBJ)\ssh.obj \ - $(DIROBJ)\system_win32.obj \ - $(DIROBJ)\vauth.obj \ - $(DIROBJ)\cleartext.obj \ - $(DIROBJ)\cram.obj \ - $(DIROBJ)\digest.obj \ - $(DIROBJ)\digest_sspi.obj \ - $(DIROBJ)\krb5_gssapi.obj \ - $(DIROBJ)\krb5_sspi.obj \ - $(DIROBJ)\ntlm.obj \ - $(DIROBJ)\ntlm_sspi.obj \ - $(DIROBJ)\oauth2.obj \ - $(DIROBJ)\spnego_gssapi.obj \ - $(DIROBJ)\spnego_sspi.obj \ - $(DIROBJ)\vtls.obj \ - $(DIROBJ)\openssl.obj \ - $(DIROBJ)\strdup.obj \ - $(DIROBJ)\strerror.obj \ - $(DIROBJ)\strtok.obj \ - $(DIROBJ)\strtoofft.obj \ - $(DIROBJ)\telnet.obj \ - $(DIROBJ)\tftp.obj \ - $(DIROBJ)\timeval.obj \ - $(DIROBJ)\transfer.obj \ - $(DIROBJ)\url.obj \ - $(DIROBJ)\version.obj \ - $(DIROBJ)\warnless.obj \ - $(DIROBJ)\wildcard.obj \ - $(DIROBJ)\x509asn1.obj \ - $(RESOURCE) - -all : $(TARGET) - -$(TARGET): $(X_OBJS) - $(LNK) $(LFLAGS) $(X_OBJS) - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y - -xcopy $(DIROBJ)\*.exp . /y - -xcopy $(DIROBJ)\*.pdb . /y - -$(X_OBJS): $(DIROBJ) - -$(DIROBJ): - @if not exist "$(DIROBJ)" mkdir $(DIROBJ) - -.SUFFIXES: .c .obj .res - -{.\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vauth\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vtls\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -debug-dll\libcurl.res \ -debug-dll-ssl-dll\libcurl.res \ -debug-dll-zlib-dll\libcurl.res \ -debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc - -release-dll\libcurl.res \ -release-dll-ssl-dll\libcurl.res \ -release-dll-zlib-dll\libcurl.res \ -release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc -!ENDIF # End of case where a config was provided. diff --git a/lib/Makefile.vc11 b/lib/Makefile.vc11 deleted file mode 100644 index 574d39b..0000000 --- a/lib/Makefile.vc11 +++ /dev/null @@ -1,691 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-library. - -########################################################################### -# -# Makefile for building libcurl with MSVC11 -# -# Usage: see usage message below -# Should be invoked from \lib directory -# Edit the paths and desired library name -# SSL path is only required if you intend compiling -# with SSL. -# -# This make file leaves the result either a .lib or .dll file -# in the \lib directory. It should be called from the \lib -# directory. -# -# An option would have been to allow the source directory to -# be specified, but I saw no requirement. -# -# Another option would have been to leave the .lib and .dll -# files in the "cfg" directory, but then the make file -# in \src would need to be changed. -# -############################################################## - -# ---------------------------------------------- -# Verify that current subdir is libcurl's 'lib' -# ---------------------------------------------- - -!IF ! EXIST(.\curl_addrinfo.c) -! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory. -! MESSAGE Change to libcurl's 'lib' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC11 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -############################################################# -## Nothing more to do below this line! - -CCNODBG = cl.exe /O2 /DNDEBUG -CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1 -CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" -CFLAGSWINSSL = /DUSE_SCHANNEL -CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include" -CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -CFLAGSLIB = /DCURL_STATICLIB -LNKDLL = link.exe /DLL -LNKLIB = link.exe /lib -LFLAGS = /nologo /machine:$(MACHINE) -SSLLIBS = libeay32.lib ssleay32.lib -WINSSLLIBS = crypt32.lib -ZLIBLIBSDLL = zdll.lib -ZLIBLIBS = zlib.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib -CFLAGS = $(CFLAGS) - -CFGSET = FALSE - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -!IFDEF USE_IPV6 -CFLAGS = $(CFLAGS) /DUSE_IPV6 -!ENDIF - -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - -############################################################## -# Runtime library configuration - -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - - -###################### -# release - -!IF "$(CFG)" == "release" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl - -!IF "$(CFG)" == "release-ssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl - -!IF "$(CFG)" == "release-winssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib - -!IF "$(CFG)" == "release-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-zlib - -!IF "$(CFG)" == "release-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl-zlib - -!IF "$(CFG)" == "release-winssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSZLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-ssh2-zlib - -!IF "$(CFG)" == "release-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll - -!IF "$(CFG)" == "release-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib-dll - -!IF "$(CFG)" == "release-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-dll - -!IF "$(CFG)" == "release-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll - -!IF "$(CFG)" == "release-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug - -!IF "$(CFG)" == "debug" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl - -!IF "$(CFG)" == "debug-ssl" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib - -!IF "$(CFG)" == "debug-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-zlib - -!IF "$(CFG)" == "debug-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-ssh2-zlib - -!IF "$(CFG)" == "debug-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll - -!IF "$(CFG)" == "debug-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib-dll - -!IF "$(CFG)" == "debug-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-dll - -!IF "$(CFG)" == "debug-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -####################### -# Usage -# -!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != "" -!MESSAGE Usage: nmake /f makefile.vc11 CFG= -!MESSAGE where is one of: -!MESSAGE release - release static library -!MESSAGE release-ssl - release static library with ssl -!MESSAGE release-zlib - release static library with zlib -!MESSAGE release-ssl-zlib - release static library with ssl and zlib -!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib -!MESSAGE release-ssl-dll - release static library with dynamic ssl -!MESSAGE release-zlib-dll - release static library with dynamic zlib -!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib -!MESSAGE release-dll - release dynamic library -!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl -!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib -!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib -!MESSAGE debug - debug static library -!MESSAGE debug-ssl - debug static library with ssl -!MESSAGE debug-zlib - debug static library with zlib -!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib -!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib -!MESSAGE debug-ssl-dll - debug static library with dynamic ssl -!MESSAGE debug-zlib-dll - debug static library with dynamic zlib -!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib -!MESSAGE debug-dll - debug dynamic library -!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl -!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1 -!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib -!MESSAGE can be left blank in which case all is assumed -!ERROR please choose a valid configuration "$(CFG)" -!ENDIF - -####################### -# Only the clean target can be used if a config was not provided. -# -!IF "$(CFGSET)" == "FALSE" -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE -# A config was provided, so the library can be built. -# -X_OBJS= \ - $(DIROBJ)\amigaos.obj \ - $(DIROBJ)\asyn-ares.obj \ - $(DIROBJ)\asyn-thread.obj \ - $(DIROBJ)\axtls.obj \ - $(DIROBJ)\base64.obj \ - $(DIROBJ)\conncache.obj \ - $(DIROBJ)\connect.obj \ - $(DIROBJ)\content_encoding.obj \ - $(DIROBJ)\cookie.obj \ - $(DIROBJ)\curl_addrinfo.obj \ - $(DIROBJ)\curl_des.obj \ - $(DIROBJ)\curl_endian.obj \ - $(DIROBJ)\curl_fnmatch.obj \ - $(DIROBJ)\curl_gethostname.obj \ - $(DIROBJ)\curl_gssapi.obj \ - $(DIROBJ)\curl_memrchr.obj \ - $(DIROBJ)\curl_multibyte.obj \ - $(DIROBJ)\curl_ntlm_core.obj \ - $(DIROBJ)\curl_ntlm_wb.obj \ - $(DIROBJ)\curl_rtmp.obj \ - $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sspi.obj \ - $(DIROBJ)\curl_threads.obj \ - $(DIROBJ)\cyassl.obj \ - $(DIROBJ)\darwinssl.obj \ - $(DIROBJ)\dict.obj \ - $(DIROBJ)\dotdot.obj \ - $(DIROBJ)\easy.obj \ - $(DIROBJ)\escape.obj \ - $(DIROBJ)\file.obj \ - $(DIROBJ)\fileinfo.obj \ - $(DIROBJ)\formdata.obj \ - $(DIROBJ)\ftp.obj \ - $(DIROBJ)\ftplistparser.obj \ - $(DIROBJ)\getenv.obj \ - $(DIROBJ)\getinfo.obj \ - $(DIROBJ)\gopher.obj \ - $(DIROBJ)\gtls.obj \ - $(DIROBJ)\hash.obj \ - $(DIROBJ)\hmac.obj \ - $(DIROBJ)\hostasyn.obj \ - $(DIROBJ)\hostcheck.obj \ - $(DIROBJ)\hostip.obj \ - $(DIROBJ)\hostip4.obj \ - $(DIROBJ)\hostip6.obj \ - $(DIROBJ)\hostsyn.obj \ - $(DIROBJ)\http.obj \ - $(DIROBJ)\http_chunks.obj \ - $(DIROBJ)\http_digest.obj \ - $(DIROBJ)\http_negotiate.obj \ - $(DIROBJ)\http_ntlm.obj \ - $(DIROBJ)\http_proxy.obj \ - $(DIROBJ)\idn_win32.obj \ - $(DIROBJ)\if2ip.obj \ - $(DIROBJ)\imap.obj \ - $(DIROBJ)\inet_ntop.obj \ - $(DIROBJ)\inet_pton.obj \ - $(DIROBJ)\krb5.obj \ - $(DIROBJ)\ldap.obj \ - $(DIROBJ)\llist.obj \ - $(DIROBJ)\md4.obj \ - $(DIROBJ)\md5.obj \ - $(DIROBJ)\memdebug.obj \ - $(DIROBJ)\mprintf.obj \ - $(DIROBJ)\multi.obj \ - $(DIROBJ)\netrc.obj \ - $(DIROBJ)\non-ascii.obj \ - $(DIROBJ)\nonblock.obj \ - $(DIROBJ)\nss.obj \ - $(DIROBJ)\openldap.obj \ - $(DIROBJ)\parsedate.obj \ - $(DIROBJ)\pingpong.obj \ - $(DIROBJ)\pipeline.obj \ - $(DIROBJ)\polarssl.obj \ - $(DIROBJ)\polarssl_threadlock.obj \ - $(DIROBJ)\pop3.obj \ - $(DIROBJ)\progress.obj \ - $(DIROBJ)\strcase.obj \ - $(DIROBJ)\rand.obj \ - $(DIROBJ)\rtsp.obj \ - $(DIROBJ)\schannel.obj \ - $(DIROBJ)\security.obj \ - $(DIROBJ)\select.obj \ - $(DIROBJ)\sendf.obj \ - $(DIROBJ)\share.obj \ - $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ - $(DIROBJ)\smtp.obj \ - $(DIROBJ)\socks.obj \ - $(DIROBJ)\socks_gssapi.obj \ - $(DIROBJ)\socks_sspi.obj \ - $(DIROBJ)\speedcheck.obj \ - $(DIROBJ)\splay.obj \ - $(DIROBJ)\ssh.obj \ - $(DIROBJ)\system_win32.obj \ - $(DIROBJ)\vauth.obj \ - $(DIROBJ)\cleartext.obj \ - $(DIROBJ)\cram.obj \ - $(DIROBJ)\digest.obj \ - $(DIROBJ)\digest_sspi.obj \ - $(DIROBJ)\krb5_gssapi.obj \ - $(DIROBJ)\krb5_sspi.obj \ - $(DIROBJ)\ntlm.obj \ - $(DIROBJ)\ntlm_sspi.obj \ - $(DIROBJ)\oauth2.obj \ - $(DIROBJ)\spnego_gssapi.obj \ - $(DIROBJ)\spnego_sspi.obj \ - $(DIROBJ)\vtls.obj \ - $(DIROBJ)\openssl.obj \ - $(DIROBJ)\strdup.obj \ - $(DIROBJ)\strerror.obj \ - $(DIROBJ)\strtok.obj \ - $(DIROBJ)\strtoofft.obj \ - $(DIROBJ)\telnet.obj \ - $(DIROBJ)\tftp.obj \ - $(DIROBJ)\timeval.obj \ - $(DIROBJ)\transfer.obj \ - $(DIROBJ)\url.obj \ - $(DIROBJ)\version.obj \ - $(DIROBJ)\warnless.obj \ - $(DIROBJ)\wildcard.obj \ - $(DIROBJ)\x509asn1.obj \ - $(RESOURCE) - -all : $(TARGET) - -$(TARGET): $(X_OBJS) - $(LNK) $(LFLAGS) $(X_OBJS) - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y - -xcopy $(DIROBJ)\*.exp . /y - -xcopy $(DIROBJ)\*.pdb . /y - -$(X_OBJS): $(DIROBJ) - -$(DIROBJ): - @if not exist "$(DIROBJ)" mkdir $(DIROBJ) - -.SUFFIXES: .c .obj .res - -{.\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vauth\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vtls\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -debug-dll\libcurl.res \ -debug-dll-ssl-dll\libcurl.res \ -debug-dll-zlib-dll\libcurl.res \ -debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc - -release-dll\libcurl.res \ -release-dll-ssl-dll\libcurl.res \ -release-dll-zlib-dll\libcurl.res \ -release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc -!ENDIF # End of case where a config was provided. diff --git a/lib/Makefile.vc12 b/lib/Makefile.vc12 deleted file mode 100644 index d6937c8..0000000 --- a/lib/Makefile.vc12 +++ /dev/null @@ -1,691 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-library. - -########################################################################### -# -# Makefile for building libcurl with MSVC12 -# -# Usage: see usage message below -# Should be invoked from \lib directory -# Edit the paths and desired library name -# SSL path is only required if you intend compiling -# with SSL. -# -# This make file leaves the result either a .lib or .dll file -# in the \lib directory. It should be called from the \lib -# directory. -# -# An option would have been to allow the source directory to -# be specified, but I saw no requirement. -# -# Another option would have been to leave the .lib and .dll -# files in the "cfg" directory, but then the make file -# in \src would need to be changed. -# -############################################################## - -# ---------------------------------------------- -# Verify that current subdir is libcurl's 'lib' -# ---------------------------------------------- - -!IF ! EXIST(.\curl_addrinfo.c) -! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory. -! MESSAGE Change to libcurl's 'lib' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC12 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -############################################################# -## Nothing more to do below this line! - -CCNODBG = cl.exe /O2 /DNDEBUG -CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1 -CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" -CFLAGSWINSSL = /DUSE_SCHANNEL -CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include" -CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -CFLAGSLIB = /DCURL_STATICLIB -LNKDLL = link.exe /DLL -LNKLIB = link.exe /lib -LFLAGS = /nologo /machine:$(MACHINE) -SSLLIBS = libeay32.lib ssleay32.lib -WINSSLLIBS = crypt32.lib -ZLIBLIBSDLL = zdll.lib -ZLIBLIBS = zlib.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib -CFLAGS = $(CFLAGS) - -CFGSET = FALSE - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -!IFDEF USE_IPV6 -CFLAGS = $(CFLAGS) /DUSE_IPV6 -!ENDIF - -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - -############################################################## -# Runtime library configuration - -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - - -###################### -# release - -!IF "$(CFG)" == "release" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl - -!IF "$(CFG)" == "release-ssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl - -!IF "$(CFG)" == "release-winssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib - -!IF "$(CFG)" == "release-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-zlib - -!IF "$(CFG)" == "release-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl-zlib - -!IF "$(CFG)" == "release-winssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSZLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-ssh2-zlib - -!IF "$(CFG)" == "release-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll - -!IF "$(CFG)" == "release-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib-dll - -!IF "$(CFG)" == "release-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-dll - -!IF "$(CFG)" == "release-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll - -!IF "$(CFG)" == "release-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug - -!IF "$(CFG)" == "debug" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl - -!IF "$(CFG)" == "debug-ssl" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib - -!IF "$(CFG)" == "debug-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-zlib - -!IF "$(CFG)" == "debug-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-ssh2-zlib - -!IF "$(CFG)" == "debug-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll - -!IF "$(CFG)" == "debug-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib-dll - -!IF "$(CFG)" == "debug-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-dll - -!IF "$(CFG)" == "debug-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -####################### -# Usage -# -!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != "" -!MESSAGE Usage: nmake /f makefile.vc12 CFG= -!MESSAGE where is one of: -!MESSAGE release - release static library -!MESSAGE release-ssl - release static library with ssl -!MESSAGE release-zlib - release static library with zlib -!MESSAGE release-ssl-zlib - release static library with ssl and zlib -!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib -!MESSAGE release-ssl-dll - release static library with dynamic ssl -!MESSAGE release-zlib-dll - release static library with dynamic zlib -!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib -!MESSAGE release-dll - release dynamic library -!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl -!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib -!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib -!MESSAGE debug - debug static library -!MESSAGE debug-ssl - debug static library with ssl -!MESSAGE debug-zlib - debug static library with zlib -!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib -!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib -!MESSAGE debug-ssl-dll - debug static library with dynamic ssl -!MESSAGE debug-zlib-dll - debug static library with dynamic zlib -!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib -!MESSAGE debug-dll - debug dynamic library -!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl -!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1 -!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib -!MESSAGE can be left blank in which case all is assumed -!ERROR please choose a valid configuration "$(CFG)" -!ENDIF - -####################### -# Only the clean target can be used if a config was not provided. -# -!IF "$(CFGSET)" == "FALSE" -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE -# A config was provided, so the library can be built. -# -X_OBJS= \ - $(DIROBJ)\amigaos.obj \ - $(DIROBJ)\asyn-ares.obj \ - $(DIROBJ)\asyn-thread.obj \ - $(DIROBJ)\axtls.obj \ - $(DIROBJ)\base64.obj \ - $(DIROBJ)\conncache.obj \ - $(DIROBJ)\connect.obj \ - $(DIROBJ)\content_encoding.obj \ - $(DIROBJ)\cookie.obj \ - $(DIROBJ)\curl_addrinfo.obj \ - $(DIROBJ)\curl_des.obj \ - $(DIROBJ)\curl_endian.obj \ - $(DIROBJ)\curl_fnmatch.obj \ - $(DIROBJ)\curl_gethostname.obj \ - $(DIROBJ)\curl_gssapi.obj \ - $(DIROBJ)\curl_memrchr.obj \ - $(DIROBJ)\curl_multibyte.obj \ - $(DIROBJ)\curl_ntlm_core.obj \ - $(DIROBJ)\curl_ntlm_wb.obj \ - $(DIROBJ)\curl_rtmp.obj \ - $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sspi.obj \ - $(DIROBJ)\curl_threads.obj \ - $(DIROBJ)\cyassl.obj \ - $(DIROBJ)\darwinssl.obj \ - $(DIROBJ)\dict.obj \ - $(DIROBJ)\dotdot.obj \ - $(DIROBJ)\easy.obj \ - $(DIROBJ)\escape.obj \ - $(DIROBJ)\file.obj \ - $(DIROBJ)\fileinfo.obj \ - $(DIROBJ)\formdata.obj \ - $(DIROBJ)\ftp.obj \ - $(DIROBJ)\ftplistparser.obj \ - $(DIROBJ)\getenv.obj \ - $(DIROBJ)\getinfo.obj \ - $(DIROBJ)\gopher.obj \ - $(DIROBJ)\gtls.obj \ - $(DIROBJ)\hash.obj \ - $(DIROBJ)\hmac.obj \ - $(DIROBJ)\hostasyn.obj \ - $(DIROBJ)\hostcheck.obj \ - $(DIROBJ)\hostip.obj \ - $(DIROBJ)\hostip4.obj \ - $(DIROBJ)\hostip6.obj \ - $(DIROBJ)\hostsyn.obj \ - $(DIROBJ)\http.obj \ - $(DIROBJ)\http_chunks.obj \ - $(DIROBJ)\http_digest.obj \ - $(DIROBJ)\http_negotiate.obj \ - $(DIROBJ)\http_ntlm.obj \ - $(DIROBJ)\http_proxy.obj \ - $(DIROBJ)\idn_win32.obj \ - $(DIROBJ)\if2ip.obj \ - $(DIROBJ)\imap.obj \ - $(DIROBJ)\inet_ntop.obj \ - $(DIROBJ)\inet_pton.obj \ - $(DIROBJ)\krb5.obj \ - $(DIROBJ)\ldap.obj \ - $(DIROBJ)\llist.obj \ - $(DIROBJ)\md4.obj \ - $(DIROBJ)\md5.obj \ - $(DIROBJ)\memdebug.obj \ - $(DIROBJ)\mprintf.obj \ - $(DIROBJ)\multi.obj \ - $(DIROBJ)\netrc.obj \ - $(DIROBJ)\non-ascii.obj \ - $(DIROBJ)\nonblock.obj \ - $(DIROBJ)\nss.obj \ - $(DIROBJ)\openldap.obj \ - $(DIROBJ)\parsedate.obj \ - $(DIROBJ)\pingpong.obj \ - $(DIROBJ)\pipeline.obj \ - $(DIROBJ)\polarssl.obj \ - $(DIROBJ)\polarssl_threadlock.obj \ - $(DIROBJ)\pop3.obj \ - $(DIROBJ)\progress.obj \ - $(DIROBJ)\strcase.obj \ - $(DIROBJ)\rand.obj \ - $(DIROBJ)\rtsp.obj \ - $(DIROBJ)\schannel.obj \ - $(DIROBJ)\security.obj \ - $(DIROBJ)\select.obj \ - $(DIROBJ)\sendf.obj \ - $(DIROBJ)\share.obj \ - $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ - $(DIROBJ)\smtp.obj \ - $(DIROBJ)\socks.obj \ - $(DIROBJ)\socks_gssapi.obj \ - $(DIROBJ)\socks_sspi.obj \ - $(DIROBJ)\speedcheck.obj \ - $(DIROBJ)\splay.obj \ - $(DIROBJ)\ssh.obj \ - $(DIROBJ)\system_win32.obj \ - $(DIROBJ)\vauth.obj \ - $(DIROBJ)\cleartext.obj \ - $(DIROBJ)\cram.obj \ - $(DIROBJ)\digest.obj \ - $(DIROBJ)\digest_sspi.obj \ - $(DIROBJ)\krb5_gssapi.obj \ - $(DIROBJ)\krb5_sspi.obj \ - $(DIROBJ)\ntlm.obj \ - $(DIROBJ)\ntlm_sspi.obj \ - $(DIROBJ)\oauth2.obj \ - $(DIROBJ)\spnego_gssapi.obj \ - $(DIROBJ)\spnego_sspi.obj \ - $(DIROBJ)\vtls.obj \ - $(DIROBJ)\openssl.obj \ - $(DIROBJ)\strdup.obj \ - $(DIROBJ)\strerror.obj \ - $(DIROBJ)\strtok.obj \ - $(DIROBJ)\strtoofft.obj \ - $(DIROBJ)\telnet.obj \ - $(DIROBJ)\tftp.obj \ - $(DIROBJ)\timeval.obj \ - $(DIROBJ)\transfer.obj \ - $(DIROBJ)\url.obj \ - $(DIROBJ)\version.obj \ - $(DIROBJ)\warnless.obj \ - $(DIROBJ)\wildcard.obj \ - $(DIROBJ)\x509asn1.obj \ - $(RESOURCE) - -all : $(TARGET) - -$(TARGET): $(X_OBJS) - $(LNK) $(LFLAGS) $(X_OBJS) - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y - -xcopy $(DIROBJ)\*.exp . /y - -xcopy $(DIROBJ)\*.pdb . /y - -$(X_OBJS): $(DIROBJ) - -$(DIROBJ): - @if not exist "$(DIROBJ)" mkdir $(DIROBJ) - -.SUFFIXES: .c .obj .res - -{.\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vauth\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vtls\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -debug-dll\libcurl.res \ -debug-dll-ssl-dll\libcurl.res \ -debug-dll-zlib-dll\libcurl.res \ -debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc - -release-dll\libcurl.res \ -release-dll-ssl-dll\libcurl.res \ -release-dll-zlib-dll\libcurl.res \ -release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc -!ENDIF # End of case where a config was provided. diff --git a/lib/Makefile.vc14 b/lib/Makefile.vc14 deleted file mode 100644 index 8d51139..0000000 --- a/lib/Makefile.vc14 +++ /dev/null @@ -1,691 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-library. - -########################################################################### -# -# Makefile for building libcurl with MSVC14 -# -# Usage: see usage message below -# Should be invoked from \lib directory -# Edit the paths and desired library name -# SSL path is only required if you intend compiling -# with SSL. -# -# This make file leaves the result either a .lib or .dll file -# in the \lib directory. It should be called from the \lib -# directory. -# -# An option would have been to allow the source directory to -# be specified, but I saw no requirement. -# -# Another option would have been to leave the .lib and .dll -# files in the "cfg" directory, but then the make file -# in \src would need to be changed. -# -############################################################## - -# ---------------------------------------------- -# Verify that current subdir is libcurl's 'lib' -# ---------------------------------------------- - -!IF ! EXIST(.\curl_addrinfo.c) -! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory. -! MESSAGE Change to libcurl's 'lib' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC14 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -############################################################# -## Nothing more to do below this line! - -CCNODBG = cl.exe /O2 /DNDEBUG -CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1 -CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" -CFLAGSWINSSL = /DUSE_SCHANNEL -CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include" -CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -CFLAGSLIB = /DCURL_STATICLIB -LNKDLL = link.exe /DLL -LNKLIB = link.exe /lib -LFLAGS = /nologo /machine:$(MACHINE) -SSLLIBS = libeay32.lib ssleay32.lib -WINSSLLIBS = crypt32.lib -ZLIBLIBSDLL = zdll.lib -ZLIBLIBS = zlib.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib -CFLAGS = $(CFLAGS) - -CFGSET = FALSE - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -!IFDEF USE_IPV6 -CFLAGS = $(CFLAGS) /DUSE_IPV6 -!ENDIF - -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - -############################################################## -# Runtime library configuration - -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - - -###################### -# release - -!IF "$(CFG)" == "release" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl - -!IF "$(CFG)" == "release-ssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl - -!IF "$(CFG)" == "release-winssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib - -!IF "$(CFG)" == "release-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-zlib - -!IF "$(CFG)" == "release-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl-zlib - -!IF "$(CFG)" == "release-winssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSZLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-ssh2-zlib - -!IF "$(CFG)" == "release-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll - -!IF "$(CFG)" == "release-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib-dll - -!IF "$(CFG)" == "release-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-dll - -!IF "$(CFG)" == "release-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll - -!IF "$(CFG)" == "release-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug - -!IF "$(CFG)" == "debug" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl - -!IF "$(CFG)" == "debug-ssl" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib - -!IF "$(CFG)" == "debug-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-zlib - -!IF "$(CFG)" == "debug-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-ssh2-zlib - -!IF "$(CFG)" == "debug-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll - -!IF "$(CFG)" == "debug-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib-dll - -!IF "$(CFG)" == "debug-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-dll - -!IF "$(CFG)" == "debug-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -####################### -# Usage -# -!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != "" -!MESSAGE Usage: nmake /f makefile.vc14 CFG= -!MESSAGE where is one of: -!MESSAGE release - release static library -!MESSAGE release-ssl - release static library with ssl -!MESSAGE release-zlib - release static library with zlib -!MESSAGE release-ssl-zlib - release static library with ssl and zlib -!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib -!MESSAGE release-ssl-dll - release static library with dynamic ssl -!MESSAGE release-zlib-dll - release static library with dynamic zlib -!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib -!MESSAGE release-dll - release dynamic library -!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl -!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib -!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib -!MESSAGE debug - debug static library -!MESSAGE debug-ssl - debug static library with ssl -!MESSAGE debug-zlib - debug static library with zlib -!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib -!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib -!MESSAGE debug-ssl-dll - debug static library with dynamic ssl -!MESSAGE debug-zlib-dll - debug static library with dynamic zlib -!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib -!MESSAGE debug-dll - debug dynamic library -!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl -!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1 -!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib -!MESSAGE can be left blank in which case all is assumed -!ERROR please choose a valid configuration "$(CFG)" -!ENDIF - -####################### -# Only the clean target can be used if a config was not provided. -# -!IF "$(CFGSET)" == "FALSE" -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE -# A config was provided, so the library can be built. -# -X_OBJS= \ - $(DIROBJ)\amigaos.obj \ - $(DIROBJ)\asyn-ares.obj \ - $(DIROBJ)\asyn-thread.obj \ - $(DIROBJ)\axtls.obj \ - $(DIROBJ)\base64.obj \ - $(DIROBJ)\conncache.obj \ - $(DIROBJ)\connect.obj \ - $(DIROBJ)\content_encoding.obj \ - $(DIROBJ)\cookie.obj \ - $(DIROBJ)\curl_addrinfo.obj \ - $(DIROBJ)\curl_des.obj \ - $(DIROBJ)\curl_endian.obj \ - $(DIROBJ)\curl_fnmatch.obj \ - $(DIROBJ)\curl_gethostname.obj \ - $(DIROBJ)\curl_gssapi.obj \ - $(DIROBJ)\curl_memrchr.obj \ - $(DIROBJ)\curl_multibyte.obj \ - $(DIROBJ)\curl_ntlm_core.obj \ - $(DIROBJ)\curl_ntlm_wb.obj \ - $(DIROBJ)\curl_rtmp.obj \ - $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sspi.obj \ - $(DIROBJ)\curl_threads.obj \ - $(DIROBJ)\cyassl.obj \ - $(DIROBJ)\darwinssl.obj \ - $(DIROBJ)\dict.obj \ - $(DIROBJ)\dotdot.obj \ - $(DIROBJ)\easy.obj \ - $(DIROBJ)\escape.obj \ - $(DIROBJ)\file.obj \ - $(DIROBJ)\fileinfo.obj \ - $(DIROBJ)\formdata.obj \ - $(DIROBJ)\ftp.obj \ - $(DIROBJ)\ftplistparser.obj \ - $(DIROBJ)\getenv.obj \ - $(DIROBJ)\getinfo.obj \ - $(DIROBJ)\gopher.obj \ - $(DIROBJ)\gtls.obj \ - $(DIROBJ)\hash.obj \ - $(DIROBJ)\hmac.obj \ - $(DIROBJ)\hostasyn.obj \ - $(DIROBJ)\hostcheck.obj \ - $(DIROBJ)\hostip.obj \ - $(DIROBJ)\hostip4.obj \ - $(DIROBJ)\hostip6.obj \ - $(DIROBJ)\hostsyn.obj \ - $(DIROBJ)\http.obj \ - $(DIROBJ)\http_chunks.obj \ - $(DIROBJ)\http_digest.obj \ - $(DIROBJ)\http_negotiate.obj \ - $(DIROBJ)\http_ntlm.obj \ - $(DIROBJ)\http_proxy.obj \ - $(DIROBJ)\idn_win32.obj \ - $(DIROBJ)\if2ip.obj \ - $(DIROBJ)\imap.obj \ - $(DIROBJ)\inet_ntop.obj \ - $(DIROBJ)\inet_pton.obj \ - $(DIROBJ)\krb5.obj \ - $(DIROBJ)\ldap.obj \ - $(DIROBJ)\llist.obj \ - $(DIROBJ)\md4.obj \ - $(DIROBJ)\md5.obj \ - $(DIROBJ)\memdebug.obj \ - $(DIROBJ)\mprintf.obj \ - $(DIROBJ)\multi.obj \ - $(DIROBJ)\netrc.obj \ - $(DIROBJ)\non-ascii.obj \ - $(DIROBJ)\nonblock.obj \ - $(DIROBJ)\nss.obj \ - $(DIROBJ)\openldap.obj \ - $(DIROBJ)\parsedate.obj \ - $(DIROBJ)\pingpong.obj \ - $(DIROBJ)\pipeline.obj \ - $(DIROBJ)\polarssl.obj \ - $(DIROBJ)\polarssl_threadlock.obj \ - $(DIROBJ)\pop3.obj \ - $(DIROBJ)\progress.obj \ - $(DIROBJ)\strcase.obj \ - $(DIROBJ)\rand.obj \ - $(DIROBJ)\rtsp.obj \ - $(DIROBJ)\schannel.obj \ - $(DIROBJ)\security.obj \ - $(DIROBJ)\select.obj \ - $(DIROBJ)\sendf.obj \ - $(DIROBJ)\share.obj \ - $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ - $(DIROBJ)\smtp.obj \ - $(DIROBJ)\socks.obj \ - $(DIROBJ)\socks_gssapi.obj \ - $(DIROBJ)\socks_sspi.obj \ - $(DIROBJ)\speedcheck.obj \ - $(DIROBJ)\splay.obj \ - $(DIROBJ)\ssh.obj \ - $(DIROBJ)\system_win32.obj \ - $(DIROBJ)\vauth.obj \ - $(DIROBJ)\cleartext.obj \ - $(DIROBJ)\cram.obj \ - $(DIROBJ)\digest.obj \ - $(DIROBJ)\digest_sspi.obj \ - $(DIROBJ)\krb5_gssapi.obj \ - $(DIROBJ)\krb5_sspi.obj \ - $(DIROBJ)\ntlm.obj \ - $(DIROBJ)\ntlm_sspi.obj \ - $(DIROBJ)\oauth2.obj \ - $(DIROBJ)\spnego_gssapi.obj \ - $(DIROBJ)\spnego_sspi.obj \ - $(DIROBJ)\vtls.obj \ - $(DIROBJ)\openssl.obj \ - $(DIROBJ)\strdup.obj \ - $(DIROBJ)\strerror.obj \ - $(DIROBJ)\strtok.obj \ - $(DIROBJ)\strtoofft.obj \ - $(DIROBJ)\telnet.obj \ - $(DIROBJ)\tftp.obj \ - $(DIROBJ)\timeval.obj \ - $(DIROBJ)\transfer.obj \ - $(DIROBJ)\url.obj \ - $(DIROBJ)\version.obj \ - $(DIROBJ)\warnless.obj \ - $(DIROBJ)\wildcard.obj \ - $(DIROBJ)\x509asn1.obj \ - $(RESOURCE) - -all : $(TARGET) - -$(TARGET): $(X_OBJS) - $(LNK) $(LFLAGS) $(X_OBJS) - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y - -xcopy $(DIROBJ)\*.exp . /y - -xcopy $(DIROBJ)\*.pdb . /y - -$(X_OBJS): $(DIROBJ) - -$(DIROBJ): - @if not exist "$(DIROBJ)" mkdir $(DIROBJ) - -.SUFFIXES: .c .obj .res - -{.\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vauth\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vtls\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -debug-dll\libcurl.res \ -debug-dll-ssl-dll\libcurl.res \ -debug-dll-zlib-dll\libcurl.res \ -debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc - -release-dll\libcurl.res \ -release-dll-ssl-dll\libcurl.res \ -release-dll-zlib-dll\libcurl.res \ -release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc -!ENDIF # End of case where a config was provided. diff --git a/lib/Makefile.vc7 b/lib/Makefile.vc7 deleted file mode 100644 index 1b2d5ba..0000000 --- a/lib/Makefile.vc7 +++ /dev/null @@ -1,691 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-library. - -########################################################################### -# -# Makefile for building libcurl with MSVC7 -# -# Usage: see usage message below -# Should be invoked from \lib directory -# Edit the paths and desired library name -# SSL path is only required if you intend compiling -# with SSL. -# -# This make file leaves the result either a .lib or .dll file -# in the \lib directory. It should be called from the \lib -# directory. -# -# An option would have been to allow the source directory to -# be specified, but I saw no requirement. -# -# Another option would have been to leave the .lib and .dll -# files in the "cfg" directory, but then the make file -# in \src would need to be changed. -# -############################################################## - -# ---------------------------------------------- -# Verify that current subdir is libcurl's 'lib' -# ---------------------------------------------- - -!IF ! EXIST(.\curl_addrinfo.c) -! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory. -! MESSAGE Change to libcurl's 'lib' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC7 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -############################################################# -## Nothing more to do below this line! - -CCNODBG = cl.exe /O2 /DNDEBUG -CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ -CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" -CFLAGSWINSSL = /DUSE_SCHANNEL -CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include" -CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -CFLAGS = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -CFLAGSLIB = /DCURL_STATICLIB -LNKDLL = link.exe /DLL -LNKLIB = link.exe /lib -LFLAGS = /nologo /machine:$(MACHINE) -SSLLIBS = libeay32.lib ssleay32.lib -WINSSLLIBS = crypt32.lib -ZLIBLIBSDLL = zdll.lib -ZLIBLIBS = zlib.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib -CFLAGS = $(CFLAGS) - -CFGSET = FALSE - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -!IFDEF USE_IPV6 -CFLAGS = $(CFLAGS) /DUSE_IPV6 -!ENDIF - -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - -############################################################## -# Runtime library configuration - -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - - -###################### -# release - -!IF "$(CFG)" == "release" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl - -!IF "$(CFG)" == "release-ssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl - -!IF "$(CFG)" == "release-winssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib - -!IF "$(CFG)" == "release-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-zlib - -!IF "$(CFG)" == "release-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl-zlib - -!IF "$(CFG)" == "release-winssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSZLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-ssh2-zlib - -!IF "$(CFG)" == "release-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll - -!IF "$(CFG)" == "release-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib-dll - -!IF "$(CFG)" == "release-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-dll - -!IF "$(CFG)" == "release-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll - -!IF "$(CFG)" == "release-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug - -!IF "$(CFG)" == "debug" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl - -!IF "$(CFG)" == "debug-ssl" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib - -!IF "$(CFG)" == "debug-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-zlib - -!IF "$(CFG)" == "debug-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-ssh2-zlib - -!IF "$(CFG)" == "debug-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll - -!IF "$(CFG)" == "debug-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib-dll - -!IF "$(CFG)" == "debug-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-dll - -!IF "$(CFG)" == "debug-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -####################### -# Usage -# -!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != "" -!MESSAGE Usage: nmake /f makefile.vc6 CFG= -!MESSAGE where is one of: -!MESSAGE release - release static library -!MESSAGE release-ssl - release static library with ssl -!MESSAGE release-zlib - release static library with zlib -!MESSAGE release-ssl-zlib - release static library with ssl and zlib -!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib -!MESSAGE release-ssl-dll - release static library with dynamic ssl -!MESSAGE release-zlib-dll - release static library with dynamic zlib -!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib -!MESSAGE release-dll - release dynamic library -!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl -!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib -!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib -!MESSAGE debug - debug static library -!MESSAGE debug-ssl - debug static library with ssl -!MESSAGE debug-zlib - debug static library with zlib -!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib -!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib -!MESSAGE debug-ssl-dll - debug static library with dynamic ssl -!MESSAGE debug-zlib-dll - debug static library with dynamic zlib -!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib -!MESSAGE debug-dll - debug dynamic library -!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl -!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1 -!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib -!MESSAGE can be left blank in which case all is assumed -!ERROR please choose a valid configuration "$(CFG)" -!ENDIF - -####################### -# Only the clean target can be used if a config was not provided. -# -!IF "$(CFGSET)" == "FALSE" -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE -# A config was provided, so the library can be built. -# -X_OBJS= \ - $(DIROBJ)\amigaos.obj \ - $(DIROBJ)\asyn-ares.obj \ - $(DIROBJ)\asyn-thread.obj \ - $(DIROBJ)\axtls.obj \ - $(DIROBJ)\base64.obj \ - $(DIROBJ)\conncache.obj \ - $(DIROBJ)\connect.obj \ - $(DIROBJ)\content_encoding.obj \ - $(DIROBJ)\cookie.obj \ - $(DIROBJ)\curl_addrinfo.obj \ - $(DIROBJ)\curl_des.obj \ - $(DIROBJ)\curl_endian.obj \ - $(DIROBJ)\curl_fnmatch.obj \ - $(DIROBJ)\curl_gethostname.obj \ - $(DIROBJ)\curl_gssapi.obj \ - $(DIROBJ)\curl_memrchr.obj \ - $(DIROBJ)\curl_multibyte.obj \ - $(DIROBJ)\curl_ntlm_core.obj \ - $(DIROBJ)\curl_ntlm_wb.obj \ - $(DIROBJ)\curl_rtmp.obj \ - $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sspi.obj \ - $(DIROBJ)\curl_threads.obj \ - $(DIROBJ)\cyassl.obj \ - $(DIROBJ)\darwinssl.obj \ - $(DIROBJ)\dict.obj \ - $(DIROBJ)\dotdot.obj \ - $(DIROBJ)\easy.obj \ - $(DIROBJ)\escape.obj \ - $(DIROBJ)\file.obj \ - $(DIROBJ)\fileinfo.obj \ - $(DIROBJ)\formdata.obj \ - $(DIROBJ)\ftp.obj \ - $(DIROBJ)\ftplistparser.obj \ - $(DIROBJ)\getenv.obj \ - $(DIROBJ)\getinfo.obj \ - $(DIROBJ)\gopher.obj \ - $(DIROBJ)\gtls.obj \ - $(DIROBJ)\hash.obj \ - $(DIROBJ)\hmac.obj \ - $(DIROBJ)\hostasyn.obj \ - $(DIROBJ)\hostcheck.obj \ - $(DIROBJ)\hostip.obj \ - $(DIROBJ)\hostip4.obj \ - $(DIROBJ)\hostip6.obj \ - $(DIROBJ)\hostsyn.obj \ - $(DIROBJ)\http.obj \ - $(DIROBJ)\http_chunks.obj \ - $(DIROBJ)\http_digest.obj \ - $(DIROBJ)\http_negotiate.obj \ - $(DIROBJ)\http_ntlm.obj \ - $(DIROBJ)\http_proxy.obj \ - $(DIROBJ)\idn_win32.obj \ - $(DIROBJ)\if2ip.obj \ - $(DIROBJ)\imap.obj \ - $(DIROBJ)\inet_ntop.obj \ - $(DIROBJ)\inet_pton.obj \ - $(DIROBJ)\krb5.obj \ - $(DIROBJ)\ldap.obj \ - $(DIROBJ)\llist.obj \ - $(DIROBJ)\md4.obj \ - $(DIROBJ)\md5.obj \ - $(DIROBJ)\memdebug.obj \ - $(DIROBJ)\mprintf.obj \ - $(DIROBJ)\multi.obj \ - $(DIROBJ)\netrc.obj \ - $(DIROBJ)\non-ascii.obj \ - $(DIROBJ)\nonblock.obj \ - $(DIROBJ)\nss.obj \ - $(DIROBJ)\openldap.obj \ - $(DIROBJ)\parsedate.obj \ - $(DIROBJ)\pingpong.obj \ - $(DIROBJ)\pipeline.obj \ - $(DIROBJ)\polarssl.obj \ - $(DIROBJ)\polarssl_threadlock.obj \ - $(DIROBJ)\pop3.obj \ - $(DIROBJ)\progress.obj \ - $(DIROBJ)\strcase.obj \ - $(DIROBJ)\rand.obj \ - $(DIROBJ)\rtsp.obj \ - $(DIROBJ)\schannel.obj \ - $(DIROBJ)\security.obj \ - $(DIROBJ)\select.obj \ - $(DIROBJ)\sendf.obj \ - $(DIROBJ)\share.obj \ - $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ - $(DIROBJ)\smtp.obj \ - $(DIROBJ)\socks.obj \ - $(DIROBJ)\socks_gssapi.obj \ - $(DIROBJ)\socks_sspi.obj \ - $(DIROBJ)\speedcheck.obj \ - $(DIROBJ)\splay.obj \ - $(DIROBJ)\ssh.obj \ - $(DIROBJ)\system_win32.obj \ - $(DIROBJ)\vauth.obj \ - $(DIROBJ)\cleartext.obj \ - $(DIROBJ)\cram.obj \ - $(DIROBJ)\digest.obj \ - $(DIROBJ)\digest_sspi.obj \ - $(DIROBJ)\krb5_gssapi.obj \ - $(DIROBJ)\krb5_sspi.obj \ - $(DIROBJ)\ntlm.obj \ - $(DIROBJ)\ntlm_sspi.obj \ - $(DIROBJ)\oauth2.obj \ - $(DIROBJ)\spnego_gssapi.obj \ - $(DIROBJ)\spnego_sspi.obj \ - $(DIROBJ)\vtls.obj \ - $(DIROBJ)\openssl.obj \ - $(DIROBJ)\strdup.obj \ - $(DIROBJ)\strerror.obj \ - $(DIROBJ)\strtok.obj \ - $(DIROBJ)\strtoofft.obj \ - $(DIROBJ)\telnet.obj \ - $(DIROBJ)\tftp.obj \ - $(DIROBJ)\timeval.obj \ - $(DIROBJ)\transfer.obj \ - $(DIROBJ)\url.obj \ - $(DIROBJ)\version.obj \ - $(DIROBJ)\warnless.obj \ - $(DIROBJ)\wildcard.obj \ - $(DIROBJ)\x509asn1.obj \ - $(RESOURCE) - -all : $(TARGET) - -$(TARGET): $(X_OBJS) - $(LNK) $(LFLAGS) $(X_OBJS) - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y - -xcopy $(DIROBJ)\*.exp . /y - -xcopy $(DIROBJ)\*.pdb . /y - -$(X_OBJS): $(DIROBJ) - -$(DIROBJ): - @if not exist "$(DIROBJ)" mkdir $(DIROBJ) - -.SUFFIXES: .c .obj .res - -{.\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vauth\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vtls\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -debug-dll\libcurl.res \ -debug-dll-ssl-dll\libcurl.res \ -debug-dll-zlib-dll\libcurl.res \ -debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc - -release-dll\libcurl.res \ -release-dll-ssl-dll\libcurl.res \ -release-dll-zlib-dll\libcurl.res \ -release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc -!ENDIF # End of case where a config was provided. diff --git a/lib/Makefile.vc8 b/lib/Makefile.vc8 deleted file mode 100644 index 067b049..0000000 --- a/lib/Makefile.vc8 +++ /dev/null @@ -1,691 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-library. - -########################################################################### -# -# Makefile for building libcurl with MSVC8 -# -# Usage: see usage message below -# Should be invoked from \lib directory -# Edit the paths and desired library name -# SSL path is only required if you intend compiling -# with SSL. -# -# This make file leaves the result either a .lib or .dll file -# in the \lib directory. It should be called from the \lib -# directory. -# -# An option would have been to allow the source directory to -# be specified, but I saw no requirement. -# -# Another option would have been to leave the .lib and .dll -# files in the "cfg" directory, but then the make file -# in \src would need to be changed. -# -############################################################## - -# ---------------------------------------------- -# Verify that current subdir is libcurl's 'lib' -# ---------------------------------------------- - -!IF ! EXIST(.\curl_addrinfo.c) -! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory. -! MESSAGE Change to libcurl's 'lib' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC8 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -############################################################# -## Nothing more to do below this line! - -CCNODBG = cl.exe /O2 /DNDEBUG -CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1 -CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" -CFLAGSWINSSL = /DUSE_SCHANNEL -CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include" -CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -CFLAGSLIB = /DCURL_STATICLIB -LNKDLL = link.exe /DLL -LNKLIB = link.exe /lib -LFLAGS = /nologo /machine:$(MACHINE) -SSLLIBS = libeay32.lib ssleay32.lib -WINSSLLIBS = crypt32.lib -ZLIBLIBSDLL = zdll.lib -ZLIBLIBS = zlib.lib -WINLIBS = ws2_32.lib bufferoverflowu.lib wldap32.lib advapi32.lib -CFLAGS = $(CFLAGS) - -CFGSET = FALSE - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -!IFDEF USE_IPV6 -CFLAGS = $(CFLAGS) /DUSE_IPV6 -!ENDIF - -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - -############################################################## -# Runtime library configuration - -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - - -###################### -# release - -!IF "$(CFG)" == "release" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl - -!IF "$(CFG)" == "release-ssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl - -!IF "$(CFG)" == "release-winssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib - -!IF "$(CFG)" == "release-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-zlib - -!IF "$(CFG)" == "release-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl-zlib - -!IF "$(CFG)" == "release-winssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSZLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-ssh2-zlib - -!IF "$(CFG)" == "release-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll - -!IF "$(CFG)" == "release-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib-dll - -!IF "$(CFG)" == "release-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-dll - -!IF "$(CFG)" == "release-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll - -!IF "$(CFG)" == "release-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug - -!IF "$(CFG)" == "debug" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl - -!IF "$(CFG)" == "debug-ssl" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib - -!IF "$(CFG)" == "debug-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-zlib - -!IF "$(CFG)" == "debug-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-ssh2-zlib - -!IF "$(CFG)" == "debug-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll - -!IF "$(CFG)" == "debug-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib-dll - -!IF "$(CFG)" == "debug-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-dll - -!IF "$(CFG)" == "debug-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -####################### -# Usage -# -!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != "" -!MESSAGE Usage: nmake /f makefile.vc6 CFG= -!MESSAGE where is one of: -!MESSAGE release - release static library -!MESSAGE release-ssl - release static library with ssl -!MESSAGE release-zlib - release static library with zlib -!MESSAGE release-ssl-zlib - release static library with ssl and zlib -!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib -!MESSAGE release-ssl-dll - release static library with dynamic ssl -!MESSAGE release-zlib-dll - release static library with dynamic zlib -!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib -!MESSAGE release-dll - release dynamic library -!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl -!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib -!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib -!MESSAGE debug - debug static library -!MESSAGE debug-ssl - debug static library with ssl -!MESSAGE debug-zlib - debug static library with zlib -!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib -!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib -!MESSAGE debug-ssl-dll - debug static library with dynamic ssl -!MESSAGE debug-zlib-dll - debug static library with dynamic zlib -!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib -!MESSAGE debug-dll - debug dynamic library -!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl -!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1 -!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib -!MESSAGE can be left blank in which case all is assumed -!ERROR please choose a valid configuration "$(CFG)" -!ENDIF - -####################### -# Only the clean target can be used if a config was not provided. -# -!IF "$(CFGSET)" == "FALSE" -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE -# A config was provided, so the library can be built. -# -X_OBJS= \ - $(DIROBJ)\amigaos.obj \ - $(DIROBJ)\asyn-ares.obj \ - $(DIROBJ)\asyn-thread.obj \ - $(DIROBJ)\axtls.obj \ - $(DIROBJ)\base64.obj \ - $(DIROBJ)\conncache.obj \ - $(DIROBJ)\connect.obj \ - $(DIROBJ)\content_encoding.obj \ - $(DIROBJ)\cookie.obj \ - $(DIROBJ)\curl_addrinfo.obj \ - $(DIROBJ)\curl_des.obj \ - $(DIROBJ)\curl_endian.obj \ - $(DIROBJ)\curl_fnmatch.obj \ - $(DIROBJ)\curl_gethostname.obj \ - $(DIROBJ)\curl_gssapi.obj \ - $(DIROBJ)\curl_memrchr.obj \ - $(DIROBJ)\curl_multibyte.obj \ - $(DIROBJ)\curl_ntlm_core.obj \ - $(DIROBJ)\curl_ntlm_wb.obj \ - $(DIROBJ)\curl_rtmp.obj \ - $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sspi.obj \ - $(DIROBJ)\curl_threads.obj \ - $(DIROBJ)\cyassl.obj \ - $(DIROBJ)\darwinssl.obj \ - $(DIROBJ)\dict.obj \ - $(DIROBJ)\dotdot.obj \ - $(DIROBJ)\easy.obj \ - $(DIROBJ)\escape.obj \ - $(DIROBJ)\file.obj \ - $(DIROBJ)\fileinfo.obj \ - $(DIROBJ)\formdata.obj \ - $(DIROBJ)\ftp.obj \ - $(DIROBJ)\ftplistparser.obj \ - $(DIROBJ)\getenv.obj \ - $(DIROBJ)\getinfo.obj \ - $(DIROBJ)\gopher.obj \ - $(DIROBJ)\gtls.obj \ - $(DIROBJ)\hash.obj \ - $(DIROBJ)\hmac.obj \ - $(DIROBJ)\hostasyn.obj \ - $(DIROBJ)\hostcheck.obj \ - $(DIROBJ)\hostip.obj \ - $(DIROBJ)\hostip4.obj \ - $(DIROBJ)\hostip6.obj \ - $(DIROBJ)\hostsyn.obj \ - $(DIROBJ)\http.obj \ - $(DIROBJ)\http_chunks.obj \ - $(DIROBJ)\http_digest.obj \ - $(DIROBJ)\http_negotiate.obj \ - $(DIROBJ)\http_ntlm.obj \ - $(DIROBJ)\http_proxy.obj \ - $(DIROBJ)\idn_win32.obj \ - $(DIROBJ)\if2ip.obj \ - $(DIROBJ)\imap.obj \ - $(DIROBJ)\inet_ntop.obj \ - $(DIROBJ)\inet_pton.obj \ - $(DIROBJ)\krb5.obj \ - $(DIROBJ)\ldap.obj \ - $(DIROBJ)\llist.obj \ - $(DIROBJ)\md4.obj \ - $(DIROBJ)\md5.obj \ - $(DIROBJ)\memdebug.obj \ - $(DIROBJ)\mprintf.obj \ - $(DIROBJ)\multi.obj \ - $(DIROBJ)\netrc.obj \ - $(DIROBJ)\non-ascii.obj \ - $(DIROBJ)\nonblock.obj \ - $(DIROBJ)\nss.obj \ - $(DIROBJ)\openldap.obj \ - $(DIROBJ)\parsedate.obj \ - $(DIROBJ)\pingpong.obj \ - $(DIROBJ)\pipeline.obj \ - $(DIROBJ)\polarssl.obj \ - $(DIROBJ)\polarssl_threadlock.obj \ - $(DIROBJ)\pop3.obj \ - $(DIROBJ)\progress.obj \ - $(DIROBJ)\strcase.obj \ - $(DIROBJ)\rand.obj \ - $(DIROBJ)\rtsp.obj \ - $(DIROBJ)\schannel.obj \ - $(DIROBJ)\security.obj \ - $(DIROBJ)\select.obj \ - $(DIROBJ)\sendf.obj \ - $(DIROBJ)\share.obj \ - $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ - $(DIROBJ)\smtp.obj \ - $(DIROBJ)\socks.obj \ - $(DIROBJ)\socks_gssapi.obj \ - $(DIROBJ)\socks_sspi.obj \ - $(DIROBJ)\speedcheck.obj \ - $(DIROBJ)\splay.obj \ - $(DIROBJ)\ssh.obj \ - $(DIROBJ)\system_win32.obj \ - $(DIROBJ)\vauth.obj \ - $(DIROBJ)\cleartext.obj \ - $(DIROBJ)\cram.obj \ - $(DIROBJ)\digest.obj \ - $(DIROBJ)\digest_sspi.obj \ - $(DIROBJ)\krb5_gssapi.obj \ - $(DIROBJ)\krb5_sspi.obj \ - $(DIROBJ)\ntlm.obj \ - $(DIROBJ)\ntlm_sspi.obj \ - $(DIROBJ)\oauth2.obj \ - $(DIROBJ)\spnego_gssapi.obj \ - $(DIROBJ)\spnego_sspi.obj \ - $(DIROBJ)\vtls.obj \ - $(DIROBJ)\openssl.obj \ - $(DIROBJ)\strdup.obj \ - $(DIROBJ)\strerror.obj \ - $(DIROBJ)\strtok.obj \ - $(DIROBJ)\strtoofft.obj \ - $(DIROBJ)\telnet.obj \ - $(DIROBJ)\tftp.obj \ - $(DIROBJ)\timeval.obj \ - $(DIROBJ)\transfer.obj \ - $(DIROBJ)\url.obj \ - $(DIROBJ)\version.obj \ - $(DIROBJ)\warnless.obj \ - $(DIROBJ)\wildcard.obj \ - $(DIROBJ)\x509asn1.obj \ - $(RESOURCE) - -all : $(TARGET) - -$(TARGET): $(X_OBJS) - $(LNK) $(LFLAGS) $(X_OBJS) - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y - -xcopy $(DIROBJ)\*.exp . /y - -xcopy $(DIROBJ)\*.pdb . /y - -$(X_OBJS): $(DIROBJ) - -$(DIROBJ): - @if not exist "$(DIROBJ)" mkdir $(DIROBJ) - -.SUFFIXES: .c .obj .res - -{.\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vauth\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vtls\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -debug-dll\libcurl.res \ -debug-dll-ssl-dll\libcurl.res \ -debug-dll-zlib-dll\libcurl.res \ -debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc - -release-dll\libcurl.res \ -release-dll-ssl-dll\libcurl.res \ -release-dll-zlib-dll\libcurl.res \ -release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc -!ENDIF # End of case where a config was provided. diff --git a/lib/Makefile.vc9 b/lib/Makefile.vc9 deleted file mode 100644 index c210649..0000000 --- a/lib/Makefile.vc9 +++ /dev/null @@ -1,691 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-library. - -########################################################################### -# -# Makefile for building libcurl with MSVC9 -# -# Usage: see usage message below -# Should be invoked from \lib directory -# Edit the paths and desired library name -# SSL path is only required if you intend compiling -# with SSL. -# -# This make file leaves the result either a .lib or .dll file -# in the \lib directory. It should be called from the \lib -# directory. -# -# An option would have been to allow the source directory to -# be specified, but I saw no requirement. -# -# Another option would have been to leave the .lib and .dll -# files in the "cfg" directory, but then the make file -# in \src would need to be changed. -# -############################################################## - -# ---------------------------------------------- -# Verify that current subdir is libcurl's 'lib' -# ---------------------------------------------- - -!IF ! EXIST(.\curl_addrinfo.c) -! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory. -! MESSAGE Change to libcurl's 'lib' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC9 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -############################################################# -## Nothing more to do below this line! - -CCNODBG = cl.exe /O2 /DNDEBUG -CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1 -CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" -CFLAGSWINSSL = /DUSE_SCHANNEL -CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include" -CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -CFLAGS = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -CFLAGSLIB = /DCURL_STATICLIB -LNKDLL = link.exe /DLL -LNKLIB = link.exe /lib -LFLAGS = /nologo /machine:$(MACHINE) -SSLLIBS = libeay32.lib ssleay32.lib -WINSSLLIBS = crypt32.lib -ZLIBLIBSDLL = zdll.lib -ZLIBLIBS = zlib.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib -CFLAGS = $(CFLAGS) - -CFGSET = FALSE - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -!IFDEF USE_IPV6 -CFLAGS = $(CFLAGS) /DUSE_IPV6 -!ENDIF - -!IFDEF USE_IDN -CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES -!ENDIF - -############################################################## -# Runtime library configuration - -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - - -###################### -# release - -!IF "$(CFG)" == "release" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl - -!IF "$(CFG)" == "release-ssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl - -!IF "$(CFG)" == "release-winssl" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib - -!IF "$(CFG)" == "release-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-zlib - -!IF "$(CFG)" == "release-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-winssl-zlib - -!IF "$(CFG)" == "release-winssl-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSZLIB) $(WINSSLLIBS) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-ssh2-zlib - -!IF "$(CFG)" == "release-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll - -!IF "$(CFG)" == "release-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-zlib-dll - -!IF "$(CFG)" == "release-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# release-dll - -!IF "$(CFG)" == "release-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll - -!IF "$(CFG)" == "release-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# release-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_REL) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL) -CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug - -!IF "$(CFG)" == "debug" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl - -!IF "$(CFG)" == "debug-ssl" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib - -!IF "$(CFG)" == "debug-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-zlib - -!IF "$(CFG)" == "debug-ssl-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-ssh2-zlib - -!IF "$(CFG)" == "debug-ssl-ssh2-zlib" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32" -LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll - -!IF "$(CFG)" == "debug-ssl-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-zlib-dll - -!IF "$(CFG)" == "debug-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_STA_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB) -CFGSET = TRUE -!ENDIF - -###################### -# debug-dll - -!IF "$(CFG)" == "debug-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -###################### -# debug-dll-ssl-dll-zlib-dll - -!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll" -TARGET = $(LIBCURL_DYN_LIB_DBG) -DIROBJ = $(CFG) -LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)" -LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll" -LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB) -CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) -CFGSET = TRUE -RESOURCE = $(DIROBJ)\libcurl.res -!ENDIF - -####################### -# Usage -# -!IF "$(CFGSET)" == "FALSE" && "$(CFG)" != "" -!MESSAGE Usage: nmake /f makefile.vc9 CFG= -!MESSAGE where is one of: -!MESSAGE release - release static library -!MESSAGE release-ssl - release static library with ssl -!MESSAGE release-zlib - release static library with zlib -!MESSAGE release-ssl-zlib - release static library with ssl and zlib -!MESSAGE release-ssl-ssh2-zlib - release static library with ssl, ssh2 and zlib -!MESSAGE release-ssl-dll - release static library with dynamic ssl -!MESSAGE release-zlib-dll - release static library with dynamic zlib -!MESSAGE release-ssl-dll-zlib-dll - release static library with dynamic ssl and dynamic zlib -!MESSAGE release-dll - release dynamic library -!MESSAGE release-dll-ssl-dll - release dynamic library with dynamic ssl -!MESSAGE release-dll-zlib-dll - release dynamic library with dynamic zlib -!MESSAGE release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib -!MESSAGE debug - debug static library -!MESSAGE debug-ssl - debug static library with ssl -!MESSAGE debug-zlib - debug static library with zlib -!MESSAGE debug-ssl-zlib - debug static library with ssl and zlib -!MESSAGE debug-ssl-ssh2-zlib - debug static library with ssl, ssh2 and zlib -!MESSAGE debug-ssl-dll - debug static library with dynamic ssl -!MESSAGE debug-zlib-dll - debug static library with dynamic zlib -!MESSAGE debug-ssl-dll-zlib-dll - debug static library with dynamic ssl and dynamic zlib -!MESSAGE debug-dll - debug dynamic library -!MESSAGE debug-dll-ssl-dll - debug dynamic library with dynamic ssl -!MESSAGE debug-dll-zlib-dll - debug dynamic library with dynamic zlib1 -!MESSAGE debug-dll-ssl-dll-zlib-dll - debug dynamic library with dynamic ssl and dynamic zlib -!MESSAGE can be left blank in which case all is assumed -!ERROR please choose a valid configuration "$(CFG)" -!ENDIF - -####################### -# Only the clean target can be used if a config was not provided. -# -!IF "$(CFGSET)" == "FALSE" -clean: - @-erase /s *.dll 2> NUL - @-erase /s *.exp 2> NUL - @-erase /s *.idb 2> NUL - @-erase /s *.lib 2> NUL - @-erase /s *.obj 2> NUL - @-erase /s *.pch 2> NUL - @-erase /s *.pdb 2> NUL - @-erase /s *.res 2> NUL -!ELSE -# A config was provided, so the library can be built. -# -X_OBJS= \ - $(DIROBJ)\amigaos.obj \ - $(DIROBJ)\asyn-ares.obj \ - $(DIROBJ)\asyn-thread.obj \ - $(DIROBJ)\axtls.obj \ - $(DIROBJ)\base64.obj \ - $(DIROBJ)\conncache.obj \ - $(DIROBJ)\connect.obj \ - $(DIROBJ)\content_encoding.obj \ - $(DIROBJ)\cookie.obj \ - $(DIROBJ)\curl_addrinfo.obj \ - $(DIROBJ)\curl_des.obj \ - $(DIROBJ)\curl_endian.obj \ - $(DIROBJ)\curl_fnmatch.obj \ - $(DIROBJ)\curl_gethostname.obj \ - $(DIROBJ)\curl_gssapi.obj \ - $(DIROBJ)\curl_memrchr.obj \ - $(DIROBJ)\curl_multibyte.obj \ - $(DIROBJ)\curl_ntlm_core.obj \ - $(DIROBJ)\curl_ntlm_wb.obj \ - $(DIROBJ)\curl_rtmp.obj \ - $(DIROBJ)\curl_sasl.obj \ - $(DIROBJ)\curl_sspi.obj \ - $(DIROBJ)\curl_threads.obj \ - $(DIROBJ)\cyassl.obj \ - $(DIROBJ)\darwinssl.obj \ - $(DIROBJ)\dict.obj \ - $(DIROBJ)\dotdot.obj \ - $(DIROBJ)\easy.obj \ - $(DIROBJ)\escape.obj \ - $(DIROBJ)\file.obj \ - $(DIROBJ)\fileinfo.obj \ - $(DIROBJ)\formdata.obj \ - $(DIROBJ)\ftp.obj \ - $(DIROBJ)\ftplistparser.obj \ - $(DIROBJ)\getenv.obj \ - $(DIROBJ)\getinfo.obj \ - $(DIROBJ)\gopher.obj \ - $(DIROBJ)\gtls.obj \ - $(DIROBJ)\hash.obj \ - $(DIROBJ)\hmac.obj \ - $(DIROBJ)\hostasyn.obj \ - $(DIROBJ)\hostcheck.obj \ - $(DIROBJ)\hostip.obj \ - $(DIROBJ)\hostip4.obj \ - $(DIROBJ)\hostip6.obj \ - $(DIROBJ)\hostsyn.obj \ - $(DIROBJ)\http.obj \ - $(DIROBJ)\http_chunks.obj \ - $(DIROBJ)\http_digest.obj \ - $(DIROBJ)\http_negotiate.obj \ - $(DIROBJ)\http_ntlm.obj \ - $(DIROBJ)\http_proxy.obj \ - $(DIROBJ)\idn_win32.obj \ - $(DIROBJ)\if2ip.obj \ - $(DIROBJ)\imap.obj \ - $(DIROBJ)\inet_ntop.obj \ - $(DIROBJ)\inet_pton.obj \ - $(DIROBJ)\krb5.obj \ - $(DIROBJ)\ldap.obj \ - $(DIROBJ)\llist.obj \ - $(DIROBJ)\md4.obj \ - $(DIROBJ)\md5.obj \ - $(DIROBJ)\memdebug.obj \ - $(DIROBJ)\mprintf.obj \ - $(DIROBJ)\multi.obj \ - $(DIROBJ)\netrc.obj \ - $(DIROBJ)\non-ascii.obj \ - $(DIROBJ)\nonblock.obj \ - $(DIROBJ)\nss.obj \ - $(DIROBJ)\openldap.obj \ - $(DIROBJ)\parsedate.obj \ - $(DIROBJ)\pingpong.obj \ - $(DIROBJ)\pipeline.obj \ - $(DIROBJ)\polarssl.obj \ - $(DIROBJ)\polarssl_threadlock.obj \ - $(DIROBJ)\pop3.obj \ - $(DIROBJ)\progress.obj \ - $(DIROBJ)\strcase.obj \ - $(DIROBJ)\rand.obj \ - $(DIROBJ)\rtsp.obj \ - $(DIROBJ)\schannel.obj \ - $(DIROBJ)\security.obj \ - $(DIROBJ)\select.obj \ - $(DIROBJ)\sendf.obj \ - $(DIROBJ)\share.obj \ - $(DIROBJ)\slist.obj \ - $(DIROBJ)\smb.obj \ - $(DIROBJ)\smtp.obj \ - $(DIROBJ)\socks.obj \ - $(DIROBJ)\socks_gssapi.obj \ - $(DIROBJ)\socks_sspi.obj \ - $(DIROBJ)\speedcheck.obj \ - $(DIROBJ)\splay.obj \ - $(DIROBJ)\ssh.obj \ - $(DIROBJ)\system_win32.obj \ - $(DIROBJ)\vauth.obj \ - $(DIROBJ)\cleartext.obj \ - $(DIROBJ)\cram.obj \ - $(DIROBJ)\digest.obj \ - $(DIROBJ)\digest_sspi.obj \ - $(DIROBJ)\krb5_gssapi.obj \ - $(DIROBJ)\krb5_sspi.obj \ - $(DIROBJ)\ntlm.obj \ - $(DIROBJ)\ntlm_sspi.obj \ - $(DIROBJ)\oauth2.obj \ - $(DIROBJ)\spnego_gssapi.obj \ - $(DIROBJ)\spnego_sspi.obj \ - $(DIROBJ)\vtls.obj \ - $(DIROBJ)\openssl.obj \ - $(DIROBJ)\strdup.obj \ - $(DIROBJ)\strerror.obj \ - $(DIROBJ)\strtok.obj \ - $(DIROBJ)\strtoofft.obj \ - $(DIROBJ)\telnet.obj \ - $(DIROBJ)\tftp.obj \ - $(DIROBJ)\timeval.obj \ - $(DIROBJ)\transfer.obj \ - $(DIROBJ)\url.obj \ - $(DIROBJ)\version.obj \ - $(DIROBJ)\warnless.obj \ - $(DIROBJ)\wildcard.obj \ - $(DIROBJ)\x509asn1.obj \ - $(RESOURCE) - -all : $(TARGET) - -$(TARGET): $(X_OBJS) - $(LNK) $(LFLAGS) $(X_OBJS) - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y - -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y - -xcopy $(DIROBJ)\*.exp . /y - -xcopy $(DIROBJ)\*.pdb . /y - -$(X_OBJS): $(DIROBJ) - -$(DIROBJ): - @if not exist "$(DIROBJ)" mkdir $(DIROBJ) - -.SUFFIXES: .c .obj .res - -{.\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vauth\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -{.\vtls\}.c{$(DIROBJ)\}.obj: - $(CC) $(CFLAGS) /Fo"$@" $< - -debug-dll\libcurl.res \ -debug-dll-ssl-dll\libcurl.res \ -debug-dll-zlib-dll\libcurl.res \ -debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc - -release-dll\libcurl.res \ -release-dll-ssl-dll\libcurl.res \ -release-dll-zlib-dll\libcurl.res \ -release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc - rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc -!ENDIF # End of case where a config was provided. diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index c038c2a..aa581a4 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,9 +22,15 @@ #include "curl_setup.h" -#ifdef HAVE_LIMITS_H +/*********************************************************************** + * Only for ares-enabled builds + * And only for functions that fulfill the asynch resolver backend API + * as defined in asyn.h, nothing else belongs in this file! + **********************************************************************/ + +#ifdef CURLRES_ARES + #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -48,14 +54,6 @@ #define in_addr_t unsigned long #endif -/*********************************************************************** - * Only for ares-enabled builds - * And only for functions that fulfill the asynch resolver backend API - * as defined in asyn.h, nothing else belongs in this file! - **********************************************************************/ - -#ifdef CURLRES_ARES - #include "urldata.h" #include "sendf.h" #include "hostip.h" @@ -232,7 +230,7 @@ int Curl_resolver_getsock(struct connectdata *conn, milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000); if(milli == 0) milli += 10; - Curl_expire_latest(conn->data, milli); + Curl_expire(conn->data, milli, EXPIRE_ASYNC_NAME); return max; } @@ -260,7 +258,7 @@ static int waitperform(struct connectdata *conn, int timeout_ms) bitmask = ares_getsock((ares_channel)data->state.resolver, socks, ARES_GETSOCK_MAXNUM); - for(i=0; i < ARES_GETSOCK_MAXNUM; i++) { + for(i = 0; i < ARES_GETSOCK_MAXNUM; i++) { pfd[i].events = 0; pfd[i].revents = 0; if(ARES_GETSOCK_READABLE(bitmask, i)) { @@ -289,7 +287,7 @@ static int waitperform(struct connectdata *conn, int timeout_ms) ARES_SOCKET_BAD); else { /* move through the descriptors and ask for processing on them */ - for(i=0; i < num; i++) + for(i = 0; i < num; i++) ares_process_fd((ares_channel)data->state.resolver, pfd[i].revents & (POLLRDNORM|POLLIN)? pfd[i].fd:ARES_SOCKET_BAD, @@ -354,18 +352,25 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, { CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; - long timeout; - struct timeval now = Curl_tvnow(); + timediff_t timeout; + struct curltime now = Curl_now(); struct Curl_dns_entry *temp_entry; + if(entry) + *entry = NULL; /* clear on entry */ + timeout = Curl_timeleft(data, &now, TRUE); + if(timeout < 0) { + /* already expired! */ + connclose(conn, "Timed out before name resolve started"); + return CURLE_OPERATION_TIMEDOUT; + } if(!timeout) timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */ /* Wait for the name resolve query to complete. */ - for(;;) { + while(!result) { struct timeval *tvp, tv, store; - long timediff; int itimeout; int timeout_ms; @@ -385,28 +390,30 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, timeout_ms = 1000; waitperform(conn, timeout_ms); - Curl_resolver_is_resolved(conn, &temp_entry); + result = Curl_resolver_is_resolved(conn, &temp_entry); - if(conn->async.done) + if(result || conn->async.done) break; - if(Curl_pgrsUpdate(conn)) { + if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; - timeout = -1; /* trigger the cancel below */ - } else { - struct timeval now2 = Curl_tvnow(); - timediff = Curl_tvdiff(now2, now); /* spent time */ - timeout -= timediff?timediff:1; /* always deduct at least 1 */ + struct curltime now2 = Curl_now(); + timediff_t timediff = Curl_timediff(now2, now); /* spent time */ + if(timediff <= 0) + timeout -= 1; /* always deduct at least 1 */ + else if(timediff > timeout) + timeout = -1; + else + timeout -= (long)timediff; now = now2; /* for next loop */ } - - if(timeout < 0) { - /* our timeout, so we cancel the ares operation */ - ares_cancel((ares_channel)data->state.resolver); - break; - } + if(timeout < 0) + result = CURLE_OPERATION_TIMEDOUT; } + if(result) + /* failure, so we cancel the ares operation */ + ares_cancel((ares_channel)data->state.resolver); /* Operation complete, if the lookup was successful we now have the entry in the cache. */ diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 26a15b1..1ac3fc8 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,11 @@ #include "curl_setup.h" +/*********************************************************************** + * Only for threaded name resolves builds + **********************************************************************/ +#ifdef CURLRES_THREADED + #ifdef HAVE_NETINET_IN_H #include #endif @@ -74,11 +79,6 @@ #include "curl_memory.h" #include "memdebug.h" -/*********************************************************************** - * Only for threaded name resolves builds - **********************************************************************/ -#ifdef CURLRES_THREADED - /* * Curl_resolver_global_init() * Called from curl_global_init() to initialize global resolver environment. @@ -210,6 +210,10 @@ int init_thread_sync_data(struct thread_data * td, tsd->td = td; tsd->port = port; + /* Treat the request as done until the thread actually starts so any early + * cleanup gets done properly. + */ + tsd->done = 1; #ifdef HAVE_GETADDRINFO DEBUGASSERT(hints); tsd->hints = *hints; @@ -380,11 +384,11 @@ static bool init_resolve_thread(struct connectdata *conn, const struct addrinfo *hints) { struct thread_data *td = calloc(1, sizeof(struct thread_data)); - int err = RESOLVER_ENOMEM; + int err = ENOMEM; conn->async.os_specific = (void *)td; if(!td) - goto err_exit; + goto errno_exit; conn->async.port = port; conn->async.done = FALSE; @@ -392,14 +396,20 @@ static bool init_resolve_thread(struct connectdata *conn, conn->async.dns = NULL; td->thread_hnd = curl_thread_t_null; - if(!init_thread_sync_data(td, hostname, port, hints)) - goto err_exit; + if(!init_thread_sync_data(td, hostname, port, hints)) { + conn->async.os_specific = NULL; + free(td); + goto errno_exit; + } free(conn->async.hostname); conn->async.hostname = strdup(hostname); if(!conn->async.hostname) goto err_exit; + /* The thread will set this to 1 when complete. */ + td->tsd.done = 0; + #ifdef HAVE_GETADDRINFO td->thread_hnd = Curl_thread_create(getaddrinfo_thread, &td->tsd); #else @@ -407,9 +417,9 @@ static bool init_resolve_thread(struct connectdata *conn, #endif if(!td->thread_hnd) { -#ifndef _WIN32_WCE + /* The thread never started, so mark it as done here for proper cleanup. */ + td->tsd.done = 1; err = errno; -#endif goto err_exit; } @@ -418,8 +428,8 @@ static bool init_resolve_thread(struct connectdata *conn, err_exit: destroy_async_data(&conn->async); - SET_ERRNO(err); - + errno_exit: + errno = err; return FALSE; } @@ -525,7 +535,8 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, } else { /* poll for name lookup done with exponential backoff up to 250ms */ - time_t elapsed = Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle); + timediff_t elapsed = Curl_timediff(Curl_now(), + data->progress.t_startsingle); if(elapsed < 0) elapsed = 0; @@ -540,7 +551,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, td->poll_interval = 250; td->interval_end = elapsed + td->poll_interval; - Curl_expire(conn->data, td->poll_interval); + Curl_expire(conn->data, td->poll_interval, EXPIRE_ASYNC_NAME); } return CURLE_OK; @@ -594,28 +605,29 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, int *waitp) { struct addrinfo hints; - struct in_addr in; Curl_addrinfo *res; int error; char sbuf[12]; int pf = PF_INET; -#ifdef CURLRES_IPV6 - struct in6_addr in6; -#endif /* CURLRES_IPV6 */ *waitp = 0; /* default to synchronous response */ #ifndef USE_RESOLVE_ON_IPS - /* First check if this is an IPv4 address string */ - if(Curl_inet_pton(AF_INET, hostname, &in) > 0) - /* This is a dotted IP address 123.123.123.123-style */ - return Curl_ip2addr(AF_INET, &in, hostname, port); - + { + struct in_addr in; + /* First check if this is an IPv4 address string */ + if(Curl_inet_pton(AF_INET, hostname, &in) > 0) + /* This is a dotted IP address 123.123.123.123-style */ + return Curl_ip2addr(AF_INET, &in, hostname, port); + } #ifdef CURLRES_IPV6 - /* check if this is an IPv6 address string */ - if(Curl_inet_pton(AF_INET6, hostname, &in6) > 0) - /* This is an IPv6 address literal */ - return Curl_ip2addr(AF_INET6, &in6, hostname, port); + { + struct in6_addr in6; + /* check if this is an IPv6 address string */ + if(Curl_inet_pton(AF_INET6, hostname, &in6) > 0) + /* This is an IPv6 address literal */ + return Curl_ip2addr(AF_INET6, &in6, hostname, port); + } #endif /* CURLRES_IPV6 */ #endif /* !USE_RESOLVE_ON_IPS */ @@ -654,7 +666,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, /* fall-back to blocking version */ infof(conn->data, "init_resolve_thread() failed for %s; %s\n", - hostname, Curl_strerror(conn, ERRNO)); + hostname, Curl_strerror(conn, errno)); error = Curl_getaddrinfo_ex(hostname, sbuf, &hints, &res); if(error) { diff --git a/lib/checksrc.pl b/lib/checksrc.pl index 7857bbf..c86222b 100755 --- a/lib/checksrc.pl +++ b/lib/checksrc.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | @@ -6,7 +6,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 2011 - 2016, Daniel Stenberg, , et al. +# Copyright (C) 2011 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -26,7 +26,7 @@ my $indent = 2; my $warnings; my $errors; -my $supressed; # whitelisted problems +my $suppressed; # whitelisted problems my $file; my $dir="."; my $wlist; @@ -35,10 +35,10 @@ my $verbose; my %whitelist; my %warnings = ( - 'LONGLINE' => "Line longer than $max_column", - 'TABS' => 'TAB characters not allowed', - 'TRAILINGSPACE' => 'Trailing white space on the line', - 'CPPCOMMENTS' => '// comment detected', + 'LONGLINE' => "Line longer than $max_column", + 'TABS' => 'TAB characters not allowed', + 'TRAILINGSPACE' => 'Trailing white space on the line', + 'CPPCOMMENTS' => '// comment detected', 'SPACEBEFOREPAREN' => 'space before an open parenthesis', 'SPACEAFTERPAREN' => 'space after open parenthesis', 'SPACEBEFORECLOSE' => 'space before a close parenthesis', @@ -58,7 +58,11 @@ my %warnings = ( 'OPENCOMMENT' => 'file ended with a /* comment still "open"', 'ASTERISKSPACE' => 'pointer declared with space after asterisk', 'ASTERISKNOSPACE' => 'pointer declared without space before asterisk', - 'ASSIGNWITHINCONDITION' => 'assignment within conditional expression' + 'ASSIGNWITHINCONDITION' => 'assignment within conditional expression', + 'EQUALSNOSPACE' => 'equals sign without following space', + 'NOSPACEEQUALS' => 'equals sign without preceding space', + 'SEMINOSPACE' => 'semicolon without following space', + 'MULTISPACE' => 'multiple spaces used when not suitable', ); sub readwhitelist { @@ -97,7 +101,7 @@ sub checkwarn { } if($nowarn) { - $supressed++; + $suppressed++; if($w) { $swarnings++; } @@ -138,6 +142,16 @@ while(1) { $file = shift @ARGV; next; } + elsif($file =~ /-i([1-9])/) { + $indent = $1 + 0; + $file = shift @ARGV; + next; + } + elsif($file =~ /-m([0-9]+)/) { + $max_column = $1 + 0; + $file = shift @ARGV; + next; + } elsif($file =~ /^(-h|--help)/) { undef $file; last; @@ -152,6 +166,8 @@ if(!$file) { print " -D[DIR] Directory to prepend file names\n"; print " -h Show help output\n"; print " -W[file] Whitelist the given file - ignore all its flaws\n"; + print " -i Indent spaces. Default: 2\n"; + print " -m Maximum line length. Default: 79\n"; print "\nDetects and warns for these problems:\n"; for(sort keys %warnings) { printf (" %-18s: %s\n", $_, $warnings{$_}); @@ -345,6 +361,9 @@ sub scanfile { elsif($3 eq "return") { # return must have a space } + elsif($3 eq "case") { + # case must have a space + } elsif($4 eq "*") { # (* beginning makes the space OK! } @@ -415,7 +434,7 @@ sub scanfile { # There is a quote here, figure out whether the comma is # within a string or '' or not. if($pref =~ /\"/) { - # withing a string + # within a string } elsif($pref =~ /\'$/) { # a single letter @@ -513,7 +532,7 @@ sub scanfile { # check for 'void func() {', but avoid false positives by requiring # both an open and closed parentheses before the open brace - if($l =~ /^((\w).*){\z/) { + if($l =~ /^((\w).*)\{\z/) { my $k = $1; $k =~ s/const *//; $k =~ s/static *//; @@ -523,6 +542,52 @@ sub scanfile { "wrongly placed open brace"); } } + + # check for equals sign without spaces next to it + if($nostr =~ /(.*)\=[a-z0-9]/i) { + checkwarn("EQUALSNOSPACE", + $line, length($1)+1, $file, $ol, + "no space after equals sign"); + } + # check for equals sign without spaces before it + elsif($nostr =~ /(.*)[a-z0-9]\=/i) { + checkwarn("NOSPACEEQUALS", + $line, length($1)+1, $file, $ol, + "no space before equals sign"); + } + + # check for plus signs without spaces next to it + if($nostr =~ /(.*)[^+]\+[a-z0-9]/i) { + checkwarn("PLUSNOSPACE", + $line, length($1)+1, $file, $ol, + "no space after plus sign"); + } + # check for plus sign without spaces before it + elsif($nostr =~ /(.*)[a-z0-9]\+[^+]/i) { + checkwarn("NOSPACEPLUS", + $line, length($1)+1, $file, $ol, + "no space before plus sign"); + } + + # check for semicolons without space next to it + if($nostr =~ /(.*)\;[a-z0-9]/i) { + checkwarn("SEMINOSPACE", + $line, length($1)+1, $file, $ol, + "no space after semilcolon"); + } + + # check for more than one consecutive space before open brace or + # question mark. Skip lines containing strings since they make it hard + # due to artificially getting multiple spaces + if(($l eq $nostr) && + $nostr =~ /^(.*(\S)) + [{?]/i) { + checkwarn("MULTISPACE", + $line, length($1)+1, $file, $ol, + "multiple space"); + print STDERR "L: $l\n"; + print STDERR "nostr: $nostr\n"; + } + $line++; $prevl = $ol; } @@ -543,7 +608,7 @@ sub scanfile { if($errors || $warnings || $verbose) { printf "checksrc: %d errors and %d warnings\n", $errors, $warnings; - if($supressed) { + if($suppressed) { printf "checksrc: %d errors and %d warnings suppressed\n", $serrors, $swarnings; diff --git a/lib/config-dos.h b/lib/config-dos.h index f2c9ff4..ff1ea15 100644 --- a/lib/config-dos.h +++ b/lib/config-dos.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -40,8 +40,10 @@ #define PACKAGE "curl" #define HAVE_ARPA_INET_H 1 +#define HAVE_ASSERT_H 1 #define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 +#define HAVE_FREEADDRINFO 1 #define HAVE_GETADDRINFO 1 #define HAVE_GETNAMEINFO 1 #define HAVE_GETPROTOBYNAME 1 @@ -51,7 +53,6 @@ #define HAVE_IOCTL_FIONBIO 1 #define HAVE_IOCTLSOCKET 1 #define HAVE_IOCTLSOCKET_FIONBIO 1 -#define HAVE_LIMITS_H 1 #define HAVE_LOCALE_H 1 #define HAVE_LONGLONG 1 #define HAVE_MEMORY_H 1 @@ -85,9 +86,11 @@ #define RETSIGTYPE void #define SIZEOF_INT 4 +#define SIZEOF_LONG 4 #define SIZEOF_LONG_DOUBLE 16 #define SIZEOF_SHORT 2 #define SIZEOF_SIZE_T 4 +#define SIZEOF_CURL_OFF_T 4 #define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 diff --git a/lib/config-os400.h b/lib/config-os400.h index fe5b864..7844444 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -403,8 +403,14 @@ /* The size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + /* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 +#define SIZEOF_SIZE_T 4 + +/* The size of `curl_off_t', as computed by sizeof. */ +#define SIZEOF_CURL_OFF_T 8 /* Whether long long constants must be suffixed by LL. */ diff --git a/lib/config-symbian.h b/lib/config-symbian.h index 92983d2..d23de33 100644 --- a/lib/config-symbian.h +++ b/lib/config-symbian.h @@ -318,9 +318,6 @@ /* Define to 1 if you have the `ssl' library (-lssl). */ /*#define HAVE_LIBSSL 1*/ -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - /* if your compiler supports LL */ #define HAVE_LL 1 diff --git a/lib/config-tpf.h b/lib/config-tpf.h index d1714fd..778d983 100644 --- a/lib/config-tpf.h +++ b/lib/config-tpf.h @@ -284,9 +284,6 @@ /* if zlib is available */ /* #undef HAVE_LIBZ */ -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - /* if your compiler supports LL */ #define HAVE_LL 1 @@ -618,6 +615,9 @@ /* The size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 +/* Define to the size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + /* The size of `size_t', as computed by sizeof. */ #define SIZEOF_SIZE_T 8 diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h index 780a4a2..19f2d23 100644 --- a/lib/config-vxworks.h +++ b/lib/config-vxworks.h @@ -384,9 +384,6 @@ /* if zlib is available */ #define HAVE_LIBZ 1 -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - /* if your compiler supports LL */ #define HAVE_LL 1 diff --git a/lib/config-win32.h b/lib/config-win32.h index af7bb1f..fdac6f9 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -61,9 +61,6 @@ /* Define if you have the header file. */ #define HAVE_IO_H 1 -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - /* Define if you have the header file. */ #define HAVE_LOCALE_H 1 @@ -399,6 +396,9 @@ /* Define to the size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 +/* Define to the size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + /* Define to the size of `size_t', as computed by sizeof. */ #if defined(_WIN64) # define SIZEOF_SIZE_T 8 @@ -406,6 +406,9 @@ # define SIZEOF_SIZE_T 4 #endif +/* Define to the size of `curl_off_t', as computed by sizeof. */ +#define SIZEOF_CURL_OFF_T 8 + /* ---------------------------------------------------------------- */ /* BSD-style lwIP TCP/IP stack SPECIFIC */ /* ---------------------------------------------------------------- */ @@ -493,7 +496,7 @@ #define _CRT_NONSTDC_NO_DEPRECATE 1 #endif -/* VS2005 and later dafault size for time_t is 64-bit, unless +/* VS2005 and later default size for time_t is 64-bit, unless _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */ #if defined(_MSC_VER) && (_MSC_VER >= 1400) # ifndef _USE_32BIT_TIME_T @@ -514,7 +517,7 @@ # define VS2008_MIN_TARGET 0x0500 /* The minimum build target for VS2012 is Vista unless Update 1 is installed - and the v110_xp toolset is choosen. */ + and the v110_xp toolset is chosen. */ # if defined(_USING_V110_SDK71_) # define VS2012_MIN_TARGET 0x0501 # else @@ -526,7 +529,7 @@ # define VS2008_DEF_TARGET 0x0501 /* VS2012 default build target is Windows Vista unless Update 1 is installed - and the v110_xp toolset is choosen. */ + and the v110_xp toolset is chosen. */ # if defined(_USING_V110_SDK71_) # define VS2012_DEF_TARGET 0x0501 # else @@ -703,8 +706,11 @@ Vista #endif /* Define to use the Windows crypto library. */ -#if !defined(USE_OPENSSL) && !defined(USE_NSS) #define USE_WIN32_CRYPTO + +/* Define to use Unix sockets. */ +#if defined(_MSC_VER) && _MSC_VER >= 1900 +/* #define USE_UNIX_SOCKETS */ #endif /* ---------------------------------------------------------------- */ diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 3839485..1820522 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -54,9 +54,6 @@ /* Define if you have the header file. */ #define HAVE_IO_H 1 -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - /* Define if you need the malloc.h header header file even with stdlib.h */ #define NEED_MALLOC_H 1 @@ -346,6 +343,9 @@ /* The size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 +/* Define to the size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + /* The size of `size_t', as computed by sizeof. */ #if defined(_WIN64) # define SIZEOF_SIZE_T 8 @@ -379,7 +379,7 @@ #define _CRT_NONSTDC_NO_DEPRECATE 1 #endif -/* VS2005 and later dafault size for time_t is 64-bit, unless */ +/* VS2005 and later default size for time_t is 64-bit, unless */ /* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */ #if defined(_MSC_VER) && (_MSC_VER >= 1400) # ifndef _USE_32BIT_TIME_T diff --git a/lib/conncache.c b/lib/conncache.c index a51c8fd..b8f5444 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -5,8 +5,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012, 2016, Linus Nielsen Feltzing, - * Copyright (C) 2012 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2016, Linus Nielsen Feltzing, + * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -31,11 +31,36 @@ #include "multiif.h" #include "sendf.h" #include "conncache.h" +#include "share.h" +#include "sigpipe.h" +#include "connect.h" + /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" #include "memdebug.h" +#ifdef CURLDEBUG +/* the debug versions of these macros make extra certain that the lock is + never doubly locked or unlocked */ +#define CONN_LOCK(x) if((x)->share) { \ + Curl_share_lock((x), CURL_LOCK_DATA_CONNECT, CURL_LOCK_ACCESS_SINGLE); \ + DEBUGASSERT(!(x)->state.conncache_lock); \ + (x)->state.conncache_lock = TRUE; \ + } + +#define CONN_UNLOCK(x) if((x)->share) { \ + DEBUGASSERT((x)->state.conncache_lock); \ + (x)->state.conncache_lock = FALSE; \ + Curl_share_unlock((x), CURL_LOCK_DATA_CONNECT); \ + } +#else +#define CONN_LOCK(x) if((x)->share) \ + Curl_share_lock((x), CURL_LOCK_DATA_CONNECT, CURL_LOCK_ACCESS_SINGLE) +#define CONN_UNLOCK(x) if((x)->share) \ + Curl_share_unlock((x), CURL_LOCK_DATA_CONNECT) +#endif + static void conn_llist_dtor(void *user, void *element) { struct connectdata *data = element; @@ -56,11 +81,7 @@ static CURLcode bundle_create(struct Curl_easy *data, (*cb_ptr)->num_connections = 0; (*cb_ptr)->multiuse = BUNDLE_UNKNOWN; - (*cb_ptr)->conn_list = Curl_llist_alloc((curl_llist_dtor) conn_llist_dtor); - if(!(*cb_ptr)->conn_list) { - Curl_safefree(*cb_ptr); - return CURLE_OUT_OF_MEMORY; - } + Curl_llist_init(&(*cb_ptr)->conn_list, (curl_llist_dtor) conn_llist_dtor); return CURLE_OK; } @@ -69,22 +90,18 @@ static void bundle_destroy(struct connectbundle *cb_ptr) if(!cb_ptr) return; - if(cb_ptr->conn_list) { - Curl_llist_destroy(cb_ptr->conn_list, NULL); - cb_ptr->conn_list = NULL; - } + Curl_llist_destroy(&cb_ptr->conn_list, NULL); + free(cb_ptr); } /* Add a connection to a bundle */ static CURLcode bundle_add_conn(struct connectbundle *cb_ptr, - struct connectdata *conn) + struct connectdata *conn) { - if(!Curl_llist_insert_next(cb_ptr->conn_list, cb_ptr->conn_list->tail, conn)) - return CURLE_OUT_OF_MEMORY; - + Curl_llist_insert_next(&cb_ptr->conn_list, cb_ptr->conn_list.tail, conn, + &conn->bundle_node); conn->bundle = cb_ptr; - cb_ptr->num_connections++; return CURLE_OK; } @@ -95,10 +112,10 @@ static int bundle_remove_conn(struct connectbundle *cb_ptr, { struct curl_llist_element *curr; - curr = cb_ptr->conn_list->head; + curr = cb_ptr->conn_list.head; while(curr) { if(curr->ptr == conn) { - Curl_llist_remove(cb_ptr->conn_list, curr, NULL); + Curl_llist_remove(&cb_ptr->conn_list, curr, NULL); cb_ptr->num_connections--; conn->bundle = NULL; return 1; /* we removed a handle */ @@ -117,8 +134,23 @@ static void free_bundle_hash_entry(void *freethis) int Curl_conncache_init(struct conncache *connc, int size) { - return Curl_hash_init(&connc->hash, size, Curl_hash_str, - Curl_str_key_compare, free_bundle_hash_entry); + int rc; + + /* allocate a new easy handle to use when closing cached connections */ + connc->closure_handle = curl_easy_init(); + if(!connc->closure_handle) + return 1; /* bad */ + + rc = Curl_hash_init(&connc->hash, size, Curl_hash_str, + Curl_str_key_compare, free_bundle_hash_entry); + if(rc) { + Curl_close(connc->closure_handle); + connc->closure_handle = NULL; + } + else + connc->closure_handle->state.conn_cache = connc; + + return rc; } void Curl_conncache_destroy(struct conncache *connc) @@ -127,8 +159,9 @@ void Curl_conncache_destroy(struct conncache *connc) Curl_hash_destroy(&connc->hash); } -/* returns an allocated key to find a bundle for this connection */ -static char *hashkey(struct connectdata *conn) +/* creates a key to find a bundle for this connection */ +static void hashkey(struct connectdata *conn, char *buf, + size_t len) /* something like 128 is fine */ { const char *hostname; @@ -141,21 +174,54 @@ static char *hashkey(struct connectdata *conn) else hostname = conn->host.name; - return aprintf("%s:%ld", hostname, conn->port); + DEBUGASSERT(len > 32); + + /* put the number first so that the hostname gets cut off if too long */ + snprintf(buf, len, "%ld%s", conn->port, hostname); +} + +void Curl_conncache_unlock(struct connectdata *conn) +{ + CONN_UNLOCK(conn->data); +} + +/* Returns number of connections currently held in the connection cache. + Locks/unlocks the cache itself! +*/ +size_t Curl_conncache_size(struct Curl_easy *data) +{ + size_t num; + CONN_LOCK(data); + num = data->state.conn_cache->num_conn; + CONN_UNLOCK(data); + return num; +} + +/* Returns number of connections currently held in the connections's bundle + Locks/unlocks the cache itself! +*/ +size_t Curl_conncache_bundle_size(struct connectdata *conn) +{ + size_t num; + CONN_LOCK(conn->data); + num = conn->bundle->num_connections; + CONN_UNLOCK(conn->data); + return num; } /* Look up the bundle with all the connections to the same host this - connectdata struct is setup to use. */ + connectdata struct is setup to use. + + **NOTE**: When it returns, it holds the connection cache lock! */ struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn, struct conncache *connc) { struct connectbundle *bundle = NULL; + CONN_LOCK(conn->data); if(connc) { - char *key = hashkey(conn); - if(key) { - bundle = Curl_hash_pick(&connc->hash, key, strlen(key)); - free(key); - } + char key[128]; + hashkey(conn, key, sizeof(key)); + bundle = Curl_hash_pick(&connc->hash, key, strlen(key)); } return bundle; @@ -202,26 +268,24 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc, struct connectbundle *new_bundle = NULL; struct Curl_easy *data = conn->data; + /* *find_bundle() locks the connection cache */ bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache); if(!bundle) { - char *key; int rc; + char key[128]; result = bundle_create(data, &new_bundle); - if(result) - return result; - - key = hashkey(conn); - if(!key) { - bundle_destroy(new_bundle); - return CURLE_OUT_OF_MEMORY; + if(result) { + goto unlock; } + hashkey(conn, key, sizeof(key)); rc = conncache_add_bundle(data->state.conn_cache, key, new_bundle); - free(key); + if(!rc) { bundle_destroy(new_bundle); - return CURLE_OUT_OF_MEMORY; + result = CURLE_OUT_OF_MEMORY; + goto unlock; } bundle = new_bundle; } @@ -230,49 +294,64 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc, if(result) { if(new_bundle) conncache_remove_bundle(data->state.conn_cache, new_bundle); - return result; + goto unlock; } conn->connection_id = connc->next_connection_id++; - connc->num_connections++; + connc->num_conn++; DEBUGF(infof(conn->data, "Added connection %ld. " "The cache now contains %" CURL_FORMAT_CURL_OFF_TU " members\n", - conn->connection_id, (curl_off_t) connc->num_connections)); + conn->connection_id, (curl_off_t) connc->num_conn)); - return CURLE_OK; + unlock: + CONN_UNLOCK(data); + + return result; } -void Curl_conncache_remove_conn(struct conncache *connc, - struct connectdata *conn) +void Curl_conncache_remove_conn(struct connectdata *conn, bool lock) { + struct Curl_easy *data = conn->data; struct connectbundle *bundle = conn->bundle; + struct conncache *connc = data->state.conn_cache; /* The bundle pointer can be NULL, since this function can be called due to a failed connection attempt, before being added to a bundle */ if(bundle) { + if(lock) { + CONN_LOCK(conn->data); + } bundle_remove_conn(bundle, conn); - if(bundle->num_connections == 0) { + if(bundle->num_connections == 0) conncache_remove_bundle(connc, bundle); - } - + conn->bundle = NULL; /* removed from it */ if(connc) { - connc->num_connections--; - + connc->num_conn--; DEBUGF(infof(conn->data, "The cache now contains %" CURL_FORMAT_CURL_OFF_TU " members\n", - (curl_off_t) connc->num_connections)); + (curl_off_t) connc->num_conn)); + } + if(lock) { + CONN_UNLOCK(conn->data); } } } -/* This function iterates the entire connection cache and calls the - function func() with the connection pointer as the first argument - and the supplied 'param' argument as the other, +/* This function iterates the entire connection cache and calls the function + func() with the connection pointer as the first argument and the supplied + 'param' argument as the other. + + The conncache lock is still held when the callback is called. It needs it, + so that it can safely continue traversing the lists once the callback + returns. + + Returns 1 if the loop was aborted due to the callback's return code. Return 0 from func() to continue the loop, return 1 to abort it. */ -void Curl_conncache_foreach(struct conncache *connc, +bool Curl_conncache_foreach(struct Curl_easy *data, + struct conncache *connc, void *param, int (*func)(struct connectdata *conn, void *param)) { @@ -281,8 +360,9 @@ void Curl_conncache_foreach(struct conncache *connc, struct curl_hash_element *he; if(!connc) - return; + return FALSE; + CONN_LOCK(data); Curl_hash_start_iterate(&connc->hash, &iter); he = Curl_hash_next_element(&iter); @@ -292,21 +372,29 @@ void Curl_conncache_foreach(struct conncache *connc, bundle = he->ptr; he = Curl_hash_next_element(&iter); - curr = bundle->conn_list->head; + curr = bundle->conn_list.head; while(curr) { /* Yes, we need to update curr before calling func(), because func() might decide to remove the connection */ struct connectdata *conn = curr->ptr; curr = curr->next; - if(1 == func(conn, param)) - return; + if(1 == func(conn, param)) { + CONN_UNLOCK(data); + return TRUE; + } } } + CONN_UNLOCK(data); + return FALSE; } /* Return the first connection found in the cache. Used when closing all - connections */ + connections. + + NOTE: no locking is done here as this is presumably only done when cleaning + up a cache! +*/ struct connectdata * Curl_conncache_find_first_connection(struct conncache *connc) { @@ -321,7 +409,7 @@ Curl_conncache_find_first_connection(struct conncache *connc) struct curl_llist_element *curr; bundle = he->ptr; - curr = bundle->conn_list->head; + curr = bundle->conn_list.head; if(curr) { return curr->ptr; } @@ -332,6 +420,188 @@ Curl_conncache_find_first_connection(struct conncache *connc) return NULL; } +/* + * Give ownership of a connection back to the connection cache. Might + * disconnect the oldest existing in there to make space. + * + * Return TRUE if stored, FALSE if closed. + */ +bool Curl_conncache_return_conn(struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + + /* data->multi->maxconnects can be negative, deal with it. */ + size_t maxconnects = + (data->multi->maxconnects < 0) ? data->multi->num_easy * 4: + data->multi->maxconnects; + struct connectdata *conn_candidate = NULL; + + if(maxconnects > 0 && + Curl_conncache_size(data) > maxconnects) { + infof(data, "Connection cache is full, closing the oldest one.\n"); + + conn_candidate = Curl_conncache_extract_oldest(data); + + if(conn_candidate) { + /* Set the connection's owner correctly */ + conn_candidate->data = data; + + /* the winner gets the honour of being disconnected */ + (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE); + } + } + CONN_LOCK(data); + conn->inuse = FALSE; /* Mark the connection unused */ + CONN_UNLOCK(data); + + return (conn_candidate == conn) ? FALSE : TRUE; + +} + +/* + * This function finds the connection in the connection bundle that has been + * unused for the longest time. + * + * Does not lock the connection cache! + * + * Returns the pointer to the oldest idle connection, or NULL if none was + * found. + */ +struct connectdata * +Curl_conncache_extract_bundle(struct Curl_easy *data, + struct connectbundle *bundle) +{ + struct curl_llist_element *curr; + timediff_t highscore = -1; + timediff_t score; + struct curltime now; + struct connectdata *conn_candidate = NULL; + struct connectdata *conn; + + (void)data; + + now = Curl_now(); + + curr = bundle->conn_list.head; + while(curr) { + conn = curr->ptr; + + if(!conn->inuse) { + /* Set higher score for the age passed since the connection was used */ + score = Curl_timediff(now, conn->now); + + if(score > highscore) { + highscore = score; + conn_candidate = conn; + } + } + curr = curr->next; + } + if(conn_candidate) { + /* remove it to prevent another thread from nicking it */ + bundle_remove_conn(bundle, conn_candidate); + data->state.conn_cache->num_conn--; + DEBUGF(infof(data, "The cache now contains %" + CURL_FORMAT_CURL_OFF_TU " members\n", + (curl_off_t) data->state.conn_cache->num_conn)); + } + + return conn_candidate; +} + +/* + * This function finds the connection in the connection cache that has been + * unused for the longest time and extracts that from the bundle. + * + * Returns the pointer to the connection, or NULL if none was found. + */ +struct connectdata * +Curl_conncache_extract_oldest(struct Curl_easy *data) +{ + struct conncache *connc = data->state.conn_cache; + struct curl_hash_iterator iter; + struct curl_llist_element *curr; + struct curl_hash_element *he; + timediff_t highscore =- 1; + timediff_t score; + struct curltime now; + struct connectdata *conn_candidate = NULL; + struct connectbundle *bundle; + struct connectbundle *bundle_candidate = NULL; + + now = Curl_now(); + + CONN_LOCK(data); + Curl_hash_start_iterate(&connc->hash, &iter); + + he = Curl_hash_next_element(&iter); + while(he) { + struct connectdata *conn; + + bundle = he->ptr; + + curr = bundle->conn_list.head; + while(curr) { + conn = curr->ptr; + + if(!conn->inuse) { + /* Set higher score for the age passed since the connection was used */ + score = Curl_timediff(now, conn->now); + + if(score > highscore) { + highscore = score; + conn_candidate = conn; + bundle_candidate = bundle; + } + } + curr = curr->next; + } + + he = Curl_hash_next_element(&iter); + } + if(conn_candidate) { + /* remove it to prevent another thread from nicking it */ + bundle_remove_conn(bundle_candidate, conn_candidate); + connc->num_conn--; + DEBUGF(infof(data, "The cache now contains %" + CURL_FORMAT_CURL_OFF_TU " members\n", + (curl_off_t) connc->num_conn)); + } + CONN_UNLOCK(data); + + return conn_candidate; +} + +void Curl_conncache_close_all_connections(struct conncache *connc) +{ + struct connectdata *conn; + + conn = Curl_conncache_find_first_connection(connc); + while(conn) { + SIGPIPE_VARIABLE(pipe_st); + conn->data = connc->closure_handle; + + sigpipe_ignore(conn->data, &pipe_st); + conn->data->easy_conn = NULL; /* clear the easy handle's connection + pointer */ + /* This will remove the connection from the cache */ + connclose(conn, "kill all"); + (void)Curl_disconnect(conn, FALSE); + sigpipe_restore(&pipe_st); + + conn = Curl_conncache_find_first_connection(connc); + } + + if(connc->closure_handle) { + SIGPIPE_VARIABLE(pipe_st); + sigpipe_ignore(connc->closure_handle, &pipe_st); + + Curl_hostcache_clean(connc->closure_handle, + connc->closure_handle->dns.hostcache); + Curl_close(connc->closure_handle); + sigpipe_restore(&pipe_st); + } +} #if 0 /* Useful for debugging the connection cache */ diff --git a/lib/conncache.h b/lib/conncache.h index b1dadf9..d8ad80f 100644 --- a/lib/conncache.h +++ b/lib/conncache.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2015, Daniel Stenberg, , et al. + * Copyright (C) 2015 - 2017, Daniel Stenberg, , et al. * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, * * This software is licensed as described in the file COPYING, which @@ -23,11 +23,19 @@ * ***************************************************************************/ +/* + * All accesses to struct fields and changing of data in the connection cache + * and connectbundles must be done with the conncache LOCKED. The cache might + * be shared. + */ + struct conncache { struct curl_hash hash; - size_t num_connections; + size_t num_conn; long next_connection_id; - struct timeval last_cleanup; + struct curltime last_cleanup; + /* handle used for closing cached connections */ + struct Curl_easy *closure_handle; }; #define BUNDLE_NO_MULTIUSE -1 @@ -38,24 +46,28 @@ struct conncache { struct connectbundle { int multiuse; /* supports multi-use */ size_t num_connections; /* Number of connections in the bundle */ - struct curl_llist *conn_list; /* The connectdata members of the bundle */ + struct curl_llist conn_list; /* The connectdata members of the bundle */ }; +/* returns 1 on error, 0 is fine */ int Curl_conncache_init(struct conncache *, int size); - void Curl_conncache_destroy(struct conncache *connc); /* return the correct bundle, to a host or a proxy */ struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn, struct conncache *connc); +void Curl_conncache_unlock(struct connectdata *conn); +/* returns number of connections currently held in the connection cache */ +size_t Curl_conncache_size(struct Curl_easy *data); +size_t Curl_conncache_bundle_size(struct connectdata *conn); +bool Curl_conncache_return_conn(struct connectdata *conn); CURLcode Curl_conncache_add_conn(struct conncache *connc, struct connectdata *conn); - -void Curl_conncache_remove_conn(struct conncache *connc, - struct connectdata *conn); - -void Curl_conncache_foreach(struct conncache *connc, +void Curl_conncache_remove_conn(struct connectdata *conn, + bool lock); +bool Curl_conncache_foreach(struct Curl_easy *data, + struct conncache *connc, void *param, int (*func)(struct connectdata *conn, void *param)); @@ -63,6 +75,12 @@ void Curl_conncache_foreach(struct conncache *connc, struct connectdata * Curl_conncache_find_first_connection(struct conncache *connc); +struct connectdata * +Curl_conncache_extract_bundle(struct Curl_easy *data, + struct connectbundle *bundle); +struct connectdata * +Curl_conncache_extract_oldest(struct Curl_easy *data); +void Curl_conncache_close_all_connections(struct conncache *connc); void Curl_conncache_print(struct conncache *connc); #endif /* HEADER_CURL_CONNCACHE_H */ diff --git a/lib/connect.c b/lib/connect.c index 524d885..1a27ae1 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,8 +28,10 @@ #ifdef HAVE_SYS_UN_H #include /* for sockaddr_un */ #endif -#ifdef HAVE_NETINET_TCP_H -#include /* for TCP_NODELAY */ +#ifdef HAVE_LINUX_TCP_H +#include +#elif defined(HAVE_NETINET_TCP_H) +#include #endif #ifdef HAVE_SYS_IOCTL_H #include @@ -179,13 +181,13 @@ singleipconnect(struct connectdata *conn, * * @unittest: 1303 */ -time_t Curl_timeleft(struct Curl_easy *data, - struct timeval *nowp, - bool duringconnect) +timediff_t Curl_timeleft(struct Curl_easy *data, + struct curltime *nowp, + bool duringconnect) { int timeout_set = 0; - time_t timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0; - struct timeval now; + timediff_t timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0; + struct curltime now; /* if a timeout is set, use the most restrictive one */ @@ -218,17 +220,17 @@ time_t Curl_timeleft(struct Curl_easy *data, } if(!nowp) { - now = Curl_tvnow(); + now = Curl_now(); nowp = &now; } /* subtract elapsed time */ if(duringconnect) /* since this most recent connect started */ - timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle); + timeout_ms -= Curl_timediff(*nowp, data->progress.t_startsingle); else /* since the entire operation started */ - timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startop); + timeout_ms -= Curl_timediff(*nowp, data->progress.t_startop); if(!timeout_ms) /* avoid returning 0 as that means no timeout! */ return -1; @@ -249,7 +251,7 @@ static CURLcode bindlocal(struct connectdata *conn, struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa; #endif - struct Curl_dns_entry *h=NULL; + struct Curl_dns_entry *h = NULL; unsigned short port = data->set.localport; /* use this port number, 0 for "random" */ /* how many port numbers to try to bind to, increasing one at a time */ @@ -285,6 +287,34 @@ static CURLcode bindlocal(struct connectdata *conn, /* interface */ if(!is_host) { +#ifdef SO_BINDTODEVICE + /* I am not sure any other OSs than Linux that provide this feature, + * and at the least I cannot test. --Ben + * + * This feature allows one to tightly bind the local socket to a + * particular interface. This will force even requests to other + * local interfaces to go out the external interface. + * + * + * Only bind to the interface when specified as interface, not just + * as a hostname or ip address. + * + * interface might be a VRF, eg: vrf-blue, which means it cannot be + * converted to an IP address and would fail Curl_if2ip. Simply try + * to use it straight away. + */ + if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, + dev, (curl_socklen_t)strlen(dev) + 1) == 0) { + /* This is typically "errno 1, error: Operation not permitted" if + * you're not running as root or another suitable privileged + * user. + * If it succeeds it means the parameter was a valid interface and + * not an IP address. Return immediately. + */ + return CURLE_OK; + } +#endif + switch(Curl_if2ip(af, scope, conn->scope_id, dev, myhost, sizeof(myhost))) { case IF2IP_NOT_FOUND: @@ -305,30 +335,6 @@ static CURLcode bindlocal(struct connectdata *conn, infof(data, "Local Interface %s is ip %s using address family %i\n", dev, myhost, af); done = 1; - -#ifdef SO_BINDTODEVICE - /* I am not sure any other OSs than Linux that provide this feature, - * and at the least I cannot test. --Ben - * - * This feature allows one to tightly bind the local socket to a - * particular interface. This will force even requests to other - * local interfaces to go out the external interface. - * - * - * Only bind to the interface when specified as interface, not just - * as a hostname or ip address. - */ - if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, - dev, (curl_socklen_t)strlen(dev)+1) != 0) { - error = SOCKERRNO; - infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s;" - " will do regular bind\n", - dev, error, Curl_strerror(conn, error)); - /* This is typically "errno 1, error: Operation not permitted" if - you're not running as root or another suitable privileged - user */ - } -#endif break; } } @@ -408,6 +414,10 @@ static CURLcode bindlocal(struct connectdata *conn, } if(done < 1) { + /* errorbuf is set false so failf will overwrite any message already in + the error buffer, so the user receives this error message instead of a + generic resolve error. */ + data->state.errorbuf = FALSE; failf(data, "Couldn't bind to '%s'", dev); return CURLE_INTERFACE_FAILED; } @@ -607,9 +617,10 @@ void Curl_persistconninfo(struct connectdata *conn) conn->data->info.conn_local_port = conn->local_port; } -/* retrieves ip address and port from a sockaddr structure */ -static bool getaddressinfo(struct sockaddr *sa, char *addr, - long *port) +/* retrieves ip address and port from a sockaddr structure. + note it calls Curl_inet_ntop which sets errno on fail, not SOCKERRNO. */ +bool Curl_getaddressinfo(struct sockaddr *sa, char *addr, + long *port) { unsigned short us_port; struct sockaddr_in *si = NULL; @@ -654,7 +665,7 @@ static bool getaddressinfo(struct sockaddr *sa, char *addr, addr[0] = '\0'; *port = 0; - + errno = EAFNOSUPPORT; return FALSE; } @@ -672,11 +683,9 @@ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd) return; if(!conn->bits.reuse && !conn->bits.tcp_fastopen) { - int error; - len = sizeof(struct Curl_sockaddr_storage); if(getpeername(sockfd, (struct sockaddr*) &ssrem, &len)) { - error = SOCKERRNO; + int error = SOCKERRNO; failf(data, "getpeername() failed with errno %d: %s", error, Curl_strerror(conn, error)); return; @@ -685,26 +694,24 @@ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd) len = sizeof(struct Curl_sockaddr_storage); memset(&ssloc, 0, sizeof(ssloc)); if(getsockname(sockfd, (struct sockaddr*) &ssloc, &len)) { - error = SOCKERRNO; + int error = SOCKERRNO; failf(data, "getsockname() failed with errno %d: %s", error, Curl_strerror(conn, error)); return; } - if(!getaddressinfo((struct sockaddr*)&ssrem, - conn->primary_ip, &conn->primary_port)) { - error = ERRNO; + if(!Curl_getaddressinfo((struct sockaddr*)&ssrem, + conn->primary_ip, &conn->primary_port)) { failf(data, "ssrem inet_ntop() failed with errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); return; } memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN); - if(!getaddressinfo((struct sockaddr*)&ssloc, - conn->local_ip, &conn->local_port)) { - error = ERRNO; + if(!Curl_getaddressinfo((struct sockaddr*)&ssloc, + conn->local_ip, &conn->local_port)) { failf(data, "ssloc inet_ntop() failed with errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); return; } @@ -724,9 +731,9 @@ CURLcode Curl_is_connected(struct connectdata *conn, { struct Curl_easy *data = conn->data; CURLcode result = CURLE_OK; - time_t allow; + timediff_t allow; int error = 0; - struct timeval now; + struct curltime now; int rc; int i; @@ -740,7 +747,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, return CURLE_OK; } - now = Curl_tvnow(); + now = Curl_now(); /* figure out how long time we have left to connect */ allow = Curl_timeleft(data, &now, TRUE); @@ -751,7 +758,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, return CURLE_OPERATION_TIMEDOUT; } - for(i=0; i<2; i++) { + for(i = 0; i<2; i++) { const int other = i ^ 1; if(conn->tempsock[i] == CURL_SOCKET_BAD) continue; @@ -768,7 +775,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, if(rc == 0) { /* no connection yet */ error = 0; - if(curlx_tvdiff(now, conn->connecttime) >= conn->timeoutms_per_addr) { + if(Curl_timediff(now, conn->connecttime) >= conn->timeoutms_per_addr) { infof(data, "After %ldms connect time, move on!\n", conn->timeoutms_per_addr); error = ETIMEDOUT; @@ -776,7 +783,8 @@ CURLcode Curl_is_connected(struct connectdata *conn, /* should we try another protocol family? */ if(i == 0 && conn->tempaddr[1] == NULL && - curlx_tvdiff(now, conn->connecttime) >= HAPPY_EYEBALLS_TIMEOUT) { + (Curl_timediff(now, conn->connecttime) >= + data->set.happy_eyeballs_timeout)) { trynextip(conn, sockindex, 1); } } @@ -788,6 +796,9 @@ CURLcode Curl_is_connected(struct connectdata *conn, conn->sock[sockindex] = conn->tempsock[i]; conn->ip_addr = conn->tempaddr[i]; conn->tempsock[i] = CURL_SOCKET_BAD; +#ifdef ENABLE_IPV6 + conn->bits.ipv6 = (conn->ip_addr->ai_family == AF_INET6)?TRUE:FALSE; +#endif /* close the other socket, if open */ if(conn->tempsock[other] != CURL_SOCKET_BAD) { @@ -810,8 +821,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, return CURLE_OK; } - else - infof(data, "Connection failed\n"); + infof(data, "Connection failed\n"); } else if(rc & CURL_CSELECT_ERR) (void)verifyconnect(conn->tempsock[i], &error); @@ -880,19 +890,6 @@ void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd) curl_socklen_t onoff = (curl_socklen_t) 1; int level = IPPROTO_TCP; -#if 0 - /* The use of getprotobyname() is disabled since it isn't thread-safe on - numerous systems. On these getprotobyname_r() should be used instead, but - that exists in at least one 4 arg version and one 5 arg version, and - since the proto number rarely changes anyway we now just use the hard - coded number. The "proper" fix would need a configure check for the - correct function much in the same style the gethostbyname_r versions are - detected. */ - struct protoent *pe = getprotobyname("tcp"); - if(pe) - level = pe->p_proto; -#endif - #if defined(CURL_DISABLE_VERBOSE_STRINGS) (void) conn; #endif @@ -917,7 +914,7 @@ void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd) static void nosigpipe(struct connectdata *conn, curl_socket_t sockfd) { - struct Curl_easy *data= conn->data; + struct Curl_easy *data = conn->data; int onoff = 1; if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff, sizeof(onoff)) < 0) @@ -995,6 +992,9 @@ static CURLcode singleipconnect(struct connectdata *conn, char ipaddress[MAX_IPADR_LEN]; long port; bool is_tcp; +#ifdef TCP_FASTOPEN_CONNECT + int optval = 1; +#endif *sockp = CURL_SOCKET_BAD; @@ -1006,12 +1006,11 @@ static CURLcode singleipconnect(struct connectdata *conn, return CURLE_OK; /* store remote address and port used in this connection attempt */ - if(!getaddressinfo((struct sockaddr*)&addr.sa_addr, - ipaddress, &port)) { + if(!Curl_getaddressinfo((struct sockaddr*)&addr.sa_addr, + ipaddress, &port)) { /* malformed address or bug in inet_ntop, try next address */ - error = ERRNO; failf(data, "sa_addr inet_ntop() failed with errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); Curl_closesocket(conn, sockfd); return CURLE_OK; } @@ -1035,9 +1034,11 @@ static CURLcode singleipconnect(struct connectdata *conn, if(data->set.fsockopt) { /* activate callback for setting socket options */ + Curl_set_in_callback(data, true); error = data->set.fsockopt(data->set.sockopt_client, sockfd, CURLSOCKTYPE_IPCXN); + Curl_set_in_callback(data, false); if(error == CURL_SOCKOPT_ALREADY_CONNECTED) isconnected = TRUE; @@ -1069,25 +1070,45 @@ static CURLcode singleipconnect(struct connectdata *conn, /* set socket non-blocking */ (void)curlx_nonblock(sockfd, TRUE); - conn->connecttime = Curl_tvnow(); + conn->connecttime = Curl_now(); if(conn->num_addr > 1) - Curl_expire_latest(data, conn->timeoutms_per_addr); + Curl_expire(data, conn->timeoutms_per_addr, EXPIRE_DNS_PER_NAME); /* Connect TCP sockets, bind UDP */ if(!isconnected && (conn->socktype == SOCK_STREAM)) { if(conn->bits.tcp_fastopen) { -#if defined(CONNECT_DATA_IDEMPOTENT) /* OS X */ - sa_endpoints_t endpoints; - endpoints.sae_srcif = 0; - endpoints.sae_srcaddr = NULL; - endpoints.sae_srcaddrlen = 0; - endpoints.sae_dstaddr = &addr.sa_addr; - endpoints.sae_dstaddrlen = addr.addrlen; - - rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY, - CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT, - NULL, 0, NULL, NULL); -#elif defined(MSG_FASTOPEN) /* Linux */ +#if defined(CONNECT_DATA_IDEMPOTENT) /* Darwin */ +# if defined(HAVE_BUILTIN_AVAILABLE) + /* while connectx function is available since macOS 10.11 / iOS 9, + it did not have the interface declared correctly until + Xcode 9 / macOS SDK 10.13 */ + if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) { + sa_endpoints_t endpoints; + endpoints.sae_srcif = 0; + endpoints.sae_srcaddr = NULL; + endpoints.sae_srcaddrlen = 0; + endpoints.sae_dstaddr = &addr.sa_addr; + endpoints.sae_dstaddrlen = addr.addrlen; + + rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY, + CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT, + NULL, 0, NULL, NULL); + } + else { + rc = connect(sockfd, &addr.sa_addr, addr.addrlen); + } +# else + rc = connect(sockfd, &addr.sa_addr, addr.addrlen); +# endif /* HAVE_BUILTIN_AVAILABLE */ +#elif defined(TCP_FASTOPEN_CONNECT) /* Linux >= 4.11 */ + if(setsockopt(sockfd, IPPROTO_TCP, TCP_FASTOPEN_CONNECT, + (void *)&optval, sizeof(optval)) < 0) + infof(data, "Failed to enable TCP Fast Open on fd %d\n", sockfd); + else + infof(data, "TCP_FASTOPEN_CONNECT set\n"); + + rc = connect(sockfd, &addr.sa_addr, addr.addrlen); +#elif defined(MSG_FASTOPEN) /* old Linux */ if(conn->given->flags & PROTOPT_SSL) rc = connect(sockfd, &addr.sa_addr, addr.addrlen); else @@ -1106,10 +1127,6 @@ static CURLcode singleipconnect(struct connectdata *conn, return CURLE_OK; } -#ifdef ENABLE_IPV6 - conn->bits.ipv6 = (addr.family == AF_INET6)?TRUE:FALSE; -#endif - if(-1 == rc) { switch(error) { case EINPROGRESS: @@ -1154,10 +1171,10 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ const struct Curl_dns_entry *remotehost) { struct Curl_easy *data = conn->data; - struct timeval before = Curl_tvnow(); + struct curltime before = Curl_now(); CURLcode result = CURLE_COULDNT_CONNECT; - time_t timeout_ms = Curl_timeleft(data, &before, TRUE); + timediff_t timeout_ms = Curl_timeleft(data, &before, TRUE); if(timeout_ms < 0) { /* a precaution, no need to continue if time already is up */ @@ -1170,7 +1187,6 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ conn->tempaddr[1] = NULL; conn->tempsock[0] = CURL_SOCKET_BAD; conn->tempsock[1] = CURL_SOCKET_BAD; - Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT); /* Max time for the next connection attempt */ conn->timeoutms_per_addr = @@ -1191,6 +1207,8 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ } data->info.numconnects++; /* to track the number of connections made */ + Curl_expire(conn->data, data->set.happy_eyeballs_timeout, + EXPIRE_HAPPY_EYEBALLS); return CURLE_OK; } @@ -1234,7 +1252,7 @@ curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, find.tofind = data->state.lastconnect; find.found = FALSE; - Curl_conncache_foreach(data->multi_easy? + Curl_conncache_foreach(data, data->multi_easy? &data->multi_easy->conn_cache: &data->multi->conn_cache, &find, conn_is_conn); @@ -1297,8 +1315,12 @@ int Curl_closesocket(struct connectdata *conn, status */ conn->sock_accepted[SECONDARYSOCKET] = FALSE; else { + int rc; Curl_multi_closed(conn, sock); - return conn->fclosesocket(conn->closesocket_client, sock); + Curl_set_in_callback(conn->data, true); + rc = conn->fclosesocket(conn->closesocket_client, sock); + Curl_set_in_callback(conn->data, false); + return rc; } } @@ -1342,14 +1364,14 @@ CURLcode Curl_socket(struct connectdata *conn, addr->family = ai->ai_family; addr->socktype = conn->socktype; - addr->protocol = conn->socktype==SOCK_DGRAM?IPPROTO_UDP:ai->ai_protocol; + addr->protocol = conn->socktype == SOCK_DGRAM?IPPROTO_UDP:ai->ai_protocol; addr->addrlen = ai->ai_addrlen; if(addr->addrlen > sizeof(struct Curl_sockaddr_storage)) addr->addrlen = sizeof(struct Curl_sockaddr_storage); memcpy(&addr->sa_addr, ai->ai_addr, addr->addrlen); - if(data->set.fopensocket) + if(data->set.fopensocket) { /* * If the opensocket callback is set, all the destination address * information is passed to the callback. Depending on this information the @@ -1359,9 +1381,12 @@ CURLcode Curl_socket(struct connectdata *conn, * might have been changed and this 'new' address will actually be used * here to connect. */ + Curl_set_in_callback(data, true); *sockfd = data->set.fopensocket(data->set.opensocket_client, CURLSOCKTYPE_IPCXN, (struct curl_sockaddr *)addr); + Curl_set_in_callback(data, false); + } else /* opensocket callback not set, so simply create the socket now */ *sockfd = socket(addr->family, addr->socktype, addr->protocol); @@ -1386,7 +1411,7 @@ CURLcode Curl_socket(struct connectdata *conn, */ void Curl_conncontrol(struct connectdata *conn, int ctrl /* see defines in header */ -#ifdef DEBUGBUILD +#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) , const char *reason #endif ) diff --git a/lib/connect.h b/lib/connect.h index 5653cb4..193dc63 100644 --- a/lib/connect.h +++ b/lib/connect.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,6 +25,7 @@ #include "nonblock.h" /* for curlx_nonblock(), formerly Curl_nonblock() */ #include "sockaddr.h" +#include "timeval.h" CURLcode Curl_is_connected(struct connectdata *conn, int sockindex, @@ -35,13 +36,11 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* generic function that returns how much time there's left to run, according to the timeouts set */ -time_t Curl_timeleft(struct Curl_easy *data, - struct timeval *nowp, - bool duringconnect); +timediff_t Curl_timeleft(struct Curl_easy *data, + struct curltime *nowp, + bool duringconnect); #define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */ -#define HAPPY_EYEBALLS_TIMEOUT 200 /* milliseconds to wait between - IPv4/IPv6 connection attempts */ /* * Used to extract socket and connectdata struct for the most recent @@ -77,6 +76,11 @@ void Curl_persistconninfo(struct connectdata *conn); int Curl_closesocket(struct connectdata *conn, curl_socket_t sock); /* + * Get presentation format IP address and port from a sockaddr. + */ +bool Curl_getaddressinfo(struct sockaddr *sa, char *addr, long *port); + +/* * The Curl_sockaddr_ex structure is basically libcurl's external API * curl_sockaddr structure with enough space available to directly hold any * protocol-specific address structures. The variable declared here will be @@ -127,16 +131,16 @@ void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd); void Curl_conncontrol(struct connectdata *conn, int closeit -#ifdef DEBUGBUILD +#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) , const char *reason #endif ); -#ifdef DEBUGBUILD +#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) #define streamclose(x,y) Curl_conncontrol(x, CONNCTRL_STREAM, y) #define connclose(x,y) Curl_conncontrol(x, CONNCTRL_CONNECTION, y) #define connkeep(x,y) Curl_conncontrol(x, CONNCTRL_KEEP, y) -#else /* if !CURLDEBUG */ +#else /* if !DEBUGBUILD || CURL_DISABLE_VERBOSE_STRINGS */ #define streamclose(x,y) Curl_conncontrol(x, CONNCTRL_STREAM) #define connclose(x,y) Curl_conncontrol(x, CONNCTRL_CONNECTION) #define connkeep(x,y) Curl_conncontrol(x, CONNCTRL_KEEP) diff --git a/lib/content_encoding.c b/lib/content_encoding.c index c3996a1..2b2188b 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,22 +22,43 @@ #include "curl_setup.h" -#ifdef HAVE_LIBZ - #include "urldata.h" #include +#include + +#ifdef HAVE_ZLIB_H +#include +#ifdef __SYMBIAN32__ +/* zlib pollutes the namespace with this definition */ +#undef WIN32 +#endif +#endif + +#ifdef HAVE_BROTLI +#include +#endif + #include "sendf.h" +#include "http.h" #include "content_encoding.h" #include "strdup.h" +#include "strcase.h" #include "curl_memory.h" #include "memdebug.h" +#define CONTENT_ENCODING_DEFAULT "identity" + +#ifndef CURL_DISABLE_HTTP + +#define DSIZ CURL_MAX_WRITE_SIZE /* buffer size for decompressed data */ + + +#ifdef HAVE_LIBZ + /* Comment this out if zlib is always going to be at least ver. 1.2.0.4 (doing so will reduce code size slightly). */ #define OLD_ZLIB_SUPPORT 1 -#define DSIZ CURL_MAX_WRITE_SIZE /* buffer size for decompressed data */ - #define GZIP_MAGIC_0 0x1f #define GZIP_MAGIC_1 0x8b @@ -49,6 +70,24 @@ #define COMMENT 0x10 /* bit 4 set: file comment present */ #define RESERVED 0xE0 /* bits 5..7: reserved */ +typedef enum { + ZLIB_UNINIT, /* uninitialized */ + ZLIB_INIT, /* initialized */ + ZLIB_INFLATING, /* Inflating started. */ + ZLIB_GZIP_HEADER, /* reading gzip header */ + ZLIB_GZIP_TRAILER, /* reading gzip trailer */ + ZLIB_GZIP_INFLATING, /* inflating gzip stream */ + ZLIB_INIT_GZIP /* initialized in transparent gzip mode */ +} zlibInitState; + +/* Writer parameters. */ +typedef struct { + zlibInitState zlib_init; /* zlib init state */ + uInt trailerlen; /* Remaining trailer byte count. */ + z_stream z; /* State structure for zlib. */ +} zlib_params; + + static voidpf zalloc_cb(voidpf opaque, unsigned int items, unsigned int size) { @@ -79,115 +118,223 @@ process_zlib_error(struct connectdata *conn, z_stream *z) } static CURLcode -exit_zlib(z_stream *z, zlibInitState *zlib_init, CURLcode result) +exit_zlib(struct connectdata *conn, + z_stream *z, zlibInitState *zlib_init, CURLcode result) { - inflateEnd(z); - *zlib_init = ZLIB_UNINIT; + if(*zlib_init == ZLIB_GZIP_HEADER) + Curl_safefree(z->next_in); + + if(*zlib_init != ZLIB_UNINIT) { + if(inflateEnd(z) != Z_OK && result == CURLE_OK) + result = process_zlib_error(conn, z); + *zlib_init = ZLIB_UNINIT; + } + return result; } -static CURLcode -inflate_stream(struct connectdata *conn, - struct SingleRequest *k) +static CURLcode process_trailer(struct connectdata *conn, zlib_params *zp) { - int allow_restart = 1; - z_stream *z = &k->z; /* zlib state structure */ + z_stream *z = &zp->z; + CURLcode result = CURLE_OK; + uInt len = z->avail_in < zp->trailerlen? z->avail_in: zp->trailerlen; + + /* Consume expected trailer bytes. Terminate stream if exhausted. + Issue an error if unexpected bytes follow. */ + + zp->trailerlen -= len; + z->avail_in -= len; + z->next_in += len; + if(z->avail_in) + result = CURLE_WRITE_ERROR; + if(result || !zp->trailerlen) + result = exit_zlib(conn, z, &zp->zlib_init, result); + else { + /* Only occurs for gzip with zlib < 1.2.0.4. */ + zp->zlib_init = ZLIB_GZIP_TRAILER; + } + return result; +} + +static CURLcode inflate_stream(struct connectdata *conn, + contenc_writer *writer, zlibInitState started) +{ + zlib_params *zp = (zlib_params *) &writer->params; + z_stream *z = &zp->z; /* zlib state structure */ uInt nread = z->avail_in; Bytef *orig_in = z->next_in; int status; /* zlib status */ + bool done = FALSE; CURLcode result = CURLE_OK; /* Curl_client_write status */ char *decomp; /* Put the decompressed data here. */ + /* Check state. */ + if(zp->zlib_init != ZLIB_INIT && + zp->zlib_init != ZLIB_INFLATING && + zp->zlib_init != ZLIB_INIT_GZIP && + zp->zlib_init != ZLIB_GZIP_INFLATING) + return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR); + /* Dynamically allocate a buffer for decompression because it's uncommonly large to hold on the stack */ decomp = malloc(DSIZ); - if(decomp == NULL) { - return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY); - } + if(decomp == NULL) + return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); /* because the buffer size is fixed, iteratively decompress and transfer to - the client via client_write. */ - for(;;) { + the client via downstream_write function. */ + while(!done) { + done = TRUE; + /* (re)set buffer for decompressed output for every iteration */ - z->next_out = (Bytef *)decomp; + z->next_out = (Bytef *) decomp; z->avail_out = DSIZ; - status = inflate(z, Z_SYNC_FLUSH); - if(status == Z_OK || status == Z_STREAM_END) { - allow_restart = 0; - if((DSIZ - z->avail_out) && (!k->ignorebody)) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, decomp, - DSIZ - z->avail_out); - /* if !CURLE_OK, clean up, return */ + status = inflate(z, Z_BLOCK); + + /* Flush output data if some. */ + if(z->avail_out != DSIZ) { + if(status == Z_OK || status == Z_STREAM_END) { + zp->zlib_init = started; /* Data started. */ + result = Curl_unencode_write(conn, writer->downstream, decomp, + DSIZ - z->avail_out); if(result) { - free(decomp); - return exit_zlib(z, &k->zlib_init, result); + exit_zlib(conn, z, &zp->zlib_init, result); + break; } } - - /* Done? clean up, return */ - if(status == Z_STREAM_END) { - free(decomp); - if(inflateEnd(z) == Z_OK) - return exit_zlib(z, &k->zlib_init, result); - else - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); - } - - /* Done with these bytes, exit */ - - /* status is always Z_OK at this point! */ - if(z->avail_in == 0) { - free(decomp); - return result; - } } - else if(allow_restart && status == Z_DATA_ERROR) { + + /* Dispatch by inflate() status. */ + switch(status) { + case Z_OK: + /* Always loop: there may be unflushed latched data in zlib state. */ + done = FALSE; + break; + case Z_BUF_ERROR: + /* No more data to flush: just exit loop. */ + break; + case Z_STREAM_END: + result = process_trailer(conn, zp); + break; + case Z_DATA_ERROR: /* some servers seem to not generate zlib headers, so this is an attempt to fix and continue anyway */ - - (void) inflateEnd(z); /* don't care about the return code */ - if(inflateInit2(z, -MAX_WBITS) != Z_OK) { - free(decomp); - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); + if(zp->zlib_init == ZLIB_INIT) { + /* Do not use inflateReset2(): only available since zlib 1.2.3.4. */ + (void) inflateEnd(z); /* don't care about the return code */ + if(inflateInit2(z, -MAX_WBITS) == Z_OK) { + z->next_in = orig_in; + z->avail_in = nread; + zp->zlib_init = ZLIB_INFLATING; + done = FALSE; + break; + } + zp->zlib_init = ZLIB_UNINIT; /* inflateEnd() already called. */ } - z->next_in = orig_in; - z->avail_in = nread; - allow_restart = 0; - continue; - } - else { /* Error; exit loop, handle below */ - free(decomp); - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); + /* FALLTHROUGH */ + default: + result = exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z)); + break; } } - /* Will never get here */ + free(decomp); + + /* We're about to leave this call so the `nread' data bytes won't be seen + again. If we are in a state that would wrongly allow restart in raw mode + at the next call, assume output has already started. */ + if(nread && zp->zlib_init == ZLIB_INIT) + zp->zlib_init = started; /* Cannot restart anymore. */ + + return result; } -CURLcode -Curl_unencode_deflate_write(struct connectdata *conn, - struct SingleRequest *k, - ssize_t nread) + +/* Deflate handler. */ +static CURLcode deflate_init_writer(struct connectdata *conn, + contenc_writer *writer) { - z_stream *z = &k->z; /* zlib state structure */ + zlib_params *zp = (zlib_params *) &writer->params; + z_stream *z = &zp->z; /* zlib state structure */ - /* Initialize zlib? */ - if(k->zlib_init == ZLIB_UNINIT) { - memset(z, 0, sizeof(z_stream)); - z->zalloc = (alloc_func)zalloc_cb; - z->zfree = (free_func)zfree_cb; + if(!writer->downstream) + return CURLE_WRITE_ERROR; - if(inflateInit(z) != Z_OK) - return process_zlib_error(conn, z); - k->zlib_init = ZLIB_INIT; - } + /* Initialize zlib */ + z->zalloc = (alloc_func) zalloc_cb; + z->zfree = (free_func) zfree_cb; + + if(inflateInit(z) != Z_OK) + return process_zlib_error(conn, z); + zp->zlib_init = ZLIB_INIT; + return CURLE_OK; +} + +static CURLcode deflate_unencode_write(struct connectdata *conn, + contenc_writer *writer, + const char *buf, size_t nbytes) +{ + zlib_params *zp = (zlib_params *) &writer->params; + z_stream *z = &zp->z; /* zlib state structure */ /* Set the compressed input when this function is called */ - z->next_in = (Bytef *)k->str; - z->avail_in = (uInt)nread; + z->next_in = (Bytef *) buf; + z->avail_in = (uInt) nbytes; /* Now uncompress the data */ - return inflate_stream(conn, k); + return inflate_stream(conn, writer, ZLIB_INFLATING); +} + +static void deflate_close_writer(struct connectdata *conn, + contenc_writer *writer) +{ + zlib_params *zp = (zlib_params *) &writer->params; + z_stream *z = &zp->z; /* zlib state structure */ + + exit_zlib(conn, z, &zp->zlib_init, CURLE_OK); +} + +static const content_encoding deflate_encoding = { + "deflate", + NULL, + deflate_init_writer, + deflate_unencode_write, + deflate_close_writer, + sizeof(zlib_params) +}; + + +/* Gzip handler. */ +static CURLcode gzip_init_writer(struct connectdata *conn, + contenc_writer *writer) +{ + zlib_params *zp = (zlib_params *) &writer->params; + z_stream *z = &zp->z; /* zlib state structure */ + + if(!writer->downstream) + return CURLE_WRITE_ERROR; + + /* Initialize zlib */ + z->zalloc = (alloc_func) zalloc_cb; + z->zfree = (free_func) zfree_cb; + + if(strcmp(zlibVersion(), "1.2.0.4") >= 0) { + /* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */ + if(inflateInit2(z, MAX_WBITS + 32) != Z_OK) { + return process_zlib_error(conn, z); + } + zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */ + } + else { + /* we must parse the gzip header and trailer ourselves */ + if(inflateInit2(z, -MAX_WBITS) != Z_OK) { + return process_zlib_error(conn, z); + } + zp->trailerlen = 8; /* A CRC-32 and a 32-bit input size (RFC 1952, 2.2) */ + zp->zlib_init = ZLIB_INIT; /* Initial call state */ + } + + return CURLE_OK; } #ifdef OLD_ZLIB_SUPPORT @@ -228,7 +375,7 @@ static enum { extra_len = (data[1] << 8) | data[0]; - if(len < (extra_len+2)) + if(len < (extra_len + 2)) return GZIP_UNDERFLOW; len -= (extra_len + 2); @@ -274,47 +421,25 @@ static enum { } #endif -CURLcode -Curl_unencode_gzip_write(struct connectdata *conn, - struct SingleRequest *k, - ssize_t nread) +static CURLcode gzip_unencode_write(struct connectdata *conn, + contenc_writer *writer, + const char *buf, size_t nbytes) { - z_stream *z = &k->z; /* zlib state structure */ - - /* Initialize zlib? */ - if(k->zlib_init == ZLIB_UNINIT) { - memset(z, 0, sizeof(z_stream)); - z->zalloc = (alloc_func)zalloc_cb; - z->zfree = (free_func)zfree_cb; - - if(strcmp(zlibVersion(), "1.2.0.4") >= 0) { - /* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */ - if(inflateInit2(z, MAX_WBITS+32) != Z_OK) { - return process_zlib_error(conn, z); - } - k->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */ - } - else { - /* we must parse the gzip header ourselves */ - if(inflateInit2(z, -MAX_WBITS) != Z_OK) { - return process_zlib_error(conn, z); - } - k->zlib_init = ZLIB_INIT; /* Initial call state */ - } - } + zlib_params *zp = (zlib_params *) &writer->params; + z_stream *z = &zp->z; /* zlib state structure */ - if(k->zlib_init == ZLIB_INIT_GZIP) { + if(zp->zlib_init == ZLIB_INIT_GZIP) { /* Let zlib handle the gzip decompression entirely */ - z->next_in = (Bytef *)k->str; - z->avail_in = (uInt)nread; + z->next_in = (Bytef *) buf; + z->avail_in = (uInt) nbytes; /* Now uncompress the data */ - return inflate_stream(conn, k); + return inflate_stream(conn, writer, ZLIB_INIT_GZIP); } #ifndef OLD_ZLIB_SUPPORT /* Support for old zlib versions is compiled away and we are running with an old version, so return an error. */ - return exit_zlib(z, &k->zlib_init, CURLE_WRITE_ERROR); + return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR); #else /* This next mess is to get around the potential case where there isn't @@ -327,18 +452,18 @@ Curl_unencode_gzip_write(struct connectdata *conn, * can handle the gzip header themselves. */ - switch(k->zlib_init) { + switch(zp->zlib_init) { /* Skip over gzip header? */ case ZLIB_INIT: { /* Initial call state */ ssize_t hlen; - switch(check_gzip_header((unsigned char *)k->str, nread, &hlen)) { + switch(check_gzip_header((unsigned char *) buf, nbytes, &hlen)) { case GZIP_OK: - z->next_in = (Bytef *)k->str + hlen; - z->avail_in = (uInt)(nread - hlen); - k->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ + z->next_in = (Bytef *) buf + hlen; + z->avail_in = (uInt) (nbytes - hlen); + zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ break; case GZIP_UNDERFLOW: @@ -349,19 +474,19 @@ Curl_unencode_gzip_write(struct connectdata *conn, * the first place, and it's even more unlikely for a transfer to fail * immediately afterwards, it should seldom be a problem. */ - z->avail_in = (uInt)nread; + z->avail_in = (uInt) nbytes; z->next_in = malloc(z->avail_in); if(z->next_in == NULL) { - return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY); + return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); } - memcpy(z->next_in, k->str, z->avail_in); - k->zlib_init = ZLIB_GZIP_HEADER; /* Need more gzip header data state */ + memcpy(z->next_in, buf, z->avail_in); + zp->zlib_init = ZLIB_GZIP_HEADER; /* Need more gzip header data state */ /* We don't have any data to inflate yet */ return CURLE_OK; case GZIP_BAD: default: - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); + return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z)); } } @@ -371,22 +496,22 @@ Curl_unencode_gzip_write(struct connectdata *conn, { /* Need more gzip header data state */ ssize_t hlen; - z->avail_in += (uInt)nread; + z->avail_in += (uInt) nbytes; z->next_in = Curl_saferealloc(z->next_in, z->avail_in); if(z->next_in == NULL) { - return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY); + return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); } /* Append the new block of data to the previous one */ - memcpy(z->next_in + z->avail_in - nread, k->str, nread); + memcpy(z->next_in + z->avail_in - nbytes, buf, nbytes); switch(check_gzip_header(z->next_in, z->avail_in, &hlen)) { case GZIP_OK: /* This is the zlib stream data */ free(z->next_in); /* Don't point into the malloced block since we just freed it */ - z->next_in = (Bytef *)k->str + hlen + nread - z->avail_in; - z->avail_in = (uInt)(z->avail_in - hlen); - k->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ + z->next_in = (Bytef *) buf + hlen + nbytes - z->avail_in; + z->avail_in = (uInt) (z->avail_in - hlen); + zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ break; case GZIP_UNDERFLOW: @@ -395,18 +520,22 @@ Curl_unencode_gzip_write(struct connectdata *conn, case GZIP_BAD: default: - free(z->next_in); - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); + return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z)); } } break; + case ZLIB_GZIP_TRAILER: + z->next_in = (Bytef *) buf; + z->avail_in = (uInt) nbytes; + return process_trailer(conn, zp); + case ZLIB_GZIP_INFLATING: default: /* Inflating stream state */ - z->next_in = (Bytef *)k->str; - z->avail_in = (uInt)nread; + z->next_in = (Bytef *) buf; + z->avail_in = (uInt) nbytes; break; } @@ -416,17 +545,469 @@ Curl_unencode_gzip_write(struct connectdata *conn, } /* We've parsed the header, now uncompress the data */ - return inflate_stream(conn, k); + return inflate_stream(conn, writer, ZLIB_GZIP_INFLATING); #endif } +static void gzip_close_writer(struct connectdata *conn, + contenc_writer *writer) +{ + zlib_params *zp = (zlib_params *) &writer->params; + z_stream *z = &zp->z; /* zlib state structure */ + + exit_zlib(conn, z, &zp->zlib_init, CURLE_OK); +} + +static const content_encoding gzip_encoding = { + "gzip", + "x-gzip", + gzip_init_writer, + gzip_unencode_write, + gzip_close_writer, + sizeof(zlib_params) +}; + +#endif /* HAVE_LIBZ */ + + +#ifdef HAVE_BROTLI + +/* Writer parameters. */ +typedef struct { + BrotliDecoderState *br; /* State structure for brotli. */ +} brotli_params; + + +static CURLcode brotli_map_error(BrotliDecoderErrorCode be) +{ + switch(be) { + case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: + case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: + case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: + case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: + case BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: + case BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: + case BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: + case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: + case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: + case BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: + case BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: + case BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: + case BROTLI_DECODER_ERROR_FORMAT_PADDING_1: + case BROTLI_DECODER_ERROR_FORMAT_PADDING_2: +#ifdef BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY + case BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY: +#endif +#ifdef BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET + case BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: +#endif + case BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: + return CURLE_BAD_CONTENT_ENCODING; + case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: + case BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: + case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: + case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: + case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: + case BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: + return CURLE_OUT_OF_MEMORY; + default: + break; + } + return CURLE_WRITE_ERROR; +} + +static CURLcode brotli_init_writer(struct connectdata *conn, + contenc_writer *writer) +{ + brotli_params *bp = (brotli_params *) &writer->params; + + (void) conn; + + if(!writer->downstream) + return CURLE_WRITE_ERROR; + + bp->br = BrotliDecoderCreateInstance(NULL, NULL, NULL); + return bp->br? CURLE_OK: CURLE_OUT_OF_MEMORY; +} + +static CURLcode brotli_unencode_write(struct connectdata *conn, + contenc_writer *writer, + const char *buf, size_t nbytes) +{ + brotli_params *bp = (brotli_params *) &writer->params; + const uint8_t *src = (const uint8_t *) buf; + char *decomp; + uint8_t *dst; + size_t dstleft; + CURLcode result = CURLE_OK; + BrotliDecoderResult r = BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT; + + if(!bp->br) + return CURLE_WRITE_ERROR; /* Stream already ended. */ + + decomp = malloc(DSIZ); + if(!decomp) + return CURLE_OUT_OF_MEMORY; + + while((nbytes || r == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) && + result == CURLE_OK) { + dst = (uint8_t *) decomp; + dstleft = DSIZ; + r = BrotliDecoderDecompressStream(bp->br, + &nbytes, &src, &dstleft, &dst, NULL); + result = Curl_unencode_write(conn, writer->downstream, + decomp, DSIZ - dstleft); + if(result) + break; + switch(r) { + case BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: + case BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: + break; + case BROTLI_DECODER_RESULT_SUCCESS: + BrotliDecoderDestroyInstance(bp->br); + bp->br = NULL; + if(nbytes) + result = CURLE_WRITE_ERROR; + break; + default: + result = brotli_map_error(BrotliDecoderGetErrorCode(bp->br)); + break; + } + } + free(decomp); + return result; +} + +static void brotli_close_writer(struct connectdata *conn, + contenc_writer *writer) +{ + brotli_params *bp = (brotli_params *) &writer->params; + + (void) conn; + + if(bp->br) { + BrotliDecoderDestroyInstance(bp->br); + bp->br = NULL; + } +} + +static const content_encoding brotli_encoding = { + "br", + NULL, + brotli_init_writer, + brotli_unencode_write, + brotli_close_writer, + sizeof(brotli_params) +}; +#endif + + +/* Identity handler. */ +static CURLcode identity_init_writer(struct connectdata *conn, + contenc_writer *writer) +{ + (void) conn; + return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR; +} + +static CURLcode identity_unencode_write(struct connectdata *conn, + contenc_writer *writer, + const char *buf, size_t nbytes) +{ + return Curl_unencode_write(conn, writer->downstream, buf, nbytes); +} + +static void identity_close_writer(struct connectdata *conn, + contenc_writer *writer) +{ + (void) conn; + (void) writer; +} + +static const content_encoding identity_encoding = { + "identity", + "none", + identity_init_writer, + identity_unencode_write, + identity_close_writer, + 0 +}; + + +/* supported content encodings table. */ +static const content_encoding * const encodings[] = { + &identity_encoding, +#ifdef HAVE_LIBZ + &deflate_encoding, + &gzip_encoding, +#endif +#ifdef HAVE_BROTLI + &brotli_encoding, +#endif + NULL +}; + + +/* Return a list of comma-separated names of supported encodings. */ +char *Curl_all_content_encodings(void) +{ + size_t len = 0; + const content_encoding * const *cep; + const content_encoding *ce; + char *ace; + char *p; + + for(cep = encodings; *cep; cep++) { + ce = *cep; + if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) + len += strlen(ce->name) + 2; + } + + if(!len) + return strdup(CONTENT_ENCODING_DEFAULT); + + ace = malloc(len); + if(ace) { + p = ace; + for(cep = encodings; *cep; cep++) { + ce = *cep; + if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) { + strcpy(p, ce->name); + p += strlen(p); + *p++ = ','; + *p++ = ' '; + } + } + p[-2] = '\0'; + } + + return ace; +} + + +/* Real client writer: no downstream. */ +static CURLcode client_init_writer(struct connectdata *conn, + contenc_writer *writer) +{ + (void) conn; + return writer->downstream? CURLE_WRITE_ERROR: CURLE_OK; +} + +static CURLcode client_unencode_write(struct connectdata *conn, + contenc_writer *writer, + const char *buf, size_t nbytes) +{ + struct Curl_easy *data = conn->data; + struct SingleRequest *k = &data->req; + + (void) writer; + + if(!nbytes || k->ignorebody) + return CURLE_OK; + + return Curl_client_write(conn, CLIENTWRITE_BODY, (char *) buf, nbytes); +} + +static void client_close_writer(struct connectdata *conn, + contenc_writer *writer) +{ + (void) conn; + (void) writer; +} + +static const content_encoding client_encoding = { + NULL, + NULL, + client_init_writer, + client_unencode_write, + client_close_writer, + 0 +}; + + +/* Deferred error dummy writer. */ +static CURLcode error_init_writer(struct connectdata *conn, + contenc_writer *writer) +{ + (void) conn; + return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR; +} + +static CURLcode error_unencode_write(struct connectdata *conn, + contenc_writer *writer, + const char *buf, size_t nbytes) +{ + char *all = Curl_all_content_encodings(); + + (void) writer; + (void) buf; + (void) nbytes; + + if(!all) + return CURLE_OUT_OF_MEMORY; + failf(conn->data, "Unrecognized content encoding type. " + "libcurl understands %s content encodings.", all); + free(all); + return CURLE_BAD_CONTENT_ENCODING; +} + +static void error_close_writer(struct connectdata *conn, + contenc_writer *writer) +{ + (void) conn; + (void) writer; +} + +static const content_encoding error_encoding = { + NULL, + NULL, + error_init_writer, + error_unencode_write, + error_close_writer, + 0 +}; + +/* Create an unencoding writer stage using the given handler. */ +static contenc_writer *new_unencoding_writer(struct connectdata *conn, + const content_encoding *handler, + contenc_writer *downstream) +{ + size_t sz = offsetof(contenc_writer, params) + handler->paramsize; + contenc_writer *writer = (contenc_writer *) malloc(sz); + + if(writer) { + memset(writer, 0, sz); + writer->handler = handler; + writer->downstream = downstream; + if(handler->init_writer(conn, writer)) { + free(writer); + writer = NULL; + } + } + + return writer; +} + +/* Write data using an unencoding writer stack. */ +CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer, + const char *buf, size_t nbytes) +{ + if(!nbytes) + return CURLE_OK; + return writer->handler->unencode_write(conn, writer, buf, nbytes); +} + +/* Close and clean-up the connection's writer stack. */ void Curl_unencode_cleanup(struct connectdata *conn) { struct Curl_easy *data = conn->data; struct SingleRequest *k = &data->req; - z_stream *z = &k->z; - if(k->zlib_init != ZLIB_UNINIT) - (void) exit_zlib(z, &k->zlib_init, CURLE_OK); + contenc_writer *writer = k->writer_stack; + + while(writer) { + k->writer_stack = writer->downstream; + writer->handler->close_writer(conn, writer); + free(writer); + writer = k->writer_stack; + } } -#endif /* HAVE_LIBZ */ +/* Find the content encoding by name. */ +static const content_encoding *find_encoding(const char *name, size_t len) +{ + const content_encoding * const *cep; + const content_encoding *ce; + + for(cep = encodings; *cep; cep++) { + ce = *cep; + if((strncasecompare(name, ce->name, len) && !ce->name[len]) || + (ce->alias && strncasecompare(name, ce->alias, len) && !ce->alias[len])) + return ce; + } + return NULL; +} + +/* Set-up the unencoding stack from the Content-Encoding header value. + * See RFC 7231 section 3.1.2.2. */ +CURLcode Curl_build_unencoding_stack(struct connectdata *conn, + const char *enclist, int maybechunked) +{ + struct Curl_easy *data = conn->data; + struct SingleRequest *k = &data->req; + + do { + const char *name; + size_t namelen; + + /* Parse a single encoding name. */ + while(ISSPACE(*enclist) || *enclist == ',') + enclist++; + + name = enclist; + + for(namelen = 0; *enclist && *enclist != ','; enclist++) + if(!ISSPACE(*enclist)) + namelen = enclist - name + 1; + + /* Special case: chunked encoding is handled at the reader level. */ + if(maybechunked && namelen == 7 && strncasecompare(name, "chunked", 7)) { + k->chunk = TRUE; /* chunks coming our way. */ + Curl_httpchunk_init(conn); /* init our chunky engine. */ + } + else if(namelen) { + const content_encoding *encoding = find_encoding(name, namelen); + contenc_writer *writer; + + if(!k->writer_stack) { + k->writer_stack = new_unencoding_writer(conn, &client_encoding, NULL); + + if(!k->writer_stack) + return CURLE_OUT_OF_MEMORY; + } + + if(!encoding) + encoding = &error_encoding; /* Defer error at stack use. */ + + /* Stack the unencoding stage. */ + writer = new_unencoding_writer(conn, encoding, k->writer_stack); + if(!writer) + return CURLE_OUT_OF_MEMORY; + k->writer_stack = writer; + } + } while(*enclist); + + return CURLE_OK; +} + +#else +/* Stubs for builds without HTTP. */ +CURLcode Curl_build_unencoding_stack(struct connectdata *conn, + const char *enclist, int maybechunked) +{ + (void) conn; + (void) enclist; + (void) maybechunked; + return CURLE_NOT_BUILT_IN; +} + +CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer, + const char *buf, size_t nbytes) +{ + (void) conn; + (void) writer; + (void) buf; + (void) nbytes; + return CURLE_NOT_BUILT_IN; +} + +void Curl_unencode_cleanup(struct connectdata *conn) +{ + (void) conn; +} + +char *Curl_all_content_encodings(void) +{ + return strdup(CONTENT_ENCODING_DEFAULT); /* Satisfy caller. */ +} + +#endif /* CURL_DISABLE_HTTP */ diff --git a/lib/content_encoding.h b/lib/content_encoding.h index 3fadd28..4cd52be 100644 --- a/lib/content_encoding.h +++ b/lib/content_encoding.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,26 +23,33 @@ ***************************************************************************/ #include "curl_setup.h" -/* - * Comma-separated list all supported Content-Encodings ('identity' is implied) - */ -#ifdef HAVE_LIBZ -#define ALL_CONTENT_ENCODINGS "deflate, gzip" -/* force a cleanup */ -void Curl_unencode_cleanup(struct connectdata *conn); -#else -#define ALL_CONTENT_ENCODINGS "identity" -#define Curl_unencode_cleanup(x) Curl_nop_stmt -#endif +/* Decoding writer. */ +typedef struct contenc_writer_s contenc_writer; +typedef struct content_encoding_s content_encoding; + +struct contenc_writer_s { + const content_encoding *handler; /* Encoding handler. */ + contenc_writer *downstream; /* Downstream writer. */ + void *params; /* Encoding-specific storage (variable length). */ +}; -CURLcode Curl_unencode_deflate_write(struct connectdata *conn, - struct SingleRequest *req, - ssize_t nread); +/* Content encoding writer. */ +struct content_encoding_s { + const char *name; /* Encoding name. */ + const char *alias; /* Encoding name alias. */ + CURLcode (*init_writer)(struct connectdata *conn, contenc_writer *writer); + CURLcode (*unencode_write)(struct connectdata *conn, contenc_writer *writer, + const char *buf, size_t nbytes); + void (*close_writer)(struct connectdata *conn, contenc_writer *writer); + size_t paramsize; +}; -CURLcode -Curl_unencode_gzip_write(struct connectdata *conn, - struct SingleRequest *k, - ssize_t nread); +CURLcode Curl_build_unencoding_stack(struct connectdata *conn, + const char *enclist, int maybechunked); +CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer, + const char *buf, size_t nbytes); +void Curl_unencode_cleanup(struct connectdata *conn); +char *Curl_all_content_encodings(void); #endif /* HEADER_CURL_CONTENT_ENCODING_H */ diff --git a/lib/cookie.c b/lib/cookie.c index 9462843..63deee1 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -125,7 +125,7 @@ static bool tailmatch(const char *cooke_domain, const char *hostname) if(hostname_len < cookie_domain_len) return FALSE; - if(!strcasecompare(cooke_domain, hostname+hostname_len-cookie_domain_len)) + if(!strcasecompare(cooke_domain, hostname + hostname_len-cookie_domain_len)) return FALSE; /* A lead char of cookie_domain is not '.'. @@ -309,7 +309,7 @@ static void remove_expired(struct CookieInfo *cookies) while(co) { nx = co->next; if(co->expires && co->expires < now) { - if(co == cookies->cookies) { + if(!pv) { cookies->cookies = co->next; } else { @@ -375,9 +375,8 @@ Curl_cookie_add(struct Curl_easy *data, unless set */ { struct Cookie *clist; - char name[MAX_NAME]; struct Cookie *co; - struct Cookie *lastc=NULL; + struct Cookie *lastc = NULL; time_t now = time(NULL); bool replace_old = FALSE; bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */ @@ -397,17 +396,19 @@ Curl_cookie_add(struct Curl_easy *data, if(httpheader) { /* This line was read off a HTTP-header */ + char name[MAX_NAME]; + char what[MAX_NAME]; const char *ptr; const char *semiptr; - char *what; - what = malloc(MAX_COOKIE_LINE); - if(!what) { + size_t linelength = strlen(lineptr); + if(linelength > MAX_COOKIE_LINE) { + /* discard overly long lines at once */ free(co); return NULL; } - semiptr=strchr(lineptr, ';'); /* first, find a semicolon */ + semiptr = strchr(lineptr, ';'); /* first, find a semicolon */ while(*lineptr && ISBLANK(*lineptr)) lineptr++; @@ -415,9 +416,9 @@ Curl_cookie_add(struct Curl_easy *data, ptr = lineptr; do { /* we have a = pair or a stand-alone word here */ - name[0]=what[0]=0; /* init the buffers */ + name[0] = what[0] = 0; /* init the buffers */ if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;\r\n=] =%" - MAX_COOKIE_LINE_TXT "[^;\r\n]", + MAX_NAME_TXT "[^;\r\n]", name, what)) { /* Use strstore() below to properly deal with received cookie headers that have the same string property set more than once, @@ -425,10 +426,21 @@ Curl_cookie_add(struct Curl_easy *data, const char *whatptr; bool done = FALSE; bool sep; - size_t len=strlen(what); + size_t len = strlen(what); size_t nlen = strlen(name); const char *endofn = &ptr[ nlen ]; + if(nlen >= (MAX_NAME-1) || len >= (MAX_NAME-1) || + ((nlen + len) > MAX_NAME)) { + /* too long individual name or contents, or too long combination of + name + contents. Chrome and Firefox support 4095 or 4096 bytes + combo. */ + freecookie(co); + infof(data, "oversized cookie dropped, name/val %d + %d bytes\n", + nlen, len); + return NULL; + } + /* name ends with a '=' ? */ sep = (*endofn == '=')?TRUE:FALSE; @@ -440,18 +452,18 @@ Curl_cookie_add(struct Curl_easy *data, endofn--; nlen--; } - name[nlen]=0; /* new end of name */ + name[nlen] = 0; /* new end of name */ } } /* Strip off trailing whitespace from the 'what' */ while(len && ISBLANK(what[len-1])) { - what[len-1]=0; + what[len-1] = 0; len--; } /* Skip leading whitespace from the 'what' */ - whatptr=what; + whatptr = what; while(*whatptr && ISBLANK(*whatptr)) whatptr++; @@ -484,6 +496,7 @@ Curl_cookie_add(struct Curl_easy *data, badcookie = TRUE; /* out of memory bad */ break; } + free(co->spath); /* if this is set again */ co->spath = sanitize_cookie_path(co->path); if(!co->spath) { badcookie = TRUE; /* out of memory bad */ @@ -510,7 +523,7 @@ Curl_cookie_add(struct Curl_easy *data, /* check for more dots */ dotp = strchr(whatptr, '.'); if(!dotp && !strcasecompare("localhost", whatptr)) - domain=":"; + domain = ":"; } #endif @@ -525,14 +538,14 @@ Curl_cookie_add(struct Curl_easy *data, break; } if(!is_ip) - co->tailmatch=TRUE; /* we always do that if the domain name was - given */ + co->tailmatch = TRUE; /* we always do that if the domain name was + given */ } else { /* we did not get a tailmatch and then the attempted set domain is not a domain to which the current host belongs. Mark as bad. */ - badcookie=TRUE; + badcookie = TRUE; infof(data, "skipped cookie with bad tailmatch domain: %s\n", whatptr); } @@ -581,26 +594,32 @@ Curl_cookie_add(struct Curl_easy *data, continue; } - ptr=semiptr+1; + ptr = semiptr + 1; while(*ptr && ISBLANK(*ptr)) ptr++; - semiptr=strchr(ptr, ';'); /* now, find the next semicolon */ + semiptr = strchr(ptr, ';'); /* now, find the next semicolon */ if(!semiptr && *ptr) /* There are no more semicolons, but there's a final name=value pair coming up */ - semiptr=strchr(ptr, '\0'); + semiptr = strchr(ptr, '\0'); } while(semiptr); if(co->maxage) { - co->expires = - curlx_strtoofft((*co->maxage=='\"')? - &co->maxage[1]:&co->maxage[0], NULL, 10); - if(CURL_OFF_T_MAX - now < co->expires) - /* avoid overflow */ + CURLofft offt; + offt = curlx_strtoofft((*co->maxage == '\"')? + &co->maxage[1]:&co->maxage[0], NULL, 10, + &co->expires); + if(offt == CURL_OFFT_FLOW) + /* overflow, used max value */ co->expires = CURL_OFF_T_MAX; - else - co->expires += now; + else if(!offt) { + if(CURL_OFF_T_MAX - now < co->expires) + /* would overflow */ + co->expires = CURL_OFF_T_MAX; + else + co->expires += now; + } } else if(co->expirestr) { /* Note that if the date couldn't get parsed for whatever reason, @@ -619,7 +638,7 @@ Curl_cookie_add(struct Curl_easy *data, if(!badcookie && !co->domain) { if(domain) { /* no domain was given in the header line, set the default */ - co->domain=strdup(domain); + co->domain = strdup(domain); if(!co->domain) badcookie = TRUE; } @@ -639,11 +658,11 @@ Curl_cookie_add(struct Curl_easy *data, else endslash = memrchr(path, '/', (size_t)(queryp - path)); if(endslash) { - size_t pathlen = (size_t)(endslash-path+1); /* include ending slash */ - co->path=malloc(pathlen+1); /* one extra for the zero byte */ + size_t pathlen = (size_t)(endslash-path + 1); /* include end slash */ + co->path = malloc(pathlen + 1); /* one extra for the zero byte */ if(co->path) { memcpy(co->path, path, pathlen); - co->path[pathlen]=0; /* zero terminate */ + co->path[pathlen] = 0; /* zero terminate */ co->spath = sanitize_cookie_path(co->path); if(!co->spath) badcookie = TRUE; /* out of memory bad */ @@ -653,8 +672,6 @@ Curl_cookie_add(struct Curl_easy *data, } } - free(what); - if(badcookie || !co->name) { /* we didn't get a cookie name or a bad one, this is an illegal line, bail out */ @@ -668,7 +685,7 @@ Curl_cookie_add(struct Curl_easy *data, reading the odd netscape cookies-file format here */ char *ptr; char *firstptr; - char *tok_buf=NULL; + char *tok_buf = NULL; int fields; /* IE introduced HTTP-only cookies to prevent XSS attacks. Cookies @@ -689,19 +706,19 @@ Curl_cookie_add(struct Curl_easy *data, return NULL; } /* strip off the possible end-of-line characters */ - ptr=strchr(lineptr, '\r'); + ptr = strchr(lineptr, '\r'); if(ptr) - *ptr=0; /* clear it */ - ptr=strchr(lineptr, '\n'); + *ptr = 0; /* clear it */ + ptr = strchr(lineptr, '\n'); if(ptr) - *ptr=0; /* clear it */ + *ptr = 0; /* clear it */ - firstptr=strtok_r(lineptr, "\t", &tok_buf); /* tokenize it on the TAB */ + firstptr = strtok_r(lineptr, "\t", &tok_buf); /* tokenize it on the TAB */ /* Now loop through the fields and init the struct we already have allocated */ - for(ptr=firstptr, fields=0; ptr && !badcookie; - ptr=strtok_r(NULL, "\t", &tok_buf), fields++) { + for(ptr = firstptr, fields = 0; ptr && !badcookie; + ptr = strtok_r(NULL, "\t", &tok_buf), fields++) { switch(fields) { case 0: if(ptr[0]=='.') /* skip preceding dots */ @@ -753,7 +770,8 @@ Curl_cookie_add(struct Curl_easy *data, co->secure = strcasecompare(ptr, "TRUE")?TRUE:FALSE; break; case 4: - co->expires = curlx_strtoofft(ptr, NULL, 10); + if(curlx_strtoofft(ptr, NULL, 10, &co->expires)) + badcookie = TRUE; break; case 5: co->name = strdup(ptr); @@ -828,7 +846,7 @@ Curl_cookie_add(struct Curl_easy *data, if(strcasecompare(clist->domain, co->domain) && (clist->tailmatch == co->tailmatch)) /* The domains are identical */ - replace_old=TRUE; + replace_old = TRUE; } else if(!clist->domain && !co->domain) replace_old = TRUE; @@ -929,9 +947,8 @@ static char *get_line(char *buf, int len, FILE *input) } return b; } - else - /* read a partial, discard the next piece that ends with newline */ - partial = TRUE; + /* read a partial, discard the next piece that ends with newline */ + partial = TRUE; } else break; @@ -958,7 +975,7 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, { struct CookieInfo *c; FILE *fp = NULL; - bool fromfile=TRUE; + bool fromfile = TRUE; char *line = NULL; if(NULL == inc) { @@ -978,7 +995,7 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, if(file && !strcmp(file, "-")) { fp = stdin; - fromfile=FALSE; + fromfile = FALSE; } else if(file && !*file) { /* points to a "" string */ @@ -999,12 +1016,12 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, while(get_line(line, MAX_COOKIE_LINE, fp)) { if(checkprefix("Set-Cookie:", line)) { /* This is a cookie line, get it! */ - lineptr=&line[11]; - headerline=TRUE; + lineptr = &line[11]; + headerline = TRUE; } else { - lineptr=line; - headerline=FALSE; + lineptr = line; + headerline = FALSE; } while(*lineptr && ISBLANK(*lineptr)) lineptr++; @@ -1114,7 +1131,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, struct Cookie *newco; struct Cookie *co; time_t now = time(NULL); - struct Cookie *mainco=NULL; + struct Cookie *mainco = NULL; size_t matches = 0; bool is_ip; @@ -1186,7 +1203,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, co = mainco; - for(i=0; co; co = co->next) + for(i = 0; co; co = co->next) array[i++] = co; /* now sort the cookie pointers in path length order */ @@ -1195,8 +1212,8 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, /* remake the linked list order according to the new order */ mainco = array[0]; /* start here */ - for(i=0; inext = array[i+1]; + for(i = 0; inext = array[i + 1]; array[matches-1]->next = NULL; /* terminate the list */ free(array); /* remove the temporary data again */ @@ -1336,7 +1353,7 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere) { struct Cookie *co; FILE *out; - bool use_stdout=FALSE; + bool use_stdout = FALSE; char *format_ptr; if((NULL == c) || (0 == c->numcookies)) @@ -1350,7 +1367,7 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere) if(!strcmp("-", dumphere)) { /* use stdout */ out = stdout; - use_stdout=TRUE; + use_stdout = TRUE; } else { out = fopen(dumphere, FOPEN_WRITETEXT); @@ -1383,7 +1400,7 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere) return 0; } -struct curl_slist *Curl_cookie_list(struct Curl_easy *data) +static struct curl_slist *cookie_list(struct Curl_easy *data) { struct curl_slist *list = NULL; struct curl_slist *beg; @@ -1414,6 +1431,15 @@ struct curl_slist *Curl_cookie_list(struct Curl_easy *data) return list; } +struct curl_slist *Curl_cookie_list(struct Curl_easy *data) +{ + struct curl_slist *list; + Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); + list = cookie_list(data); + Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); + return list; +} + void Curl_flush_cookies(struct Curl_easy *data, int cleanup) { if(data->set.str[STRING_COOKIEJAR]) { diff --git a/lib/cookie.h b/lib/cookie.h index a9a4578..cb50b71 100644 --- a/lib/cookie.h +++ b/lib/cookie.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -62,13 +62,16 @@ struct CookieInfo { that comprise the cookie non-terminal in the syntax description of the Set-Cookie header)" + We allow max 5000 bytes cookie header. Max 4095 bytes length per cookie + name and value. Name + value may not exceed 4096 bytes. + */ #define MAX_COOKIE_LINE 5000 #define MAX_COOKIE_LINE_TXT "4999" -/* This is the maximum length of a cookie name we deal with: */ -#define MAX_NAME 1024 -#define MAX_NAME_TXT "1023" +/* This is the maximum length of a cookie name or content we deal with: */ +#define MAX_NAME 4096 +#define MAX_NAME_TXT "4095" struct Curl_easy; /* diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index 3dbfb3e..95a3f10 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,6 +27,9 @@ #ifdef HAVE_NETINET_IN_H # include #endif +#ifdef HAVE_NETINET_IN6_H +# include +#endif #ifdef HAVE_NETDB_H # include #endif @@ -47,6 +50,10 @@ # define in_addr_t unsigned long #endif +#if defined(WIN32) && defined(USE_UNIX_SOCKETS) +#include +#endif + #include #include "curl_addrinfo.h" @@ -286,7 +293,7 @@ Curl_he2ai(const struct hostent *he, int port) DEBUGASSERT((he->h_name != NULL) && (he->h_addr_list != NULL)); - for(i=0; (curr = he->h_addr_list[i]) != NULL; i++) { + for(i = 0; (curr = he->h_addr_list[i]) != NULL; i++) { size_t ss_size; #ifdef ENABLE_IPV6 @@ -469,7 +476,7 @@ Curl_addrinfo *Curl_str2addr(char *address, int port) /* This is a dotted IP address 123.123.123.123-style */ return Curl_ip2addr(AF_INET, &in, address, port); #ifdef ENABLE_IPV6 - else { + { struct in6_addr in6; if(Curl_inet_pton(AF_INET6, address, &in6) > 0) /* This is a dotted IPv6 address ::1-style */ @@ -570,9 +577,9 @@ curl_dogetaddrinfo(const char *hostname, int line, const char *source) { #ifdef USE_LWIPSOCK - int res=lwip_getaddrinfo(hostname, service, hints, result); + int res = lwip_getaddrinfo(hostname, service, hints, result); #else - int res=(getaddrinfo)(hostname, service, hints, result); + int res = (getaddrinfo)(hostname, service, hints, result); #endif if(0 == res) /* success */ diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 49c1b8a..e640cc6 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -4,10 +4,13 @@ #cmakedefine BUILDING_LIBCURL 1 /* Location of default ca bundle */ -#cmakedefine CURL_CA_BUNDLE ${CURL_CA_BUNDLE} +#cmakedefine CURL_CA_BUNDLE "${CURL_CA_BUNDLE}" + +/* define "1" to use built-in ca store of TLS backend */ +#cmakedefine CURL_CA_FALLBACK 1 /* Location of default ca path */ -#cmakedefine CURL_CA_PATH ${CURL_CA_PATH} +#cmakedefine CURL_CA_PATH "${CURL_CA_PATH}" /* to disable cookies support */ #cmakedefine CURL_DISABLE_COOKIES 1 @@ -48,9 +51,6 @@ /* to disable RTSP */ #cmakedefine CURL_DISABLE_RTSP 1 -/* to disable RTMP */ -#cmakedefine CURL_DISABLE_RTMP 1 - /* to disable SMB */ #cmakedefine CURL_DISABLE_SMB 1 @@ -79,9 +79,6 @@ /* when not building a shared library */ #cmakedefine CURL_STATICLIB 1 -/* Set to explicitly specify we don't want to use thread-safe functions */ -#cmakedefine DISABLED_THREADSAFE 1 - /* your Entropy Gathering Daemon socket pathname */ #cmakedefine EGD_SOCKET ${EGD_SOCKET} @@ -401,9 +398,6 @@ /* if zlib is available */ #cmakedefine HAVE_LIBZ 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIMITS_H 1 - /* if your compiler supports LL */ #cmakedefine HAVE_LL 1 @@ -891,6 +885,9 @@ /* The size of `off_t', as computed by sizeof. */ #cmakedefine SIZEOF_OFF_T ${SIZEOF_OFF_T} +/* The size of `curl_off_t', as computed by sizeof. */ +#cmakedefine SIZEOF_CURL_OFF_T ${SIZEOF_CURL_OFF_T} + /* The size of `size_t', as computed by sizeof. */ #cmakedefine SIZEOF_SIZE_T ${SIZEOF_SIZE_T} @@ -927,6 +924,9 @@ /* if PolarSSL is enabled */ #cmakedefine USE_POLARSSL 1 +/* if DarwinSSL is enabled */ +#cmakedefine USE_DARWINSSL 1 + /* if mbedTLS is enabled */ #cmakedefine USE_MBEDTLS 1 @@ -966,9 +966,6 @@ /* Version number of package */ #cmakedefine VERSION ${VERSION} -/* Define to avoid automatic inclusion of winsock.h */ -#cmakedefine WIN32_LEAN_AND_MEAN 1 - /* Define to 1 if OS is AIX. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -1000,3 +997,6 @@ /* the signed version of size_t */ #cmakedefine ssize_t ${ssize_t} + +/* Define to 1 if you have the mach_absolute_time function. */ +#cmakedefine HAVE_MACH_ABSOLUTE_TIME 1 diff --git a/lib/curl_config.h.in b/lib/curl_config.h.in index 60e9d23..0f2a804 100644 --- a/lib/curl_config.h.in +++ b/lib/curl_config.h.in @@ -9,6 +9,9 @@ /* Location of default ca path */ #undef CURL_CA_PATH +/* Default SSL backend */ +#undef CURL_DEFAULT_SSL_BACKEND + /* to disable cookies support */ #undef CURL_DISABLE_COOKIES @@ -72,6 +75,9 @@ /* Definition to make a library symbol externally visible. */ #undef CURL_EXTERN_SYMBOL +/* built with multiple SSL backends */ +#undef CURL_WITH_MULTI_SSL + /* your Entropy Gathering Daemon socket pathname */ #undef EGD_SOCKET @@ -126,6 +132,15 @@ /* Define to 1 if using BoringSSL. */ #undef HAVE_BORINGSSL +/* if BROTLI is in use */ +#undef HAVE_BROTLI + +/* Define to 1 if you have the header file. */ +#undef HAVE_BROTLI_DECODE_H + +/* Define to 1 if you have the __builtin_available function. */ +#undef HAVE_BUILTIN_AVAILABLE + /* Define to 1 if you have the clock_gettime function and monotonic timer. */ #undef HAVE_CLOCK_GETTIME_MONOTONIC @@ -180,9 +195,6 @@ /* Define to 1 if you have the fdopen function. */ #undef HAVE_FDOPEN -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - /* Define to 1 if you have the freeaddrinfo function. */ #undef HAVE_FREEADDRINFO @@ -258,9 +270,6 @@ /* Define to 1 if you have the `getppid' function. */ #undef HAVE_GETPPID -/* Define to 1 if you have the `getprotobyname' function. */ -#undef HAVE_GETPROTOBYNAME - /* Define to 1 if you have the `getpwuid' function. */ #undef HAVE_GETPWUID @@ -325,9 +334,6 @@ /* Define to 1 if you have the `if_nametoindex' function. */ #undef HAVE_IF_NAMETOINDEX -/* Define to 1 if you have the `inet_addr' function. */ -#undef HAVE_INET_ADDR - /* Define to 1 if you have the inet_ntoa_r function. */ #undef HAVE_INET_NTOA_R @@ -392,6 +398,9 @@ /* Define to 1 if you have the `ldap_url_parse' function. */ #undef HAVE_LDAP_URL_PARSE +/* Define to 1 if you have the `brotlidec' library (-lbrotlidec). */ +#undef HAVE_LIBBROTLIDEC + /* Define to 1 if you have the header file. */ #undef HAVE_LIBGEN_H @@ -404,20 +413,26 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBRTMP_RTMP_H +/* Define to 1 if you have the `ssh' library (-lssh). */ +#undef HAVE_LIBSSH + /* Define to 1 if you have the `ssh2' library (-lssh2). */ #undef HAVE_LIBSSH2 /* Define to 1 if you have the header file. */ #undef HAVE_LIBSSH2_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBSSH_LIBSSH_H + /* Define to 1 if you have the `ssl' library (-lssl). */ #undef HAVE_LIBSSL /* if zlib is available */ #undef HAVE_LIBZ -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_TCP_H /* if your compiler supports LL */ #undef HAVE_LL @@ -431,6 +446,9 @@ /* Define to 1 if the compiler supports the 'long long' data type. */ #undef HAVE_LONGLONG +/* Define to 1 if you have the `mach_absolute_time' function. */ +#undef HAVE_MACH_ABSOLUTE_TIME + /* Define to 1 if you have the malloc.h header file. */ #undef HAVE_MALLOC_H @@ -446,6 +464,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN6_H + /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H @@ -477,9 +498,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_PEM_H -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_PKCS12_H - /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RSA_H @@ -495,12 +513,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PEM_H -/* Define to 1 if you have the `perror' function. */ -#undef HAVE_PERROR - /* Define to 1 if you have the `pipe' function. */ #undef HAVE_PIPE +/* if you have the PK11_CreateManagedGenericObject function */ +#undef HAVE_PK11_CREATEMANAGEDGENERICOBJECT + /* Define to 1 if you have a working poll function. */ #undef HAVE_POLL @@ -714,8 +732,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H -/* Define to 1 if you have the `uname' function. */ -#undef HAVE_UNAME +/* Define this if time_t is unsigned */ +#undef HAVE_TIME_T_UNSIGNED /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -723,6 +741,9 @@ /* Define to 1 if you have the `utime' function. */ #undef HAVE_UTIME +/* Define to 1 if you have the `utimes' function. */ +#undef HAVE_UTIMES + /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H @@ -876,6 +897,9 @@ /* Define to the function return type for send. */ #undef SEND_TYPE_RETV +/* The size of `curl_off_t', as computed by sizeof. */ +#undef SIZEOF_CURL_OFF_T + /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT @@ -897,9 +921,6 @@ /* The size of `time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T -/* The size of `void*', as computed by sizeof. */ -#undef SIZEOF_VOIDP - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -933,6 +954,9 @@ /* if librtmp is in use */ #undef USE_LIBRTMP +/* if libSSH is in use */ +#undef USE_LIBSSH + /* if libSSH2 is in use */ #undef USE_LIBSSH2 @@ -998,9 +1022,6 @@ /* Define to 1 to provide own prototypes. */ #undef WANT_IDN_PROTOTYPES -/* Define to avoid automatic inclusion of winsock.h */ -#undef WIN32_LEAN_AND_MEAN - /* Define to 1 if OS is AIX. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff --git a/lib/curl_ctype.c b/lib/curl_ctype.c new file mode 100644 index 0000000..4f5abc2 --- /dev/null +++ b/lib/curl_ctype.c @@ -0,0 +1,122 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" + +#undef _U +#define _U (1<<0) /* upper case */ +#undef _L +#define _L (1<<1) /* lower case */ +#undef _N +#define _N (1<<2) /* decimal numerical digit */ +#undef _S +#define _S (1<<3) /* space */ +#undef _P +#define _P (1<<4) /* punctuation */ +#undef _C +#define _C (1<<5) /* control */ +#undef _X +#define _X (1<<6) /* hexadecimal letter */ +#undef _B +#define _B (1<<7) /* blank */ + +static const unsigned char ascii[128] = { + _C, _C, _C, _C, _C, _C, _C, _C, + _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, + _C, _C, _C, _C, _C, _C, _C, _C, + _C, _C, _C, _C, _C, _C, _C, _C, + _S|_B, _P, _P, _P, _P, _P, _P, _P, + _P, _P, _P, _P, _P, _P, _P, _P, + _N, _N, _N, _N, _N, _N, _N, _N, + _N, _N, _P, _P, _P, _P, _P, _P, + _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, + _U, _U, _U, _U, _U, _U, _U, _U, + _U, _U, _U, _U, _U, _U, _U, _U, + _U, _U, _U, _P, _P, _P, _P, _P, + _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, + _L, _L, _L, _L, _L, _L, _L, _L, + _L, _L, _L, _L, _L, _L, _L, _L, + _L, _L, _L, _P, _P, _P, _P, _C +}; + +int Curl_isspace(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & _S); +} + +int Curl_isdigit(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & _N); +} + +int Curl_isalnum(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & (_N|_U|_L)); +} + +int Curl_isxdigit(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & (_N|_X)); +} + +int Curl_isgraph(int c) +{ + if((c < 0) || (c >= 0x80) || (c == ' ')) + return FALSE; + return (ascii[c] & (_N|_X|_U|_L|_P|_S)); +} + +int Curl_isprint(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & (_N|_X|_U|_L|_P|_S)); +} + +int Curl_isalpha(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & (_U|_L)); +} + +int Curl_isupper(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & (_U)); +} + +int Curl_islower(int c) +{ + if((c < 0) || (c >= 0x80)) + return FALSE; + return (ascii[c] & (_L)); +} diff --git a/lib/curl_ctype.h b/lib/curl_ctype.h new file mode 100644 index 0000000..da3bd95 --- /dev/null +++ b/lib/curl_ctype.h @@ -0,0 +1,48 @@ +#ifndef HEADER_CURL_CTYPE_H +#define HEADER_CURL_CTYPE_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +int Curl_isspace(int c); +int Curl_isdigit(int c); +int Curl_isalnum(int c); +int Curl_isxdigit(int c); +int Curl_isgraph(int c); +int Curl_isprint(int c); +int Curl_isalpha(int c); +int Curl_isupper(int c); +int Curl_islower(int c); + +#define ISSPACE(x) (Curl_isspace((int) ((unsigned char)x))) +#define ISDIGIT(x) (Curl_isdigit((int) ((unsigned char)x))) +#define ISALNUM(x) (Curl_isalnum((int) ((unsigned char)x))) +#define ISXDIGIT(x) (Curl_isxdigit((int) ((unsigned char)x))) +#define ISGRAPH(x) (Curl_isgraph((int) ((unsigned char)x))) +#define ISALPHA(x) (Curl_isalpha((int) ((unsigned char)x))) +#define ISPRINT(x) (Curl_isprint((int) ((unsigned char)x))) +#define ISUPPER(x) (Curl_isupper((int) ((unsigned char)x))) +#define ISLOWER(x) (Curl_islower((int) ((unsigned char)x))) +#define ISASCII(x) (((x) >= 0) && ((x) <= 0x80)) +#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \ + (((unsigned char)x) == '\t')) + +#endif /* HEADER_CURL_CTYPE_H */ diff --git a/lib/curl_endian.c b/lib/curl_endian.c index c2d21de..c25db49 100644 --- a/lib/curl_endian.c +++ b/lib/curl_endian.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -62,44 +62,6 @@ unsigned int Curl_read32_le(const unsigned char *buf) ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24); } -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_read64_le() - * - * This function converts a 64-bit integer from the little endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 8 byte buffer. - * - * Returns the integer. - */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_le(const unsigned char *buf) -{ - return ((unsigned long long)buf[0]) | - ((unsigned long long)buf[1] << 8) | - ((unsigned long long)buf[2] << 16) | - ((unsigned long long)buf[3] << 24) | - ((unsigned long long)buf[4] << 32) | - ((unsigned long long)buf[5] << 40) | - ((unsigned long long)buf[6] << 48) | - ((unsigned long long)buf[7] << 56); -} -#else -unsigned __int64 Curl_read64_le(const unsigned char *buf) -{ - return ((unsigned __int64)buf[0]) | ((unsigned __int64)buf[1] << 8) | - ((unsigned __int64)buf[2] << 16) | ((unsigned __int64)buf[3] << 24) | - ((unsigned __int64)buf[4] << 32) | ((unsigned __int64)buf[5] << 40) | - ((unsigned __int64)buf[6] << 48) | ((unsigned __int64)buf[7] << 56); -} -#endif - -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ - /* * Curl_read16_be() * @@ -120,80 +82,6 @@ unsigned short Curl_read16_be(const unsigned char *buf) } /* - * Curl_read32_be() - * - * This function converts a 32-bit integer from the big endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 4 byte buffer. - * - * Returns the integer. - */ -unsigned int Curl_read32_be(const unsigned char *buf) -{ - return ((unsigned int)buf[0] << 24) | ((unsigned int)buf[1] << 16) | - ((unsigned int)buf[2] << 8) | ((unsigned int)buf[3]); -} - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_read64_be() - * - * This function converts a 64-bit integer from the big endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 8 byte buffer. - * - * Returns the integer. - */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_be(const unsigned char *buf) -{ - return ((unsigned long long)buf[0] << 56) | - ((unsigned long long)buf[1] << 48) | - ((unsigned long long)buf[2] << 40) | - ((unsigned long long)buf[3] << 32) | - ((unsigned long long)buf[4] << 24) | - ((unsigned long long)buf[5] << 16) | - ((unsigned long long)buf[6] << 8) | - ((unsigned long long)buf[7]); -} -#else -unsigned __int64 Curl_read64_be(const unsigned char *buf) -{ - return ((unsigned __int64)buf[0] << 56) | ((unsigned __int64)buf[1] << 48) | - ((unsigned __int64)buf[2] << 40) | ((unsigned __int64)buf[3] << 32) | - ((unsigned __int64)buf[4] << 24) | ((unsigned __int64)buf[5] << 16) | - ((unsigned __int64)buf[6] << 8) | ((unsigned __int64)buf[7]); -} -#endif - -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ - -/* - * Curl_write16_le() - * - * This function converts a 16-bit integer from the native endian format, - * to little endian format ready for sending down the wire. - * - * Parameters: - * - * value [in] - The 16-bit integer value. - * buffer [in] - A pointer to the output buffer. - */ -void Curl_write16_le(const short value, unsigned char *buffer) -{ - buffer[0] = (char)(value & 0x00FF); - buffer[1] = (char)((value & 0xFF00) >> 8); -} - -/* * Curl_write32_le() * * This function converts a 32-bit integer from the native endian format, diff --git a/lib/curl_endian.h b/lib/curl_endian.h index 8a2b07a..4f345a6 100644 --- a/lib/curl_endian.h +++ b/lib/curl_endian.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,33 +28,9 @@ unsigned short Curl_read16_le(const unsigned char *buf); /* Converts a 32-bit integer from little endian */ unsigned int Curl_read32_le(const unsigned char *buf); -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer from little endian */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_le(const unsigned char *buf); -#else -unsigned __int64 Curl_read64_le(const unsigned char *buf); -#endif -#endif - /* Converts a 16-bit integer from big endian */ unsigned short Curl_read16_be(const unsigned char *buf); -/* Converts a 32-bit integer from big endian */ -unsigned int Curl_read32_be(const unsigned char *buf); - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer from big endian */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_be(const unsigned char *buf); -#else -unsigned __int64 Curl_read64_be(const unsigned char *buf); -#endif -#endif - -/* Converts a 16-bit integer to little endian */ -void Curl_write16_le(const short value, unsigned char *buffer); - /* Converts a 32-bit integer to little endian */ void Curl_write32_le(const int value, unsigned char *buffer); diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c index e8108bb..0179a4f 100644 --- a/lib/curl_fnmatch.c +++ b/lib/curl_fnmatch.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,14 +47,7 @@ #define CURLFNM_UPPER (CURLFNM_CHARSET_LEN + 10) typedef enum { - CURLFNM_LOOP_DEFAULT = 0, - CURLFNM_LOOP_BACKSLASH -} loop_state; - -typedef enum { CURLFNM_SCHS_DEFAULT = 0, - CURLFNM_SCHS_MAYRANGE, - CURLFNM_SCHS_MAYRANGE2, CURLFNM_SCHS_RIGHTBR, CURLFNM_SCHS_RIGHTBRLEFTBR } setcharset_state; @@ -64,6 +57,13 @@ typedef enum { CURLFNM_PKW_DDOT } parsekey_state; +typedef enum { + CCLASS_OTHER = 0, + CCLASS_DIGIT, + CCLASS_UPPER, + CCLASS_LOWER +} char_class; + #define SETCHARSET_OK 1 #define SETCHARSET_FAIL 0 @@ -81,12 +81,12 @@ static int parsekeyword(unsigned char **pattern, unsigned char *charset) return SETCHARSET_FAIL; switch(state) { case CURLFNM_PKW_INIT: - if(ISALPHA(c) && ISLOWER(c)) + if(ISLOWER(c)) keyword[i] = c; else if(c == ':') state = CURLFNM_PKW_DDOT; else - return 0; + return SETCHARSET_FAIL; break; case CURLFNM_PKW_DDOT: if(c == ']') @@ -123,55 +123,74 @@ static int parsekeyword(unsigned char **pattern, unsigned char *charset) return SETCHARSET_OK; } +/* Return the character class. */ +static char_class charclass(unsigned char c) +{ + if(ISUPPER(c)) + return CCLASS_UPPER; + if(ISLOWER(c)) + return CCLASS_LOWER; + if(ISDIGIT(c)) + return CCLASS_DIGIT; + return CCLASS_OTHER; +} + +/* Include a character or a range in set. */ +static void setcharorrange(unsigned char **pp, unsigned char *charset) +{ + unsigned char *p = (*pp)++; + unsigned char c = *p++; + + charset[c] = 1; + if(ISALNUM(c) && *p++ == '-') { + char_class cc = charclass(c); + unsigned char endrange = *p++; + + if(endrange == '\\') + endrange = *p++; + if(endrange >= c && charclass(endrange) == cc) { + while(c++ != endrange) + if(charclass(c) == cc) /* Chars in class may be not consecutive. */ + charset[c] = 1; + *pp = p; + } + } +} + /* returns 1 (true) if pattern is OK, 0 if is bad ("p" is pattern pointer) */ static int setcharset(unsigned char **p, unsigned char *charset) { setcharset_state state = CURLFNM_SCHS_DEFAULT; - unsigned char rangestart = 0; - unsigned char lastchar = 0; bool something_found = FALSE; unsigned char c; + + memset(charset, 0, CURLFNM_CHSET_SIZE); for(;;) { c = **p; + if(!c) + return SETCHARSET_FAIL; + switch(state) { case CURLFNM_SCHS_DEFAULT: - if(ISALNUM(c)) { /* ASCII value */ - rangestart = c; - charset[c] = 1; - (*p)++; - state = CURLFNM_SCHS_MAYRANGE; - something_found = TRUE; - } - else if(c == ']') { + if(c == ']') { if(something_found) return SETCHARSET_OK; - else - something_found = TRUE; + something_found = TRUE; state = CURLFNM_SCHS_RIGHTBR; charset[c] = 1; (*p)++; } else if(c == '[') { - char c2 = *((*p)+1); - if(c2 == ':') { /* there has to be a keyword */ - (*p) += 2; - if(parsekeyword(p, charset)) { - state = CURLFNM_SCHS_DEFAULT; - } - else - return SETCHARSET_FAIL; - } + unsigned char *pp = *p + 1; + + if(*pp++ == ':' && parsekeyword(&pp, charset)) + *p = pp; else { charset[c] = 1; (*p)++; } something_found = TRUE; } - else if(c == '?' || c == '*') { - something_found = TRUE; - charset[c] = 1; - (*p)++; - } else if(c == '^' || c == '!') { if(!something_found) { if(charset[CURLFNM_NEGATE]) { @@ -187,88 +206,17 @@ static int setcharset(unsigned char **p, unsigned char *charset) } else if(c == '\\') { c = *(++(*p)); - if(ISPRINT((c))) { - something_found = TRUE; - state = CURLFNM_SCHS_MAYRANGE; - charset[c] = 1; - rangestart = c; - (*p)++; - } + if(c) + setcharorrange(p, charset); else - return SETCHARSET_FAIL; - } - else if(c == '\0') { - return SETCHARSET_FAIL; + charset['\\'] = 1; + something_found = TRUE; } else { - charset[c] = 1; - (*p)++; + setcharorrange(p, charset); something_found = TRUE; } break; - case CURLFNM_SCHS_MAYRANGE: - if(c == '-') { - charset[c] = 1; - (*p)++; - lastchar = '-'; - state = CURLFNM_SCHS_MAYRANGE2; - } - else if(c == '[') { - state = CURLFNM_SCHS_DEFAULT; - } - else if(ISALNUM(c)) { - charset[c] = 1; - (*p)++; - } - else if(c == '\\') { - c = *(++(*p)); - if(ISPRINT(c)) { - charset[c] = 1; - (*p)++; - } - else - return SETCHARSET_FAIL; - } - else if(c == ']') { - return SETCHARSET_OK; - } - else - return SETCHARSET_FAIL; - break; - case CURLFNM_SCHS_MAYRANGE2: - if(c == '\\') { - c = *(++(*p)); - if(!ISPRINT(c)) - return SETCHARSET_FAIL; - } - if(c == ']') { - return SETCHARSET_OK; - } - else if(c == '\\') { - c = *(++(*p)); - if(ISPRINT(c)) { - charset[c] = 1; - state = CURLFNM_SCHS_DEFAULT; - (*p)++; - } - else - return SETCHARSET_FAIL; - } - if(c >= rangestart) { - if((ISLOWER(c) && ISLOWER(rangestart)) || - (ISDIGIT(c) && ISDIGIT(rangestart)) || - (ISUPPER(c) && ISUPPER(rangestart))) { - charset[lastchar] = 0; - rangestart++; - while(rangestart++ <= c) - charset[rangestart-1] = 1; - (*p)++; - state = CURLFNM_SCHS_DEFAULT; - } - else - return SETCHARSET_FAIL; - } - break; case CURLFNM_SCHS_RIGHTBR: if(c == '[') { state = CURLFNM_SCHS_RIGHTBRLEFTBR; @@ -278,9 +226,6 @@ static int setcharset(unsigned char **p, unsigned char *charset) else if(c == ']') { return SETCHARSET_OK; } - else if(c == '\0') { - return SETCHARSET_FAIL; - } else if(ISPRINT(c)) { charset[c] = 1; (*p)++; @@ -293,14 +238,11 @@ static int setcharset(unsigned char **p, unsigned char *charset) goto fail; break; case CURLFNM_SCHS_RIGHTBRLEFTBR: - if(c == ']') { + if(c == ']') return SETCHARSET_OK; - } - else { - state = CURLFNM_SCHS_DEFAULT; - charset[c] = 1; - (*p)++; - } + state = CURLFNM_SCHS_DEFAULT; + charset[c] = 1; + (*p)++; break; } } @@ -308,105 +250,96 @@ fail: return SETCHARSET_FAIL; } -static int loop(const unsigned char *pattern, const unsigned char *string) +static int loop(const unsigned char *pattern, const unsigned char *string, + int maxstars) { - loop_state state = CURLFNM_LOOP_DEFAULT; unsigned char *p = (unsigned char *)pattern; unsigned char *s = (unsigned char *)string; unsigned char charset[CURLFNM_CHSET_SIZE] = { 0 }; - int rc = 0; for(;;) { - switch(state) { - case CURLFNM_LOOP_DEFAULT: - if(*p == '*') { - while(*(p+1) == '*') /* eliminate multiple stars */ - p++; - if(*s == '\0' && *(p+1) == '\0') - return CURL_FNMATCH_MATCH; - rc = loop(p + 1, s); /* *.txt matches .txt <=> .txt matches .txt */ - if(rc == CURL_FNMATCH_MATCH) + unsigned char *pp; + + switch(*p) { + case '*': + if(!maxstars) + return CURL_FNMATCH_NOMATCH; + /* Regroup consecutive stars and question marks. This can be done because + '*?*?*' can be expressed as '??*'. */ + for(;;) { + if(*++p == '\0') return CURL_FNMATCH_MATCH; - if(*s) /* let the star eat up one character */ - s++; - else - return CURL_FNMATCH_NOMATCH; - } - else if(*p == '?') { - if(ISPRINT(*s)) { - s++; - p++; + if(*p == '?') { + if(!*s++) + return CURL_FNMATCH_NOMATCH; } - else if(*s == '\0') - return CURL_FNMATCH_NOMATCH; - else - return CURL_FNMATCH_FAIL; /* cannot deal with other character */ + else if(*p != '*') + break; } - else if(*p == '\0') { - if(*s == '\0') + /* Skip string characters until we find a match with pattern suffix. */ + for(maxstars--; *s; s++) { + if(loop(p, s, maxstars) == CURL_FNMATCH_MATCH) return CURL_FNMATCH_MATCH; - else - return CURL_FNMATCH_NOMATCH; } - else if(*p == '\\') { - state = CURLFNM_LOOP_BACKSLASH; + return CURL_FNMATCH_NOMATCH; + case '?': + if(!*s) + return CURL_FNMATCH_NOMATCH; + s++; + p++; + break; + case '\0': + return *s? CURL_FNMATCH_NOMATCH: CURL_FNMATCH_MATCH; + case '\\': + if(p[1]) p++; - } - else if(*p == '[') { - unsigned char *pp = p+1; /* cannot handle with pointer to register */ - if(setcharset(&pp, charset)) { - int found = FALSE; - if(charset[(unsigned int)*s]) - found = TRUE; - else if(charset[CURLFNM_ALNUM]) - found = ISALNUM(*s); - else if(charset[CURLFNM_ALPHA]) - found = ISALPHA(*s); - else if(charset[CURLFNM_DIGIT]) - found = ISDIGIT(*s); - else if(charset[CURLFNM_XDIGIT]) - found = ISXDIGIT(*s); - else if(charset[CURLFNM_PRINT]) - found = ISPRINT(*s); - else if(charset[CURLFNM_SPACE]) - found = ISSPACE(*s); - else if(charset[CURLFNM_UPPER]) - found = ISUPPER(*s); - else if(charset[CURLFNM_LOWER]) - found = ISLOWER(*s); - else if(charset[CURLFNM_BLANK]) - found = ISBLANK(*s); - else if(charset[CURLFNM_GRAPH]) - found = ISGRAPH(*s); + if(*s++ != *p++) + return CURL_FNMATCH_NOMATCH; + break; + case '[': + pp = p + 1; /* Copy in case of syntax error in set. */ + if(setcharset(&pp, charset)) { + int found = FALSE; + if(!*s) + return CURL_FNMATCH_NOMATCH; + if(charset[(unsigned int)*s]) + found = TRUE; + else if(charset[CURLFNM_ALNUM]) + found = ISALNUM(*s); + else if(charset[CURLFNM_ALPHA]) + found = ISALPHA(*s); + else if(charset[CURLFNM_DIGIT]) + found = ISDIGIT(*s); + else if(charset[CURLFNM_XDIGIT]) + found = ISXDIGIT(*s); + else if(charset[CURLFNM_PRINT]) + found = ISPRINT(*s); + else if(charset[CURLFNM_SPACE]) + found = ISSPACE(*s); + else if(charset[CURLFNM_UPPER]) + found = ISUPPER(*s); + else if(charset[CURLFNM_LOWER]) + found = ISLOWER(*s); + else if(charset[CURLFNM_BLANK]) + found = ISBLANK(*s); + else if(charset[CURLFNM_GRAPH]) + found = ISGRAPH(*s); - if(charset[CURLFNM_NEGATE]) - found = !found; + if(charset[CURLFNM_NEGATE]) + found = !found; - if(found) { - p = pp+1; - s++; - memset(charset, 0, CURLFNM_CHSET_SIZE); - } - else - return CURL_FNMATCH_NOMATCH; - } - else - return CURL_FNMATCH_FAIL; - } - else { - if(*p++ != *s++) + if(!found) return CURL_FNMATCH_NOMATCH; + p = pp + 1; + s++; + break; } - break; - case CURLFNM_LOOP_BACKSLASH: - if(ISPRINT(*p)) { - if(*p++ == *s++) - state = CURLFNM_LOOP_DEFAULT; - else - return CURL_FNMATCH_NOMATCH; - } - else - return CURL_FNMATCH_FAIL; + + /* Syntax error in set: this must be taken as a regular character. */ + /* FALLTHROUGH */ + default: + if(*p++ != *s++) + return CURL_FNMATCH_NOMATCH; break; } } @@ -422,5 +355,5 @@ int Curl_fnmatch(void *ptr, const char *pattern, const char *string) if(!pattern || !string) { return CURL_FNMATCH_FAIL; } - return loop((unsigned char *)pattern, (unsigned char *)string); + return loop((unsigned char *)pattern, (unsigned char *)string, 5); } diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c index 83f3fa0..f007986 100644 --- a/lib/curl_gssapi.c +++ b/lib/curl_gssapi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2011 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2011 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,6 +27,11 @@ #include "curl_gssapi.h" #include "sendf.h" +/* The last 3 #include files should be in this order */ +#include "curl_printf.h" +#include "curl_memory.h" +#include "memdebug.h" + static char spnego_oid_bytes[] = "\x2b\x06\x01\x05\x05\x02"; gss_OID_desc Curl_spnego_mech_oid = { 6, &spnego_oid_bytes }; static char krb5_oid_bytes[] = "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"; diff --git a/lib/curl_md4.h b/lib/curl_md4.h index 8c26d12..e069041 100644 --- a/lib/curl_md4.h +++ b/lib/curl_md4.h @@ -24,12 +24,12 @@ #include "curl_setup.h" -/* NSS and OS/400 crypto library do not provide the MD4 hash algorithm, so - * that we have a local implementation of it */ -#if defined(USE_NSS) || defined(USE_OS400CRYPTO) +#if defined(USE_NSS) || defined(USE_OS400CRYPTO) || \ + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len); -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ +#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) || + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) */ #endif /* HEADER_CURL_MD4_H */ diff --git a/lib/curl_memory.h b/lib/curl_memory.h index 6f792ff..fccf468 100644 --- a/lib/curl_memory.h +++ b/lib/curl_memory.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -70,7 +70,7 @@ * * Programs and libraries in 'tests' subdirectories have specific * purposes and needs, and as such each one will use whatever fits - * best, depending additionally wether it links with libcurl or not. + * best, depending additionally whether it links with libcurl or not. * * Caveat emptor. Proper curlx_* separation is a work in progress * the same as CURLX_NO_MEMORY_CALLBACKS usage, some adjustments may diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index e02983c..e896276 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -31,6 +31,25 @@ * https://www.innovation.ch/java/ntlm.html */ +/* Please keep the SSL backend-specific #if branches in this order: + + 1. USE_OPENSSL + 2. USE_GNUTLS_NETTLE + 3. USE_GNUTLS + 4. USE_NSS + 5. USE_MBEDTLS + 6. USE_DARWINSSL + 7. USE_OS400CRYPTO + 8. USE_WIN32_CRYPTO + + This ensures that: + - the same SSL branch gets activated throughout this source + file even if multiple backends are enabled at the same time. + - OpenSSL and NSS have higher priority than Windows Crypt, due + to issues with the latter supporting NTLM2Session responses + in NTLM type-3 messages. + */ + #if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) #ifdef USE_OPENSSL @@ -76,11 +95,6 @@ # define MD5_DIGEST_LENGTH 16 # define MD4_DIGEST_LENGTH 16 -#elif defined(USE_MBEDTLS) - -# include -# include - #elif defined(USE_NSS) # include @@ -89,6 +103,14 @@ # include "curl_md4.h" # define MD5_DIGEST_LENGTH MD5_LENGTH +#elif defined(USE_MBEDTLS) + +# include +# include +# if !defined(MBEDTLS_MD4_C) +# include "curl_md4.h" +# endif + #elif defined(USE_DARWINSSL) # include @@ -193,26 +215,6 @@ static void setup_des_key(const unsigned char *key_56, gcry_cipher_setkey(*des, key, sizeof(key)); } -#elif defined(USE_MBEDTLS) - -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - mbedtls_des_context ctx; - char key[8]; - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, key); - - /* Set the key parity to odd */ - mbedtls_des_key_set_parity((unsigned char *) key); - - /* Perform the encryption */ - mbedtls_des_init(&ctx); - mbedtls_des_setkey_enc(&ctx, (unsigned char *) key); - return mbedtls_des_crypt_ecb(&ctx, in, out) == 0; -} - #elif defined(USE_NSS) /* @@ -278,6 +280,26 @@ fail: return rv; } +#elif defined(USE_MBEDTLS) + +static bool encrypt_des(const unsigned char *in, unsigned char *out, + const unsigned char *key_56) +{ + mbedtls_des_context ctx; + char key[8]; + + /* Expand the 56-bit key to 64-bits */ + extend_key_56_to_64(key_56, key); + + /* Set the key parity to odd */ + mbedtls_des_key_set_parity((unsigned char *) key); + + /* Perform the encryption */ + mbedtls_des_init(&ctx); + mbedtls_des_setkey_enc(&ctx, (unsigned char *) key); + return mbedtls_des_crypt_ecb(&ctx, in, out) == 0; +} + #elif defined(USE_DARWINSSL) static bool encrypt_des(const unsigned char *in, unsigned char *out, @@ -425,7 +447,7 @@ void Curl_ntlm_core_lm_resp(const unsigned char *keys, setup_des_key(keys + 14, &des); gcry_cipher_encrypt(des, results + 16, 8, plaintext, 8); gcry_cipher_close(des); -#elif defined(USE_MBEDTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) \ +#elif defined(USE_NSS) || defined(USE_MBEDTLS) || defined(USE_DARWINSSL) \ || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) encrypt_des(plaintext, results, keys); encrypt_des(plaintext, results + 8, keys + 7); @@ -489,7 +511,7 @@ CURLcode Curl_ntlm_core_mk_lm_hash(struct Curl_easy *data, setup_des_key(pw + 7, &des); gcry_cipher_encrypt(des, lmbuffer + 8, 8, magic, 8); gcry_cipher_close(des); -#elif defined(USE_MBEDTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) \ +#elif defined(USE_NSS) || defined(USE_MBEDTLS) || defined(USE_DARWINSSL) \ || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) encrypt_des(magic, lmbuffer, pw); encrypt_des(magic, lmbuffer + 8, pw + 7); @@ -501,7 +523,7 @@ CURLcode Curl_ntlm_core_mk_lm_hash(struct Curl_easy *data, return CURLE_OK; } -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES static void ascii_to_unicode_le(unsigned char *dest, const char *src, size_t srclen) { @@ -512,14 +534,14 @@ static void ascii_to_unicode_le(unsigned char *dest, const char *src, } } -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) +#if defined(USE_NTLM_V2) && !defined(USE_WINDOWS_SSPI) static void ascii_uppercase_to_unicode_le(unsigned char *dest, const char *src, size_t srclen) { size_t i; for(i = 0; i < srclen; i++) { - dest[2 * i] = (unsigned char)(toupper(src[i])); + dest[2 * i] = (unsigned char)(Curl_raw_toupper(src[i])); dest[2 * i + 1] = '\0'; } } @@ -535,7 +557,7 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, unsigned char *ntbuffer /* 21 bytes */) { size_t len = strlen(password); - unsigned char *pw = malloc(len * 2); + unsigned char *pw = len ? malloc(len * 2) : strdup(""); CURLcode result; if(!pw) return CURLE_OUT_OF_MEMORY; @@ -568,12 +590,18 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, gcry_md_write(MD4pw, pw, 2 * len); memcpy(ntbuffer, gcry_md_read(MD4pw, 0), MD4_DIGEST_LENGTH); gcry_md_close(MD4pw); +#elif defined(USE_NSS) + Curl_md4it(ntbuffer, pw, 2 * len); #elif defined(USE_MBEDTLS) +#if defined(MBEDTLS_MD4_C) mbedtls_md4(pw, 2 * len, ntbuffer); -#elif defined(USE_NSS) || defined(USE_OS400CRYPTO) +#else Curl_md4it(ntbuffer, pw, 2 * len); +#endif #elif defined(USE_DARWINSSL) (void)CC_MD4(pw, (CC_LONG)(2 * len), ntbuffer); +#elif defined(USE_OS400CRYPTO) + Curl_md4it(ntbuffer, pw, 2 * len); #elif defined(USE_WIN32_CRYPTO) HCRYPTPROV hprov; if(CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, @@ -597,7 +625,7 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, return CURLE_OK; } -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) +#if defined(USE_NTLM_V2) && !defined(USE_WINDOWS_SSPI) /* This returns the HMAC MD5 digest */ CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, @@ -618,6 +646,15 @@ CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, return CURLE_OK; } +#ifndef SIZE_T_MAX +/* some limits.h headers have this defined, some don't */ +#if defined(SIZEOF_SIZE_T) && (SIZEOF_SIZE_T > 4) +#define SIZE_T_MAX 18446744073709551615U +#else +#define SIZE_T_MAX 4294967295U +#endif +#endif + /* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode * (uppercase UserName + Domain) as the data */ @@ -627,10 +664,20 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, unsigned char *ntlmv2hash) { /* Unicode representation */ - size_t identity_len = (userlen + domlen) * 2; - unsigned char *identity = malloc(identity_len); + size_t identity_len; + unsigned char *identity; CURLcode result = CURLE_OK; + /* we do the length checks below separately to avoid integer overflow risk + on extreme data lengths */ + if((userlen > SIZE_T_MAX/2) || + (domlen > SIZE_T_MAX/2) || + ((userlen + domlen) > SIZE_T_MAX/2)) + return CURLE_OUT_OF_MEMORY; + + identity_len = (userlen + domlen) * 2; + identity = malloc(identity_len); + if(!identity) return CURLE_OUT_OF_MEMORY; @@ -776,7 +823,7 @@ CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, /* Concatenate the HMAC MD5 output with the client nonce */ memcpy(lmresp, hmac_output, 16); - memcpy(lmresp+16, challenge_client, 8); + memcpy(lmresp + 16, challenge_client, 8); return result; } diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h index c5f90e7..07ef5de 100644 --- a/lib/curl_ntlm_core.h +++ b/lib/curl_ntlm_core.h @@ -26,38 +26,39 @@ #if defined(USE_NTLM) +/* If NSS is the first available SSL backend (see order in curl_ntlm_core.c) + then it must be initialized to be used by NTLM. */ +#if !defined(USE_OPENSSL) && \ + !defined(USE_GNUTLS_NETTLE) && \ + !defined(USE_GNUTLS) && \ + defined(USE_NSS) +#define NTLM_NEEDS_NSS_INIT +#endif + #if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) #ifdef USE_OPENSSL -# if !defined(OPENSSL_VERSION_NUMBER) && \ - !defined(HEADER_SSL_H) && !defined(HEADER_MD5_H) -# error "curl_ntlm_core.h shall not be included before OpenSSL headers." -# endif -# ifdef OPENSSL_NO_MD4 -# define USE_NTRESPONSES 0 -# define USE_NTLM2SESSION 0 -# define USE_NTLM_V2 0 -# endif +# include #endif -/* Define USE_NTRESPONSES to 1 in order to make the type-3 message include +/* Define USE_NTRESPONSES in order to make the type-3 message include * the NT response message. */ -#ifndef USE_NTRESPONSES -#define USE_NTRESPONSES 1 +#if !defined(USE_OPENSSL) || !defined(OPENSSL_NO_MD4) +#define USE_NTRESPONSES #endif -/* Define USE_NTLM2SESSION to 1 in order to make the type-3 message include the +/* Define USE_NTLM2SESSION in order to make the type-3 message include the NTLM2Session response message, requires USE_NTRESPONSES defined to 1 and a Crypto engine that we have curl_ssl_md5sum() for. */ -#if !defined(USE_NTLM2SESSION) && USE_NTRESPONSES && !defined(USE_WIN32_CRYPTO) -#define USE_NTLM2SESSION 1 +#if defined(USE_NTRESPONSES) && !defined(USE_WIN32_CRYPTO) +#define USE_NTLM2SESSION #endif -/* Define USE_NTLM_V2 to 1 in order to allow the type-3 message to include the +/* Define USE_NTLM_V2 in order to allow the type-3 message to include the LMv2 and NTLMv2 response messages, requires USE_NTRESPONSES defined to 1 and support for 64-bit integers. */ -#if !defined(USE_NTLM_V2) && USE_NTRESPONSES && (CURL_SIZEOF_CURL_OFF_T > 4) -#define USE_NTLM_V2 1 +#if defined(USE_NTRESPONSES) && (CURL_SIZEOF_CURL_OFF_T > 4) +#define USE_NTLM_V2 #endif void Curl_ntlm_core_lm_resp(const unsigned char *keys, @@ -68,12 +69,12 @@ CURLcode Curl_ntlm_core_mk_lm_hash(struct Curl_easy *data, const char *password, unsigned char *lmbuffer /* 21 bytes */); -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, const char *password, unsigned char *ntbuffer /* 21 bytes */); -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) +#if defined(USE_NTLM_V2) && !defined(USE_WINDOWS_SSPI) CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, const unsigned char *data, unsigned int datalen, diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c index 9f5b87b..353a656 100644 --- a/lib/curl_ntlm_wb.c +++ b/lib/curl_ntlm_wb.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,6 +48,7 @@ #include "sendf.h" #include "select.h" #include "vauth/ntlm.h" +#include "curl_ntlm_core.h" #include "curl_ntlm_wb.h" #include "url.h" #include "strerror.h" @@ -123,7 +124,6 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp) struct passwd pw, *pw_res; char pwbuf[1024]; #endif - int error; /* Return if communication with ntlm_auth already set up */ if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD || @@ -178,26 +178,23 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp) ntlm_auth = NTLM_WB_FILE; if(access(ntlm_auth, X_OK) != 0) { - error = ERRNO; failf(conn->data, "Could not access ntlm_auth: %s errno %d: %s", - ntlm_auth, error, Curl_strerror(conn, error)); + ntlm_auth, errno, Curl_strerror(conn, errno)); goto done; } if(socketpair(AF_UNIX, SOCK_STREAM, 0, sockfds)) { - error = ERRNO; failf(conn->data, "Could not open socket pair. errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); goto done; } child_pid = fork(); if(child_pid == -1) { - error = ERRNO; sclose(sockfds[0]); sclose(sockfds[1]); failf(conn->data, "Could not fork. errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); goto done; } else if(!child_pid) { @@ -208,16 +205,14 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp) /* Don't use sclose in the child since it fools the socket leak detector */ sclose_nolog(sockfds[0]); if(dup2(sockfds[1], STDIN_FILENO) == -1) { - error = ERRNO; failf(conn->data, "Could not redirect child stdin. errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); exit(1); } if(dup2(sockfds[1], STDOUT_FILENO) == -1) { - error = ERRNO; failf(conn->data, "Could not redirect child stdout. errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); exit(1); } @@ -235,10 +230,9 @@ static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp) "--username", username, NULL); - error = ERRNO; sclose_nolog(sockfds[1]); failf(conn->data, "Could not execl(). errno %d: %s", - error, Curl_strerror(conn, error)); + errno, Curl_strerror(conn, errno)); exit(1); } @@ -364,13 +358,13 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, /* not set means empty */ if(!userp) - userp=""; + userp = ""; switch(ntlm->state) { case NTLMSTATE_TYPE1: default: /* Use Samba's 'winbind' daemon to support NTLM authentication, - * by delegating the NTLM challenge/response protocal to a helper + * by delegating the NTLM challenge/response protocol to a helper * in ntlm_auth. * http://devel.squid-cache.org/ntlm/squid_helper_protocol.html * https://www.samba.org/samba/docs/man/manpages-3/winbindd.8.html @@ -420,7 +414,7 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, /* connection is already authenticated, * don't send a header in future requests */ free(*allocuserpwd); - *allocuserpwd=NULL; + *allocuserpwd = NULL; authp->done = TRUE; break; } diff --git a/lib/curl_path.c b/lib/curl_path.c new file mode 100644 index 0000000..e843dea --- /dev/null +++ b/lib/curl_path.c @@ -0,0 +1,195 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" + +#include +#include "curl_memory.h" +#include "curl_path.h" +#include "escape.h" +#include "memdebug.h" + +/* figure out the path to work with in this particular request */ +CURLcode Curl_getworkingpath(struct connectdata *conn, + char *homedir, /* when SFTP is used */ + char **path) /* returns the allocated + real path to work with */ +{ + struct Curl_easy *data = conn->data; + char *real_path = NULL; + char *working_path; + size_t working_path_len; + CURLcode result = + Curl_urldecode(data, data->state.path, 0, &working_path, + &working_path_len, FALSE); + if(result) + return result; + + /* Check for /~/, indicating relative to the user's home directory */ + if(conn->handler->protocol & CURLPROTO_SCP) { + real_path = malloc(working_path_len + 1); + if(real_path == NULL) { + free(working_path); + return CURLE_OUT_OF_MEMORY; + } + if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3))) + /* It is referenced to the home directory, so strip the leading '/~/' */ + memcpy(real_path, working_path + 3, 4 + working_path_len-3); + else + memcpy(real_path, working_path, 1 + working_path_len); + } + else if(conn->handler->protocol & CURLPROTO_SFTP) { + if((working_path_len > 1) && (working_path[1] == '~')) { + size_t homelen = strlen(homedir); + real_path = malloc(homelen + working_path_len + 1); + if(real_path == NULL) { + free(working_path); + return CURLE_OUT_OF_MEMORY; + } + /* It is referenced to the home directory, so strip the + leading '/' */ + memcpy(real_path, homedir, homelen); + real_path[homelen] = '/'; + real_path[homelen + 1] = '\0'; + if(working_path_len > 3) { + memcpy(real_path + homelen + 1, working_path + 3, + 1 + working_path_len -3); + } + } + else { + real_path = malloc(working_path_len + 1); + if(real_path == NULL) { + free(working_path); + return CURLE_OUT_OF_MEMORY; + } + memcpy(real_path, working_path, 1 + working_path_len); + } + } + + free(working_path); + + /* store the pointer for the caller to receive */ + *path = real_path; + + return CURLE_OK; +} + +/* The get_pathname() function is being borrowed from OpenSSH sftp.c + version 4.6p1. */ +/* + * Copyright (c) 2001-2004 Damien Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir) +{ + const char *cp = *cpp, *end; + char quot; + unsigned int i, j; + size_t fullPathLength, pathLength; + bool relativePath = false; + static const char WHITESPACE[] = " \t\r\n"; + + if(!*cp) { + *cpp = NULL; + *path = NULL; + return CURLE_QUOTE_ERROR; + } + /* Ignore leading whitespace */ + cp += strspn(cp, WHITESPACE); + /* Allocate enough space for home directory and filename + separator */ + fullPathLength = strlen(cp) + strlen(homedir) + 2; + *path = malloc(fullPathLength); + if(*path == NULL) + return CURLE_OUT_OF_MEMORY; + + /* Check for quoted filenames */ + if(*cp == '\"' || *cp == '\'') { + quot = *cp++; + + /* Search for terminating quote, unescape some chars */ + for(i = j = 0; i <= strlen(cp); i++) { + if(cp[i] == quot) { /* Found quote */ + i++; + (*path)[j] = '\0'; + break; + } + if(cp[i] == '\0') { /* End of string */ + /*error("Unterminated quote");*/ + goto fail; + } + if(cp[i] == '\\') { /* Escaped characters */ + i++; + if(cp[i] != '\'' && cp[i] != '\"' && + cp[i] != '\\') { + /*error("Bad escaped character '\\%c'", + cp[i]);*/ + goto fail; + } + } + (*path)[j++] = cp[i]; + } + + if(j == 0) { + /*error("Empty quotes");*/ + goto fail; + } + *cpp = cp + i + strspn(cp + i, WHITESPACE); + } + else { + /* Read to end of filename - either to white space or terminator */ + end = strpbrk(cp, WHITESPACE); + if(end == NULL) + end = strchr(cp, '\0'); + /* return pointer to second parameter if it exists */ + *cpp = end + strspn(end, WHITESPACE); + pathLength = 0; + relativePath = (cp[0] == '/' && cp[1] == '~' && cp[2] == '/'); + /* Handling for relative path - prepend home directory */ + if(relativePath) { + strcpy(*path, homedir); + pathLength = strlen(homedir); + (*path)[pathLength++] = '/'; + (*path)[pathLength] = '\0'; + cp += 3; + } + /* Copy path name up until first "white space" */ + memcpy(&(*path)[pathLength], cp, (int)(end - cp)); + pathLength += (int)(end - cp); + (*path)[pathLength] = '\0'; + } + return CURLE_OK; + + fail: + Curl_safefree(*path); + return CURLE_QUOTE_ERROR; +} diff --git a/lib/curl_path.h b/lib/curl_path.h new file mode 100644 index 0000000..f9d4327 --- /dev/null +++ b/lib/curl_path.h @@ -0,0 +1,44 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" +#include +#include "urldata.h" + +#ifdef WIN32 +# undef PATH_MAX +# define PATH_MAX MAX_PATH +# ifndef R_OK +# define R_OK 4 +# endif +#endif + +#ifndef PATH_MAX +#define PATH_MAX 1024 /* just an extra precaution since there are systems that + have their definition hidden well */ +#endif + +CURLcode Curl_getworkingpath(struct connectdata *conn, + char *homedir, + char **path); + +CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir); diff --git a/lib/curl_range.c b/lib/curl_range.c new file mode 100644 index 0000000..aa3c493 --- /dev/null +++ b/lib/curl_range.c @@ -0,0 +1,95 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" +#include +#include "curl_range.h" +#include "sendf.h" +#include "strtoofft.h" + +/* Only include this function if one or more of FTP, FILE are enabled. */ +#if !defined(CURL_DISABLE_FTP) || !defined(CURL_DISABLE_FILE) + + /* + Check if this is a range download, and if so, set the internal variables + properly. + */ +CURLcode Curl_range(struct connectdata *conn) +{ + curl_off_t from, to; + char *ptr; + char *ptr2; + struct Curl_easy *data = conn->data; + + if(data->state.use_range && data->state.range) { + CURLofft from_t; + CURLofft to_t; + from_t = curlx_strtoofft(data->state.range, &ptr, 0, &from); + if(from_t == CURL_OFFT_FLOW) + return CURLE_RANGE_ERROR; + while(*ptr && (ISSPACE(*ptr) || (*ptr == '-'))) + ptr++; + to_t = curlx_strtoofft(ptr, &ptr2, 0, &to); + if(to_t == CURL_OFFT_FLOW) + return CURLE_RANGE_ERROR; + if((to_t == CURL_OFFT_INVAL) && !from_t) { + /* X - */ + data->state.resume_from = from; + DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n", + from)); + } + else if((from_t == CURL_OFFT_INVAL) && !to_t) { + /* -Y */ + data->req.maxdownload = to; + data->state.resume_from = -to; + DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n", + to)); + } + else { + /* X-Y */ + curl_off_t totalsize; + + /* Ensure the range is sensible - to should follow from. */ + if(from > to) + return CURLE_RANGE_ERROR; + + totalsize = to - from; + if(totalsize == CURL_OFF_T_MAX) + return CURLE_RANGE_ERROR; + + data->req.maxdownload = totalsize + 1; /* include last byte */ + data->state.resume_from = from; + DEBUGF(infof(data, "RANGE from %" CURL_FORMAT_CURL_OFF_T + " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n", + from, data->req.maxdownload)); + } + DEBUGF(infof(data, "range-download from %" CURL_FORMAT_CURL_OFF_T + " to %" CURL_FORMAT_CURL_OFF_T ", totally %" + CURL_FORMAT_CURL_OFF_T " bytes\n", + from, to, data->req.maxdownload)); + } + else + data->req.maxdownload = -1; + return CURLE_OK; +} + +#endif diff --git a/src/tool_writeenv.h b/lib/curl_range.h similarity index 75% rename from src/tool_writeenv.h rename to lib/curl_range.h index 55daf48..2350df9 100644 --- a/src/tool_writeenv.h +++ b/lib/curl_range.h @@ -1,5 +1,5 @@ -#ifndef HEADER_CURL_TOOL_WRITEENV_H -#define HEADER_CURL_TOOL_WRITEENV_H +#ifndef HEADER_CURL_RANGE_H +#define HEADER_CURL_RANGE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -21,15 +21,10 @@ * KIND, either express or implied. * ***************************************************************************/ -#include "tool_setup.h" -#ifdef USE_ENVIRONMENT +#include "curl_setup.h" +#include "urldata.h" -void ourWriteEnv(CURL *curl); - -#else -# define ourWriteEnv(x) Curl_nop_stmt -#endif - -#endif /* HEADER_CURL_TOOL_WRITEENV_H */ +CURLcode Curl_range(struct connectdata *conn); +#endif /* HEADER_CURL_RANGE_H */ diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c index 06dd047..9743064 100644 --- a/lib/curl_rtmp.c +++ b/lib/curl_rtmp.c @@ -25,6 +25,7 @@ #ifdef USE_LIBRTMP +#include "curl_rtmp.h" #include "urldata.h" #include "nonblock.h" /* for curlx_nonblock */ #include "progress.h" /* for Curl_pgrsSetUploadSize */ @@ -73,6 +74,7 @@ const struct Curl_handler Curl_handler_rtmp = { ZERO_NULL, /* perform_getsock */ rtmp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_RTMP, /* defport */ CURLPROTO_RTMP, /* protocol */ PROTOPT_NONE /* flags*/ @@ -93,6 +95,7 @@ const struct Curl_handler Curl_handler_rtmpt = { ZERO_NULL, /* perform_getsock */ rtmp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_RTMPT, /* defport */ CURLPROTO_RTMPT, /* protocol */ PROTOPT_NONE /* flags*/ @@ -113,6 +116,7 @@ const struct Curl_handler Curl_handler_rtmpe = { ZERO_NULL, /* perform_getsock */ rtmp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_RTMP, /* defport */ CURLPROTO_RTMPE, /* protocol */ PROTOPT_NONE /* flags*/ @@ -133,6 +137,7 @@ const struct Curl_handler Curl_handler_rtmpte = { ZERO_NULL, /* perform_getsock */ rtmp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_RTMPT, /* defport */ CURLPROTO_RTMPTE, /* protocol */ PROTOPT_NONE /* flags*/ @@ -153,6 +158,7 @@ const struct Curl_handler Curl_handler_rtmps = { ZERO_NULL, /* perform_getsock */ rtmp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_RTMPS, /* defport */ CURLPROTO_RTMPS, /* protocol */ PROTOPT_NONE /* flags*/ @@ -173,6 +179,7 @@ const struct Curl_handler Curl_handler_rtmpts = { ZERO_NULL, /* perform_getsock */ rtmp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_RTMPS, /* defport */ CURLPROTO_RTMPTS, /* protocol */ PROTOPT_NONE /* flags*/ @@ -199,7 +206,7 @@ static CURLcode rtmp_connect(struct connectdata *conn, bool *done) RTMP *r = conn->proto.generic; SET_RCVTIMEO(tv, 10); - r->m_sb.sb_socket = conn->sock[FIRSTSOCKET]; + r->m_sb.sb_socket = (int)conn->sock[FIRSTSOCKET]; /* We have to know if it's a write before we send the * connect request packet diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index 807f5de..7052bd9 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -50,7 +50,7 @@ #include "memdebug.h" /* Supported mechanisms */ -const struct { +static const struct { const char *name; /* Name */ size_t len; /* Name length */ unsigned int bit; /* Flag bit */ @@ -331,7 +331,8 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, sasl->authused = SASL_MECH_NTLM; if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_ntlm_type1_message(conn->user, conn->passwd, + result = Curl_auth_create_ntlm_type1_message(data, + conn->user, conn->passwd, &conn->ntlm, &resp, &len); } else @@ -360,15 +361,6 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, conn->oauth_bearer, &resp, &len); } - else if(enabledmechs & SASL_MECH_LOGIN) { - mech = SASL_MECH_STRING_LOGIN; - state1 = SASL_LOGIN; - state2 = SASL_LOGIN_PASSWD; - sasl->authused = SASL_MECH_LOGIN; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_login_message(data, conn->user, &resp, &len); - } else if(enabledmechs & SASL_MECH_PLAIN) { mech = SASL_MECH_STRING_PLAIN; state1 = SASL_PLAIN; @@ -378,6 +370,15 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, result = Curl_auth_create_plain_message(data, conn->user, conn->passwd, &resp, &len); } + else if(enabledmechs & SASL_MECH_LOGIN) { + mech = SASL_MECH_STRING_LOGIN; + state1 = SASL_LOGIN; + state2 = SASL_LOGIN_PASSWD; + sasl->authused = SASL_MECH_LOGIN; + + if(force_ir || data->set.sasl_ir) + result = Curl_auth_create_login_message(data, conn->user, &resp, &len); + } } if(!result && mech) { @@ -415,7 +416,6 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, conn->host.name; const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; #if !defined(CURL_DISABLE_CRYPTO_AUTH) - char *serverdata; char *chlg = NULL; size_t chlglen = 0; #endif @@ -424,6 +424,10 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, data->set.str[STRING_SERVICE_NAME] : sasl->params->service; #endif +#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ + defined(USE_NTLM) + char *serverdata; +#endif size_t len = 0; *progress = SASL_INPROGRESS; @@ -490,7 +494,8 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, #ifdef USE_NTLM case SASL_NTLM: /* Create the type-1 message */ - result = Curl_auth_create_ntlm_type1_message(conn->user, conn->passwd, + result = Curl_auth_create_ntlm_type1_message(data, + conn->user, conn->passwd, &conn->ntlm, &resp, &len); newstate = SASL_NTLM_TYPE2MSG; break; diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 0fe3633..f128696 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,10 @@ * ***************************************************************************/ +#if defined(BUILDING_LIBCURL) && !defined(CURL_NO_OLDIES) +#define CURL_NO_OLDIES +#endif + /* * Define WIN32 when build target is Win32 API */ @@ -31,6 +35,17 @@ #define WIN32 #endif +#ifdef WIN32 +/* + * Don't include unneeded stuff in Windows headers to avoid compiler + * warnings and macro clashes. + * Make sure to define this macro before including any Windows headers. + */ +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +#endif + /* * Include configuration script results or hand-crafted * configuration file for platforms which lack config tool. @@ -124,27 +139,9 @@ /* please, do it beyond the point further indicated in this file. */ /* ================================================================ */ -/* - * libcurl's external interface definitions are also used internally, - * and might also include required system header files to define them. - */ - -#include - -/* - * Compile time sanity checks must also be done when building the library. - */ +#include -#include - -/* - * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro - */ - -#ifdef SIZEOF_CURL_OFF_T -# error "SIZEOF_CURL_OFF_T shall not be defined!" - Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined -#endif +#define CURL_SIZEOF_CURL_OFF_T SIZEOF_CURL_OFF_T /* * Disable other protocols when http is the only one desired. @@ -181,9 +178,6 @@ # ifndef CURL_DISABLE_SMTP # define CURL_DISABLE_SMTP # endif -# ifndef CURL_DISABLE_RTMP -# define CURL_DISABLE_RTMP -# endif # ifndef CURL_DISABLE_GOPHER # define CURL_DISABLE_GOPHER # endif @@ -202,7 +196,7 @@ /* ================================================================ */ /* No system header file shall be included in this file before this */ -/* point. The only allowed ones are those included from curlbuild.h */ +/* point. The only allowed ones are those included from curl/system.h */ /* ================================================================ */ /* @@ -248,9 +242,6 @@ # if defined(_UNICODE) && !defined(UNICODE) # define UNICODE # endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif # include # ifdef HAVE_WINSOCK2_H # include @@ -398,6 +389,11 @@ # define LSEEK_ERROR (off_t)-1 #endif +#ifndef SIZEOF_TIME_T +/* assume default size of time_t to be 32 bit */ +#define SIZEOF_TIME_T 4 +#endif + /* * Default sizeof(off_t) in case it hasn't been defined in config file. */ @@ -425,6 +421,32 @@ # endif #endif +#if (SIZEOF_CURL_OFF_T == 4) +# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF) +#else + /* assume CURL_SIZEOF_CURL_OFF_T == 8 */ +# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) +#endif +#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1)) + +#if (SIZEOF_TIME_T == 4) +# ifdef HAVE_TIME_T_UNSIGNED +# define TIME_T_MAX UINT_MAX +# define TIME_T_MIN 0 +# else +# define TIME_T_MAX INT_MAX +# define TIME_T_MIN INT_MIN +# endif +#else +# ifdef HAVE_TIME_T_UNSIGNED +# define TIME_T_MAX 0xFFFFFFFFFFFFFFFF +# define TIME_T_MIN 0 +# else +# define TIME_T_MAX 0x7FFFFFFFFFFFFFFF +# define TIME_T_MIN (-TIME_T_MAX - 1) +# endif +#endif + /* * Arg 2 type for gethostname in case it hasn't been defined in config file. */ @@ -599,14 +621,13 @@ int netware_init(void); #endif #endif -#if defined(HAVE_LIBIDN2) && defined(HAVE_IDN2_H) +#if defined(HAVE_LIBIDN2) && defined(HAVE_IDN2_H) && !defined(USE_WIN32_IDN) /* The lib and header are present */ #define USE_LIBIDN2 #endif -#ifndef SIZEOF_TIME_T -/* assume default size of time_t to be 32 bit */ -#define SIZEOF_TIME_T 4 +#if defined(USE_LIBIDN2) && defined(USE_WIN32_IDN) +#error "Both libidn2 and WinIDN are enabled, choose one." #endif #define LIBIDN_REQUIRED_VERSION "0.4.1" @@ -634,22 +655,21 @@ int netware_init(void); #if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH) #if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \ defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \ - defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) + defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) || \ + defined(USE_MBEDTLS) #define USE_NTLM -#elif defined(USE_MBEDTLS) +# if defined(USE_MBEDTLS) +/* Get definition of MBEDTLS_MD4_C */ # include -# if defined(MBEDTLS_MD4_C) -#define USE_NTLM # endif #endif #endif -/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */ -#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE) -#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE") +#ifdef CURL_WANTS_CA_BUNDLE_ENV +#error "No longer supported. Set CURLOPT_CAINFO at runtime instead." #endif /* @@ -723,6 +743,7 @@ Therefore we specify it explicitly. https://github.com/curl/curl/pull/258 #if defined(WIN32) || defined(MSDOS) #define FOPEN_READTEXT "rt" #define FOPEN_WRITETEXT "wt" +#define FOPEN_APPENDTEXT "at" #elif defined(__CYGWIN__) /* Cygwin has specific behavior we need to address when WIN32 is not defined. https://cygwin.com/cygwin-ug-net/using-textbinary.html @@ -732,9 +753,11 @@ endings either CRLF or LF so 't' is appropriate. */ #define FOPEN_READTEXT "rt" #define FOPEN_WRITETEXT "w" +#define FOPEN_APPENDTEXT "a" #else #define FOPEN_READTEXT "r" #define FOPEN_WRITETEXT "w" +#define FOPEN_APPENDTEXT "a" #endif /* WinSock destroys recv() buffer when send() failed. @@ -746,17 +769,18 @@ endings either CRLF or LF so 't' is appropriate. # if defined(WIN32) || defined(__CYGWIN__) # define USE_RECV_BEFORE_SEND_WORKAROUND # endif -#else /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */ +#else /* DONT_USE_RECV_BEFORE_SEND_WORKAROUND */ # ifdef USE_RECV_BEFORE_SEND_WORKAROUND # undef USE_RECV_BEFORE_SEND_WORKAROUND # endif -#endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */ +#endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUND */ /* Detect Windows App environment which has a restricted access * to the Win32 APIs. */ -# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602) +# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || \ + defined(WINAPI_FAMILY) # include -# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define CURL_WINDOWS_APP # endif diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h index 4da8349..6d01ea1 100644 --- a/lib/curl_setup_once.h +++ b/lib/curl_setup_once.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -101,7 +101,6 @@ # endif #endif - /* * Definition of timeval struct for platforms that don't have it. */ @@ -196,7 +195,7 @@ struct timeval { /* */ #else #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \ - (SEND_TYPE_ARG2)(y), \ + (SEND_QUAL_ARG2 SEND_TYPE_ARG2)(y), \ (SEND_TYPE_ARG3)(z), \ (SEND_TYPE_ARG4)(SEND_4TH_ARG)) #endif @@ -274,25 +273,6 @@ struct timeval { # define sfcntl fcntl #endif -/* - * Uppercase macro versions of ANSI/ISO is*() functions/macros which - * avoid negative number inputs with argument byte codes > 127. - */ - -#define ISSPACE(x) (isspace((int) ((unsigned char)x))) -#define ISDIGIT(x) (isdigit((int) ((unsigned char)x))) -#define ISALNUM(x) (isalnum((int) ((unsigned char)x))) -#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x))) -#define ISGRAPH(x) (isgraph((int) ((unsigned char)x))) -#define ISALPHA(x) (isalpha((int) ((unsigned char)x))) -#define ISPRINT(x) (isprint((int) ((unsigned char)x))) -#define ISUPPER(x) (isupper((int) ((unsigned char)x))) -#define ISLOWER(x) (islower((int) ((unsigned char)x))) -#define ISASCII(x) (isascii((int) ((unsigned char)x))) - -#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \ - (((unsigned char)x) == '\t')) - #define TOLOWER(x) (tolower((int) ((unsigned char)x))) @@ -347,6 +327,7 @@ struct timeval { #define FALSE false #endif +#include "curl_ctype.h" /* * Macro WHILE_FALSE may be used to build single-iteration do-while loops, @@ -436,20 +417,6 @@ typedef int sig_atomic_t; /* - * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno - * (or equivalent) on this platform to hide platform details to code using it. - */ - -#if defined(WIN32) && !defined(USE_LWIPSOCK) -#define ERRNO ((int)GetLastError()) -#define SET_ERRNO(x) (SetLastError((DWORD)(x))) -#else -#define ERRNO (errno) -#define SET_ERRNO(x) (errno = (x)) -#endif - - -/* * Portable error number symbolic names defined to Winsock error codes. */ diff --git a/lib/curl_sha256.h b/lib/curl_sha256.h new file mode 100644 index 0000000..6db4b04 --- /dev/null +++ b/lib/curl_sha256.h @@ -0,0 +1,32 @@ +#ifndef HEADER_CURL_SHA256_H +#define HEADER_CURL_SHA256_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, Florin Petriuc, + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#ifndef CURL_DISABLE_CRYPTO_AUTH + +void Curl_sha256it(unsigned char *outbuffer, + const unsigned char *input); + +#endif + +#endif /* HEADER_CURL_SHA256_H */ diff --git a/lib/curl_threads.c b/lib/curl_threads.c index a78eff5..c1624a9 100644 --- a/lib/curl_threads.c +++ b/lib/curl_threads.c @@ -104,15 +104,22 @@ int Curl_thread_join(curl_thread_t *hnd) curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *), void *arg) { + curl_thread_t t; #ifdef _WIN32_WCE - return CreateThread(NULL, 0, func, arg, 0, NULL); + t = CreateThread(NULL, 0, func, arg, 0, NULL); #else - curl_thread_t t; t = (curl_thread_t)_beginthreadex(NULL, 0, func, arg, 0, NULL); - if((t == 0) || (t == (curl_thread_t)-1L)) +#endif + if((t == 0) || (t == LongToHandle(-1L))) { +#ifdef _WIN32_WCE + DWORD gle = GetLastError(); + errno = ((gle == ERROR_ACCESS_DENIED || + gle == ERROR_NOT_ENOUGH_MEMORY) ? + EACCES : EINVAL); +#endif return curl_thread_t_null; + } return t; -#endif } void Curl_thread_destroy(curl_thread_t hnd) diff --git a/lib/curlx.h b/lib/curlx.h index 6168dc1..6e41826 100644 --- a/lib/curlx.h +++ b/lib/curlx.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -42,16 +42,6 @@ curl_off_t number from a given string. */ -#include "timeval.h" -/* - "timeval.h" sets up a 'struct timeval' even for platforms that otherwise - don't have one and has protos for these functions: - - curlx_tvnow() - curlx_tvdiff() - curlx_tvdiff_secs() -*/ - #include "nonblock.h" /* "nonblock.h" provides curlx_nonblock() */ diff --git a/lib/dict.c b/lib/dict.c index 69defc4..4fc8552 100644 --- a/lib/dict.c +++ b/lib/dict.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -85,6 +85,7 @@ const struct Curl_handler Curl_handler_dict = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_DICT, /* defport */ CURLPROTO_DICT, /* protocol */ PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */ @@ -92,12 +93,12 @@ const struct Curl_handler Curl_handler_dict = { static char *unescape_word(struct Curl_easy *data, const char *inputbuff) { - char *newp; + char *newp = NULL; char *dictp; char *ptr; size_t len; char ch; - int olen=0; + int olen = 0; CURLcode result = Curl_urldecode(data, inputbuff, 0, &newp, &len, FALSE); if(!newp || result) @@ -116,7 +117,7 @@ static char *unescape_word(struct Curl_easy *data, const char *inputbuff) } dictp[olen++] = ch; } - dictp[olen]=0; + dictp[olen] = 0; } free(newp); return dictp; @@ -131,8 +132,8 @@ static CURLcode dict_do(struct connectdata *conn, bool *done) char *strategy = NULL; char *nthdef = NULL; /* This is not part of the protocol, but required by RFC 2229 */ - CURLcode result=CURLE_OK; - struct Curl_easy *data=conn->data; + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; char *path = data->state.path; @@ -167,7 +168,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done) if((word == NULL) || (*word == (char)0)) { infof(data, "lookup word is missing\n"); - word=(char *)"default"; + word = (char *)"default"; } if((database == NULL) || (*database == (char)0)) { database = (char *)"!"; @@ -221,7 +222,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done) if((word == NULL) || (*word == (char)0)) { infof(data, "lookup word is missing\n"); - word=(char *)"default"; + word = (char *)"default"; } if((database == NULL) || (*database == (char)0)) { database = (char *)"!"; diff --git a/lib/dotdot.c b/lib/dotdot.c index ea7c8a0..cbb308d 100644 --- a/lib/dotdot.c +++ b/lib/dotdot.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -55,7 +55,7 @@ char *Curl_dedotdotify(const char *input) size_t inlen = strlen(input); char *clone; size_t clen = inlen; /* the length of the cloned input */ - char *out = malloc(inlen+1); + char *out = malloc(inlen + 1); char *outptr; char *orgclone; char *queryp; @@ -92,25 +92,25 @@ char *Curl_dedotdotify(const char *input) remove that prefix from the input buffer; otherwise, */ if(!strncmp("./", clone, 2)) { - clone+=2; - clen-=2; + clone += 2; + clen -= 2; } else if(!strncmp("../", clone, 3)) { - clone+=3; - clen-=3; + clone += 3; + clen -= 3; } /* B. if the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer; otherwise, */ else if(!strncmp("/./", clone, 3)) { - clone+=2; - clen-=2; + clone += 2; + clen -= 2; } else if(!strcmp("/.", clone)) { clone[1]='/'; clone++; - clen-=1; + clen -= 1; } /* C. if the input buffer begins with a prefix of "/../" or "/..", where @@ -119,8 +119,8 @@ char *Curl_dedotdotify(const char *input) any) from the output buffer; otherwise, */ else if(!strncmp("/../", clone, 4)) { - clone+=3; - clen-=3; + clone += 3; + clen -= 3; /* remove the last segment from the output buffer */ while(outptr > out) { outptr--; @@ -131,8 +131,8 @@ char *Curl_dedotdotify(const char *input) } else if(!strcmp("/..", clone)) { clone[2]='/'; - clone+=2; - clen-=2; + clone += 2; + clen -= 2; /* remove the last segment from the output buffer */ while(outptr > out) { outptr--; @@ -146,7 +146,8 @@ char *Curl_dedotdotify(const char *input) that from the input buffer; otherwise, */ else if(!strcmp(".", clone) || !strcmp("..", clone)) { - *clone=0; + *clone = 0; + *out = 0; } else { @@ -171,7 +172,7 @@ char *Curl_dedotdotify(const char *input) from the correct index. */ size_t oindex = queryp - orgclone; qlen = strlen(&input[oindex]); - memcpy(outptr, &input[oindex], qlen+1); /* include the ending zero byte */ + memcpy(outptr, &input[oindex], qlen + 1); /* include the end zero byte */ } free(orgclone); diff --git a/lib/easy.c b/lib/easy.c index bed94a4..64c647b 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -61,17 +61,21 @@ #include "strdup.h" #include "progress.h" #include "easyif.h" +#include "multiif.h" #include "select.h" #include "sendf.h" /* for failf function prototype */ #include "connect.h" /* for Curl_getconnectinfo */ #include "slist.h" +#include "mime.h" #include "amigaos.h" #include "non-ascii.h" #include "warnless.h" -#include "conncache.h" #include "multiif.h" #include "sigpipe.h" #include "ssh.h" +#include "setopt.h" +#include "http_digest.h" + /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" @@ -179,7 +183,7 @@ curl_wcsdup_callback Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup; #endif #else /* - * Symbian OS doesn't support initialization to code in writeable static data. + * Symbian OS doesn't support initialization to code in writable static data. * Initialization will occur in the curl_global_init() call. */ curl_malloc_callback Curl_cmalloc; @@ -214,11 +218,10 @@ static CURLcode global_init(long flags, bool memoryfuncs) #endif } - if(flags & CURL_GLOBAL_SSL) - if(!Curl_ssl_init()) { - DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n")); - return CURLE_FAILED_INIT; - } + if(!Curl_ssl_init()) { + DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n")); + return CURLE_FAILED_INIT; + } if(flags & CURL_GLOBAL_WIN32) if(win32_init()) { @@ -253,6 +256,13 @@ static CURLcode global_init(long flags, bool memoryfuncs) } #endif +#if defined(USE_LIBSSH) + if(ssh_init()) { + DEBUGF(fprintf(stderr, "Error: libssh_init failed\n")); + return CURLE_FAILED_INIT; + } +#endif + if(flags & CURL_GLOBAL_ACK_EINTR) Curl_ack_eintr = 1; @@ -318,10 +328,7 @@ void curl_global_cleanup(void) return; Curl_global_host_cache_dtor(); - - if(init_flags & CURL_GLOBAL_SSL) - Curl_ssl_cleanup(); - + Curl_ssl_cleanup(); Curl_resolver_global_cleanup(); if(init_flags & CURL_GLOBAL_WIN32) @@ -333,6 +340,10 @@ void curl_global_cleanup(void) (void)libssh2_exit(); #endif +#if defined(USE_LIBSSH) + (void)ssh_finalize(); +#endif + init_flags = 0; } @@ -365,28 +376,6 @@ struct Curl_easy *curl_easy_init(void) return data; } -/* - * curl_easy_setopt() is the external interface for setting options on an - * easy handle. - */ - -#undef curl_easy_setopt -CURLcode curl_easy_setopt(struct Curl_easy *data, CURLoption tag, ...) -{ - va_list arg; - CURLcode result; - - if(!data) - return CURLE_BAD_FUNCTION_ARGUMENT; - - va_start(arg, tag); - - result = Curl_setopt(data, tag, arg); - - va_end(arg); - return result; -} - #ifdef CURLDEBUG struct socketmonitor { @@ -433,7 +422,7 @@ static int events_timer(struct Curl_multi *multi, /* multi handle */ */ static int poll2cselect(int pollmask) { - int omask=0; + int omask = 0; if(pollmask & POLLIN) omask |= CURL_CSELECT_IN; if(pollmask & POLLOUT) @@ -450,7 +439,7 @@ static int poll2cselect(int pollmask) */ static short socketcb2poll(int pollmask) { - short omask=0; + short omask = 0; if(pollmask & CURL_POLL_IN) omask |= POLLIN; if(pollmask & CURL_POLL_OUT) @@ -473,7 +462,7 @@ static int events_socket(struct Curl_easy *easy, /* easy handle */ { struct events *ev = userp; struct socketmonitor *m; - struct socketmonitor *prev=NULL; + struct socketmonitor *prev = NULL; #if defined(CURL_DISABLE_VERBOSE_STRINGS) (void) easy; @@ -561,7 +550,7 @@ static void events_setup(struct Curl_multi *multi, struct events *ev) static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) { bool done = FALSE; - CURLMcode mcode; + CURLMcode mcode = CURLM_OK; CURLcode result = CURLE_OK; while(!done) { @@ -569,14 +558,14 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) struct socketmonitor *m; struct pollfd *f; struct pollfd fds[4]; - int numfds=0; + int numfds = 0; int pollrc; int i; - struct timeval before; - struct timeval after; + struct curltime before; + struct curltime after; /* populate the fds[] array */ - for(m = ev->list, f=&fds[0]; m; m = m->next) { + for(m = ev->list, f = &fds[0]; m; m = m->next) { f->fd = m->socket.fd; f->events = m->socket.events; f->revents = 0; @@ -586,12 +575,12 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) } /* get the time stamp to use to figure out how long poll takes */ - before = curlx_tvnow(); + before = Curl_now(); /* wait for activity or timeout */ pollrc = Curl_poll(fds, numfds, (int)ev->ms); - after = curlx_tvnow(); + after = Curl_now(); ev->msbump = FALSE; /* reset here */ @@ -615,12 +604,18 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) } } - if(!ev->msbump) + if(!ev->msbump) { /* If nothing updated the timeout, we decrease it by the spent time. * If it was updated, it has the new timeout time stored already. */ - ev->ms += curlx_tvdiff(after, before); - + timediff_t timediff = Curl_timediff(after, before); + if(timediff > 0) { + if(timediff > ev->ms) + ev->ms = 0; + else + ev->ms -= (long)timediff; + } + } } else return CURLE_RECV_ERROR; @@ -647,7 +642,9 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) */ static CURLcode easy_events(struct Curl_multi *multi) { - struct events evs= {2, FALSE, 0, NULL, 0}; + /* this struct is made static to allow it to be used after this function + returns and curl_multi_remove_handle() is called */ + static struct events evs = {2, FALSE, 0, NULL, 0}; /* if running event-based, do some further multi inits */ events_setup(multi, &evs); @@ -664,7 +661,7 @@ static CURLcode easy_transfer(struct Curl_multi *multi) bool done = FALSE; CURLMcode mcode = CURLM_OK; CURLcode result = CURLE_OK; - struct timeval before; + struct curltime before; int without_fds = 0; /* count number of consecutive returns from curl_multi_wait() without any filedescriptors */ @@ -672,17 +669,17 @@ static CURLcode easy_transfer(struct Curl_multi *multi) int still_running = 0; int rc; - before = curlx_tvnow(); + before = Curl_now(); mcode = curl_multi_wait(multi, NULL, 0, 1000, &rc); if(!mcode) { if(!rc) { - struct timeval after = curlx_tvnow(); + struct curltime after = Curl_now(); /* If it returns without any filedescriptor instantly, we need to avoid busy-looping during periods where it has nothing particular to wait for */ - if(curlx_tvdiff(after, before) <= 10) { + if(Curl_timediff(after, before) <= 10) { without_fds++; if(without_fds > 2) { int sleep_ms = without_fds < 10 ? (1 << (without_fds - 1)) : 1000; @@ -765,6 +762,9 @@ static CURLcode easy_perform(struct Curl_easy *data, bool events) data->multi_easy = multi; } + if(multi->in_callback) + return CURLE_RECURSIVE_API_CALL; + /* Copy the MAXCONNECTS option to the multi handle */ curl_multi_setopt(multi, CURLMOPT_MAXCONNECTS, data->set.maxconnects); @@ -773,8 +773,7 @@ static CURLcode easy_perform(struct Curl_easy *data, bool events) curl_multi_cleanup(multi); if(mcode == CURLM_OUT_OF_MEMORY) return CURLE_OUT_OF_MEMORY; - else - return CURLE_FAILED_INIT; + return CURLE_FAILED_INIT; } sigpipe_ignore(data, &pipe_st); @@ -854,6 +853,44 @@ CURLcode curl_easy_getinfo(struct Curl_easy *data, CURLINFO info, ...) return result; } +static CURLcode dupset(struct Curl_easy *dst, struct Curl_easy *src) +{ + CURLcode result = CURLE_OK; + enum dupstring i; + + /* Copy src->set into dst->set first, then deal with the strings + afterwards */ + dst->set = src->set; + Curl_mime_initpart(&dst->set.mimepost, dst); + + /* clear all string pointers first */ + memset(dst->set.str, 0, STRING_LAST * sizeof(char *)); + + /* duplicate all strings */ + for(i = (enum dupstring)0; i< STRING_LASTZEROTERMINATED; i++) { + result = Curl_setstropt(&dst->set.str[i], src->set.str[i]); + if(result) + return result; + } + + /* duplicate memory areas pointed to */ + i = STRING_COPYPOSTFIELDS; + if(src->set.postfieldsize && src->set.str[i]) { + /* postfieldsize is curl_off_t, Curl_memdup() takes a size_t ... */ + dst->set.str[i] = Curl_memdup(src->set.str[i], + curlx_sotouz(src->set.postfieldsize)); + if(!dst->set.str[i]) + return CURLE_OUT_OF_MEMORY; + /* point to the new copy */ + dst->set.postfields = dst->set.str[i]; + } + + /* Duplicate mime data. */ + result = Curl_mime_duppart(&dst->set.mimepost, &src->set.mimepost); + + return result; +} + /* * curl_easy_duphandle() is an external interface to allow duplication of a * given input easy handle. The returned handle will be a new working handle @@ -871,7 +908,7 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) * the likeliness of us forgetting to init a buffer here in the future. */ outcurl->set.buffer_size = data->set.buffer_size; - outcurl->state.buffer = malloc(CURL_BUFSIZE(outcurl->set.buffer_size) + 1); + outcurl->state.buffer = malloc(outcurl->set.buffer_size + 1); if(!outcurl->state.buffer) goto fail; @@ -881,7 +918,7 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) outcurl->state.headersize = HEADERSIZE; /* copy all userdefined values */ - if(Curl_dupset(outcurl, data)) + if(dupset(outcurl, data)) goto fail; /* the connection cache is setup on demand */ @@ -971,7 +1008,7 @@ void curl_easy_reset(struct Curl_easy *data) /* zero out UserDefined data: */ Curl_freeset(data); memset(&data->set, 0, sizeof(struct UserDefined)); - (void)Curl_init_userdefined(&data->set); + (void)Curl_init_userdefined(data); /* zero out Progress data: */ memset(&data->progress, 0, sizeof(struct Progress)); @@ -981,6 +1018,11 @@ void curl_easy_reset(struct Curl_easy *data) data->progress.flags |= PGRS_HIDE; data->state.current_speed = -1; /* init to negative == impossible */ + + /* zero out authentication data: */ + memset(&data->state.authhost, 0, sizeof(struct auth)); + memset(&data->state.authproxy, 0, sizeof(struct auth)); + Curl_digest_cleanup(data); } /* @@ -992,6 +1034,9 @@ void curl_easy_reset(struct Curl_easy *data) * the pausing, you may get your write callback called at this point. * * Action is a bitmask consisting of CURLPAUSE_* bits in curl/curl.h + * + * NOTE: This is one of few API functions that are allowed to be called from + * within a callback. */ CURLcode curl_easy_pause(struct Curl_easy *data, int action) { @@ -1008,19 +1053,43 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action) /* put it back in the keepon */ k->keepon = newstate; - if(!(newstate & KEEP_RECV_PAUSE) && data->state.tempwrite) { - /* we have a buffer for sending that we now seem to be able to deliver - since the receive pausing is lifted! */ + if(!(newstate & KEEP_RECV_PAUSE) && data->state.tempcount) { + /* there are buffers for sending that can be delivered as the receive + pausing is lifted! */ + unsigned int i; + unsigned int count = data->state.tempcount; + struct tempbuf writebuf[3]; /* there can only be three */ + struct connectdata *conn = data->easy_conn; + struct Curl_easy *saved_data = NULL; + + /* copy the structs to allow for immediate re-pausing */ + for(i = 0; i < data->state.tempcount; i++) { + writebuf[i] = data->state.tempwrite[i]; + data->state.tempwrite[i].buf = NULL; + } + data->state.tempcount = 0; + + /* set the connection's current owner */ + if(conn->data != data) { + saved_data = conn->data; + conn->data = data; + } + + for(i = 0; i < count; i++) { + /* even if one function returns error, this loops through and frees all + buffers */ + if(!result) + result = Curl_client_write(conn, writebuf[i].type, writebuf[i].buf, + writebuf[i].len); + free(writebuf[i].buf); + } - /* get the pointer in local copy since the function may return PAUSE - again and then we'll get a new copy allocted and stored in - the tempwrite variables */ - char *tempwrite = data->state.tempwrite; + /* recover previous owner of the connection */ + if(saved_data) + conn->data = saved_data; - data->state.tempwrite = NULL; - result = Curl_client_chop_write(data->easy_conn, data->state.tempwritetype, - tempwrite, data->state.tempwritesize); - free(tempwrite); + if(result) + return result; } /* if there's no error and we're not pausing both directions, we want @@ -1028,7 +1097,7 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action) if(!result && ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) != (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) ) - Curl_expire(data, 0); /* get this handle going again */ + Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */ return result; } @@ -1070,6 +1139,9 @@ CURLcode curl_easy_recv(struct Curl_easy *data, void *buffer, size_t buflen, ssize_t n1; struct connectdata *c; + if(Curl_is_in_callback(data)) + return CURLE_RECURSIVE_API_CALL; + result = easy_connection(data, &sfd, &c); if(result) return result; @@ -1097,6 +1169,9 @@ CURLcode curl_easy_send(struct Curl_easy *data, const void *buffer, ssize_t n1; struct connectdata *c = NULL; + if(Curl_is_in_callback(data)) + return CURLE_RECURSIVE_API_CALL; + result = easy_connection(data, &sfd, &c); if(result) return result; diff --git a/lib/escape.c b/lib/escape.c index 9c811b8..b7e2d32 100644 --- a/lib/escape.c +++ b/lib/escape.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -84,14 +84,14 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string, char *testing_ptr = NULL; unsigned char in; /* we need to treat the characters unsigned */ size_t newlen; - size_t strindex=0; + size_t strindex = 0; size_t length; CURLcode result; if(inlength < 0) return NULL; - alloc = (inlength?(size_t)inlength:strlen(string))+1; + alloc = (inlength?(size_t)inlength:strlen(string)) + 1; newlen = alloc; ns = malloc(alloc); @@ -104,7 +104,7 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string, if(Curl_isunreserved(in)) /* just copy this */ - ns[strindex++]=in; + ns[strindex++] = in; else { /* encode it */ newlen += 2; /* the size grows with two, since this'll become a %XX */ @@ -113,12 +113,10 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string, testing_ptr = Curl_saferealloc(ns, alloc); if(!testing_ptr) return NULL; - else { - ns = testing_ptr; - } + ns = testing_ptr; } - result = Curl_convert_to_network(data, &in, 1); + result = Curl_convert_to_network(data, (char *)&in, 1); if(result) { /* Curl_convert_to_network calls failf if unsuccessful */ free(ns); @@ -127,11 +125,11 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string, snprintf(&ns[strindex], 4, "%%%02X", in); - strindex+=3; + strindex += 3; } string++; } - ns[strindex]=0; /* terminate it */ + ns[strindex] = 0; /* terminate it */ return ns; } @@ -150,10 +148,10 @@ CURLcode Curl_urldecode(struct Curl_easy *data, char **ostring, size_t *olen, bool reject_ctrl) { - size_t alloc = (length?length:strlen(string))+1; + size_t alloc = (length?length:strlen(string)) + 1; char *ns = malloc(alloc); unsigned char in; - size_t strindex=0; + size_t strindex = 0; unsigned long hex; CURLcode result; @@ -175,15 +173,15 @@ CURLcode Curl_urldecode(struct Curl_easy *data, in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */ - result = Curl_convert_from_network(data, &in, 1); + result = Curl_convert_from_network(data, (char *)&in, 1); if(result) { /* Curl_convert_from_network calls failf if unsuccessful */ free(ns); return result; } - string+=2; - alloc-=2; + string += 2; + alloc -= 2; } if(reject_ctrl && (in < 0x20)) { @@ -194,7 +192,7 @@ CURLcode Curl_urldecode(struct Curl_easy *data, ns[strindex++] = in; string++; } - ns[strindex]=0; /* terminate it */ + ns[strindex] = 0; /* terminate it */ if(olen) /* store output size */ diff --git a/lib/file.c b/lib/file.c index e90902c..db04cc2 100644 --- a/lib/file.c +++ b/lib/file.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -61,6 +61,7 @@ #include "url.h" #include "parsedate.h" /* for the week day and month names */ #include "warnless.h" +#include "curl_range.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" @@ -108,6 +109,7 @@ const struct Curl_handler Curl_handler_file = { ZERO_NULL, /* perform_getsock */ file_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ 0, /* defport */ CURLPROTO_FILE, /* protocol */ PROTOPT_NONETWORK | PROTOPT_NOURLQUERY /* flags */ @@ -124,60 +126,6 @@ static CURLcode file_setup_connection(struct connectdata *conn) return CURLE_OK; } - /* - Check if this is a range download, and if so, set the internal variables - properly. This code is copied from the FTP implementation and might as - well be factored out. - */ -static CURLcode file_range(struct connectdata *conn) -{ - curl_off_t from, to; - curl_off_t totalsize=-1; - char *ptr; - char *ptr2; - struct Curl_easy *data = conn->data; - - if(data->state.use_range && data->state.range) { - from=curlx_strtoofft(data->state.range, &ptr, 0); - while(*ptr && (ISSPACE(*ptr) || (*ptr=='-'))) - ptr++; - to=curlx_strtoofft(ptr, &ptr2, 0); - if(ptr == ptr2) { - /* we didn't get any digit */ - to=-1; - } - if((-1 == to) && (from>=0)) { - /* X - */ - data->state.resume_from = from; - DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n", - from)); - } - else if(from < 0) { - /* -Y */ - data->req.maxdownload = -from; - data->state.resume_from = from; - DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n", - -from)); - } - else { - /* X-Y */ - totalsize = to-from; - data->req.maxdownload = totalsize+1; /* include last byte */ - data->state.resume_from = from; - DEBUGF(infof(data, "RANGE from %" CURL_FORMAT_CURL_OFF_T - " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n", - from, data->req.maxdownload)); - } - DEBUGF(infof(data, "range-download from %" CURL_FORMAT_CURL_OFF_T - " to %" CURL_FORMAT_CURL_OFF_T ", totally %" - CURL_FORMAT_CURL_OFF_T " bytes\n", - from, to, data->req.maxdownload)); - } - else - data->req.maxdownload = -1; - return CURLE_OK; -} - /* * file_connect() gets called from Curl_protocol_connect() to allow us to * do protocol-specific actions at connect-time. We emulate a @@ -225,7 +173,7 @@ static CURLcode file_connect(struct connectdata *conn, bool *done) } /* change path separators from '/' to '\\' for DOS, Windows and OS/2 */ - for(i=0; i < real_path_len; ++i) + for(i = 0; i < real_path_len; ++i) if(actual_path[i] == '/') actual_path[i] = '\\'; else if(!actual_path[i]) { /* binary zero */ @@ -311,7 +259,6 @@ static CURLcode file_upload(struct connectdata *conn) size_t nread; size_t nwrite; curl_off_t bytecount = 0; - struct timeval now = Curl_tvnow(); struct_stat file_stat; const char *buf2; @@ -355,13 +302,12 @@ static CURLcode file_upload(struct connectdata *conn) failf(data, "Can't get the size of %s", file->path); return CURLE_WRITE_ERROR; } - else - data->state.resume_from = (curl_off_t)file_stat.st_size; + data->state.resume_from = (curl_off_t)file_stat.st_size; } while(!result) { int readcount; - result = Curl_fillreadbuffer(conn, BUFSIZE, &readcount); + result = Curl_fillreadbuffer(conn, (int)data->set.buffer_size, &readcount); if(result) break; @@ -400,7 +346,7 @@ static CURLcode file_upload(struct connectdata *conn) if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, now); + result = Curl_speedcheck(data, Curl_now()); } if(!result && Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; @@ -429,15 +375,14 @@ static CURLcode file_do(struct connectdata *conn, bool *done) struct_stat statbuf; /* struct_stat instead of struct stat just to allow the Windows version to have a different struct without having to redefine the simple word 'stat' */ - curl_off_t expected_size=0; + curl_off_t expected_size = 0; bool size_known; - bool fstated=FALSE; + bool fstated = FALSE; ssize_t nread; struct Curl_easy *data = conn->data; char *buf = data->state.buffer; curl_off_t bytecount = 0; int fd; - struct timeval now = Curl_tvnow(); struct FILEPROTO *file; *done = TRUE; /* unconditionally */ @@ -458,12 +403,12 @@ static CURLcode file_do(struct connectdata *conn, bool *done) /* we could stat it, then read out the size */ expected_size = statbuf.st_size; /* and store the modification time */ - data->info.filetime = (long)statbuf.st_mtime; + data->info.filetime = statbuf.st_mtime; fstated = TRUE; } if(fstated && !data->state.range && data->set.timecondition) { - if(!Curl_meets_timecondition(data, (time_t)data->info.filetime)) { + if(!Curl_meets_timecondition(data, data->info.filetime)) { *done = TRUE; return CURLE_OK; } @@ -476,9 +421,10 @@ static CURLcode file_do(struct connectdata *conn, bool *done) time_t filetime; struct tm buffer; const struct tm *tm = &buffer; - snprintf(buf, CURL_BUFSIZE(data->set.buffer_size), + char header[80]; + snprintf(header, sizeof(header), "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); + result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0); if(result) return result; @@ -493,7 +439,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) return result; /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ - snprintf(buf, BUFSIZE-1, + snprintf(header, sizeof(header), "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], tm->tm_mday, @@ -502,7 +448,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) tm->tm_hour, tm->tm_min, tm->tm_sec); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); + result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0); if(!result) /* set the file size to make it available post transfer */ Curl_pgrsSetDownloadSize(data, expected_size); @@ -510,7 +456,9 @@ static CURLcode file_do(struct connectdata *conn, bool *done) } /* Check whether file range has been specified */ - file_range(conn); + result = Curl_range(conn); + if(result) + return result; /* Adjust the start offset in case we want to get the N last bytes * of the stream iff the filesize could be determined */ @@ -519,8 +467,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) failf(data, "Can't get the size of file."); return CURLE_READ_ERROR; } - else - data->state.resume_from += (curl_off_t)statbuf.st_size; + data->state.resume_from += (curl_off_t)statbuf.st_size; } if(data->state.resume_from <= expected_size) @@ -559,12 +506,11 @@ static CURLcode file_do(struct connectdata *conn, bool *done) size_t bytestoread; if(size_known) { - bytestoread = - (expected_size < CURL_OFF_T_C(BUFSIZE) - CURL_OFF_T_C(1)) ? - curlx_sotouz(expected_size) : BUFSIZE - 1; + bytestoread = (expected_size < data->set.buffer_size) ? + curlx_sotouz(expected_size) : (size_t)data->set.buffer_size; } else - bytestoread = BUFSIZE-1; + bytestoread = data->set.buffer_size-1; nread = read(fd, buf, bytestoread); @@ -587,7 +533,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, now); + result = Curl_speedcheck(data, Curl_now()); } if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; diff --git a/lib/fileinfo.c b/lib/fileinfo.c index 144c65b..3872988 100644 --- a/lib/fileinfo.c +++ b/lib/fileinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,23 +28,19 @@ /* The last #include file should be: */ #include "memdebug.h" -struct curl_fileinfo *Curl_fileinfo_alloc(void) +struct fileinfo *Curl_fileinfo_alloc(void) { - struct curl_fileinfo *tmp = malloc(sizeof(struct curl_fileinfo)); - if(!tmp) - return NULL; - memset(tmp, 0, sizeof(struct curl_fileinfo)); - return tmp; + return calloc(1, sizeof(struct fileinfo)); } void Curl_fileinfo_dtor(void *user, void *element) { - struct curl_fileinfo *finfo = element; + struct fileinfo *finfo = element; (void) user; if(!finfo) return; - Curl_safefree(finfo->b_data); + Curl_safefree(finfo->info.b_data); free(finfo); } diff --git a/lib/fileinfo.h b/lib/fileinfo.h index 5324f1a..c5d0ee5 100644 --- a/lib/fileinfo.h +++ b/lib/fileinfo.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010, Daniel Stenberg, , et al. + * Copyright (C) 2010, 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,11 +23,15 @@ ***************************************************************************/ #include +#include "llist.h" -struct curl_fileinfo *Curl_fileinfo_alloc(void); +struct fileinfo { + struct curl_fileinfo info; + struct curl_llist_element list; +}; -void Curl_fileinfo_dtor(void *, void *); +struct fileinfo *Curl_fileinfo_alloc(void); -struct curl_fileinfo *Curl_fileinfo_dup(const struct curl_fileinfo *src); +void Curl_fileinfo_dtor(void *, void *); #endif /* HEADER_CURL_FILEINFO_H */ diff --git a/lib/formdata.c b/lib/formdata.c index c214ba2..f912410 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -32,6 +32,8 @@ #include "urldata.h" /* for struct Curl_easy */ #include "formdata.h" +#include "mime.h" +#include "non-ascii.h" #include "vtls/vtls.h" #include "strcase.h" #include "sendf.h" @@ -42,21 +44,11 @@ #include "curl_memory.h" #include "memdebug.h" -#ifndef HAVE_BASENAME -static char *Curl_basename(char *path); -#define basename(x) Curl_basename((x)) -#endif - -static size_t readfromfile(struct Form *form, char *buffer, size_t size); -static char *formboundary(struct Curl_easy *data); /* What kind of Content-Type to use on un-specified files with unrecognized extensions. */ #define HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream" -#define FORM_FILE_SEPARATOR ',' -#define FORM_TYPE_SEPARATOR ';' - #define HTTPPOST_PTRNAME CURL_HTTPPOST_PTRNAME #define HTTPPOST_FILENAME CURL_HTTPPOST_FILENAME #define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS @@ -99,7 +91,7 @@ AddHttpPost(char *name, size_t namelength, post->contenttype = contenttype; post->contentheader = contentHeader; post->showfilename = showfilename; - post->userp = userp, + post->userp = userp; post->flags = flags | CURL_HTTPPOST_LARGE; } else @@ -163,60 +155,6 @@ static FormInfo * AddFormInfo(char *value, /*************************************************************************** * - * ContentTypeForFilename() - * - * Provides content type for filename if one of the known types (else - * (either the prevtype or the default is returned). - * - * Returns some valid contenttype for filename. - * - ***************************************************************************/ -static const char *ContentTypeForFilename(const char *filename, - const char *prevtype) -{ - const char *contenttype = NULL; - unsigned int i; - /* - * No type was specified, we scan through a few well-known - * extensions and pick the first we match! - */ - struct ContentType { - const char *extension; - const char *type; - }; - static const struct ContentType ctts[]={ - {".gif", "image/gif"}, - {".jpg", "image/jpeg"}, - {".jpeg", "image/jpeg"}, - {".txt", "text/plain"}, - {".html", "text/html"}, - {".xml", "application/xml"} - }; - - if(prevtype) - /* default to the previously set/used! */ - contenttype = prevtype; - else - contenttype = HTTPPOST_CONTENTTYPE_DEFAULT; - - if(filename) { /* in case a NULL was passed in */ - for(i=0; i= strlen(ctts[i].extension)) { - if(strcasecompare(filename + - strlen(filename) - strlen(ctts[i].extension), - ctts[i].extension)) { - contenttype = ctts[i].type; - break; - } - } - } - } - /* we have a contenttype by now */ - return contenttype; -} - -/*************************************************************************** - * * FormAdd() * * Stores a formpost parameter and builds the appropriate linked list. @@ -275,7 +213,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, struct curl_httppost *post = NULL; CURLformoption option; struct curl_forms *forms = NULL; - char *array_value=NULL; /* value read from an array */ + char *array_value = NULL; /* value read from an array */ /* This is a state variable, that if TRUE means that we're parsing an array that we got passed to us. If FALSE we're parsing the input @@ -342,6 +280,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, #else current_form->flags |= HTTPPOST_PTRNAME; /* fall through */ #endif + /* FALLTHROUGH */ case CURLFORM_COPYNAME: if(current_form->name) return_value = CURL_FORMADD_OPTION_TWICE; @@ -629,70 +568,85 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, return_value = CURL_FORMADD_INCOMPLETE; break; } - else { - if(((form->flags & HTTPPOST_FILENAME) || - (form->flags & HTTPPOST_BUFFER)) && - !form->contenttype) { - char *f = form->flags & HTTPPOST_BUFFER? - form->showfilename : form->value; - - /* our contenttype is missing */ - form->contenttype = strdup(ContentTypeForFilename(f, prevtype)); - if(!form->contenttype) { - return_value = CURL_FORMADD_MEMORY; - break; - } - form->contenttype_alloc = TRUE; + if(((form->flags & HTTPPOST_FILENAME) || + (form->flags & HTTPPOST_BUFFER)) && + !form->contenttype) { + char *f = form->flags & HTTPPOST_BUFFER? + form->showfilename : form->value; + char const *type; + type = Curl_mime_contenttype(f); + if(!type) + type = prevtype; + if(!type) + type = FILE_CONTENTTYPE_DEFAULT; + + /* our contenttype is missing */ + form->contenttype = strdup(type); + if(!form->contenttype) { + return_value = CURL_FORMADD_MEMORY; + break; } - if(!(form->flags & HTTPPOST_PTRNAME) && - (form == first_form) ) { - /* Note that there's small risk that form->name is NULL here if the - app passed in a bad combo, so we better check for that first. */ - if(form->name) { - /* copy name (without strdup; possibly contains null characters) */ - form->name = Curl_memdup(form->name, form->namelength? - form->namelength: - strlen(form->name)+1); - } - if(!form->name) { - return_value = CURL_FORMADD_MEMORY; + form->contenttype_alloc = TRUE; + } + if(form->name && form->namelength) { + /* Name should not contain nul bytes. */ + size_t i; + for(i = 0; i < form->namelength; i++) + if(!form->name[i]) { + return_value = CURL_FORMADD_NULL; break; } - form->name_alloc = TRUE; + if(return_value != CURL_FORMADD_OK) + break; + } + if(!(form->flags & HTTPPOST_PTRNAME) && + (form == first_form) ) { + /* Note that there's small risk that form->name is NULL here if the + app passed in a bad combo, so we better check for that first. */ + if(form->name) { + /* copy name (without strdup; possibly not nul-terminated) */ + form->name = Curl_memdup(form->name, form->namelength? + form->namelength: + strlen(form->name) + 1); } - if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE | - HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER | - HTTPPOST_CALLBACK)) && form->value) { - /* copy value (without strdup; possibly contains null characters) */ - size_t clen = (size_t) form->contentslength; - if(!clen) - clen = strlen(form->value)+1; + if(!form->name) { + return_value = CURL_FORMADD_MEMORY; + break; + } + form->name_alloc = TRUE; + } + if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE | + HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER | + HTTPPOST_CALLBACK)) && form->value) { + /* copy value (without strdup; possibly contains null characters) */ + size_t clen = (size_t) form->contentslength; + if(!clen) + clen = strlen(form->value) + 1; - form->value = Curl_memdup(form->value, clen); + form->value = Curl_memdup(form->value, clen); - if(!form->value) { - return_value = CURL_FORMADD_MEMORY; - break; - } - form->value_alloc = TRUE; - } - post = AddHttpPost(form->name, form->namelength, - form->value, form->contentslength, - form->buffer, form->bufferlength, - form->contenttype, form->flags, - form->contentheader, form->showfilename, - form->userp, - post, httppost, - last_post); - - if(!post) { + if(!form->value) { return_value = CURL_FORMADD_MEMORY; break; } - - if(form->contenttype) - prevtype = form->contenttype; + form->value_alloc = TRUE; + } + post = AddHttpPost(form->name, form->namelength, + form->value, form->contentslength, + form->buffer, form->bufferlength, + form->contenttype, form->flags, + form->contentheader, form->showfilename, + form->userp, + post, httppost, + last_post); + + if(!post) { + return_value = CURL_FORMADD_MEMORY; + break; } + + if(form->contenttype) + prevtype = form->contenttype; } if(CURL_FORMADD_OK != return_value) { /* On error, free allocated fields for nodes of the FormInfo linked @@ -750,211 +704,6 @@ CURLFORMcode curl_formadd(struct curl_httppost **httppost, return result; } -#ifdef __VMS -#include -/* - * get_vms_file_size does what it takes to get the real size of the file - * - * For fixed files, find out the size of the EOF block and adjust. - * - * For all others, have to read the entire file in, discarding the contents. - * Most posted text files will be small, and binary files like zlib archives - * and CD/DVD images should be either a STREAM_LF format or a fixed format. - * - */ -curl_off_t VmsRealFileSize(const char *name, - const struct_stat *stat_buf) -{ - char buffer[8192]; - curl_off_t count; - int ret_stat; - FILE * file; - - file = fopen(name, FOPEN_READTEXT); /* VMS */ - if(file == NULL) - return 0; - - count = 0; - ret_stat = 1; - while(ret_stat > 0) { - ret_stat = fread(buffer, 1, sizeof(buffer), file); - if(ret_stat != 0) - count += ret_stat; - } - fclose(file); - - return count; -} - -/* - * - * VmsSpecialSize checks to see if the stat st_size can be trusted and - * if not to call a routine to get the correct size. - * - */ -static curl_off_t VmsSpecialSize(const char *name, - const struct_stat *stat_buf) -{ - switch(stat_buf->st_fab_rfm) { - case FAB$C_VAR: - case FAB$C_VFC: - return VmsRealFileSize(name, stat_buf); - break; - default: - return stat_buf->st_size; - } -} - -#endif - -#ifndef __VMS -#define filesize(name, stat_data) (stat_data.st_size) -#else - /* Getting the expected file size needs help on VMS */ -#define filesize(name, stat_data) VmsSpecialSize(name, &stat_data) -#endif - -/* - * AddFormData() adds a chunk of data to the FormData linked list. - * - * size is incremented by the chunk length, unless it is NULL - */ -static CURLcode AddFormData(struct FormData **formp, - enum formtype type, - const void *line, - curl_off_t length, - curl_off_t *size) -{ - struct FormData *newform; - char *alloc2 = NULL; - CURLcode result = CURLE_OK; - if(length < 0 || (size && *size < 0)) - return CURLE_BAD_FUNCTION_ARGUMENT; - - newform = malloc(sizeof(struct FormData)); - if(!newform) - return CURLE_OUT_OF_MEMORY; - newform->next = NULL; - - if(type <= FORM_CONTENT) { - /* we make it easier for plain strings: */ - if(!length) - length = strlen((char *)line); -#if (SIZEOF_SIZE_T < CURL_SIZEOF_CURL_OFF_T) - else if(length >= (curl_off_t)(size_t)-1) { - result = CURLE_BAD_FUNCTION_ARGUMENT; - goto error; - } -#endif - if(type != FORM_DATAMEM) { - newform->line = malloc((size_t)length+1); - if(!newform->line) { - result = CURLE_OUT_OF_MEMORY; - goto error; - } - alloc2 = newform->line; - memcpy(newform->line, line, (size_t)length); - - /* zero terminate for easier debugging */ - newform->line[(size_t)length]=0; - } - else { - newform->line = (char *)line; - type = FORM_DATA; /* in all other aspects this is just FORM_DATA */ - } - newform->length = (size_t)length; - } - else - /* For callbacks and files we don't have any actual data so we just keep a - pointer to whatever this points to */ - newform->line = (char *)line; - - newform->type = type; - - if(size) { - if(type != FORM_FILE) - /* for static content as well as callback data we add the size given - as input argument */ - *size += length; - else { - /* Since this is a file to be uploaded here, add the size of the actual - file */ - if(strcmp("-", newform->line)) { - struct_stat file; - if(!stat(newform->line, &file) && !S_ISDIR(file.st_mode)) - *size += filesize(newform->line, file); - else { - result = CURLE_BAD_FUNCTION_ARGUMENT; - goto error; - } - } - } - } - - if(*formp) { - (*formp)->next = newform; - *formp = newform; - } - else - *formp = newform; - - return CURLE_OK; - error: - if(newform) - free(newform); - if(alloc2) - free(alloc2); - return result; -} - -/* - * AddFormDataf() adds printf()-style formatted data to the formdata chain. - */ - -static CURLcode AddFormDataf(struct FormData **formp, - curl_off_t *size, - const char *fmt, ...) -{ - char *s; - CURLcode result; - va_list ap; - va_start(ap, fmt); - s = curl_mvaprintf(fmt, ap); - va_end(ap); - - if(!s) - return CURLE_OUT_OF_MEMORY; - - result = AddFormData(formp, FORM_DATAMEM, s, 0, size); - if(result) - free(s); - - return result; -} - -/* - * Curl_formclean() is used from http.c, this cleans a built FormData linked - * list - */ -void Curl_formclean(struct FormData **form_ptr) -{ - struct FormData *next, *form; - - form = *form_ptr; - if(!form) - return; - - do { - next=form->next; /* the following form line */ - if(form->type <= FORM_CONTENT) - free(form->line); /* free the line */ - free(form); /* free the struct */ - form = next; - } while(form); /* continue */ - - *form_ptr = NULL; -} - /* * curl_formget() * Serialize a curl_httppost struct. @@ -966,42 +715,34 @@ int curl_formget(struct curl_httppost *form, void *arg, curl_formget_callback append) { CURLcode result; - curl_off_t size; - struct FormData *data, *ptr; + curl_mimepart toppart; - result = Curl_getformdata(NULL, &data, form, NULL, &size); - if(result) - return (int)result; - - for(ptr = data; ptr; ptr = ptr->next) { - if((ptr->type == FORM_FILE) || (ptr->type == FORM_CALLBACK)) { - char buffer[8192]; - size_t nread; - struct Form temp; - - Curl_FormInit(&temp, ptr); - - do { - nread = readfromfile(&temp, buffer, sizeof(buffer)); - if((nread == (size_t) -1) || - (nread > sizeof(buffer)) || - (nread != append(arg, buffer, nread))) { - if(temp.fp) - fclose(temp.fp); - Curl_formclean(&data); - return -1; - } - } while(nread); - } - else { - if(ptr->length != append(arg, ptr->line, ptr->length)) { - Curl_formclean(&data); - return -1; - } + Curl_mime_initpart(&toppart, NULL); /* default form is empty */ + result = Curl_getformdata(NULL, &toppart, form, NULL); + if(!result) + result = Curl_mime_prepare_headers(&toppart, "multipart/form-data", + NULL, MIMESTRATEGY_FORM); + + while(!result) { + char buffer[8192]; + size_t nread = Curl_mime_read(buffer, 1, sizeof buffer, &toppart); + + if(!nread) + break; + + switch(nread) { + default: + if(append(arg, buffer, nread) != nread) + result = CURLE_READ_ERROR; + break; + case CURL_READFUNC_ABORT: + case CURL_READFUNC_PAUSE: + break; } } - Curl_formclean(&data); - return 0; + + Curl_mime_cleanpart(&toppart); + return (int) result; } /* @@ -1017,7 +758,7 @@ void curl_formfree(struct curl_httppost *form) return; do { - next=form->next; /* the following form line */ + next = form->next; /* the following form line */ /* recurse to sub-contents */ curl_formfree(form->more); @@ -1035,118 +776,29 @@ void curl_formfree(struct curl_httppost *form) } while(form); /* continue */ } -#ifndef HAVE_BASENAME -/* - (Quote from The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 - Edition) - - The basename() function shall take the pathname pointed to by path and - return a pointer to the final component of the pathname, deleting any - trailing '/' characters. - - If the string pointed to by path consists entirely of the '/' character, - basename() shall return a pointer to the string "/". If the string pointed - to by path is exactly "//", it is implementation-defined whether '/' or "//" - is returned. - - If path is a null pointer or points to an empty string, basename() shall - return a pointer to the string ".". - - The basename() function may modify the string pointed to by path, and may - return a pointer to static storage that may then be overwritten by a - subsequent call to basename(). - - The basename() function need not be reentrant. A function that is not - required to be reentrant is not required to be thread-safe. - -*/ -static char *Curl_basename(char *path) -{ - /* Ignore all the details above for now and make a quick and simple - implementaion here */ - char *s1; - char *s2; - - s1=strrchr(path, '/'); - s2=strrchr(path, '\\'); - - if(s1 && s2) { - path = (s1 > s2? s1 : s2)+1; - } - else if(s1) - path = s1 + 1; - else if(s2) - path = s2 + 1; - - return path; -} -#endif - -static char *strippath(const char *fullfile) -{ - char *filename; - char *base; - filename = strdup(fullfile); /* duplicate since basename() may ruin the - buffer it works on */ - if(!filename) - return NULL; - base = strdup(basename(filename)); - - free(filename); /* free temporary buffer */ - - return base; /* returns an allocated string or NULL ! */ -} -static CURLcode formdata_add_filename(const struct curl_httppost *file, - struct FormData **form, - curl_off_t *size) +/* Set mime part name, taking care of non nul-terminated name string. */ +static CURLcode setname(curl_mimepart *part, const char *name, size_t len) { - CURLcode result = CURLE_OK; - char *filename = file->showfilename; - char *filebasename = NULL; - char *filename_escaped = NULL; - - if(!filename) { - filebasename = strippath(file->contents); - if(!filebasename) - return CURLE_OUT_OF_MEMORY; - filename = filebasename; - } - - if(strchr(filename, '\\') || strchr(filename, '"')) { - char *p0, *p1; + char *zname; + CURLcode res; - /* filename need be escaped */ - filename_escaped = malloc(strlen(filename)*2+1); - if(!filename_escaped) { - free(filebasename); - return CURLE_OUT_OF_MEMORY; - } - p0 = filename_escaped; - p1 = filename; - while(*p1) { - if(*p1 == '\\' || *p1 == '"') - *p0++ = '\\'; - *p0++ = *p1++; - } - *p0 = '\0'; - filename = filename_escaped; - } - result = AddFormDataf(form, size, - "; filename=\"%s\"", - filename); - free(filename_escaped); - free(filebasename); - return result; + if(!name || !len) + return curl_mime_name(part, name); + zname = malloc(len + 1); + if(!zname) + return CURLE_OUT_OF_MEMORY; + memcpy(zname, name, len); + zname[len] = '\0'; + res = curl_mime_name(part, zname); + free(zname); + return res; } /* - * Curl_getformdata() converts a linked list of "meta data" into a complete - * (possibly huge) multipart formdata. The input list is in 'post', while the - * output resulting linked lists gets stored in '*finalform'. *sizep will get - * the total size of the whole POST. - * A multipart/form_data content-type is built, unless a custom content-type - * is passed in 'custom_content_type'. + * Curl_getformdata() converts a linked list of "meta data" into a mime + * structure. The input list is in 'post', while the output is stored in + * mime part at '*finalform'. * * This function will not do a failf() for the potential memory failures but * should for all other errors it spots. Just note that this function MAY get @@ -1154,429 +806,121 @@ static CURLcode formdata_add_filename(const struct curl_httppost *file, */ CURLcode Curl_getformdata(struct Curl_easy *data, - struct FormData **finalform, + curl_mimepart *finalform, struct curl_httppost *post, - const char *custom_content_type, - curl_off_t *sizep) + curl_read_callback fread_func) { - struct FormData *form = NULL; - struct FormData *firstform; - struct curl_httppost *file; CURLcode result = CURLE_OK; + curl_mime *form = NULL; + curl_mime *multipart; + curl_mimepart *part; + struct curl_httppost *file; - curl_off_t size = 0; /* support potentially ENORMOUS formposts */ - char *boundary; - char *fileboundary = NULL; - struct curl_slist *curList; - - *finalform = NULL; /* default form is empty */ + Curl_mime_cleanpart(finalform); /* default form is empty */ if(!post) return result; /* no input => no output! */ - boundary = formboundary(data); - if(!boundary) - return CURLE_OUT_OF_MEMORY; - - /* Make the first line of the output */ - result = AddFormDataf(&form, NULL, - "%s; boundary=%s\r\n", - custom_content_type?custom_content_type: - "Content-Type: multipart/form-data", - boundary); - - if(result) { - free(boundary); - return result; - } - /* we DO NOT include that line in the total size of the POST, since it'll be - part of the header! */ - - firstform = form; - - do { - - if(size) { - result = AddFormDataf(&form, &size, "\r\n"); - if(result) - break; - } - - /* boundary */ - result = AddFormDataf(&form, &size, "--%s\r\n", boundary); - if(result) - break; - - /* Maybe later this should be disabled when a custom_content_type is - passed, since Content-Disposition is not meaningful for all multipart - types. - */ - result = AddFormDataf(&form, &size, - "Content-Disposition: form-data; name=\""); - if(result) - break; - - result = AddFormData(&form, FORM_DATA, post->name, post->namelength, - &size); - if(result) - break; + form = curl_mime_init(data); + if(!form) + result = CURLE_OUT_OF_MEMORY; - result = AddFormDataf(&form, &size, "\""); - if(result) - break; + if(!result) + result = curl_mime_subparts(finalform, form); + /* Process each top part. */ + for(; !result && post; post = post->next) { + /* If we have more than a file here, create a mime subpart and fill it. */ + multipart = form; if(post->more) { - /* If used, this is a link to more file names, we must then do - the magic to include several files with the same field name */ - - free(fileboundary); - fileboundary = formboundary(data); - if(!fileboundary) { + part = curl_mime_addpart(form); + if(!part) result = CURLE_OUT_OF_MEMORY; - break; + if(!result) + result = setname(part, post->name, post->namelength); + if(!result) { + multipart = curl_mime_init(data); + if(!multipart) + result = CURLE_OUT_OF_MEMORY; } - - result = AddFormDataf(&form, &size, - "\r\nContent-Type: multipart/mixed;" - " boundary=%s\r\n", - fileboundary); - if(result) - break; + if(!result) + result = curl_mime_subparts(part, multipart); } - file = post; - - do { - - /* If 'showfilename' is set, that is a faked name passed on to us - to use to in the formpost. If that is not set, the actually used - local file name should be added. */ - - if(post->more) { - /* if multiple-file */ - result = AddFormDataf(&form, &size, - "\r\n--%s\r\nContent-Disposition: " - "attachment", - fileboundary); - if(result) - break; - result = formdata_add_filename(file, &form, &size); - if(result) - break; - } - else if(post->flags & (HTTPPOST_FILENAME|HTTPPOST_BUFFER| - HTTPPOST_CALLBACK)) { - /* it should be noted that for the HTTPPOST_FILENAME and - HTTPPOST_CALLBACK cases the ->showfilename struct member is always - assigned at this point */ - if(post->showfilename || (post->flags & HTTPPOST_FILENAME)) { - result = formdata_add_filename(post, &form, &size); - } - - if(result) - break; - } - - if(file->contenttype) { - /* we have a specified type */ - result = AddFormDataf(&form, &size, - "\r\nContent-Type: %s", - file->contenttype); - if(result) - break; - } - - curList = file->contentheader; - while(curList) { - /* Process the additional headers specified for this form */ - result = AddFormDataf(&form, &size, "\r\n%s", curList->data); - if(result) - break; - curList = curList->next; - } - if(result) - break; - - result = AddFormDataf(&form, &size, "\r\n\r\n"); - if(result) - break; + /* Generate all the part contents. */ + for(file = post; !result && file; file = file->more) { + /* Create the part. */ + part = curl_mime_addpart(multipart); + if(!part) + result = CURLE_OUT_OF_MEMORY; - if((post->flags & HTTPPOST_FILENAME) || - (post->flags & HTTPPOST_READFILE)) { - /* we should include the contents from the specified file */ - FILE *fileread; - - fileread = !strcmp("-", file->contents)? - stdin:fopen(file->contents, "rb"); /* binary read for win32 */ - - /* - * VMS: This only allows for stream files on VMS. Stream files are - * OK, as are FIXED & VAR files WITHOUT implied CC For implied CC, - * every record needs to have a \n appended & 1 added to SIZE - */ - - if(fileread) { - if(fileread != stdin) { - /* close the file */ - fclose(fileread); - /* add the file name only - for later reading from this */ - result = AddFormData(&form, FORM_FILE, file->contents, 0, &size); - } - else { - /* When uploading from stdin, we can't know the size of the file, - * thus must read the full file as before. We *could* use chunked - * transfer-encoding, but that only works for HTTP 1.1 and we - * can't be sure we work with such a server. - */ - size_t nread; - char buffer[512]; - while((nread = fread(buffer, 1, sizeof(buffer), fileread)) != 0) { - result = AddFormData(&form, FORM_CONTENT, buffer, nread, &size); - if(result || feof(fileread) || ferror(fileread)) - break; - } + /* Set the headers. */ + if(!result) + result = curl_mime_headers(part, file->contentheader, 0); + + /* Set the content type. */ + if(!result && file->contenttype) + result = curl_mime_type(part, file->contenttype); + + /* Set field name. */ + if(!result && !post->more) + result = setname(part, post->name, post->namelength); + + /* Process contents. */ + if(!result) { + curl_off_t clen = post->contentslength; + + if(post->flags & CURL_HTTPPOST_LARGE) + clen = post->contentlen; + if(!clen) + clen = -1; + + if(post->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE)) { + if(!strcmp(file->contents, "-")) { + /* There are a few cases where the code below won't work; in + particular, freopen(stdin) by the caller is not guaranteed + to result as expected. This feature has been kept for backward + compatibility: use of "-" pseudo file name should be avoided. */ + result = curl_mime_data_cb(part, (curl_off_t) -1, + (curl_read_callback) fread, + (curl_seek_callback) fseek, + NULL, (void *) stdin); } + else + result = curl_mime_filedata(part, file->contents); + if(!result && (post->flags & HTTPPOST_READFILE)) + result = curl_mime_filename(part, NULL); } + else if(post->flags & HTTPPOST_BUFFER) + result = curl_mime_data(part, post->buffer, + post->bufferlength? post->bufferlength: -1); + else if(post->flags & HTTPPOST_CALLBACK) + /* the contents should be read with the callback and the size is set + with the contentslength */ + result = curl_mime_data_cb(part, clen, + fread_func, NULL, NULL, post->userp); else { - if(data) - failf(data, "couldn't open file \"%s\"", file->contents); - *finalform = NULL; - result = CURLE_READ_ERROR; + result = curl_mime_data(part, post->contents, (ssize_t) clen); +#ifdef CURL_DOES_CONVERSIONS + /* Convert textual contents now. */ + if(!result && data && part->datasize) + result = Curl_convert_to_network(data, part->data, part->datasize); +#endif } } - else if(post->flags & HTTPPOST_BUFFER) - /* include contents of buffer */ - result = AddFormData(&form, FORM_CONTENT, post->buffer, - post->bufferlength, &size); - else if(post->flags & HTTPPOST_CALLBACK) - /* the contents should be read with the callback and the size is set - with the contentslength */ - result = AddFormData(&form, FORM_CALLBACK, post->userp, - post->flags&CURL_HTTPPOST_LARGE? - post->contentlen:post->contentslength, &size); - else - /* include the contents we got */ - result = AddFormData(&form, FORM_CONTENT, post->contents, - post->flags&CURL_HTTPPOST_LARGE? - post->contentlen:post->contentslength, &size); - file = file->more; - } while(file && !result); /* for each specified file for this field */ - - if(result) - break; - if(post->more) { - /* this was a multiple-file inclusion, make a termination file - boundary: */ - result = AddFormDataf(&form, &size, - "\r\n--%s--", - fileboundary); - if(result) - break; + /* Set fake file name. */ + if(!result && post->showfilename) + if(post->more || (post->flags & (HTTPPOST_FILENAME | HTTPPOST_BUFFER | + HTTPPOST_CALLBACK))) + result = curl_mime_filename(part, post->showfilename); } - post = post->next; - } while(post); /* for each field */ - - /* end-boundary for everything */ - if(!result) - result = AddFormDataf(&form, &size, "\r\n--%s--\r\n", boundary); - - if(result) { - Curl_formclean(&firstform); - free(fileboundary); - free(boundary); - return result; - } - - *sizep = size; - - free(fileboundary); - free(boundary); - - *finalform = firstform; - - return result; -} - -/* - * Curl_FormInit() inits the struct 'form' points to with the 'formdata' - * and resets the 'sent' counter. - */ -int Curl_FormInit(struct Form *form, struct FormData *formdata) -{ - if(!formdata) - return 1; /* error */ - - form->data = formdata; - form->sent = 0; - form->fp = NULL; - form->fread_func = ZERO_NULL; - - return 0; -} - -#ifndef __VMS -# define fopen_read fopen -#else - /* - * vmsfopenread - * - * For upload to work as expected on VMS, different optional - * parameters must be added to the fopen command based on - * record format of the file. - * - */ -# define fopen_read vmsfopenread -static FILE * vmsfopenread(const char *file, const char *mode) -{ - struct_stat statbuf; - int result; - - result = stat(file, &statbuf); - - switch(statbuf.st_fab_rfm) { - case FAB$C_VAR: - case FAB$C_VFC: - case FAB$C_STMCR: - return fopen(file, FOPEN_READTEXT); /* VMS */ - break; - default: - return fopen(file, FOPEN_READTEXT, "rfm=stmlf", "ctx=stm"); - } -} -#endif - -/* - * readfromfile() - * - * The read callback that this function may use can return a value larger than - * 'size' (which then this function returns) that indicates a problem and it - * must be properly dealt with - */ -static size_t readfromfile(struct Form *form, char *buffer, - size_t size) -{ - size_t nread; - bool callback = (form->data->type == FORM_CALLBACK)?TRUE:FALSE; - - if(callback) { - if(form->fread_func == ZERO_NULL) - return 0; - else - nread = form->fread_func(buffer, 1, size, form->data->line); - } - else { - if(!form->fp) { - /* this file hasn't yet been opened */ - form->fp = fopen_read(form->data->line, "rb"); /* b is for binary */ - if(!form->fp) - return (size_t)-1; /* failure */ - } - nread = fread(buffer, 1, size, form->fp); - } - if(!nread) { - /* this is the last chunk from the file, move on */ - if(form->fp) { - fclose(form->fp); - form->fp = NULL; - } - form->data = form->data->next; - } - - return nread; -} - -/* - * Curl_FormReader() is the fread() emulation function that will be used to - * deliver the formdata to the transfer loop and then sent away to the peer. - */ -size_t Curl_FormReader(char *buffer, - size_t size, - size_t nitems, - FILE *mydata) -{ - struct Form *form; - size_t wantedsize; - size_t gotsize = 0; - - form=(struct Form *)mydata; - - wantedsize = size * nitems; - - if(!form->data) - return 0; /* nothing, error, empty */ - - if((form->data->type == FORM_FILE) || - (form->data->type == FORM_CALLBACK)) { - gotsize = readfromfile(form, buffer, wantedsize); - - if(gotsize) - /* If positive or -1, return. If zero, continue! */ - return gotsize; } - do { - - if((form->data->length - form->sent) > wantedsize - gotsize) { - - memcpy(buffer + gotsize, form->data->line + form->sent, - wantedsize - gotsize); - - form->sent += wantedsize-gotsize; - - return wantedsize; - } - - memcpy(buffer+gotsize, - form->data->line + form->sent, - (form->data->length - form->sent) ); - gotsize += form->data->length - form->sent; - - form->sent = 0; - form->data = form->data->next; /* advance */ - - } while(form->data && (form->data->type < FORM_CALLBACK)); - /* If we got an empty line and we have more data, we proceed to the next - line immediately to avoid returning zero before we've reached the end. */ - - return gotsize; -} - -/* - * Curl_formpostheader() returns the first line of the formpost, the - * request-header part (which is not part of the request-body like the rest of - * the post). - */ -char *Curl_formpostheader(void *formp, size_t *len) -{ - char *header; - struct Form *form=(struct Form *)formp; - - if(!form->data) - return NULL; /* nothing, ERROR! */ - - header = form->data->line; - *len = form->data->length; - - form->data = form->data->next; /* advance */ - - return header; -} - -/* - * formboundary() creates a suitable boundary string and returns an allocated - * one. - */ -static char *formboundary(struct Curl_easy *data) -{ - /* 24 dashes and 16 hexadecimal digits makes 64 bit (18446744073709551615) - combinations */ - unsigned int rnd[2]; - CURLcode result = Curl_rand(data, &rnd[0], 2); if(result) - return NULL; + Curl_mime_cleanpart(finalform); - return aprintf("------------------------%08x%08x", rnd[0], rnd[1]); + return result; } #else /* CURL_DISABLE_HTTP */ diff --git a/lib/formdata.h b/lib/formdata.h index 69629f6..1246c2b 100644 --- a/lib/formdata.h +++ b/lib/formdata.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,32 +22,6 @@ * ***************************************************************************/ -enum formtype { - FORM_DATAMEM, /* already allocated FORM_DATA memory */ - FORM_DATA, /* form metadata (convert to network encoding if necessary) */ - FORM_CONTENT, /* form content (never convert) */ - FORM_CALLBACK, /* 'line' points to the custom pointer we pass to the callback - */ - FORM_FILE /* 'line' points to a file name we should read from - to create the form data (never convert) */ -}; - -/* plain and simple linked list with lines to send */ -struct FormData { - struct FormData *next; - enum formtype type; - char *line; - size_t length; -}; - -struct Form { - struct FormData *data; /* current form line to send */ - size_t sent; /* number of bytes of the current line that has - already been sent in a previous invoke */ - FILE *fp; /* file to read from */ - curl_read_callback fread_func; /* fread callback pointer */ -}; - /* used by FormAdd for temporary storage */ typedef struct FormInfo { char *name; @@ -69,31 +43,9 @@ typedef struct FormInfo { struct FormInfo *more; } FormInfo; -int Curl_FormInit(struct Form *form, struct FormData *formdata); - CURLcode Curl_getformdata(struct Curl_easy *data, - struct FormData **, + curl_mimepart *, struct curl_httppost *post, - const char *custom_contenttype, - curl_off_t *size); - -/* fread() emulation */ -size_t Curl_FormReader(char *buffer, - size_t size, - size_t nitems, - FILE *mydata); - -/* - * Curl_formpostheader() returns the first line of the formpost, the - * request-header part (which is not part of the request-body like the rest of - * the post). - */ -char *Curl_formpostheader(void *formp, size_t *len); - -char *Curl_FormBoundary(void); - -void Curl_formclean(struct FormData **); - -CURLcode Curl_formconvert(struct Curl_easy *, struct FormData *); + curl_read_callback fread_func); #endif /* HEADER_CURL_FORMDATA_H */ diff --git a/lib/ftp.c b/lib/ftp.c index aa4d5ac..e2cc38b 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -59,6 +59,7 @@ #include "ftp.h" #include "fileinfo.h" #include "ftplistparser.h" +#include "curl_range.h" #include "curl_sec.h" #include "strtoofft.h" #include "strcase.h" @@ -178,10 +179,12 @@ const struct Curl_handler Curl_handler_ftp = { ZERO_NULL, /* perform_getsock */ ftp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_FTP, /* defport */ CURLPROTO_FTP, /* protocol */ - PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD - | PROTOPT_NOURLQUERY /* flags */ + PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD | + PROTOPT_NOURLQUERY | PROTOPT_PROXY_AS_HTTP | + PROTOPT_WILDCARD /* flags */ }; @@ -205,66 +208,14 @@ const struct Curl_handler Curl_handler_ftps = { ZERO_NULL, /* perform_getsock */ ftp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_FTPS, /* defport */ CURLPROTO_FTPS, /* protocol */ PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION | - PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY /* flags */ + PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY | PROTOPT_WILDCARD /* flags */ }; #endif -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed FTP protocol handler. - */ - -static const struct Curl_handler Curl_handler_ftp_proxy = { - "FTP", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_FTP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - - -#ifdef USE_SSL -/* - * HTTP-proxyed FTPS protocol handler. - */ - -static const struct Curl_handler Curl_handler_ftps_proxy = { - "FTPS", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_FTPS, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif - static void close_secondarysocket(struct connectdata *conn) { if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) { @@ -272,7 +223,6 @@ static void close_secondarysocket(struct connectdata *conn) conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; } conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE; - conn->tunnel_state[SECONDARYSOCKET] = TUNNEL_INIT; } /* @@ -291,9 +241,9 @@ static void freedirs(struct ftp_conn *ftpc) { int i; if(ftpc->dirs) { - for(i=0; i < ftpc->dirdepth; i++) { + for(i = 0; i < ftpc->dirdepth; i++) { free(ftpc->dirs[i]); - ftpc->dirs[i]=NULL; + ftpc->dirs[i] = NULL; } free(ftpc->dirs); ftpc->dirs = NULL; @@ -340,7 +290,7 @@ static CURLcode AcceptServerConnect(struct connectdata *conn) if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) { size = sizeof(add); - s=accept(sock, (struct sockaddr *) &add, &size); + s = accept(sock, (struct sockaddr *) &add, &size); } Curl_closesocket(conn, sock); /* close the first socket */ @@ -361,9 +311,11 @@ static CURLcode AcceptServerConnect(struct connectdata *conn) int error = 0; /* activate callback for setting socket options */ + Curl_set_in_callback(data, true); error = data->set.fsockopt(data->set.sockopt_client, s, CURLSOCKTYPE_ACCEPT); + Curl_set_in_callback(data, false); if(error) { close_secondarysocket(conn); @@ -384,16 +336,16 @@ static CURLcode AcceptServerConnect(struct connectdata *conn) * Curl_pgrsTime(..., TIMER_STARTACCEPT); * */ -static time_t ftp_timeleft_accept(struct Curl_easy *data) +static timediff_t ftp_timeleft_accept(struct Curl_easy *data) { - time_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT; - time_t other; - struct timeval now; + timediff_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT; + timediff_t other; + struct curltime now; if(data->set.accepttimeout > 0) timeout_ms = data->set.accepttimeout; - now = Curl_tvnow(); + now = Curl_now(); /* check if the generic timeout possibly is set shorter */ other = Curl_timeleft(data, &now, FALSE); @@ -403,7 +355,7 @@ static time_t ftp_timeleft_accept(struct Curl_easy *data) timeout_ms = other; else { /* subtract elapsed time */ - timeout_ms -= Curl_tvdiff(now, data->progress.t_acceptdata); + timeout_ms -= Curl_timediff(now, data->progress.t_acceptdata); if(!timeout_ms) /* avoid returning 0 as that means no timeout! */ return -1; @@ -509,7 +461,7 @@ static CURLcode InitiateTransfer(struct connectdata *conn) } if(conn->proto.ftpc.state_saved == FTP_STOR) { - *(ftp->bytecountp)=0; + *(ftp->bytecountp) = 0; /* When we know we're uploading a specified file, we can get the file size prior to the actual upload. */ @@ -580,10 +532,8 @@ static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected) else { /* Add timeout to multi handle and break out of the loop */ if(!result && *connected == FALSE) { - if(data->set.accepttimeout > 0) - Curl_expire(data, data->set.accepttimeout); - else - Curl_expire(data, DEFAULT_ACCEPT_TIMEOUT); + Curl_expire(data, data->set.accepttimeout > 0 ? + data->set.accepttimeout: DEFAULT_ACCEPT_TIMEOUT, 0); } } @@ -646,7 +596,7 @@ static CURLcode ftp_readresp(curl_socket_t sockfd, #endif /* store the latest code for later retrieval */ - data->info.httpcode=code; + data->info.httpcode = code; if(ftpcode) *ftpcode = code; @@ -694,8 +644,8 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ struct ftp_conn *ftpc = &conn->proto.ftpc; struct pingpong *pp = &ftpc->pp; size_t nread; - int cache_skip=0; - int value_to_be_ignored=0; + int cache_skip = 0; + int value_to_be_ignored = 0; if(ftpcode) *ftpcode = 0; /* 0 for errors */ @@ -703,13 +653,13 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ /* make the pointer point to something for the rest of this function */ ftpcode = &value_to_be_ignored; - *nreadp=0; + *nreadp = 0; while(!*ftpcode && !result) { /* check and reset timeout value every lap */ timeout = Curl_pp_state_timeout(pp); - if(timeout <=0) { + if(timeout <= 0) { failf(data, "FTP response timeout"); return CURLE_OPERATION_TIMEDOUT; /* already too little time */ } @@ -767,7 +717,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ else /* when we got data or there is no cache left, we reset the cache skip counter */ - cache_skip=0; + cache_skip = 0; *nreadp += nread; @@ -902,7 +852,7 @@ static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks, int i; /* PORT is used to tell the server to connect to us, and during that we don't do happy eyeballs, but we do if we connect to the server */ - for(s=1, i=0; i<2; i++) { + for(s = 1, i = 0; i<2; i++) { if(conn->tempsock[i] != CURL_SOCKET_BAD) { socks[s] = conn->tempsock[i]; bits |= GETSOCK_WRITESOCK(s++); @@ -916,8 +866,7 @@ static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks, return bits; } - else - return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks); + return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks); } /* This is called after the FTP_QUOTE state is passed. @@ -940,23 +889,26 @@ static CURLcode ftp_state_cwd(struct connectdata *conn) /* count3 is set to allow a MKD to fail once. In the case when first CWD fails and then MKD fails (due to another session raced it to create the dir) this then allows for a second try to CWD to it */ - ftpc->count3 = (conn->data->set.ftp_create_missing_dirs==2)?1:0; + ftpc->count3 = (conn->data->set.ftp_create_missing_dirs == 2)?1:0; - if(conn->bits.reuse && ftpc->entrypath) { + if((conn->data->set.ftp_filemethod == FTPFILE_NOCWD) && !ftpc->cwdcount) + /* No CWD necessary */ + result = ftp_state_mdtm(conn); + else if(conn->bits.reuse && ftpc->entrypath) { /* This is a re-used connection. Since we change directory to where the transfer is taking place, we must first get back to the original dir where we ended up after login: */ - ftpc->count1 = 0; /* we count this as the first path, then we add one - for all upcoming ones in the ftp->dirs[] array */ + ftpc->cwdcount = 0; /* we count this as the first path, then we add one + for all upcoming ones in the ftp->dirs[] array */ PPSENDF(&conn->proto.ftpc.pp, "CWD %s", ftpc->entrypath); state(conn, FTP_CWD); } else { if(ftpc->dirdepth) { - ftpc->count1 = 1; + ftpc->cwdcount = 1; /* issue the first CWD, the rest is sent when the CWD responses are received... */ - PPSENDF(&conn->proto.ftpc.pp, "CWD %s", ftpc->dirs[ftpc->count1 -1]); + PPSENDF(&conn->proto.ftpc.pp, "CWD %s", ftpc->dirs[ftpc->cwdcount -1]); state(conn, FTP_CWD); } else { @@ -980,15 +932,15 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, { CURLcode result = CURLE_OK; struct ftp_conn *ftpc = &conn->proto.ftpc; - struct Curl_easy *data=conn->data; - curl_socket_t portsock= CURL_SOCKET_BAD; + struct Curl_easy *data = conn->data; + curl_socket_t portsock = CURL_SOCKET_BAD; char myhost[256] = ""; struct Curl_sockaddr_storage ss; Curl_addrinfo *res, *ai; curl_socklen_t sslen; char hbuf[NI_MAXHOST]; - struct sockaddr *sa=(struct sockaddr *)&ss; + struct sockaddr *sa = (struct sockaddr *)&ss; struct sockaddr_in * const sa4 = (void *)sa; #ifdef ENABLE_IPV6 struct sockaddr_in6 * const sa6 = (void *)sa; @@ -999,7 +951,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, int error; char *host = NULL; char *string_ftpport = data->set.str[STRING_FTPPORT]; - struct Curl_dns_entry *h=NULL; + struct Curl_dns_entry *h = NULL; unsigned short port_min = 0; unsigned short port_max = 0; unsigned short port; @@ -1027,7 +979,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, char *port_start = NULL; char *port_sep = NULL; - addr = calloc(addrlen+1, 1); + addr = calloc(addrlen + 1, 1); if(!addr) return CURLE_OUT_OF_MEMORY; @@ -1070,7 +1022,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, if(ip_end != NULL) { port_start = strchr(ip_end, ':'); if(port_start) { - port_min = curlx_ultous(strtoul(port_start+1, NULL, 10)); + port_min = curlx_ultous(strtoul(port_start + 1, NULL, 10)); port_sep = strchr(port_start, '-'); if(port_sep) { port_max = curlx_ultous(strtoul(port_sep + 1, NULL, 10)); @@ -1209,7 +1161,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, possibly_non_local = FALSE; /* don't try this again */ continue; } - else if(error != EADDRINUSE && error != EACCES) { + if(error != EADDRINUSE && error != EACCES) { failf(data, "bind(port=%hu) failed: %s", port, Curl_strerror(conn, error) ); Curl_closesocket(conn, portsock); @@ -1307,14 +1259,14 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, } break; } - else if(PORT == fcmd) { + if(PORT == fcmd) { char *source = myhost; char *dest = tmp; /* translate x.x.x.x to x,x,x,x */ while(source && *source) { if(*source == '.') - *dest=','; + *dest = ','; else *dest = *source; dest++; @@ -1509,25 +1461,22 @@ static CURLcode ftp_state_list(struct connectdata *conn) then just do LIST (in that case: nothing to do here) */ char *cmd, *lstArg, *slashPos; + const char *inpath = data->state.path; lstArg = NULL; if((data->set.ftp_filemethod == FTPFILE_NOCWD) && - data->state.path && - data->state.path[0] && - strchr(data->state.path, '/')) { - - lstArg = strdup(data->state.path); - if(!lstArg) - return CURLE_OUT_OF_MEMORY; + inpath && inpath[0] && strchr(inpath, '/')) { + size_t n = strlen(inpath); /* Check if path does not end with /, as then we cut off the file part */ - if(lstArg[strlen(lstArg) - 1] != '/') { - + if(inpath[n - 1] != '/') { /* chop off the file part if format is dir/dir/file */ - slashPos = strrchr(lstArg, '/'); - if(slashPos) - *(slashPos+1) = '\0'; + slashPos = strrchr(inpath, '/'); + n = slashPos - inpath; } + result = Curl_urldecode(data, inpath, n, &lstArg, NULL, TRUE); + if(result) + return result; } cmd = aprintf("%s%s%s", @@ -1589,7 +1538,7 @@ static CURLcode ftp_state_type(struct connectdata *conn) date. */ if(data->set.opt_no_body && ftpc->file && ftp_need_type(conn, data->set.prefer_ascii)) { - /* The SIZE command is _not_ RFC 959 specified, and therefor many servers + /* The SIZE command is _not_ RFC 959 specified, and therefore many servers may not support it! It is however the only way we have to get a file's size! */ @@ -1669,36 +1618,37 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn, /* Let's read off the proper amount of bytes from the input. */ if(conn->seek_func) { + Curl_set_in_callback(data, true); seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, SEEK_SET); + Curl_set_in_callback(data, true); } if(seekerr != CURL_SEEKFUNC_OK) { + curl_off_t passed = 0; if(seekerr != CURL_SEEKFUNC_CANTSEEK) { failf(data, "Could not seek stream"); return CURLE_FTP_COULDNT_USE_REST; } /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ - else { - curl_off_t passed=0; - do { - size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); - - size_t actuallyread = - data->state.fread_func(data->state.buffer, 1, readthisamountnow, - data->state.in); - - passed += actuallyread; - if((actuallyread == 0) || (actuallyread > readthisamountnow)) { - /* this checks for greater-than only to make sure that the - CURL_READFUNC_ABORT return code still aborts */ - failf(data, "Failed to read data"); - return CURLE_FTP_COULDNT_USE_REST; - } - } while(passed < data->state.resume_from); - } + do { + size_t readthisamountnow = + (data->state.resume_from - passed > data->set.buffer_size) ? + (size_t)data->set.buffer_size : + curlx_sotouz(data->state.resume_from - passed); + + size_t actuallyread = + data->state.fread_func(data->state.buffer, 1, readthisamountnow, + data->state.in); + + passed += actuallyread; + if((actuallyread == 0) || (actuallyread > readthisamountnow)) { + /* this checks for greater-than only to make sure that the + CURL_READFUNC_ABORT return code still aborts */ + failf(data, "Failed to read data"); + return CURLE_FTP_COULDNT_USE_REST; + } + } while(passed < data->state.resume_from); } /* now, decrease the size of the read */ if(data->state.infilesize>0) { @@ -1737,7 +1687,7 @@ static CURLcode ftp_state_quote(struct connectdata *conn, struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; struct ftp_conn *ftpc = &conn->proto.ftpc; - bool quote=FALSE; + bool quote = FALSE; struct curl_slist *item; switch(instate) { @@ -1757,7 +1707,7 @@ static CURLcode ftp_state_quote(struct connectdata *conn, /* * This state uses: * 'count1' to iterate over the commands to send - * 'count2' to store wether to allow commands to fail + * 'count2' to store whether to allow commands to fail */ if(init) @@ -1874,11 +1824,11 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, { struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result; - struct Curl_easy *data=conn->data; - struct Curl_dns_entry *addr=NULL; + struct Curl_easy *data = conn->data; + struct Curl_dns_entry *addr = NULL; int rc; unsigned short connectport; /* the local port connect() should use! */ - char *str=&data->state.buffer[4]; /* start on the first letter */ + char *str = &data->state.buffer[4]; /* start on the first letter */ /* if we come here again, make sure the former name is cleared */ Curl_safefree(ftpc->newhost); @@ -1902,9 +1852,9 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, /* The four separators should be identical, or else this is an oddly formatted reply and we bail out immediately. */ - for(i=1; i<4; i++) { + for(i = 1; i<4; i++) { if(separator[i] != sep1) { - ptr=NULL; /* set to NULL to signal error */ + ptr = NULL; /* set to NULL to signal error */ break; } } @@ -1920,7 +1870,7 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, } } else - ptr=NULL; + ptr = NULL; } if(!ptr) { failf(data, "Weirdly formatted EPSV reply"); @@ -1930,8 +1880,8 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, else if((ftpc->count1 == 1) && (ftpcode == 227)) { /* positive PASV response */ - int ip[4]; - int port[2]; + unsigned int ip[4]; + unsigned int port[2]; /* * Scan for a sequence of six comma-separated numbers and use them as @@ -1943,14 +1893,15 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, * "227 Entering passive mode. 127,0,0,1,4,51" */ while(*str) { - if(6 == sscanf(str, "%d,%d,%d,%d,%d,%d", + if(6 == sscanf(str, "%u,%u,%u,%u,%u,%u", &ip[0], &ip[1], &ip[2], &ip[3], &port[0], &port[1])) break; str++; } - if(!*str) { + if(!*str || (ip[0] > 255) || (ip[1] > 255) || (ip[2] > 255) || + (ip[3] > 255) || (port[0] > 255) || (port[1] > 255) ) { failf(data, "Couldn't interpret the 227-response"); return CURLE_FTP_WEIRD_227_FORMAT; } @@ -2040,11 +1991,14 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, /* this just dumps information about this second connection */ ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport); + Curl_resolv_unlock(data, addr); /* we're done using this address */ + Curl_safefree(conn->secondaryhostname); - conn->secondaryhostname = strdup(ftpc->newhost); conn->secondary_port = ftpc->newport; + conn->secondaryhostname = strdup(ftpc->newhost); + if(!conn->secondaryhostname) + return CURLE_OUT_OF_MEMORY; - Curl_resolv_unlock(data, addr); /* we're done using this address */ conn->bits.do_more = TRUE; state(conn, FTP_STOP); /* this phase is completed */ @@ -2091,7 +2045,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, int ftpcode) { CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; struct ftp_conn *ftpc = &conn->proto.ftpc; @@ -2101,17 +2055,17 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, /* we got a time. Format should be: "YYYYMMDDHHMMSS[.sss]" where the last .sss part is optional and means fractions of a second */ int year, month, day, hour, minute, second; - char *buf = data->state.buffer; - if(6 == sscanf(buf+4, "%04d%02d%02d%02d%02d%02d", + if(6 == sscanf(&data->state.buffer[4], "%04d%02d%02d%02d%02d%02d", &year, &month, &day, &hour, &minute, &second)) { /* we have a time, reformat it */ - time_t secs=time(NULL); - /* using the good old yacc/bison yuck */ - snprintf(buf, CURL_BUFSIZE(conn->data->set.buffer_size), + char timebuf[24]; + time_t secs = time(NULL); + + snprintf(timebuf, sizeof(timebuf), "%04d%02d%02d %02d:%02d:%02d GMT", year, month, day, hour, minute, second); /* now, convert this into a time() value: */ - data->info.filetime = (long)curl_getdate(buf, &secs); + data->info.filetime = curl_getdate(timebuf, &secs); } #ifdef CURL_FTP_HTTPSTYLE_HEAD @@ -2121,8 +2075,9 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, if(data->set.opt_no_body && ftpc->file && data->set.get_filetime && - (data->info.filetime>=0) ) { - time_t filetime = (time_t)data->info.filetime; + (data->info.filetime >= 0) ) { + char headerbuf[128]; + time_t filetime = data->info.filetime; struct tm buffer; const struct tm *tm = &buffer; @@ -2131,7 +2086,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, return result; /* format: "Tue, 15 Nov 1994 12:45:26" */ - snprintf(buf, BUFSIZE-1, + snprintf(headerbuf, sizeof(headerbuf), "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], tm->tm_mday, @@ -2140,7 +2095,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, tm->tm_hour, tm->tm_min, tm->tm_sec); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); + result = Curl_client_write(conn, CLIENTWRITE_BOTH, headerbuf, 0); if(result) return result; } /* end of a ridiculous amount of conditionals */ @@ -2196,7 +2151,7 @@ static CURLcode ftp_state_type_resp(struct connectdata *conn, ftpstate instate) { CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; if(ftpcode/100 != 2) { /* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a @@ -2225,7 +2180,7 @@ static CURLcode ftp_state_retr(struct connectdata *conn, curl_off_t filesize) { CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; struct ftp_conn *ftpc = &conn->proto.ftpc; @@ -2308,19 +2263,22 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn, ftpstate instate) { CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; - curl_off_t filesize; + struct Curl_easy *data = conn->data; + curl_off_t filesize = -1; char *buf = data->state.buffer; /* get the size from the ascii string: */ - filesize = (ftpcode == 213)?curlx_strtoofft(buf+4, NULL, 0):-1; + if(ftpcode == 213) + /* ignores parsing errors, which will make the size remain unknown */ + (void)curlx_strtoofft(buf + 4, NULL, 0, &filesize); if(instate == FTP_SIZE) { #ifdef CURL_FTP_HTTPSTYLE_HEAD if(-1 != filesize) { - snprintf(buf, CURL_BUFSIZE(data->set.buffer_size), + char clbuf[128]; + snprintf(clbuf, sizeof(clbuf), "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", filesize); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); + result = Curl_client_write(conn, CLIENTWRITE_BOTH, clbuf, 0); if(result) return result; } @@ -2382,7 +2340,7 @@ static CURLcode ftp_state_stor_resp(struct connectdata *conn, CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; - if(ftpcode>=400) { + if(ftpcode >= 400) { failf(data, "Failed FTP upload: %0d", ftpcode); state(conn, FTP_STOP); /* oops, we never close the sockets! */ @@ -2409,8 +2367,7 @@ static CURLcode ftp_state_stor_resp(struct connectdata *conn, return CURLE_OK; } - else - return InitiateTransfer(conn); + return InitiateTransfer(conn); } /* for LIST and RETR responses */ @@ -2421,7 +2378,6 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; - char *buf = data->state.buffer; if((ftpcode == 150) || (ftpcode == 125)) { @@ -2442,7 +2398,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, E: 125 Data connection already open; Transfer starting. */ - curl_off_t size=-1; /* default unknown size */ + curl_off_t size = -1; /* default unknown size */ /* @@ -2465,9 +2421,10 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, * * Example D above makes this parsing a little tricky */ char *bytes; - bytes=strstr(buf, " bytes"); - if(bytes--) { - long in=(long)(bytes-buf); + char *buf = data->state.buffer; + bytes = strstr(buf, " bytes"); + if(bytes) { + long in = (long)(--bytes-buf); /* this is a hint there is size information in there! ;-) */ while(--in) { /* scan for the left parenthesis and break there */ @@ -2475,7 +2432,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, break; /* skip only digits */ if(!ISDIGIT(*bytes)) { - bytes=NULL; + bytes = NULL; break; } /* one more estep backwards */ @@ -2484,7 +2441,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, /* if we have nothing but digits: */ if(bytes++) { /* get the number! */ - size = curlx_strtoofft(bytes, NULL, 0); + (void)curlx_strtoofft(bytes, NULL, 0, &size); } } } @@ -2647,7 +2604,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) { CURLcode result; curl_socket_t sock = conn->sock[FIRSTSOCKET]; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; int ftpcode; struct ftp_conn *ftpc = &conn->proto.ftpc; struct pingpong *pp = &ftpc->pp; @@ -2699,7 +2656,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) /* We don't have a SSL/TLS connection yet, but FTPS is requested. Try a FTPS connection now */ - ftpc->count3=0; + ftpc->count3 = 0; switch(data->set.ftpsslauth) { case CURLFTPAUTH_DEFAULT: case CURLFTPAUTH_SSL: @@ -2822,10 +2779,11 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) case FTP_PWD: if(ftpcode == 257) { - char *ptr=&data->state.buffer[4]; /* start on the first letter */ - const size_t buf_size = CURL_BUFSIZE(data->set.buffer_size); + char *ptr = &data->state.buffer[4]; /* start on the first letter */ + const size_t buf_size = data->set.buffer_size; char *dir; char *store; + bool entry_extracted = FALSE; dir = malloc(nread + 1); if(!dir) @@ -2857,7 +2815,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) } else { /* end of path */ - *store = '\0'; /* zero terminate */ + entry_extracted = TRUE; break; /* get out of this loop */ } } @@ -2866,12 +2824,14 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) store++; ptr++; } - + *store = '\0'; /* zero terminate */ + } + if(entry_extracted) { /* If the path name does not look like an absolute path (i.e.: it does not start with a '/'), we probably need some server-dependent adjustments. For example, this is the case when connecting to an OS400 FTP server: this server supports two name syntaxes, - the default one being incompatible with standard pathes. In + the default one being incompatible with standard paths. In addition, this server switches automatically to the regular path syntax when one is encountered in a command: this results in having an entrypath in the wrong syntax when later used in CWD. @@ -2913,7 +2873,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) case FTP_SYST: if(ftpcode == 215) { - char *ptr=&data->state.buffer[4]; /* start on the first letter */ + char *ptr = &data->state.buffer[4]; /* start on the first letter */ char *os; char *store; @@ -2945,12 +2905,10 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) state(conn, FTP_NAMEFMT); break; } - else { - /* Nothing special for the target server. */ - /* remember target server OS */ - Curl_safefree(ftpc->server_os); - ftpc->server_os = os; - } + /* Nothing special for the target server. */ + /* remember target server OS */ + Curl_safefree(ftpc->server_os); + ftpc->server_os = os; } else { /* Cannot identify server OS. Continue anyway and cross fingers. */ @@ -2990,10 +2948,10 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) if(ftpcode/100 != 2) { /* failure to CWD there */ if(conn->data->set.ftp_create_missing_dirs && - ftpc->count1 && !ftpc->count2) { + ftpc->cwdcount && !ftpc->count2) { /* try making it */ ftpc->count2++; /* counter to prevent CWD-MKD loops */ - PPSENDF(&ftpc->pp, "MKD %s", ftpc->dirs[ftpc->count1 - 1]); + PPSENDF(&ftpc->pp, "MKD %s", ftpc->dirs[ftpc->cwdcount - 1]); state(conn, FTP_MKD); } else { @@ -3006,10 +2964,10 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) } else { /* success */ - ftpc->count2=0; - if(++ftpc->count1 <= ftpc->dirdepth) { + ftpc->count2 = 0; + if(++ftpc->cwdcount <= ftpc->dirdepth) { /* send next CWD */ - PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]); + PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->cwdcount - 1]); } else { result = ftp_state_mdtm(conn); @@ -3027,7 +2985,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) } state(conn, FTP_CWD); /* send CWD */ - PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]); + PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->cwdcount - 1]); break; case FTP_MDTM: @@ -3211,6 +3169,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, /* until we cope better with prematurely ended requests, let them * fallback as if in complete failure */ + /* FALLTHROUGH */ default: /* by default, an error means the control connection is wedged and should not be used anymore */ ftpc->ctl_valid = FALSE; @@ -3224,16 +3183,18 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, /* now store a copy of the directory we are in */ free(ftpc->prevpath); - if(data->set.wildcardmatch) { + if(data->state.wildcardmatch) { if(data->set.chunk_end && ftpc->file) { + Curl_set_in_callback(data, true); data->set.chunk_end(data->wildcard.customptr); + Curl_set_in_callback(data, false); } ftpc->known_filesize = -1; } if(!result) /* get the "raw" path */ - result = Curl_urldecode(data, path_to_use, 0, &path, NULL, FALSE); + result = Curl_urldecode(data, path_to_use, 0, &path, NULL, TRUE); if(result) { /* We can limp along anyway (and should try to since we may already be in * the error path) */ @@ -3245,15 +3206,16 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, size_t flen = ftpc->file?strlen(ftpc->file):0; /* file is "raw" already */ size_t dlen = strlen(path)-flen; if(!ftpc->cwdfail) { + ftpc->prevmethod = data->set.ftp_filemethod; if(dlen && (data->set.ftp_filemethod != FTPFILE_NOCWD)) { ftpc->prevpath = path; if(flen) /* if 'path' is not the whole string */ - ftpc->prevpath[dlen]=0; /* terminate */ + ftpc->prevpath[dlen] = 0; /* terminate */ } else { /* we never changed dir */ - ftpc->prevpath=strdup(""); + ftpc->prevpath = strdup(""); free(path); } if(ftpc->prevpath) @@ -3307,7 +3269,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, long old_time = pp->response_time; pp->response_time = 60*1000; /* give it only a minute for now */ - pp->response = Curl_tvnow(); /* timeout relative now */ + pp->response = Curl_now(); /* timeout relative now */ result = Curl_GetFTPResponse(&nread, conn, &ftpcode); @@ -3427,7 +3389,7 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote) PPSENDF(&conn->proto.ftpc.pp, "%s", cmd); - pp->response = Curl_tvnow(); /* timeout relative now */ + pp->response = Curl_now(); /* timeout relative now */ result = Curl_GetFTPResponse(&nread, conn, &ftpcode); if(result) @@ -3508,61 +3470,6 @@ ftp_pasv_verbose(struct connectdata *conn, #endif /* - Check if this is a range download, and if so, set the internal variables - properly. - */ - -static CURLcode ftp_range(struct connectdata *conn) -{ - curl_off_t from, to; - char *ptr; - char *ptr2; - struct Curl_easy *data = conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if(data->state.use_range && data->state.range) { - from=curlx_strtoofft(data->state.range, &ptr, 0); - while(*ptr && (ISSPACE(*ptr) || (*ptr=='-'))) - ptr++; - to=curlx_strtoofft(ptr, &ptr2, 0); - if(ptr == ptr2) { - /* we didn't get any digit */ - to=-1; - } - if((-1 == to) && (from>=0)) { - /* X - */ - data->state.resume_from = from; - DEBUGF(infof(conn->data, "FTP RANGE %" CURL_FORMAT_CURL_OFF_T - " to end of file\n", from)); - } - else if(from < 0) { - /* -Y */ - data->req.maxdownload = -from; - data->state.resume_from = from; - DEBUGF(infof(conn->data, "FTP RANGE the last %" CURL_FORMAT_CURL_OFF_T - " bytes\n", -from)); - } - else { - /* X-Y */ - data->req.maxdownload = (to-from)+1; /* include last byte */ - data->state.resume_from = from; - DEBUGF(infof(conn->data, "FTP RANGE from %" CURL_FORMAT_CURL_OFF_T - " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n", - from, data->req.maxdownload)); - } - DEBUGF(infof(conn->data, "range-download from %" CURL_FORMAT_CURL_OFF_T - " to %" CURL_FORMAT_CURL_OFF_T ", totally %" - CURL_FORMAT_CURL_OFF_T " bytes\n", - from, to, data->req.maxdownload)); - ftpc->dont_check = TRUE; /* dont check for successful transfer */ - } - else - data->req.maxdownload = -1; - return CURLE_OK; -} - - -/* * ftp_do_more() * * This function shall be called when the second FTP (data) connection is @@ -3575,7 +3482,7 @@ static CURLcode ftp_range(struct connectdata *conn) static CURLcode ftp_do_more(struct connectdata *conn, int *completep) { - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result = CURLE_OK; bool connected = FALSE; @@ -3586,10 +3493,10 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep) /* if the second connection isn't done yet, wait for it */ if(!conn->bits.tcpconnect[SECONDARYSOCKET]) { - if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { + if(Curl_connect_ongoing(conn)) { /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port aren't used so we blank their arguments. TODO: make this nicer */ - result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE); + result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0); return result; } @@ -3618,12 +3525,12 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep) return result; if(conn->bits.tunnel_proxy && conn->bits.httpproxy && - conn->tunnel_state[SECONDARYSOCKET] != TUNNEL_COMPLETE) + Curl_connect_ongoing(conn)) return result; if(ftpc->state) { - /* already in a state so skip the intial commands. + /* already in a state so skip the initial commands. They are only done to kickstart the do_more state */ result = ftp_multi_statemach(conn, &complete); @@ -3684,7 +3591,13 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep) /* download */ ftp->downloadsize = -1; /* unknown as of yet */ - result = ftp_range(conn); + result = Curl_range(conn); + + if(result == CURLE_OK && data->req.maxdownload >= 0) { + /* Don't check for successful transfer */ + ftpc->dont_check = TRUE; + } + if(result) ; else if(data->set.ftp_list_only || !ftpc->file) { @@ -3742,7 +3655,7 @@ CURLcode ftp_perform(struct connectdata *conn, bool *dophase_done) { /* this is FTP and no proxy */ - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; DEBUGF(infof(conn->data, "DO phase starts\n")); @@ -3796,12 +3709,10 @@ static CURLcode init_wc_data(struct connectdata *conn) result = ftp_parse_url_path(conn); return result; } - else { - wildcard->pattern = strdup(last_slash); - if(!wildcard->pattern) - return CURLE_OUT_OF_MEMORY; - last_slash[0] = '\0'; /* cut file from path */ - } + wildcard->pattern = strdup(last_slash); + if(!wildcard->pattern) + return CURLE_OUT_OF_MEMORY; + last_slash[0] = '\0'; /* cut file from path */ } else { /* there is only 'wildcard pattern' or nothing */ if(path[0]) { @@ -3886,8 +3797,7 @@ static CURLcode wc_statemach(struct connectdata *conn) if(wildcard->state == CURLWC_CLEAN) /* only listing! */ break; - else - wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING; + wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING; break; case CURLWC_MATCHING: { @@ -3905,7 +3815,7 @@ static CURLcode wc_statemach(struct connectdata *conn) wildcard->state = CURLWC_CLEAN; return wc_statemach(conn); } - else if(wildcard->filelist->size == 0) { + if(wildcard->filelist.size == 0) { /* no corresponding file */ wildcard->state = CURLWC_CLEAN; return CURLE_REMOTE_FILE_NOT_FOUND; @@ -3916,7 +3826,7 @@ static CURLcode wc_statemach(struct connectdata *conn) case CURLWC_DOWNLOADING: { /* filelist has at least one file, lets get first one */ struct ftp_conn *ftpc = &conn->proto.ftpc; - struct curl_fileinfo *finfo = wildcard->filelist->head->ptr; + struct curl_fileinfo *finfo = wildcard->filelist.head->ptr; char *tmp_path = aprintf("%s%s", wildcard->path, finfo->filename); if(!tmp_path) @@ -3930,8 +3840,11 @@ static CURLcode wc_statemach(struct connectdata *conn) infof(conn->data, "Wildcard - START of \"%s\"\n", finfo->filename); if(conn->data->set.chunk_bgn) { - long userresponse = conn->data->set.chunk_bgn( - finfo, wildcard->customptr, (int)wildcard->filelist->size); + long userresponse; + Curl_set_in_callback(conn->data, true); + userresponse = conn->data->set.chunk_bgn( + finfo, wildcard->customptr, (int)wildcard->filelist.size); + Curl_set_in_callback(conn->data, false); switch(userresponse) { case CURL_CHUNK_BGN_FUNC_SKIP: infof(conn->data, "Wildcard - \"%s\" skipped by user\n", @@ -3956,9 +3869,9 @@ static CURLcode wc_statemach(struct connectdata *conn) return result; /* we don't need the Curl_fileinfo of first file anymore */ - Curl_llist_remove(wildcard->filelist, wildcard->filelist->head, NULL); + Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL); - if(wildcard->filelist->size == 0) { /* remains only one file to down. */ + if(wildcard->filelist.size == 0) { /* remains only one file to down. */ wildcard->state = CURLWC_CLEAN; /* after that will be ftp_do called once again and no transfer will be done because of CURLWC_CLEAN state */ @@ -3967,10 +3880,13 @@ static CURLcode wc_statemach(struct connectdata *conn) } break; case CURLWC_SKIP: { - if(conn->data->set.chunk_end) + if(conn->data->set.chunk_end) { + Curl_set_in_callback(conn->data, true); conn->data->set.chunk_end(conn->data->wildcard.customptr); - Curl_llist_remove(wildcard->filelist, wildcard->filelist->head, NULL); - wildcard->state = (wildcard->filelist->size == 0) ? + Curl_set_in_callback(conn->data, false); + } + Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL); + wildcard->state = (wildcard->filelist.size == 0) ? CURLWC_CLEAN : CURLWC_DOWNLOADING; return wc_statemach(conn); } @@ -3986,6 +3902,7 @@ static CURLcode wc_statemach(struct connectdata *conn) case CURLWC_DONE: case CURLWC_ERROR: + case CURLWC_CLEAR: break; } @@ -4009,7 +3926,7 @@ static CURLcode ftp_do(struct connectdata *conn, bool *done) *done = FALSE; /* default to false */ ftpc->wait_data_conn = FALSE; /* default to no such wait */ - if(conn->data->set.wildcardmatch) { + if(conn->data->state.wildcardmatch) { result = wc_statemach(conn); if(conn->data->wildcard.state == CURLWC_SKIP || conn->data->wildcard.state == CURLWC_DONE) { @@ -4037,7 +3954,7 @@ CURLcode Curl_ftpsend(struct connectdata *conn, const char *cmd) #define SBUF_SIZE 1024 char s[SBUF_SIZE]; size_t write_len; - char *sptr=s; + char *sptr = s; CURLcode result = CURLE_OK; #ifdef HAVE_GSSAPI enum protection_level data_sec = conn->data_prot; @@ -4048,9 +3965,8 @@ CURLcode Curl_ftpsend(struct connectdata *conn, const char *cmd) return CURLE_BAD_FUNCTION_ARGUMENT; strcpy(&s[write_len], "\r\n"); /* append a trailing CRLF */ - write_len +=2; - - bytes_written=0; + write_len += 2; + bytes_written = 0; result = Curl_convert_to_network(conn->data, s, write_len); /* Curl_convert_to_network calls failf if unsuccessful */ @@ -4128,7 +4044,7 @@ static CURLcode ftp_quit(struct connectdata *conn) */ static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection) { - struct ftp_conn *ftpc= &conn->proto.ftpc; + struct ftp_conn *ftpc = &conn->proto.ftpc; struct pingpong *pp = &ftpc->pp; /* We cannot send quit unconditionally. If this connection is stale or @@ -4224,7 +4140,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) ftpc->dirdepth = 0; break; } - slash_pos=strrchr(cur_pos, '/'); + slash_pos = strrchr(cur_pos, '/'); if(slash_pos || !*cur_pos) { size_t dirlen = slash_pos-cur_pos; CURLcode result; @@ -4239,13 +4155,13 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) result = Curl_urldecode(conn->data, slash_pos ? cur_pos : "/", slash_pos ? dirlen : 1, &ftpc->dirs[0], NULL, - FALSE); + TRUE); if(result) { freedirs(ftpc); return result; } ftpc->dirdepth = 1; /* we consider it to be a single dir */ - filename = slash_pos ? slash_pos+1 : cur_pos; /* rest is file name */ + filename = slash_pos ? slash_pos + 1 : cur_pos; /* rest is file name */ } else filename = cur_pos; /* this is a file name only */ @@ -4283,7 +4199,6 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) &ftpc->dirs[ftpc->dirdepth], NULL, TRUE); if(result) { - free(ftpc->dirs[ftpc->dirdepth]); freedirs(ftpc); return result; } @@ -4330,8 +4245,8 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) } } else - ftpc->file=NULL; /* instead of point to a zero byte, we make it a NULL - pointer */ + ftpc->file = NULL; /* instead of point to a zero byte, we make it a NULL + pointer */ if(data->set.upload && !ftpc->file && (ftp->transfer == FTPTRANSFER_BODY)) { /* We need a file name when uploading. Return error! */ @@ -4347,7 +4262,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) size_t dlen; char *path; CURLcode result = - Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); + Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, TRUE); if(result) { freedirs(ftpc); return result; @@ -4355,7 +4270,8 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) dlen -= ftpc->file?strlen(ftpc->file):0; if((dlen == strlen(ftpc->prevpath)) && - !strncmp(path, ftpc->prevpath, dlen)) { + !strncmp(path, ftpc->prevpath, dlen) && + (ftpc->prevmethod == data->set.ftp_filemethod)) { infof(data, "Request has same path as previous transfer\n"); ftpc->cwddone = TRUE; } @@ -4426,8 +4342,8 @@ static CURLcode ftp_regular_transfer(struct connectdata *conn, bool *dophase_done) { - CURLcode result=CURLE_OK; - bool connected=FALSE; + CURLcode result = CURLE_OK; + bool connected = FALSE; struct Curl_easy *data = conn->data; struct ftp_conn *ftpc = &conn->proto.ftpc; data->req.size = -1; /* make sure this is unknown at this point */ @@ -4467,28 +4383,6 @@ static CURLcode ftp_setup_connection(struct connectdata *conn) char command; struct FTP *ftp; - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel ftp operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_ftp) - conn->handler = &Curl_handler_ftp_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_ftps_proxy; -#else - failf(data, "FTPS not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - /* set it up as a HTTP connection instead */ - return conn->handler->setup_connection(conn); -#else - failf(data, "FTP over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - conn->data->req.protop = ftp = malloc(sizeof(struct FTP)); if(NULL == ftp) return CURLE_OUT_OF_MEMORY; diff --git a/lib/ftp.h b/lib/ftp.h index 3bbf262..e4aa63f 100644 --- a/lib/ftp.h +++ b/lib/ftp.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -130,10 +130,12 @@ struct ftp_conn { should be FALSE when it gets to Curl_ftp_quit() */ bool cwddone; /* if it has been determined that the proper CWD combo already has been done */ + int cwdcount; /* number of CWD commands issued */ bool cwdfail; /* set TRUE if a CWD command fails, as then we must prevent caching the current directory */ bool wait_data_conn; /* this is set TRUE if data connection is waited */ char *prevpath; /* conn->path from the previous transfer */ + curl_ftpfile prevmethod; /* ftp method in previous transfer */ char transfertype; /* set by ftp_transfertype for use by Curl_client_write()a and others (A/I or zero) */ int count1; /* general purpose counter for the state machine */ diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c index f94b31b..7668ea8 100644 --- a/lib/ftplistparser.c +++ b/lib/ftplistparser.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -49,6 +49,7 @@ #include "ftplistparser.h" #include "curl_fnmatch.h" #include "curl_memory.h" +#include "multiif.h" /* The last #include file should be: */ #include "memdebug.h" @@ -165,7 +166,7 @@ struct ftp_parselist_data { } state; CURLcode error; - struct curl_fileinfo *file_data; + struct fileinfo *file_data; unsigned int item_length; size_t item_offset; struct { @@ -264,25 +265,16 @@ static int ftp_pl_get_permission(const char *str) return permissions; } -static void PL_ERROR(struct connectdata *conn, CURLcode err) -{ - struct ftp_wc_tmpdata *tmpdata = conn->data->wildcard.tmp; - struct ftp_parselist_data *parser = tmpdata->parser; - if(parser->file_data) - Curl_fileinfo_dtor(NULL, parser->file_data); - parser->file_data = NULL; - parser->error = err; -} - static CURLcode ftp_pl_insert_finfo(struct connectdata *conn, - struct curl_fileinfo *finfo) + struct fileinfo *infop) { curl_fnmatch_callback compare; struct WildcardData *wc = &conn->data->wildcard; struct ftp_wc_tmpdata *tmpdata = wc->tmp; - struct curl_llist *llist = wc->filelist; + struct curl_llist *llist = &wc->filelist; struct ftp_parselist_data *parser = tmpdata->parser; bool add = TRUE; + struct curl_fileinfo *finfo = &infop->info; /* move finfo pointers to b_data */ char *str = finfo->b_data; @@ -303,6 +295,7 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn, compare = Curl_fnmatch; /* filter pattern-corresponding filenames */ + Curl_set_in_callback(conn->data, true); if(compare(conn->data->set.fnmatch_data, wc->pattern, finfo->filename) == 0) { /* discard symlink which is containing multiple " -> " */ @@ -314,13 +307,10 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn, else { add = FALSE; } + Curl_set_in_callback(conn->data, false); if(add) { - if(!Curl_llist_insert_next(llist, llist->tail, finfo)) { - Curl_fileinfo_dtor(NULL, finfo); - tmpdata->parser->file_data = NULL; - return CURLE_OUT_OF_MEMORY; - } + Curl_llist_insert_next(llist, llist->tail, finfo, &infop->list); } else { Curl_fileinfo_dtor(NULL, finfo); @@ -337,9 +327,11 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, struct connectdata *conn = (struct connectdata *)connptr; struct ftp_wc_tmpdata *tmpdata = conn->data->wildcard.tmp; struct ftp_parselist_data *parser = tmpdata->parser; + struct fileinfo *infop; struct curl_fileinfo *finfo; unsigned long i = 0; CURLcode result; + size_t retsize = bufflen; if(parser->error) { /* error in previous call */ /* scenario: @@ -348,7 +340,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, * 3. (last) call => is skipped RIGHT HERE and the error is hadled later * in wc_statemach() */ - return bufflen; + goto fail; } if(parser->os_type == OS_TYPE_UNKNOWN && bufflen > 0) { @@ -364,19 +356,20 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->file_data = Curl_fileinfo_alloc(); if(!parser->file_data) { parser->error = CURLE_OUT_OF_MEMORY; - return bufflen; + goto fail; } - parser->file_data->b_data = malloc(FTP_BUFFER_ALLOCSIZE); - if(!parser->file_data->b_data) { - PL_ERROR(conn, CURLE_OUT_OF_MEMORY); - return bufflen; + parser->file_data->info.b_data = malloc(FTP_BUFFER_ALLOCSIZE); + if(!parser->file_data->info.b_data) { + parser->error = CURLE_OUT_OF_MEMORY; + goto fail; } - parser->file_data->b_size = FTP_BUFFER_ALLOCSIZE; + parser->file_data->info.b_size = FTP_BUFFER_ALLOCSIZE; parser->item_offset = 0; parser->item_length = 0; } - finfo = parser->file_data; + infop = parser->file_data; + finfo = &infop->info; finfo->b_data[finfo->b_used++] = c; if(finfo->b_used >= finfo->b_size - 1) { @@ -391,8 +384,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, Curl_fileinfo_dtor(NULL, parser->file_data); parser->file_data = NULL; parser->error = CURLE_OUT_OF_MEMORY; - PL_ERROR(conn, CURLE_OUT_OF_MEMORY); - return bufflen; + goto fail; } } @@ -422,7 +414,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, else if(c == '\n') { finfo->b_data[parser->item_length - 1] = 0; if(strncmp("total ", finfo->b_data, 6) == 0) { - char *endptr = finfo->b_data+6; + char *endptr = finfo->b_data + 6; /* here we can deal with directory size, pass the leading white spaces and then the digits */ while(ISSPACE(*endptr)) @@ -430,17 +422,15 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, while(ISDIGIT(*endptr)) endptr++; if(*endptr != 0) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - else { - parser->state.UNIX.main = PL_UNIX_FILETYPE; - finfo->b_used = 0; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } + parser->state.UNIX.main = PL_UNIX_FILETYPE; + finfo->b_used = 0; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } break; @@ -473,8 +463,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->filetype = CURLFILETYPE_DOOR; break; default: - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } parser->state.UNIX.main = PL_UNIX_PERMISSION; parser->item_length = 0; @@ -484,24 +474,24 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->item_length++; if(parser->item_length <= 9) { if(!strchr("rwx-tTsS", c)) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } else if(parser->item_length == 10) { unsigned int perm; if(c != ' ') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } finfo->b_data[10] = 0; /* terminate permissions */ perm = ftp_pl_get_permission(finfo->b_data + parser->item_offset); if(perm & FTP_LP_MALFORMATED_PERM) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_PERM; - parser->file_data->perm = perm; + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_PERM; + parser->file_data->info.perm = perm; parser->offsets.perm = parser->item_offset; parser->item_length = 0; @@ -519,8 +509,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.hlinks = PL_UNIX_HLINKS_NUMBER; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } break; @@ -532,8 +522,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; hlinks = strtol(finfo->b_data + parser->item_offset, &p, 10); if(p[0] == '\0' && hlinks != LONG_MAX && hlinks != LONG_MIN) { - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_HLINKCOUNT; - parser->file_data->hardlinks = hlinks; + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_HLINKCOUNT; + parser->file_data->info.hardlinks = hlinks; } parser->item_length = 0; parser->item_offset = 0; @@ -541,8 +531,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.user = PL_UNIX_USER_PRESPACE; } else if(c < '0' || c > '9') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; } @@ -601,8 +591,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.size = PL_UNIX_SIZE_NUMBER; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } break; @@ -612,20 +602,22 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, char *p; curl_off_t fsize; finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - fsize = curlx_strtoofft(finfo->b_data+parser->item_offset, &p, 10); - if(p[0] == '\0' && fsize != CURL_OFF_T_MAX && - fsize != CURL_OFF_T_MIN) { - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_SIZE; - parser->file_data->size = fsize; + if(!curlx_strtoofft(finfo->b_data + parser->item_offset, + &p, 10, &fsize)) { + if(p[0] == '\0' && fsize != CURL_OFF_T_MAX && + fsize != CURL_OFF_T_MIN) { + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_SIZE; + parser->file_data->info.size = fsize; + } + parser->item_length = 0; + parser->item_offset = 0; + parser->state.UNIX.main = PL_UNIX_TIME; + parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART1; } - parser->item_length = 0; - parser->item_offset = 0; - parser->state.UNIX.main = PL_UNIX_TIME; - parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART1; } else if(!ISDIGIT(c)) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; } @@ -640,8 +632,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.time = PL_UNIX_TIME_PART1; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } break; @@ -651,8 +643,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART2; } else if(!ISALNUM(c) && c != '.') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; case PL_UNIX_TIME_PREPART2: @@ -662,8 +654,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.time = PL_UNIX_TIME_PART2; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } break; @@ -673,8 +665,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART3; } else if(!ISALNUM(c) && c != '.') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; case PL_UNIX_TIME_PREPART3: @@ -684,8 +676,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.time = PL_UNIX_TIME_PART3; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } break; @@ -709,8 +701,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, } } else if(!ISALNUM(c) && c != '.' && c != ':') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; } @@ -733,10 +725,10 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.filename = parser->item_offset; parser->state.UNIX.main = PL_UNIX_FILETYPE; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { - PL_ERROR(conn, result); - return bufflen; + parser->error = result; + goto fail; } } break; @@ -745,15 +737,15 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.filename = parser->item_offset; parser->state.UNIX.main = PL_UNIX_FILETYPE; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { - PL_ERROR(conn, result); - return bufflen; + parser->error = result; + goto fail; } } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; } @@ -773,8 +765,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRETARGET1; } else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; case PL_UNIX_SYMLINK_PRETARGET1: @@ -783,8 +775,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRETARGET2; } else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } else { parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_NAME; @@ -796,8 +788,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRETARGET3; } else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } else { parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_NAME; @@ -814,8 +806,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->item_offset = 0; } else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } else { parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_NAME; @@ -828,8 +820,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->item_length = 1; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; case PL_UNIX_SYMLINK_TARGET: @@ -840,10 +832,10 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, else if(c == '\n') { finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.symlink_target = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { - PL_ERROR(conn, result); - return bufflen; + parser->error = result; + goto fail; } parser->state.UNIX.main = PL_UNIX_FILETYPE; } @@ -852,16 +844,16 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, if(c == '\n') { finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.symlink_target = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { - PL_ERROR(conn, result); - return bufflen; + parser->error = result; + goto fail; } parser->state.UNIX.main = PL_UNIX_FILETYPE; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; } @@ -874,8 +866,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->item_length++; if(parser->item_length < 9) { if(!strchr("0123456789-", c)) { /* only simple control */ - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } else if(parser->item_length == 9) { @@ -884,13 +876,13 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->state.NT.sub.time = PL_WINNT_TIME_PRESPACE; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; case PL_WINNT_TIME: @@ -910,8 +902,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->item_length = 0; } else if(!strchr("APM0123456789:", c)) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; } @@ -938,27 +930,17 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, } else { char *endptr; - finfo->size = curlx_strtoofft(finfo->b_data + - parser->item_offset, - &endptr, 10); - if(!*endptr) { - if(finfo->size == CURL_OFF_T_MAX || - finfo->size == CURL_OFF_T_MIN) { - if(errno == ERANGE) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + if(curlx_strtoofft(finfo->b_data + + parser->item_offset, + &endptr, 10, &finfo->size)) { + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } /* correct file type */ - parser->file_data->filetype = CURLFILETYPE_FILE; + parser->file_data->info.filetype = CURLFILETYPE_FILE; } - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_SIZE; + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_SIZE; parser->item_length = 0; parser->state.NT.main = PL_WINNT_FILENAME; parser->state.NT.sub.filename = PL_WINNT_FILENAME_PRESPACE; @@ -985,10 +967,10 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->offsets.filename = parser->item_offset; finfo->b_data[finfo->b_used - 1] = 0; parser->offsets.filename = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { - PL_ERROR(conn, result); - return bufflen; + parser->error = result; + goto fail; } parser->state.NT.main = PL_WINNT_DATE; parser->state.NT.sub.filename = PL_WINNT_FILENAME_PRESPACE; @@ -997,17 +979,17 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, case PL_WINNT_FILENAME_WINEOL: if(c == '\n') { parser->offsets.filename = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { - PL_ERROR(conn, result); - return bufflen; + parser->error = result; + goto fail; } parser->state.NT.main = PL_WINNT_DATE; parser->state.NT.sub.filename = PL_WINNT_FILENAME_PRESPACE; } else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; + parser->error = CURLE_FTP_BAD_FILE_LIST; + goto fail; } break; } @@ -1015,13 +997,22 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, } break; default: - return bufflen + 1; + retsize = bufflen + 1; + goto fail; } i++; } - return bufflen; +fail: + + /* Clean up any allocated memory. */ + if(parser->file_data) { + Curl_fileinfo_dtor(NULL, parser->file_data); + parser->file_data = NULL; + } + + return retsize; } #endif /* CURL_DISABLE_FTP */ diff --git a/lib/getinfo.c b/lib/getinfo.c index a1ce505..d280eeb 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -54,6 +54,7 @@ CURLcode Curl_initinfo(struct Curl_easy *data) pro->t_starttransfer = 0; pro->timespent = 0; pro->t_redirect = 0; + pro->is_t_startransfer_set = false; info->httpcode = 0; info->httpproxycode = 0; @@ -155,7 +156,12 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info, *param_longp = data->info.httpproxycode; break; case CURLINFO_FILETIME: - *param_longp = data->info.filetime; + if(data->info.filetime > LONG_MAX) + *param_longp = LONG_MAX; + else if(data->info.filetime < LONG_MIN) + *param_longp = LONG_MIN; + else + *param_longp = (long)data->info.filetime; break; case CURLINFO_HEADER_SIZE: *param_longp = data->info.header_size; @@ -246,27 +252,63 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info, return CURLE_OK; } +#define DOUBLE_SECS(x) (double)(x)/1000000 + +static CURLcode getinfo_offt(struct Curl_easy *data, CURLINFO info, + curl_off_t *param_offt) +{ + switch(info) { + case CURLINFO_FILETIME_T: + *param_offt = (curl_off_t)data->info.filetime; + break; + case CURLINFO_SIZE_UPLOAD_T: + *param_offt = data->progress.uploaded; + break; + case CURLINFO_SIZE_DOWNLOAD_T: + *param_offt = data->progress.downloaded; + break; + case CURLINFO_SPEED_DOWNLOAD_T: + *param_offt = data->progress.dlspeed; + break; + case CURLINFO_SPEED_UPLOAD_T: + *param_offt = data->progress.ulspeed; + break; + case CURLINFO_CONTENT_LENGTH_DOWNLOAD_T: + *param_offt = (data->progress.flags & PGRS_DL_SIZE_KNOWN)? + data->progress.size_dl:-1; + break; + case CURLINFO_CONTENT_LENGTH_UPLOAD_T: + *param_offt = (data->progress.flags & PGRS_UL_SIZE_KNOWN)? + data->progress.size_ul:-1; + break; + default: + return CURLE_UNKNOWN_OPTION; + } + + return CURLE_OK; +} + static CURLcode getinfo_double(struct Curl_easy *data, CURLINFO info, double *param_doublep) { switch(info) { case CURLINFO_TOTAL_TIME: - *param_doublep = data->progress.timespent; + *param_doublep = DOUBLE_SECS(data->progress.timespent); break; case CURLINFO_NAMELOOKUP_TIME: - *param_doublep = data->progress.t_nslookup; + *param_doublep = DOUBLE_SECS(data->progress.t_nslookup); break; case CURLINFO_CONNECT_TIME: - *param_doublep = data->progress.t_connect; + *param_doublep = DOUBLE_SECS(data->progress.t_connect); break; case CURLINFO_APPCONNECT_TIME: - *param_doublep = data->progress.t_appconnect; + *param_doublep = DOUBLE_SECS(data->progress.t_appconnect); break; case CURLINFO_PRETRANSFER_TIME: - *param_doublep = data->progress.t_pretransfer; + *param_doublep = DOUBLE_SECS(data->progress.t_pretransfer); break; case CURLINFO_STARTTRANSFER_TIME: - *param_doublep = data->progress.t_starttransfer; + *param_doublep = DOUBLE_SECS(data->progress.t_starttransfer); break; case CURLINFO_SIZE_UPLOAD: *param_doublep = (double)data->progress.uploaded; @@ -289,7 +331,7 @@ static CURLcode getinfo_double(struct Curl_easy *data, CURLINFO info, (double)data->progress.size_ul:-1; break; case CURLINFO_REDIRECT_TIME: - *param_doublep = data->progress.t_redirect; + *param_doublep = DOUBLE_SECS(data->progress.t_redirect); break; default: @@ -326,46 +368,25 @@ static CURLcode getinfo_slist(struct Curl_easy *data, CURLINFO info, struct curl_tlssessioninfo **tsip = (struct curl_tlssessioninfo **) param_slistp; struct curl_tlssessioninfo *tsi = &data->tsi; +#ifdef USE_SSL struct connectdata *conn = data->easy_conn; +#endif *tsip = tsi; tsi->backend = Curl_ssl_backend(); tsi->internals = NULL; +#ifdef USE_SSL if(conn && tsi->backend != CURLSSLBACKEND_NONE) { unsigned int i; for(i = 0; i < (sizeof(conn->ssl) / sizeof(conn->ssl[0])); ++i) { if(conn->ssl[i].use) { -#if defined(USE_AXTLS) - tsi->internals = (void *)conn->ssl[i].ssl; -#elif defined(USE_CYASSL) - tsi->internals = (void *)conn->ssl[i].handle; -#elif defined(USE_DARWINSSL) - tsi->internals = (void *)conn->ssl[i].ssl_ctx; -#elif defined(USE_GNUTLS) - tsi->internals = (void *)conn->ssl[i].session; -#elif defined(USE_GSKIT) - tsi->internals = (void *)conn->ssl[i].handle; -#elif defined(USE_MBEDTLS) - tsi->internals = (void *)&conn->ssl[i].ssl; -#elif defined(USE_NSS) - tsi->internals = (void *)conn->ssl[i].handle; -#elif defined(USE_OPENSSL) - /* Legacy: CURLINFO_TLS_SESSION must return an SSL_CTX pointer. */ - tsi->internals = ((info == CURLINFO_TLS_SESSION) ? - (void *)conn->ssl[i].ctx : - (void *)conn->ssl[i].handle); -#elif defined(USE_POLARSSL) - tsi->internals = (void *)&conn->ssl[i].ssl; -#elif defined(USE_SCHANNEL) - tsi->internals = (void *)&conn->ssl[i].ctxt->ctxt_handle; -#elif defined(USE_SSL) -#error "SSL backend specific information missing for CURLINFO_TLS_SSL_PTR" -#endif + tsi->internals = Curl_ssl->get_internals(&conn->ssl[i], info); break; } } } +#endif } break; default: @@ -394,6 +415,7 @@ CURLcode Curl_getinfo(struct Curl_easy *data, CURLINFO info, ...) va_list arg; long *param_longp = NULL; double *param_doublep = NULL; + curl_off_t *param_offt = NULL; const char **param_charp = NULL; struct curl_slist **param_slistp = NULL; curl_socket_t *param_socketp = NULL; @@ -422,6 +444,11 @@ CURLcode Curl_getinfo(struct Curl_easy *data, CURLINFO info, ...) if(param_doublep) result = getinfo_double(data, info, param_doublep); break; + case CURLINFO_OFF_T: + param_offt = va_arg(arg, curl_off_t *); + if(param_offt) + result = getinfo_offt(data, info, param_offt); + break; case CURLINFO_SLIST: param_slistp = va_arg(arg, struct curl_slist **); if(param_slistp) diff --git a/lib/gopher.c b/lib/gopher.c index a073d0b..b7c31b6 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -65,6 +65,7 @@ const struct Curl_handler Curl_handler_gopher = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_GOPHER, /* defport */ CURLPROTO_GOPHER, /* protocol */ PROTOPT_NONE /* flags */ @@ -72,13 +73,13 @@ const struct Curl_handler Curl_handler_gopher = { static CURLcode gopher_do(struct connectdata *conn, bool *done) { - CURLcode result=CURLE_OK; - struct Curl_easy *data=conn->data; + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; curl_off_t *bytecount = &data->req.bytecount; char *path = data->state.path; - char *sel; + char *sel = NULL; char *sel_org = NULL; ssize_t amount, k; size_t len; @@ -96,18 +97,18 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) /* Otherwise, drop / and the first character (i.e., item type) ... */ newp = path; - newp+=2; + newp += 2; /* ... then turn ? into TAB for search servers, Veronica, etc. ... */ j = strlen(newp); - for(i=0; i, et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -37,8 +37,6 @@ hash_element_dtor(void *user, void *element) struct curl_hash *h = (struct curl_hash *) user; struct curl_hash_element *e = (struct curl_hash_element *) element; - Curl_safefree(e->key); - if(e->ptr) { h->dtor(e->ptr); e->ptr = NULL; @@ -74,54 +72,32 @@ Curl_hash_init(struct curl_hash *h, h->size = 0; h->slots = slots; - h->table = malloc(slots * sizeof(struct curl_llist *)); + h->table = malloc(slots * sizeof(struct curl_llist)); if(h->table) { - for(i = 0; i < slots; ++i) { - h->table[i] = Curl_llist_alloc((curl_llist_dtor) hash_element_dtor); - if(!h->table[i]) { - while(i--) { - Curl_llist_destroy(h->table[i], NULL); - h->table[i] = NULL; - } - free(h->table); - h->table = NULL; - h->slots = 0; - return 1; /* failure */ - } - } + for(i = 0; i < slots; ++i) + Curl_llist_init(&h->table[i], (curl_llist_dtor) hash_element_dtor); return 0; /* fine */ } - else { - h->slots = 0; - return 1; /* failure */ - } + h->slots = 0; + return 1; /* failure */ } static struct curl_hash_element * mk_hash_element(const void *key, size_t key_len, const void *p) { - struct curl_hash_element *he = malloc(sizeof(struct curl_hash_element)); - + /* allocate the struct plus memory after it to store the key */ + struct curl_hash_element *he = malloc(sizeof(struct curl_hash_element) + + key_len); if(he) { - void *dupkey = malloc(key_len); - if(dupkey) { - /* copy the key */ - memcpy(dupkey, key, key_len); - - he->key = dupkey; - he->key_len = key_len; - he->ptr = (void *) p; - } - else { - /* failed to duplicate the key, free memory and fail */ - free(he); - he = NULL; - } + /* copy the key */ + memcpy(he->key, key, key_len); + he->key_len = key_len; + he->ptr = (void *) p; } return he; } -#define FETCH_LIST(x,y,z) x->table[x->hash_func(y, z, x->slots)] +#define FETCH_LIST(x,y,z) &x->table[x->hash_func(y, z, x->slots)] /* Insert the data in the hash. If there already was a match in the hash, * that data is replaced. @@ -148,18 +124,9 @@ Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p) he = mk_hash_element(key, key_len, p); if(he) { - if(Curl_llist_insert_next(l, l->tail, he)) { - ++h->size; - return p; /* return the new entry */ - } - /* - * Couldn't insert it, destroy the 'he' element and the key again. We - * don't call hash_element_dtor() since that would also call the - * "destructor" for the actual data 'p'. When we fail, we shall not touch - * that data. - */ - free(he->key); - free(he); + Curl_llist_insert_next(l, l->tail, he, &he->list); + ++h->size; + return p; /* return the new entry */ } return NULL; /* failure */ @@ -243,8 +210,7 @@ Curl_hash_destroy(struct curl_hash *h) int i; for(i = 0; i < h->slots; ++i) { - Curl_llist_destroy(h->table[i], (void *) h); - h->table[i] = NULL; + Curl_llist_destroy(&h->table[i], (void *) h); } Curl_safefree(h->table); @@ -276,7 +242,7 @@ Curl_hash_clean_with_criterium(struct curl_hash *h, void *user, return; for(i = 0; i < h->slots; ++i) { - list = h->table[i]; + list = &h->table[i]; le = list->head; /* get first list entry */ while(le) { struct curl_hash_element *he = le->ptr; @@ -334,10 +300,10 @@ Curl_hash_next_element(struct curl_hash_iterator *iter) /* If we have reached the end of the list, find the next one */ if(!iter->current_element) { - for(i = iter->slot_index;i < h->slots;i++) { - if(h->table[i]->head) { - iter->current_element = h->table[i]->head; - iter->slot_index = i+1; + for(i = iter->slot_index; i < h->slots; i++) { + if(h->table[i].head) { + iter->current_element = h->table[i].head; + iter->slot_index = i + 1; break; } } @@ -347,10 +313,8 @@ Curl_hash_next_element(struct curl_hash_iterator *iter) struct curl_hash_element *he = iter->current_element->ptr; return he; } - else { - iter->current_element = NULL; - return NULL; - } + iter->current_element = NULL; + return NULL; } #if 0 /* useful function for debugging hashes and their contents */ diff --git a/lib/hash.h b/lib/hash.h index a5a6cac..90a25d1 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -44,7 +44,7 @@ typedef size_t (*comp_function) (void *key1, typedef void (*curl_hash_dtor)(void *); struct curl_hash { - struct curl_llist **table; + struct curl_llist *table; /* Hash function to be used for this hash table */ hash_function hash_func; @@ -57,9 +57,10 @@ struct curl_hash { }; struct curl_hash_element { + struct curl_llist_element list; void *ptr; - char *key; size_t key_len; + char key[1]; /* allocated memory following the struct */ }; struct curl_hash_iterator { diff --git a/lib/hostasyn.c b/lib/hostasyn.c index 28bdf7a..7b6e856 100644 --- a/lib/hostasyn.c +++ b/lib/hostasyn.c @@ -22,6 +22,11 @@ #include "curl_setup.h" +/*********************************************************************** + * Only for builds using asynchronous name resolves + **********************************************************************/ +#ifdef CURLRES_ASYNCH + #ifdef HAVE_NETINET_IN_H #include #endif @@ -51,11 +56,6 @@ /* The last #include file should be: */ #include "memdebug.h" -/*********************************************************************** - * Only for builds using asynchronous name resolves - **********************************************************************/ -#ifdef CURLRES_ASYNCH - /* * Curl_addrinfo_callback() gets called by ares, gethostbyname_thread() * or getaddrinfo_thread() when we got the name resolved (or not!). diff --git a/lib/hostcheck.c b/lib/hostcheck.c index cbd0893..37bcc12 100644 --- a/lib/hostcheck.c +++ b/lib/hostcheck.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -31,6 +31,9 @@ #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_NETINET_IN6_H +#include +#endif #include "hostcheck.h" #include "strcase.h" @@ -73,10 +76,10 @@ static int hostmatch(char *hostname, char *pattern) /* normalize pattern and hostname by stripping off trailing dots */ size_t len = strlen(hostname); if(hostname[len-1]=='.') - hostname[len-1]=0; + hostname[len-1] = 0; len = strlen(pattern); if(pattern[len-1]=='.') - pattern[len-1]=0; + pattern[len-1] = 0; pattern_wildcard = strchr(pattern, '*'); if(pattern_wildcard == NULL) @@ -87,7 +90,7 @@ static int hostmatch(char *hostname, char *pattern) if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0) return CURL_HOST_NOMATCH; #ifdef ENABLE_IPV6 - else if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0) + if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0) return CURL_HOST_NOMATCH; #endif @@ -95,7 +98,7 @@ static int hostmatch(char *hostname, char *pattern) match. */ wildcard_enabled = 1; pattern_label_end = strchr(pattern, '.'); - if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL || + if(pattern_label_end == NULL || strchr(pattern_label_end + 1, '.') == NULL || pattern_wildcard > pattern_label_end || strncasecompare(pattern, "xn--", 4)) { wildcard_enabled = 0; @@ -116,9 +119,9 @@ static int hostmatch(char *hostname, char *pattern) return CURL_HOST_NOMATCH; prefixlen = pattern_wildcard - pattern; - suffixlen = pattern_label_end - (pattern_wildcard+1); + suffixlen = pattern_label_end - (pattern_wildcard + 1); return strncasecompare(pattern, hostname, prefixlen) && - strncasecompare(pattern_wildcard+1, hostname_label_end - suffixlen, + strncasecompare(pattern_wildcard + 1, hostname_label_end - suffixlen, suffixlen) ? CURL_HOST_MATCH : CURL_HOST_NOMATCH; } @@ -137,7 +140,7 @@ int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) hostp = strdup(hostname); if(hostp) { if(hostmatch(hostp, matchp) == CURL_HOST_MATCH) - res= 1; + res = 1; free(hostp); } free(matchp); diff --git a/lib/hostip.c b/lib/hostip.c index fa4bad9..8554d39 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,6 +25,9 @@ #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_NETINET_IN6_H +#include +#endif #ifdef HAVE_NETDB_H #include #endif @@ -55,6 +58,7 @@ #include "strerror.h" #include "url.h" #include "inet_ntop.h" +#include "multiif.h" #include "warnless.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" @@ -143,7 +147,7 @@ void Curl_global_host_cache_dtor(void) } /* - * Return # of adresses in a Curl_addrinfo struct + * Return # of addresses in a Curl_addrinfo struct */ int Curl_num_addresses(const Curl_addrinfo *addr) { @@ -304,9 +308,9 @@ fetch_addr(struct connectdata *conn, entry_len = strlen(entry_id); /* See if its already in our dns cache */ - dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1); + dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len + 1); - if(dns && (data->set.dns_cache_timeout != -1)) { + if(dns && (data->set.dns_cache_timeout != -1)) { /* See whether the returned entry is stale. Done before we release lock */ struct hostcache_prune_data user; @@ -316,7 +320,7 @@ fetch_addr(struct connectdata *conn, if(hostcache_timestamp_remove(&user, dns)) { infof(data, "Hostname in DNS cache was stale, zapped\n"); dns = NULL; /* the memory deallocation is being handled by the hash */ - Curl_hash_delete(data->dns.hostcache, entry_id, entry_len+1); + Curl_hash_delete(data->dns.hostcache, entry_id, entry_len + 1); } } @@ -403,7 +407,7 @@ Curl_cache_addr(struct Curl_easy *data, dns->timestamp = 1; /* zero indicates CURLOPT_RESOLVE entry */ /* Store the resolved data in our DNS cache. */ - dns2 = Curl_hash_add(data->dns.hostcache, entry_id, entry_len+1, + dns2 = Curl_hash_add(data->dns.hostcache, entry_id, entry_len + 1, (void *)dns); if(!dns2) { free(dns); @@ -478,6 +482,17 @@ int Curl_resolv(struct connectdata *conn, if(!Curl_ipvalid(conn)) return CURLRESOLV_ERROR; + /* notify the resolver start callback */ + if(data->set.resolver_start) { + int st; + Curl_set_in_callback(data, true); + st = data->set.resolver_start(data->state.resolver, NULL, + data->set.resolver_start_client); + Curl_set_in_callback(data, false); + if(st) + return CURLRESOLV_ERROR; + } + /* If Curl_getaddrinfo() returns NULL, 'respwait' might be set to a non-zero value indicating that we need to wait for the response to the resolve call */ @@ -538,7 +553,6 @@ RETSIGTYPE alarmfunc(int sig) /* this is for "-ansi -Wall -pedantic" to stop complaining! (rabe) */ (void)sig; siglongjmp(curl_jmpenv, 1); - return; } #endif /* USE_ALARM_TIMEOUT */ @@ -573,7 +587,7 @@ int Curl_resolv_timeout(struct connectdata *conn, #ifdef USE_ALARM_TIMEOUT #ifdef HAVE_SIGACTION struct sigaction keep_sigact; /* store the old struct here */ - volatile bool keep_copysig = FALSE; /* wether old sigact has been saved */ + volatile bool keep_copysig = FALSE; /* whether old sigact has been saved */ struct sigaction sigact; #else #ifdef HAVE_SIGNAL @@ -597,7 +611,7 @@ int Curl_resolv_timeout(struct connectdata *conn, /* Ignore the timeout when signals are disabled */ timeout = 0; else - timeout = timeoutms; + timeout = (timeoutms > LONG_MAX) ? LONG_MAX : (long)timeoutms; if(!timeout) /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */ @@ -689,10 +703,11 @@ clean_up: the time we spent until now! */ if(prev_alarm) { /* there was an alarm() set before us, now put it back */ - unsigned long elapsed_ms = Curl_tvdiff(Curl_tvnow(), conn->created); + timediff_t elapsed_secs = Curl_timediff(Curl_now(), + conn->created) / 1000; /* the alarm period is counted in even number of seconds */ - unsigned long alarm_set = prev_alarm - elapsed_ms/1000; + unsigned long alarm_set = prev_alarm - elapsed_secs; if(!alarm_set || ((alarm_set >= 0x80000000) && (prev_alarm < 0x80000000)) ) { @@ -778,8 +793,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data) { struct curl_slist *hostp; char hostname[256]; - char address[256]; - int port; + int port = 0; for(hostp = data->change.resolve; hostp; hostp = hostp->next) { if(!hostp->data) @@ -807,7 +821,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data) Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); /* delete entry, ignore if it didn't exist */ - Curl_hash_delete(data->dns.hostcache, entry_id, entry_len+1); + Curl_hash_delete(data->dns.hostcache, entry_id, entry_len + 1); if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); @@ -817,20 +831,95 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data) } else { struct Curl_dns_entry *dns; - Curl_addrinfo *addr; + Curl_addrinfo *head = NULL, *tail = NULL; char *entry_id; size_t entry_len; + char address[64]; + char *addresses = NULL; + char *addr_begin; + char *addr_end; + char *port_ptr; + char *end_ptr; + char *host_end; + unsigned long tmp_port; + bool error = true; + + host_end = strchr(hostp->data, ':'); + if(!host_end || + ((host_end - hostp->data) >= (ptrdiff_t)sizeof(hostname))) + goto err; + + memcpy(hostname, hostp->data, host_end - hostp->data); + hostname[host_end - hostp->data] = '\0'; + + port_ptr = host_end + 1; + tmp_port = strtoul(port_ptr, &end_ptr, 10); + if(tmp_port > USHRT_MAX || end_ptr == port_ptr || *end_ptr != ':') + goto err; + + port = (int)tmp_port; + addresses = end_ptr + 1; + + while(*end_ptr) { + size_t alen; + Curl_addrinfo *ai; + + addr_begin = end_ptr + 1; + addr_end = strchr(addr_begin, ','); + if(!addr_end) + addr_end = addr_begin + strlen(addr_begin); + end_ptr = addr_end; + + /* allow IP(v6) address within [brackets] */ + if(*addr_begin == '[') { + if(addr_end == addr_begin || *(addr_end - 1) != ']') + goto err; + ++addr_begin; + --addr_end; + } - if(3 != sscanf(hostp->data, "%255[^:]:%d:%255s", hostname, &port, - address)) { - infof(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'!\n", - hostp->data); - continue; + alen = addr_end - addr_begin; + if(!alen) + continue; + + if(alen >= sizeof(address)) + goto err; + + memcpy(address, addr_begin, alen); + address[alen] = '\0'; + +#ifndef ENABLE_IPV6 + if(strchr(address, ':')) { + infof(data, "Ignoring resolve address '%s', missing IPv6 support.\n", + address); + continue; + } +#endif + + ai = Curl_str2addr(address, port); + if(!ai) { + infof(data, "Resolve address '%s' found illegal!\n", address); + goto err; + } + + if(tail) { + tail->ai_next = ai; + tail = tail->ai_next; + } + else { + head = tail = ai; + } } - addr = Curl_str2addr(address, port); - if(!addr) { - infof(data, "Address in '%s' found illegal!\n", hostp->data); + if(!head) + goto err; + + error = false; + err: + if(error) { + infof(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'!\n", + hostp->data); + Curl_freeaddrinfo(head); continue; } @@ -838,24 +927,23 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data) entry_id = create_hostcache_id(hostname, port); /* If we can't create the entry id, fail */ if(!entry_id) { - Curl_freeaddrinfo(addr); + Curl_freeaddrinfo(head); return CURLE_OUT_OF_MEMORY; } - entry_len = strlen(entry_id); if(data->share) Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); /* See if its already in our dns cache */ - dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1); + dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len + 1); /* free the allocated entry_id again */ free(entry_id); if(!dns) { /* if not in the cache already, put this host in the cache */ - dns = Curl_cache_addr(data, addr, hostname, port); + dns = Curl_cache_addr(data, head, hostname, port); if(dns) { dns->timestamp = 0; /* mark as added by CURLOPT_RESOLVE */ /* release the returned reference; the cache itself will keep the @@ -863,19 +951,22 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data) dns->inuse--; } } - else + else { /* this is a duplicate, free it again */ - Curl_freeaddrinfo(addr); + infof(data, "RESOLVE %s:%d is already cached, %s not stored!\n", + hostname, port, addresses); + Curl_freeaddrinfo(head); + } if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); if(!dns) { - Curl_freeaddrinfo(addr); + Curl_freeaddrinfo(head); return CURLE_OUT_OF_MEMORY; } infof(data, "Added %s:%d:%s to DNS cache\n", - hostname, port, address); + hostname, port, addresses); } } data->change.resolve = NULL; /* dealt with now */ diff --git a/lib/hostip.h b/lib/hostip.h index 1dc4079..298eeee 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -130,7 +130,7 @@ int Curl_mk_dnscache(struct curl_hash *hash); /* prune old entries from the DNS cache */ void Curl_hostcache_prune(struct Curl_easy *data); -/* Return # of adresses in a Curl_addrinfo struct */ +/* Return # of addresses in a Curl_addrinfo struct */ int Curl_num_addresses(const Curl_addrinfo *addr); #if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) diff --git a/lib/hostip4.c b/lib/hostip4.c index e459328..9d6f115 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,11 @@ #include "curl_setup.h" +/*********************************************************************** + * Only for plain IPv4 builds + **********************************************************************/ +#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */ + #ifdef HAVE_NETINET_IN_H #include #endif @@ -53,10 +58,6 @@ #include "curl_memory.h" #include "memdebug.h" -/*********************************************************************** - * Only for plain IPv4 builds - **********************************************************************/ -#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */ /* * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've * been set and returns TRUE if they are OK. @@ -249,7 +250,7 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, */ if(CURL_HOSTENT_SIZE >= - (sizeof(struct hostent)+sizeof(struct hostent_data))) { + (sizeof(struct hostent) + sizeof(struct hostent_data))) { /* August 22nd, 2000: Albert Chin-A-Young brought an updated version * that should work! September 20: Richard Prescott worked on the buffer diff --git a/lib/hostip6.c b/lib/hostip6.c index 4ebfc2d..7c9988f 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,11 @@ #include "curl_setup.h" +/*********************************************************************** + * Only for IPv6-enabled builds + **********************************************************************/ +#ifdef CURLRES_IPV6 + #ifdef HAVE_NETINET_IN_H #include #endif @@ -54,11 +59,6 @@ #include "curl_memory.h" #include "memdebug.h" -/*********************************************************************** - * Only for IPv6-enabled builds - **********************************************************************/ -#ifdef CURLRES_IPV6 - #if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) /* These are strictly for memory tracing and are using the same style as the * family otherwise present in memdebug.c. I put these ones here since they @@ -212,7 +212,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, if(port) { snprintf(sbuf, sizeof(sbuf), "%d", port); - sbufptr=sbuf; + sbufptr = sbuf; } error = Curl_getaddrinfo_ex(hostname, sbufptr, &hints, &res); diff --git a/lib/hostsyn.c b/lib/hostsyn.c index 1a95263..3de6746 100644 --- a/lib/hostsyn.c +++ b/lib/hostsyn.c @@ -22,6 +22,11 @@ #include "curl_setup.h" +/*********************************************************************** + * Only for builds using synchronous name resolves + **********************************************************************/ +#ifdef CURLRES_SYNCH + #ifdef HAVE_NETINET_IN_H #include #endif @@ -51,11 +56,6 @@ /* The last #include file should be: */ #include "memdebug.h" -/*********************************************************************** - * Only for builds using synchronous name resolves - **********************************************************************/ -#ifdef CURLRES_SYNCH - /* * Function provided by the resolver backend to set DNS servers to use. */ diff --git a/lib/http.c b/lib/http.c index 8db86cd..841f6cc 100644 --- a/lib/http.c +++ b/lib/http.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -50,6 +50,7 @@ #include "transfer.h" #include "sendf.h" #include "formdata.h" +#include "mime.h" #include "progress.h" #include "curl_base64.h" #include "cookie.h" @@ -72,7 +73,6 @@ #include "http_proxy.h" #include "warnless.h" #include "non-ascii.h" -#include "conncache.h" #include "pipeline.h" #include "http2.h" #include "connect.h" @@ -119,6 +119,7 @@ const struct Curl_handler Curl_handler_http = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_HTTP, /* defport */ CURLPROTO_HTTP, /* protocol */ PROTOPT_CREDSPERREQUEST /* flags */ @@ -143,6 +144,7 @@ const struct Curl_handler Curl_handler_https = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_HTTPS, /* defport */ CURLPROTO_HTTPS, /* protocol */ PROTOPT_SSL | PROTOPT_CREDSPERREQUEST | PROTOPT_ALPN_NPN /* flags */ @@ -160,6 +162,7 @@ CURLcode Curl_http_setup_conn(struct connectdata *conn) if(!http) return CURLE_OUT_OF_MEMORY; + Curl_mime_initpart(&http->form, conn->data); conn->data->req.protop = http; Curl_http2_setup_conn(conn); @@ -168,35 +171,15 @@ CURLcode Curl_http_setup_conn(struct connectdata *conn) return CURLE_OK; } -/* - * checkheaders() checks the linked list of custom HTTP headers for a - * particular header (prefix). - * - * Returns a pointer to the first matching header or NULL if none matched. - */ -char *Curl_checkheaders(const struct connectdata *conn, - const char *thisheader) -{ - struct curl_slist *head; - size_t thislen = strlen(thisheader); - struct Curl_easy *data = conn->data; - - for(head = data->set.headers;head; head=head->next) { - if(strncasecompare(head->data, thisheader, thislen)) - return head->data; - } - - return NULL; -} /* * checkProxyHeaders() checks the linked list of custom proxy headers * if proxy headers are not available, then it will lookup into http header * link list * - * It takes a connectdata struct as input instead of the Curl_easy simply - * to know if this is a proxy request or not, as it then might check a - * different header list. + * It takes a connectdata struct as input instead of the Curl_easy simply to + * know if this is a proxy request or not, as it then might check a different + * header list. Provide the header prefix without colon!. */ char *Curl_checkProxyheaders(const struct connectdata *conn, const char *thisheader) @@ -207,8 +190,9 @@ char *Curl_checkProxyheaders(const struct connectdata *conn, for(head = (conn->bits.proxy && data->set.sep_headers) ? data->set.proxyheaders : data->set.headers; - head; head=head->next) { - if(strncasecompare(head->data, thisheader, thislen)) + head; head = head->next) { + if(strncasecompare(head->data, thisheader, thislen) && + Curl_headersep(head->data[thislen])) return head->data; } @@ -285,6 +269,7 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy) const char *user; const char *pwd; CURLcode result; + char *out; if(proxy) { userp = &conn->allocptr.proxyuserpwd; @@ -297,27 +282,32 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy) pwd = conn->passwd; } - snprintf(data->state.buffer, CURL_BUFSIZE(data->set.buffer_size), - "%s:%s", user, pwd); + out = aprintf("%s:%s", user, pwd); + if(!out) + return CURLE_OUT_OF_MEMORY; - result = Curl_base64_encode(data, - data->state.buffer, strlen(data->state.buffer), - &authorization, &size); + result = Curl_base64_encode(data, out, strlen(out), &authorization, &size); if(result) - return result; + goto fail; - if(!authorization) - return CURLE_REMOTE_ACCESS_DENIED; + if(!authorization) { + result = CURLE_REMOTE_ACCESS_DENIED; + goto fail; + } free(*userp); *userp = aprintf("%sAuthorization: Basic %s\r\n", proxy ? "Proxy-" : "", authorization); free(authorization); - if(!*userp) - return CURLE_OUT_OF_MEMORY; + if(!*userp) { + result = CURLE_OUT_OF_MEMORY; + goto fail; + } - return CURLE_OK; + fail: + free(out); + return result; } /* pickoneauth() selects the most favourable authentication method from the @@ -413,14 +403,13 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) case HTTPREQ_POST: if(data->state.infilesize != -1) expectsend = data->state.infilesize; - else if(data->set.postfields) - expectsend = (curl_off_t)strlen(data->set.postfields); break; case HTTPREQ_PUT: if(data->state.infilesize != -1) expectsend = data->state.infilesize; break; case HTTPREQ_POST_FORM: + case HTTPREQ_POST_MIME: expectsend = http->postsize; break; default: @@ -604,7 +593,7 @@ output_auth_headers(struct connectdata *conn, #endif #if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) if(authstatus->picked == CURLAUTH_NTLM_WB) { - auth="NTLM_WB"; + auth = "NTLM_WB"; result = Curl_output_ntlm_wb(conn, proxy); if(result) return result; @@ -626,9 +615,9 @@ output_auth_headers(struct connectdata *conn, if(authstatus->picked == CURLAUTH_BASIC) { /* Basic */ if((proxy && conn->bits.proxy_user_passwd && - !Curl_checkProxyheaders(conn, "Proxy-authorization:")) || + !Curl_checkProxyheaders(conn, "Proxy-authorization")) || (!proxy && conn->bits.user_passwd && - !Curl_checkheaders(conn, "Authorization:"))) { + !Curl_checkheaders(conn, "Authorization"))) { auth = "Basic"; result = http_output_basic(conn, proxy); if(result) @@ -645,10 +634,10 @@ output_auth_headers(struct connectdata *conn, proxy ? "Proxy" : "Server", auth, proxy ? (conn->http_proxy.user ? conn->http_proxy.user : "") : (conn->user ? conn->user : "")); - authstatus->multi = (!authstatus->done) ? TRUE : FALSE; + authstatus->multipass = (!authstatus->done) ? TRUE : FALSE; } else - authstatus->multi = FALSE; + authstatus->multipass = FALSE; return CURLE_OK; } @@ -726,7 +715,7 @@ Curl_http_output_auth(struct connectdata *conn, if(!data->state.this_is_a_follow || conn->bits.netrc || !data->state.first_host || - data->set.http_disable_hostname_check_before_authentication || + data->set.allow_auth_to_other_hosts || strcasecompare(data->state.first_host, conn->host.name)) { result = output_auth_headers(conn, authhost, request, path, FALSE); } @@ -1016,7 +1005,7 @@ static size_t readmoredata(char *buffer, http->sending++; /* move one step up */ - http->backup.postsize=0; + http->backup.postsize = 0; } else http->postsize = 0; @@ -1111,7 +1100,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, buffer is using this size. */ - sendsize = (size > CURL_MAX_WRITE_SIZE) ? CURL_MAX_WRITE_SIZE : size; + sendsize = CURLMIN(size, CURL_MAX_WRITE_SIZE); /* OpenSSL is very picky and we must send the SAME buffer pointer to the library when we attempt to re-send this buffer. Sending the same data @@ -1144,7 +1133,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, /* there was body data sent beyond the initial header part, pass that on to the debug callback too */ Curl_debug(conn->data, CURLINFO_DATA_OUT, - ptr+headlen, bodylen, conn); + ptr + headlen, bodylen, conn); } } @@ -1197,8 +1186,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, This needs FIXing. */ return CURLE_SEND_ERROR; - else - Curl_pipeline_leave_write(conn); + Curl_pipeline_leave_write(conn); } } Curl_add_buffer_free(in); @@ -1257,7 +1245,7 @@ CURLcode Curl_add_buffer(Curl_send_buffer *in, const void *inptr, size_t size) (~(size * 2) < (in->size_used * 2))) new_size = (size_t)-1; else - new_size = (in->size_used+size) * 2; + new_size = (in->size_used + size) * 2; if(in->buffer) /* we have a buffer, enlarge the existing one */ @@ -1334,7 +1322,7 @@ Curl_compareheader(const char *headerline, /* line to check */ clen = strlen(content); /* length of the word to find */ /* find the content string in the rest of the line */ - for(;len>=clen;len--, start++) { + for(; len >= clen; len--, start++) { if(strncasecompare(start, content, clen)) return TRUE; /* match! */ } @@ -1359,14 +1347,18 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) if(result) return result; + if(conn->bits.proxy_connect_closed) + /* this is not an error, just part of the connection negotiation */ + return CURLE_OK; + if(CONNECT_FIRSTSOCKET_PROXY_SSL()) return CURLE_OK; /* wait for HTTPS proxy SSL initialization to complete */ - if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) + if(Curl_connect_ongoing(conn)) /* nothing else to do except wait right now - we're not done here. */ return CURLE_OK; - if(conn->given->flags & PROTOPT_SSL) { + if(conn->given->protocol & CURLPROTO_HTTPS) { /* perform SSL initialization */ result = https_connecting(conn, done); if(result) @@ -1426,6 +1418,11 @@ CURLcode Curl_http_done(struct connectdata *conn, struct Curl_easy *data = conn->data; struct HTTP *http = data->req.protop; + /* Clear multipass flag. If authentication isn't done yet, then it will get + * a chance to be set back to true when we output the next auth header */ + data->state.authhost.multipass = FALSE; + data->state.authproxy.multipass = FALSE; + Curl_unencode_cleanup(conn); #ifdef USE_SPNEGO @@ -1456,18 +1453,17 @@ CURLcode Curl_http_done(struct connectdata *conn, Curl_http2_done(conn, premature); - if(HTTPREQ_POST_FORM == data->set.httpreq) { - data->req.bytecount = http->readbytecount + http->writebytecount; + Curl_mime_cleanpart(&http->form); - Curl_formclean(&http->sendit); /* Now free that whole lot */ - if(http->form.fp) { - /* a file being uploaded was left opened, close it! */ - fclose(http->form.fp); - http->form.fp = NULL; - } - } - else if(HTTPREQ_PUT == data->set.httpreq) + switch(data->set.httpreq) { + case HTTPREQ_PUT: + case HTTPREQ_POST_FORM: + case HTTPREQ_POST_MIME: data->req.bytecount = http->readbytecount + http->writebytecount; + break; + default: + break; + } if(status) return status; @@ -1538,7 +1534,7 @@ static CURLcode expect100(struct Curl_easy *data, /* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an Expect: 100-continue to the headers which actually speeds up post operations (as there is one packet coming back from the web server) */ - ptr = Curl_checkheaders(conn, "Expect:"); + ptr = Curl_checkheaders(conn, "Expect"); if(ptr) { data->state.expect100header = Curl_compareheader(ptr, "Expect:", "100-continue"); @@ -1567,7 +1563,7 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn, char *ptr; struct curl_slist *h[2]; struct curl_slist *headers; - int numlists=1; /* by default */ + int numlists = 1; /* by default */ struct Curl_easy *data = conn->data; int i; @@ -1599,11 +1595,36 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn, } /* loop through one or two lists */ - for(i=0; i < numlists; i++) { + for(i = 0; i < numlists; i++) { headers = h[i]; while(headers) { + char *semicolonp = NULL; ptr = strchr(headers->data, ':'); + if(!ptr) { + char *optr; + /* no colon, semicolon? */ + ptr = strchr(headers->data, ';'); + if(ptr) { + optr = ptr; + ptr++; /* pass the semicolon */ + while(*ptr && ISSPACE(*ptr)) + ptr++; + + if(*ptr) { + /* this may be used for something else in the future */ + optr = NULL; + } + else { + if(*(--ptr) == ';') { + /* send no-value custom header if terminated by semicolon */ + *ptr = ':'; + semicolonp = ptr; + } + } + ptr = optr; + } + } if(ptr) { /* we require a colon for this to be a true header */ @@ -1611,8 +1632,9 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn, while(*ptr && ISSPACE(*ptr)) ptr++; - if(*ptr) { - /* only send this if the contents was non-blank */ + if(*ptr || semicolonp) { + /* only send this if the contents was non-blank or done special */ + CURLcode result = CURLE_OK; if(conn->allocptr.host && /* a Host: header was sent already, don't pass on any custom Host: @@ -1623,51 +1645,39 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn, /* this header (extended by formdata.c) is sent later */ checkprefix("Content-Type:", headers->data)) ; + else if(data->set.httpreq == HTTPREQ_POST_MIME && + /* this header is sent later */ + checkprefix("Content-Type:", headers->data)) + ; else if(conn->bits.authneg && /* while doing auth neg, don't allow the custom length since we will force length zero then */ - checkprefix("Content-Length", headers->data)) + checkprefix("Content-Length:", headers->data)) ; else if(conn->allocptr.te && /* when asking for Transfer-Encoding, don't pass on a custom Connection: */ - checkprefix("Connection", headers->data)) + checkprefix("Connection:", headers->data)) ; else if((conn->httpversion == 20) && checkprefix("Transfer-Encoding:", headers->data)) /* HTTP/2 doesn't support chunked requests */ ; + else if(checkprefix("Authorization:", headers->data) && + /* be careful of sending this potentially sensitive header to + other hosts */ + (data->state.this_is_a_follow && + data->state.first_host && + !data->set.allow_auth_to_other_hosts && + !strcasecompare(data->state.first_host, conn->host.name))) + ; else { - CURLcode result = Curl_add_bufferf(req_buffer, "%s\r\n", - headers->data); - if(result) - return result; - } - } - } - else { - ptr = strchr(headers->data, ';'); - if(ptr) { - - ptr++; /* pass the semicolon */ - while(*ptr && ISSPACE(*ptr)) - ptr++; - - if(*ptr) { - /* this may be used for something else in the future */ - } - else { - if(*(--ptr) == ';') { - CURLcode result; - - /* send no-value custom header if terminated by semicolon */ - *ptr = ':'; - result = Curl_add_bufferf(req_buffer, "%s\r\n", - headers->data); - if(result) - return result; - } + result = Curl_add_bufferf(req_buffer, "%s\r\n", headers->data); } + if(semicolonp) + *semicolonp = ';'; /* put back the semicolon */ + if(result) + return result; } } headers = headers->next; @@ -1681,9 +1691,10 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, Curl_send_buffer *req_buffer) { const struct tm *tm; - char *buf = data->state.buffer; struct tm keeptime; CURLcode result; + char datestr[80]; + const char *condp; if(data->set.timecondition == CURL_TIMECOND_NONE) /* no condition was asked for */ @@ -1696,6 +1707,21 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, } tm = &keeptime; + switch(data->set.timecondition) { + default: + return CURLE_BAD_FUNCTION_ARGUMENT; + + case CURL_TIMECOND_IFMODSINCE: + condp = "If-Modified-Since"; + break; + case CURL_TIMECOND_IFUNMODSINCE: + condp = "If-Unmodified-Since"; + break; + case CURL_TIMECOND_LASTMOD: + condp = "Last-Modified"; + break; + } + /* The If-Modified-Since header family should have their times set in * GMT as RFC2616 defines: "All HTTP date/time stamps MUST be * represented in Greenwich Mean Time (GMT), without exception. For the @@ -1704,8 +1730,9 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, */ /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ - snprintf(buf, BUFSIZE-1, - "%s, %02d %s %4d %02d:%02d:%02d GMT", + snprintf(datestr, sizeof(datestr), + "%s: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", + condp, Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], tm->tm_mday, Curl_month[tm->tm_mon], @@ -1714,22 +1741,7 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, tm->tm_min, tm->tm_sec); - switch(data->set.timecondition) { - default: - break; - case CURL_TIMECOND_IFMODSINCE: - result = Curl_add_bufferf(req_buffer, - "If-Modified-Since: %s\r\n", buf); - break; - case CURL_TIMECOND_IFUNMODSINCE: - result = Curl_add_bufferf(req_buffer, - "If-Unmodified-Since: %s\r\n", buf); - break; - case CURL_TIMECOND_LASTMOD: - result = Curl_add_bufferf(req_buffer, - "Last-Modified: %s\r\n", buf); - break; - } + result = Curl_add_buffer(req_buffer, datestr, strlen(datestr)); return result; } @@ -1759,7 +1771,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) const char *httpstring; Curl_send_buffer *req_buffer; curl_off_t postsize = 0; /* curl_off_t to handle large file sizes */ - int seekerr = CURL_SEEKFUNC_OK; + int seekerr = CURL_SEEKFUNC_CANTSEEK; /* Always consider the DO phase done after this function call, even if there may be parts of the request that is not yet sent, since we can deal with @@ -1832,11 +1844,15 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) switch(httpreq) { case HTTPREQ_POST: case HTTPREQ_POST_FORM: + case HTTPREQ_POST_MIME: request = "POST"; break; case HTTPREQ_PUT: request = "PUT"; break; + case HTTPREQ_OPTIONS: + request = "OPTIONS"; + break; default: /* this should never happen */ case HTTPREQ_GET: request = "GET"; @@ -1852,9 +1868,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) it might have been used in the proxy connect, but if we have got a header with the user-agent string specified, we erase the previously made string here. */ - if(Curl_checkheaders(conn, "User-Agent:")) { + if(Curl_checkheaders(conn, "User-Agent")) { free(conn->allocptr.uagent); - conn->allocptr.uagent=NULL; + conn->allocptr.uagent = NULL; } /* setup the authentication headers */ @@ -1862,7 +1878,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) return result; - if((data->state.authhost.multi || data->state.authproxy.multi) && + if((data->state.authhost.multipass || data->state.authproxy.multipass) && (httpreq != HTTPREQ_GET) && (httpreq != HTTPREQ_HEAD)) { /* Auth is required and we are not authenticated yet. Make a PUT or POST @@ -1873,7 +1889,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) conn->bits.authneg = FALSE; Curl_safefree(conn->allocptr.ref); - if(data->change.referer && !Curl_checkheaders(conn, "Referer:")) { + if(data->change.referer && !Curl_checkheaders(conn, "Referer")) { conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer); if(!conn->allocptr.ref) return CURLE_OUT_OF_MEMORY; @@ -1882,11 +1898,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) conn->allocptr.ref = NULL; #if !defined(CURL_DISABLE_COOKIES) - if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(conn, "Cookie:")) + if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(conn, "Cookie")) addcookies = data->set.str[STRING_COOKIE]; #endif - if(!Curl_checkheaders(conn, "Accept-Encoding:") && + if(!Curl_checkheaders(conn, "Accept-Encoding") && data->set.str[STRING_ENCODING]) { Curl_safefree(conn->allocptr.accept_encoding); conn->allocptr.accept_encoding = @@ -1902,37 +1918,87 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) #ifdef HAVE_LIBZ /* we only consider transfer-encoding magic if libz support is built-in */ - if(!Curl_checkheaders(conn, "TE:") && + if(!Curl_checkheaders(conn, "TE") && data->set.http_transfer_encoding) { /* When we are to insert a TE: header in the request, we must also insert TE in a Connection: header, so we need to merge the custom provided Connection: header and prevent the original to get sent. Note that if the user has inserted his/hers own TE: header we don't do this magic but then assume that the user will handle it all! */ - char *cptr = Curl_checkheaders(conn, "Connection:"); + char *cptr = Curl_checkheaders(conn, "Connection"); #define TE_HEADER "TE: gzip\r\n" Curl_safefree(conn->allocptr.te); + if(cptr) { + cptr = Curl_copy_header_value(cptr); + if(!cptr) + return CURLE_OUT_OF_MEMORY; + } + /* Create the (updated) Connection: header */ - conn->allocptr.te = cptr? aprintf("%s, TE\r\n" TE_HEADER, cptr): - strdup("Connection: TE\r\n" TE_HEADER); + conn->allocptr.te = aprintf("Connection: %s%sTE\r\n" TE_HEADER, + cptr ? cptr : "", (cptr && *cptr) ? ", ":""); + free(cptr); if(!conn->allocptr.te) return CURLE_OUT_OF_MEMORY; } #endif - ptr = Curl_checkheaders(conn, "Transfer-Encoding:"); + switch(httpreq) { + case HTTPREQ_POST_MIME: + http->sendit = &data->set.mimepost; + break; + case HTTPREQ_POST_FORM: + /* Convert the form structure into a mime structure. */ + Curl_mime_cleanpart(&http->form); + result = Curl_getformdata(data, &http->form, data->set.httppost, + data->state.fread_func); + if(result) + return result; + http->sendit = &http->form; + break; + default: + http->sendit = NULL; + } + + if(http->sendit) { + const char *cthdr = Curl_checkheaders(conn, "Content-Type"); + + /* Read and seek body only. */ + http->sendit->flags |= MIME_BODY_ONLY; + + /* Prepare the mime structure headers & set content type. */ + + if(cthdr) + for(cthdr += 13; *cthdr == ' '; cthdr++) + ; + else if(http->sendit->kind == MIMEKIND_MULTIPART) + cthdr = "multipart/form-data"; + + curl_mime_headers(http->sendit, data->set.headers, 0); + result = Curl_mime_prepare_headers(http->sendit, cthdr, + NULL, MIMESTRATEGY_FORM); + curl_mime_headers(http->sendit, NULL, 0); + if(!result) + result = Curl_mime_rewind(http->sendit); + if(result) + return result; + http->postsize = Curl_mime_size(http->sendit); + } + + ptr = Curl_checkheaders(conn, "Transfer-Encoding"); if(ptr) { /* Some kind of TE is requested, check if 'chunked' is chosen */ data->req.upload_chunky = Curl_compareheader(ptr, "Transfer-Encoding:", "chunked"); } else { - if((conn->handler->protocol&PROTO_FAMILY_HTTP) && - data->set.upload && - (data->state.infilesize == -1)) { + if((conn->handler->protocol & PROTO_FAMILY_HTTP) && + (((httpreq == HTTPREQ_POST_MIME || httpreq == HTTPREQ_POST_FORM) && + http->postsize < 0) || + (data->set.upload && data->state.infilesize == -1))) { if(conn->bits.authneg) /* don't enable chunked during auth neg */ ; @@ -1956,7 +2022,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) Curl_safefree(conn->allocptr.host); - ptr = Curl_checkheaders(conn, "Host:"); + ptr = Curl_checkheaders(conn, "Host"); if(ptr && (!data->state.this_is_a_follow || strcasecompare(data->state.first_host, conn->host.name))) { #if !defined(CURL_DISABLE_COOKIES) @@ -1995,7 +2061,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) #endif if(strcmp("Host:", ptr)) { - conn->allocptr.host = aprintf("%s\r\n", ptr); + conn->allocptr.host = aprintf("Host:%s\r\n", &ptr[5]); if(!conn->allocptr.host) return CURLE_OUT_OF_MEMORY; } @@ -2030,7 +2096,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } #ifndef CURL_DISABLE_PROXY - if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) { + if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) { /* Using a proxy but does not tunnel through it */ /* The path sent to the proxy is in fact the entire URL. But if the remote @@ -2104,21 +2170,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } #endif /* CURL_DISABLE_PROXY */ - if(HTTPREQ_POST_FORM == httpreq) { - /* we must build the whole post sequence first, so that we have a size of - the whole transfer before we start to send it */ - result = Curl_getformdata(data, &http->sendit, data->set.httppost, - Curl_checkheaders(conn, "Content-Type:"), - &http->postsize); - if(result) - return result; - } - - http->p_accept = Curl_checkheaders(conn, "Accept:")?NULL:"Accept: */*\r\n"; + http->p_accept = Curl_checkheaders(conn, "Accept")?NULL:"Accept: */*\r\n"; - if(( (HTTPREQ_POST == httpreq) || - (HTTPREQ_POST_FORM == httpreq) || - (HTTPREQ_PUT == httpreq) ) && + if((HTTPREQ_POST == httpreq || HTTPREQ_PUT == httpreq) && data->state.resume_from) { /********************************************************************** * Resuming upload in HTTP means that we PUT or POST and that we have @@ -2126,6 +2180,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) * a Range: header that will be passed along. We need to "fast forward" * the file the given number of bytes and decrease the assume upload * file size before we continue this venture in the dark lands of HTTP. + * Resuming mime/form posting at an offset > 0 has no sense and is ignored. *********************************************************************/ if(data->state.resume_from < 0) { @@ -2142,37 +2197,39 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) /* Now, let's read off the proper amount of bytes from the input. */ if(conn->seek_func) { + Curl_set_in_callback(data, true); seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, SEEK_SET); + Curl_set_in_callback(data, false); } if(seekerr != CURL_SEEKFUNC_OK) { + curl_off_t passed = 0; + if(seekerr != CURL_SEEKFUNC_CANTSEEK) { failf(data, "Could not seek stream"); return CURLE_READ_ERROR; } /* when seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ - else { - curl_off_t passed=0; - do { - size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); - - size_t actuallyread = - data->state.fread_func(data->state.buffer, 1, readthisamountnow, - data->state.in); - - passed += actuallyread; - if((actuallyread == 0) || (actuallyread > readthisamountnow)) { - /* this checks for greater-than only to make sure that the - CURL_READFUNC_ABORT return code still aborts */ - failf(data, "Could only read %" CURL_FORMAT_CURL_OFF_T - " bytes from the input", passed); - return CURLE_READ_ERROR; - } - } while(passed < data->state.resume_from); - } + do { + size_t readthisamountnow = + (data->state.resume_from - passed > data->set.buffer_size) ? + (size_t)data->set.buffer_size : + curlx_sotouz(data->state.resume_from - passed); + + size_t actuallyread = + data->state.fread_func(data->state.buffer, 1, readthisamountnow, + data->state.in); + + passed += actuallyread; + if((actuallyread == 0) || (actuallyread > readthisamountnow)) { + /* this checks for greater-than only to make sure that the + CURL_READFUNC_ABORT return code still aborts */ + failf(data, "Could only read %" CURL_FORMAT_CURL_OFF_T + " bytes from the input", passed); + return CURLE_READ_ERROR; + } + } while(passed < data->state.resume_from); } /* now, decrease the size of the read */ @@ -2194,14 +2251,14 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) * ones if any such are specified. */ if(((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) && - !Curl_checkheaders(conn, "Range:")) { + !Curl_checkheaders(conn, "Range")) { /* if a line like this was already allocated, free the previous one */ free(conn->allocptr.rangeline); conn->allocptr.rangeline = aprintf("Range: bytes=%s\r\n", data->state.range); } - else if((httpreq != HTTPREQ_GET) && - !Curl_checkheaders(conn, "Content-Range:")) { + else if((httpreq == HTTPREQ_POST || httpreq == HTTPREQ_PUT) && + !Curl_checkheaders(conn, "Content-Range")) { /* if a line like this was already allocated, free the previous one */ free(conn->allocptr.rangeline); @@ -2218,7 +2275,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } else if(data->state.resume_from) { /* This is because "resume" was selected */ - curl_off_t total_expected_size= + curl_off_t total_expected_size = data->state.resume_from + data->state.infilesize; conn->allocptr.rangeline = aprintf("Content-Range: bytes %s%" CURL_FORMAT_CURL_OFF_T @@ -2252,6 +2309,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) return result; + if(data->set.str[STRING_TARGET]) + ppath = data->set.str[STRING_TARGET]; + /* url */ if(paste_ftp_userpwd) result = Curl_add_bufferf(req_buffer, "ftp://%s:%s@%s", @@ -2300,25 +2360,15 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) conn->allocptr.ref:"" /* Referer: */, (conn->bits.httpproxy && !conn->bits.tunnel_proxy && - !Curl_checkProxyheaders(conn, "Proxy-Connection:"))? + !Curl_checkProxyheaders(conn, "Proxy-Connection"))? "Proxy-Connection: Keep-Alive\r\n":"", te ); - /* clear userpwd to avoid re-using credentials from re-used connections */ + /* clear userpwd and proxyuserpwd to avoid re-using old credentials + * from re-used connections */ Curl_safefree(conn->allocptr.userpwd); - - /* - * Free proxyuserpwd for Negotiate/NTLM. Cannot reuse as it is associated - * with the connection and shouldn't be repeated over it either. - */ - switch(data->state.authproxy.picked) { - case CURLAUTH_NEGOTIATE: - case CURLAUTH_NTLM: - case CURLAUTH_NTLM_WB: - Curl_safefree(conn->allocptr.proxyuserpwd); - break; - } + Curl_safefree(conn->allocptr.proxyuserpwd); if(result) return result; @@ -2335,8 +2385,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) #if !defined(CURL_DISABLE_COOKIES) if(data->cookies || addcookies) { - struct Cookie *co=NULL; /* no cookies from start */ - int count=0; + struct Cookie *co = NULL; /* no cookies from start */ + int count = 0; if(data->cookies) { Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); @@ -2349,7 +2399,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); } if(co) { - struct Cookie *store=co; + struct Cookie *store = co; /* now loop through all cookies that matched */ while(co) { if(co->value) { @@ -2403,117 +2453,79 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) switch(httpreq) { - case HTTPREQ_POST_FORM: - if(!http->sendit || conn->bits.authneg) { - /* nothing to post! */ - result = Curl_add_bufferf(req_buffer, "Content-Length: 0\r\n\r\n"); - if(result) - return result; - - result = Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, FIRSTSOCKET); - if(result) - failf(data, "Failed sending POST request"); - else - /* setup variables for the upcoming transfer */ - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, &http->readbytecount, - -1, NULL); - break; - } - - if(Curl_FormInit(&http->form, http->sendit)) { - failf(data, "Internal HTTP POST error!"); - return CURLE_HTTP_POST_ERROR; - } - - /* Get the currently set callback function pointer and store that in the - form struct since we might want the actual user-provided callback later - on. The data->set.fread_func pointer itself will be changed for the - multipart case to the function that returns a multipart formatted - stream. */ - http->form.fread_func = data->state.fread_func; - - /* Set the read function to read from the generated form data */ - data->state.fread_func = (curl_read_callback)Curl_FormReader; - data->state.in = &http->form; + case HTTPREQ_PUT: /* Let's PUT the data to the server! */ - http->sending = HTTPSEND_BODY; + if(conn->bits.authneg) + postsize = 0; + else + postsize = data->state.infilesize; - if(!data->req.upload_chunky && - !Curl_checkheaders(conn, "Content-Length:")) { + if((postsize != -1) && !data->req.upload_chunky && + (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length"))) { /* only add Content-Length if not uploading chunked */ result = Curl_add_bufferf(req_buffer, "Content-Length: %" CURL_FORMAT_CURL_OFF_T - "\r\n", http->postsize); + "\r\n", postsize); if(result) return result; } - result = expect100(data, conn, req_buffer); - if(result) - return result; - - { - - /* Get Content-Type: line from Curl_formpostheader. - */ - char *contentType; - size_t linelength=0; - contentType = Curl_formpostheader((void *)&http->form, - &linelength); - if(!contentType) { - failf(data, "Could not get Content-Type header line!"); - return CURLE_HTTP_POST_ERROR; - } - - result = Curl_add_buffer(req_buffer, contentType, linelength); + if(postsize != 0) { + result = expect100(data, conn, req_buffer); if(result) return result; } - /* make the request end in a true CRLF */ - result = Curl_add_buffer(req_buffer, "\r\n", 2); + result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers */ if(result) return result; - /* set upload size to the progress meter */ - Curl_pgrsSetUploadSize(data, http->postsize); + /* set the upload size to the progress meter */ + Curl_pgrsSetUploadSize(data, postsize); - /* fire away the whole request to the server */ + /* this sends the buffer and frees all the buffer resources */ result = Curl_add_buffer_send(req_buffer, conn, &data->info.request_size, 0, FIRSTSOCKET); if(result) - failf(data, "Failed sending POST request"); + failf(data, "Failed sending PUT request"); else - /* setup variables for the upcoming transfer */ + /* prepare for transfer */ Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, FIRSTSOCKET, - &http->writebytecount); - - if(result) { - Curl_formclean(&http->sendit); /* free that whole lot */ - return result; - } - - /* convert the form data */ - result = Curl_convert_form(data, http->sendit); - if(result) { - Curl_formclean(&http->sendit); /* free that whole lot */ + &http->readbytecount, postsize?FIRSTSOCKET:-1, + postsize?&http->writebytecount:NULL); + if(result) return result; - } - break; - case HTTPREQ_PUT: /* Let's PUT the data to the server! */ + case HTTPREQ_POST_FORM: + case HTTPREQ_POST_MIME: + /* This is form posting using mime data. */ + if(conn->bits.authneg) { + /* nothing to post! */ + result = Curl_add_bufferf(req_buffer, "Content-Length: 0\r\n\r\n"); + if(result) + return result; - if(conn->bits.authneg) - postsize = 0; - else - postsize = data->state.infilesize; + result = Curl_add_buffer_send(req_buffer, conn, + &data->info.request_size, 0, FIRSTSOCKET); + if(result) + failf(data, "Failed sending POST request"); + else + /* setup variables for the upcoming transfer */ + Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, &http->readbytecount, + -1, NULL); + break; + } - if((postsize != -1) && !data->req.upload_chunky && - (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length:"))) { - /* only add Content-Length if not uploading chunked */ + postsize = http->postsize; + + /* We only set Content-Length and allow a custom Content-Length if + we don't upload data chunked, as RFC2616 forbids us to set both + kinds of headers (Transfer-Encoding: chunked and Content-Length) */ + if(postsize != -1 && !data->req.upload_chunky && + (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length"))) { + /* we allow replacing this header if not during auth negotiation, + although it isn't very wise to actually set your own */ result = Curl_add_bufferf(req_buffer, "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", postsize); @@ -2521,24 +2533,52 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) return result; } - if(postsize != 0) { + /* Output mime-generated headers. */ + { + struct curl_slist *hdr; + + for(hdr = http->sendit->curlheaders; hdr; hdr = hdr->next) { + result = Curl_add_bufferf(req_buffer, "%s\r\n", hdr->data); + if(result) + return result; + } + } + + /* For really small posts we don't use Expect: headers at all, and for + the somewhat bigger ones we allow the app to disable it. Just make + sure that the expect100header is always set to the preferred value + here. */ + ptr = Curl_checkheaders(conn, "Expect"); + if(ptr) { + data->state.expect100header = + Curl_compareheader(ptr, "Expect:", "100-continue"); + } + else if(postsize > EXPECT_100_THRESHOLD || postsize < 0) { result = expect100(data, conn, req_buffer); if(result) return result; } + else + data->state.expect100header = FALSE; - result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers */ + /* make the request end in a true CRLF */ + result = Curl_add_buffer(req_buffer, "\r\n", 2); if(result) return result; /* set the upload size to the progress meter */ Curl_pgrsSetUploadSize(data, postsize); + /* Read from mime structure. */ + data->state.fread_func = (curl_read_callback) Curl_mime_read; + data->state.in = (void *) http->sendit; + http->sending = HTTPSEND_BODY; + /* this sends the buffer and frees all the buffer resources */ result = Curl_add_buffer_send(req_buffer, conn, &data->info.request_size, 0, FIRSTSOCKET); if(result) - failf(data, "Failed sending PUT request"); + failf(data, "Failed sending POST request"); else /* prepare for transfer */ Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, @@ -2546,6 +2586,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) postsize?&http->writebytecount:NULL); if(result) return result; + break; case HTTPREQ_POST: @@ -2553,18 +2594,15 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(conn->bits.authneg) postsize = 0; - else { - /* figure out the size of the postfields */ - postsize = (data->state.infilesize != -1)? - data->state.infilesize: - (data->set.postfields? (curl_off_t)strlen(data->set.postfields):-1); - } + else + /* the size of the post body */ + postsize = data->state.infilesize; /* We only set Content-Length and allow a custom Content-Length if we don't upload data chunked, as RFC2616 forbids us to set both kinds of headers (Transfer-Encoding: chunked and Content-Length) */ if((postsize != -1) && !data->req.upload_chunky && - (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length:"))) { + (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length"))) { /* we allow replacing this header if not during auth negotiation, although it isn't very wise to actually set your own */ result = Curl_add_bufferf(req_buffer, @@ -2574,7 +2612,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) return result; } - if(!Curl_checkheaders(conn, "Content-Type:")) { + if(!Curl_checkheaders(conn, "Content-Type")) { result = Curl_add_bufferf(req_buffer, "Content-Type: application/" "x-www-form-urlencoded\r\n"); @@ -2586,12 +2624,12 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) the somewhat bigger ones we allow the app to disable it. Just make sure that the expect100header is always set to the preferred value here. */ - ptr = Curl_checkheaders(conn, "Expect:"); + ptr = Curl_checkheaders(conn, "Expect"); if(ptr) { data->state.expect100header = Curl_compareheader(ptr, "Expect:", "100-continue"); } - else if(postsize > TINY_INITIAL_POST_SIZE || postsize < 0) { + else if(postsize > EXPECT_100_THRESHOLD || postsize < 0) { result = expect100(data, conn, req_buffer); if(result) return result; @@ -2605,7 +2643,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) its size. */ if(conn->httpversion != 20 && !data->state.expect100header && - (postsize < MAX_INITIAL_POST_SIZE)) { + (postsize < MAX_INITIAL_POST_SIZE)) { /* if we don't use expect: 100 AND postsize is less than MAX_INITIAL_POST_SIZE @@ -2740,6 +2778,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) data->req.upload_done = TRUE; data->req.keepon &= ~KEEP_SEND; /* we're done writing */ data->req.exp100 = EXP100_SEND_DATA; /* already sent */ + Curl_expire_done(data, EXPIRE_100_TIMEOUT); } } @@ -2769,7 +2808,7 @@ checkhttpprefix(struct Curl_easy *data, failf(data, "Failed to allocate memory for conversion!"); return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ } - if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s)+1)) { + if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s) + 1)) { /* Curl_convert_from_network calls failf if unsuccessful */ free(scratch); return FALSE; /* can't return CURLE_foobar so return FALSE */ @@ -2799,6 +2838,7 @@ static bool checkrtspprefix(struct Curl_easy *data, const char *s) { + bool result = FALSE; #ifdef CURL_DOES_CONVERSIONS /* convert from the network encoding using a scratch area */ @@ -2807,19 +2847,19 @@ checkrtspprefix(struct Curl_easy *data, failf(data, "Failed to allocate memory for conversion!"); return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ } - if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s)+1)) { + if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s) + 1)) { /* Curl_convert_from_network calls failf if unsuccessful */ - free(scratch); - return FALSE; /* can't return CURLE_foobar so return FALSE */ + result = FALSE; /* can't return CURLE_foobar so return FALSE */ } - s = scratch; + else + result = checkprefix("RTSP/", scratch)? TRUE: FALSE; + free(scratch); #else (void)data; /* unused */ + result = checkprefix("RTSP/", s)? TRUE: FALSE; #endif /* CURL_DOES_CONVERSIONS */ - if(checkprefix("RTSP/", s)) - return TRUE; - else - return FALSE; + + return result; } #endif /* CURL_DISABLE_RTSP */ @@ -2846,29 +2886,28 @@ static CURLcode header_append(struct Curl_easy *data, struct SingleRequest *k, size_t length) { - if(k->hbuflen + length >= data->state.headersize) { + size_t newsize = k->hbuflen + length; + if(newsize > CURL_MAX_HTTP_HEADER) { + /* The reason to have a max limit for this is to avoid the risk of a bad + server feeding libcurl with a never-ending header that will cause + reallocs infinitely */ + failf(data, "Rejected %zd bytes header (max is %d)!", newsize, + CURL_MAX_HTTP_HEADER); + return CURLE_OUT_OF_MEMORY; + } + if(newsize >= data->state.headersize) { /* We enlarge the header buffer as it is too small */ char *newbuff; size_t hbufp_index; - size_t newsize; - - if(k->hbuflen + length > CURL_MAX_HTTP_HEADER) { - /* The reason to have a max limit for this is to avoid the risk of a bad - server feeding libcurl with a never-ending header that will cause - reallocs infinitely */ - failf(data, "Avoided giant realloc for header (max is %d)!", - CURL_MAX_HTTP_HEADER); - return CURLE_OUT_OF_MEMORY; - } - newsize=CURLMAX((k->hbuflen+ length)*3/2, data->state.headersize*2); + newsize = CURLMAX((k->hbuflen + length) * 3 / 2, data->state.headersize*2); hbufp_index = k->hbufp - data->state.headerbuff; newbuff = realloc(data->state.headerbuff, newsize); if(!newbuff) { failf(data, "Failed to alloc memory for big header!"); return CURLE_OUT_OF_MEMORY; } - data->state.headersize=newsize; + data->state.headersize = newsize; data->state.headerbuff = newbuff; k->hbufp = data->state.headerbuff + hbufp_index; } @@ -2961,7 +3000,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, } /* decrease the size of the remaining (supposed) header line */ - rest_length = (k->end_ptr - k->str)+1; + rest_length = (k->end_ptr - k->str) + 1; *nread -= (ssize_t)rest_length; k->str = k->end_ptr + 1; /* move past new line */ @@ -3037,6 +3076,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, if(k->exp100 > EXP100_SEND_DATA) { k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; + Curl_expire_done(data, EXPIRE_100_TIMEOUT); } break; case 101: @@ -3078,7 +3118,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, !(conn->handler->protocol & CURLPROTO_RTSP) && data->set.httpreq != HTTPREQ_HEAD) { /* On HTTP 1.1, when connection is not to get closed, but no - Content-Length nor Content-Encoding chunked have been + Content-Length nor Transfer-Encoding chunked have been received, according to RFC2616 section 4.4 point 5, we assume that the server will close the connection to signal the end of the document. */ @@ -3159,10 +3199,12 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, case HTTPREQ_PUT: case HTTPREQ_POST: case HTTPREQ_POST_FORM: + case HTTPREQ_POST_MIME: /* We got an error response. If this happened before the whole * request body has been sent we stop sending and mark the * connection for closure after we've read the entire response. */ + Curl_expire_done(data, EXPIRE_100_TIMEOUT); if(!k->upload_done) { if(data->set.http_keep_sending_on_error) { infof(data, "HTTP error before end of send, keep sending\n"); @@ -3240,9 +3282,17 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, k->maxdownload = k->size; } - /* If max download size is *zero* (nothing) we already - have nothing and can safely return ok now! */ - if(0 == k->maxdownload) + /* If max download size is *zero* (nothing) we already have + nothing and can safely return ok now! But for HTTP/2, we'd + like to call http2_handle_stream_close to properly close a + stream. In order to do this, we keep reading until we + close the stream. */ + if(0 == k->maxdownload +#if defined(USE_NGHTTP2) + && !((conn->handler->protocol & PROTO_FAMILY_HTTP) && + conn->httpversion == 20) +#endif + ) *stop_reading = TRUE; if(*stop_reading) { @@ -3277,7 +3327,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, #define HEADER1 scratch #define SCRATCHSIZE 21 CURLcode res; - char scratch[SCRATCHSIZE+1]; /* "HTTP/major.minor 123" */ + char scratch[SCRATCHSIZE + 1]; /* "HTTP/major.minor 123" */ /* We can't really convert this yet because we don't know if it's the 1st header line or the body. So we do a partial conversion into a scratch area, @@ -3299,23 +3349,26 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, /* * https://tools.ietf.org/html/rfc7230#section-3.1.2 * - * The reponse code is always a three-digit number in HTTP as the spec + * The response code is always a three-digit number in HTTP as the spec * says. We try to allow any number here, but we cannot make * guarantees on future behaviors since it isn't within the protocol. */ + char separator; nc = sscanf(HEADER1, - " HTTP/%d.%d %d", + " HTTP/%1d.%1d%c%3d", &httpversion_major, &conn->httpversion, + &separator, &k->httpcode); if(nc == 1 && httpversion_major == 2 && 1 == sscanf(HEADER1, " HTTP/2 %d", &k->httpcode)) { conn->httpversion = 0; - nc = 3; + nc = 4; + separator = ' '; } - if(nc==3) { + if((nc == 4) && (' ' == separator)) { conn->httpversion += 10 * httpversion_major; if(k->upgr101 == UPGR101_RECEIVED) { @@ -3324,11 +3377,11 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, infof(data, "Lying server, not serving HTTP/2\n"); } } - else { + else if(!nc) { /* this is the real world, not a Nirvana NCSA 1.5.x returns this crap when asked for HTTP/1.1 */ - nc=sscanf(HEADER1, " HTTP %3d", &k->httpcode); + nc = sscanf(HEADER1, " HTTP %3d", &k->httpcode); conn->httpversion = 10; /* If user has set option HTTP200ALIASES, @@ -3342,14 +3395,20 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, } } } + else { + failf(data, "Unsupported HTTP version in response\n"); + return CURLE_UNSUPPORTED_PROTOCOL; + } } else if(conn->handler->protocol & CURLPROTO_RTSP) { + char separator; nc = sscanf(HEADER1, - " RTSP/%d.%d %3d", + " RTSP/%1d.%1d%c%3d", &rtspversion_major, &conn->rtspversion, + &separator, &k->httpcode); - if(nc==3) { + if((nc == 4) && (' ' == separator)) { conn->rtspversion += 10 * rtspversion_major; conn->httpversion = 11; /* For us, RTSP acts like HTTP 1.1 */ } @@ -3381,7 +3440,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, ((k->httpcode != 407) || !conn->bits.proxy_user_passwd) ) { if(data->state.resume_from && - (data->set.httpreq==HTTPREQ_GET) && + (data->set.httpreq == HTTPREQ_GET) && (k->httpcode == 416)) { /* "Requested Range Not Satisfiable", just proceed and pretend this is no error */ @@ -3437,8 +3496,8 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, * fields. */ if(data->set.timecondition) data->info.timecond = TRUE; - k->size=0; - k->maxdownload=0; + k->size = 0; + k->maxdownload = 0; k->ignorecl = TRUE; /* ignore Content-Length headers */ break; default: @@ -3460,13 +3519,15 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, /* Check for Content-Length: header lines to get size */ if(!k->ignorecl && !data->set.ignorecl && checkprefix("Content-Length:", k->p)) { - curl_off_t contentlength = curlx_strtoofft(k->p+15, NULL, 10); - if(data->set.max_filesize && - contentlength > data->set.max_filesize) { - failf(data, "Maximum file size exceeded"); - return CURLE_FILESIZE_EXCEEDED; - } - if(contentlength >= 0) { + curl_off_t contentlength; + CURLofft offt = curlx_strtoofft(k->p + 15, NULL, 10, &contentlength); + + if(offt == CURL_OFFT_OK) { + if(data->set.max_filesize && + contentlength > data->set.max_filesize) { + failf(data, "Maximum file size exceeded"); + return CURLE_FILESIZE_EXCEEDED; + } k->size = contentlength; k->maxdownload = k->size; /* we set the progress download size already at this point @@ -3474,13 +3535,19 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, info as soon as possible */ Curl_pgrsSetDownloadSize(data, k->size); } + else if(offt == CURL_OFFT_FLOW) { + /* out of range */ + if(data->set.max_filesize) { + failf(data, "Maximum file size exceeded"); + return CURLE_FILESIZE_EXCEEDED; + } + streamclose(conn, "overflow content-length"); + infof(data, "Overflow Content-Length: value!\n"); + } else { - /* Negative Content-Length is really odd, and we know it - happens for example when older Apache servers send large - files */ - streamclose(conn, "negative content-length"); - infof(data, "Negative content-length: %" CURL_FORMAT_CURL_OFF_T - ", closing after transfer\n", contentlength); + /* negative or just rubbish - bad HTTP */ + failf(data, "Invalid Content-Length: value"); + return CURLE_WEIRD_SERVER_REPLY; } } /* check for Content-Type: header lines to get the MIME-type */ @@ -3565,51 +3632,9 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, * of chunks, and a chunk-data set to zero signals the * end-of-chunks. */ - char *start; - - /* Find the first non-space letter */ - start = k->p + 18; - - for(;;) { - /* skip whitespaces and commas */ - while(*start && (ISSPACE(*start) || (*start == ','))) - start++; - - if(checkprefix("chunked", start)) { - k->chunk = TRUE; /* chunks coming our way */ - - /* init our chunky engine */ - Curl_httpchunk_init(conn); - - start += 7; - } - - if(k->auto_decoding) - /* TODO: we only support the first mentioned compression for now */ - break; - - if(checkprefix("identity", start)) { - k->auto_decoding = IDENTITY; - start += 8; - } - else if(checkprefix("deflate", start)) { - k->auto_decoding = DEFLATE; - start += 7; - } - else if(checkprefix("gzip", start)) { - k->auto_decoding = GZIP; - start += 4; - } - else if(checkprefix("x-gzip", start)) { - k->auto_decoding = GZIP; - start += 6; - } - else - /* unknown! */ - break; - - } - + result = Curl_build_unencoding_stack(conn, k->p + 18, TRUE); + if(result) + return result; } else if(checkprefix("Content-Encoding:", k->p) && data->set.str[STRING_ENCODING]) { @@ -3620,21 +3645,9 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, * 2616). zlib cannot handle compress. However, errors are * handled further down when the response body is processed */ - char *start; - - /* Find the first non-space letter */ - start = k->p + 17; - while(*start && ISSPACE(*start)) - start++; - - /* Record the content-encoding for later use */ - if(checkprefix("identity", start)) - k->auto_decoding = IDENTITY; - else if(checkprefix("deflate", start)) - k->auto_decoding = DEFLATE; - else if(checkprefix("gzip", start) - || checkprefix("x-gzip", start)) - k->auto_decoding = GZIP; + result = Curl_build_unencoding_stack(conn, k->p + 17, FALSE); + if(result) + return result; } else if(checkprefix("Content-Range:", k->p)) { /* Content-Range: bytes [num]- @@ -3656,11 +3669,11 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, /* if it truly stopped on a digit */ if(ISDIGIT(*ptr)) { - k->offset = curlx_strtoofft(ptr, NULL, 10); - - if(data->state.resume_from == k->offset) - /* we asked for a resume and we got it */ - k->content_range = TRUE; + if(!curlx_strtoofft(ptr, NULL, 10, &k->offset)) { + if(data->state.resume_from == k->offset) + /* we asked for a resume and we got it */ + k->content_range = TRUE; + } } else data->state.resume_from = 0; /* get everything */ @@ -3671,7 +3684,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); Curl_cookie_add(data, - data->cookies, TRUE, k->p+11, + data->cookies, TRUE, k->p + 11, /* If there is a custom-set Host: name, use it here, or else use real peer host name. */ conn->allocptr.cookiehost? @@ -3682,11 +3695,11 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, #endif else if(checkprefix("Last-Modified:", k->p) && (data->set.timecondition || data->set.get_filetime) ) { - time_t secs=time(NULL); - k->timeofdoc = curl_getdate(k->p+strlen("Last-Modified:"), + time_t secs = time(NULL); + k->timeofdoc = curl_getdate(k->p + strlen("Last-Modified:"), &secs); if(data->set.get_filetime) - data->info.filetime = (long)k->timeofdoc; + data->info.filetime = k->timeofdoc; } else if((checkprefix("WWW-Authenticate:", k->p) && (401 == k->httpcode)) || diff --git a/lib/http.h b/lib/http.h index 7ce4bd9..2ce44bb 100644 --- a/lib/http.h +++ b/lib/http.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -40,8 +40,6 @@ bool Curl_compareheader(const char *headerline, /* line to check */ const char *header, /* header keyword _with_ colon */ const char *content); /* content string to find */ -char *Curl_checkheaders(const struct connectdata *conn, - const char *thisheader); char *Curl_copy_header_value(const char *header); char *Curl_checkProxyheaders(const struct connectdata *conn, @@ -115,8 +113,13 @@ CURLcode Curl_http_perhapsrewind(struct connectdata *conn); #define MAX_INITIAL_POST_SIZE (64*1024) #endif -#ifndef TINY_INITIAL_POST_SIZE -#define TINY_INITIAL_POST_SIZE 1024 +/* EXPECT_100_THRESHOLD is the request body size limit for when libcurl will + * automatically add an "Expect: 100-continue" header in HTTP requests. When + * the size is unknown, it will always add it. + * + */ +#ifndef EXPECT_100_THRESHOLD +#define EXPECT_100_THRESHOLD 1024 #endif #endif /* CURL_DISABLE_HTTP */ @@ -125,7 +128,7 @@ CURLcode Curl_http_perhapsrewind(struct connectdata *conn); * HTTP unique setup ***************************************************************************/ struct HTTP { - struct FormData *sendit; + curl_mimepart *sendit; curl_off_t postsize; /* off_t to handle large file sizes */ const char *postdata; @@ -135,7 +138,7 @@ struct HTTP { curl_off_t writebytecount; /* For FORM posting */ - struct Form form; + curl_mimepart form; struct back { curl_read_callback fread_func; /* backup storage for fread pointer */ @@ -169,8 +172,6 @@ struct HTTP { size_t pauselen; /* the number of bytes left in data */ bool closed; /* TRUE on HTTP2 stream close */ bool close_handled; /* TRUE if stream closure is handled by libcurl */ - uint32_t error_code; /* HTTP/2 error code */ - char *mem; /* points to a buffer in memory to store received data */ size_t len; /* size of the buffer 'mem' points to */ size_t memlen; /* size of data copied to mem */ @@ -223,6 +224,7 @@ struct http_conn { /* list of settings that will be sent */ nghttp2_settings_entry local_settings[3]; size_t local_settings_num; + uint32_t error_code; /* HTTP/2 error code */ #else int unused; /* prevent a compiler warning */ #endif diff --git a/lib/http2.c b/lib/http2.c index af69c72..b2c34e9 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,10 +28,10 @@ #include "http2.h" #include "http.h" #include "sendf.h" +#include "select.h" #include "curl_base64.h" #include "strcase.h" #include "multiif.h" -#include "conncache.h" #include "url.h" #include "connect.h" #include "strtoofft.h" @@ -65,6 +65,12 @@ #define HTTP2_HUGE_WINDOW_SIZE (1 << 30) +#ifdef DEBUG_HTTP2 +#define H2BUGF(x) x +#else +#define H2BUGF(x) do { } WHILE_FALSE +#endif + /* * Curl_http2_init_state() is called when the easy handle is created and * allows for HTTP/2 specific init of state. @@ -140,17 +146,60 @@ static CURLcode http2_disconnect(struct connectdata *conn, struct http_conn *c = &conn->proto.httpc; (void)dead_connection; - DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n")); + H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n")); nghttp2_session_del(c->h2); Curl_safefree(c->inbuf); http2_stream_free(conn->data->req.protop); - DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n")); + H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n")); return CURLE_OK; } +/* + * The server may send us data at any point (e.g. PING frames). Therefore, + * we cannot assume that an HTTP/2 socket is dead just because it is readable. + * + * Instead, if it is readable, run Curl_connalive() to peek at the socket + * and distinguish between closed and data. + */ +static bool http2_connisdead(struct connectdata *check) +{ + int sval; + bool ret_val = TRUE; + + sval = SOCKET_READABLE(check->sock[FIRSTSOCKET], 0); + if(sval == 0) { + /* timeout */ + ret_val = FALSE; + } + else if(sval & CURL_CSELECT_ERR) { + /* socket is in an error state */ + ret_val = TRUE; + } + else if(sval & CURL_CSELECT_IN) { + /* readable with no error. could still be closed */ + ret_val = !Curl_connalive(check); + } + + return ret_val; +} + + +static unsigned int http2_conncheck(struct connectdata *check, + unsigned int checks_to_perform) +{ + unsigned int ret_val = CONNRESULT_NONE; + + if(checks_to_perform & CONNCHECK_ISDEAD) { + if(http2_connisdead(check)) + ret_val |= CONNRESULT_DEAD; + } + + return ret_val; +} + /* called from Curl_http_setup_conn */ void Curl_http2_setup_req(struct Curl_easy *data) { @@ -161,11 +210,10 @@ void Curl_http2_setup_req(struct Curl_easy *data) http->status_code = -1; http->pausedata = NULL; http->pauselen = 0; - http->error_code = NGHTTP2_NO_ERROR; http->closed = FALSE; http->close_handled = FALSE; http->mem = data->state.buffer; - http->len = BUFSIZE; + http->len = data->set.buffer_size; http->memlen = 0; } @@ -174,6 +222,7 @@ void Curl_http2_setup_conn(struct connectdata *conn) { conn->proto.httpc.settings.max_concurrent_streams = DEFAULT_MAX_CONCURRENT_STREAMS; + conn->proto.httpc.error_code = NGHTTP2_NO_ERROR; } /* @@ -181,7 +230,7 @@ void Curl_http2_setup_conn(struct connectdata *conn) * but will be used at run-time when the protocol is dynamically switched from * HTTP to HTTP2. */ -const struct Curl_handler Curl_handler_http2 = { +static const struct Curl_handler Curl_handler_http2 = { "HTTP", /* scheme */ ZERO_NULL, /* setup_connection */ Curl_http, /* do_it */ @@ -196,12 +245,13 @@ const struct Curl_handler Curl_handler_http2 = { http2_perform_getsock, /* perform_getsock */ http2_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + http2_conncheck, /* connection_check */ PORT_HTTP, /* defport */ CURLPROTO_HTTP, /* protocol */ PROTOPT_STREAM /* flags */ }; -const struct Curl_handler Curl_handler_http2_ssl = { +static const struct Curl_handler Curl_handler_http2_ssl = { "HTTPS", /* scheme */ ZERO_NULL, /* setup_connection */ Curl_http, /* do_it */ @@ -216,6 +266,7 @@ const struct Curl_handler Curl_handler_http2_ssl = { http2_perform_getsock, /* perform_getsock */ http2_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + http2_conncheck, /* connection_check */ PORT_HTTP, /* defport */ CURLPROTO_HTTPS, /* protocol */ PROTOPT_SSL | PROTOPT_STREAM /* flags */ @@ -338,12 +389,12 @@ char *curl_pushheader_byname(struct curl_pushheaders *h, const char *header) struct HTTP *stream = h->data->req.protop; size_t len = strlen(header); size_t i; - for(i=0; ipush_headers_used; i++) { + for(i = 0; ipush_headers_used; i++) { if(!strncmp(header, stream->push_headers[i], len)) { /* sub-match, make sure that it is followed by a colon */ if(stream->push_headers[i][len] != ':') continue; - return &stream->push_headers[i][len+1]; + return &stream->push_headers[i][len + 1]; } } } @@ -383,7 +434,7 @@ static int push_promise(struct Curl_easy *data, const nghttp2_push_promise *frame) { int rv; - DEBUGF(infof(data, "PUSH_PROMISE received, stream %u!\n", + H2BUGF(infof(data, "PUSH_PROMISE received, stream %u!\n", frame->promised_stream_id)); if(data->multi->push_cb) { struct HTTP *stream; @@ -403,21 +454,24 @@ static int push_promise(struct Curl_easy *data, heads.data = data; heads.frame = frame; /* ask the application */ - DEBUGF(infof(data, "Got PUSH_PROMISE, ask application!\n")); + H2BUGF(infof(data, "Got PUSH_PROMISE, ask application!\n")); stream = data->req.protop; if(!stream) { failf(data, "Internal NULL stream!\n"); + (void)Curl_close(newhandle); rv = 1; goto fail; } + Curl_set_in_callback(data, true); rv = data->multi->push_cb(data, newhandle, stream->push_headers_used, &heads, data->multi->push_userp); + Curl_set_in_callback(data, false); /* free the headers again */ - for(i=0; ipush_headers_used; i++) + for(i = 0; ipush_headers_used; i++) free(stream->push_headers[i]); free(stream->push_headers); stream->push_headers = NULL; @@ -451,7 +505,7 @@ static int push_promise(struct Curl_easy *data, frame->promised_stream_id, newhandle); } else { - DEBUGF(infof(data, "Got PUSH_PROMISE, ignore it!\n")); + H2BUGF(infof(data, "Got PUSH_PROMISE, ignore it!\n")); rv = 1; } fail: @@ -474,21 +528,22 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, /* stream ID zero is for connection-oriented stuff */ if(frame->hd.type == NGHTTP2_SETTINGS) { uint32_t max_conn = httpc->settings.max_concurrent_streams; - DEBUGF(infof(conn->data, "Got SETTINGS\n")); + H2BUGF(infof(conn->data, "Got SETTINGS\n")); httpc->settings.max_concurrent_streams = nghttp2_session_get_remote_settings( session, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS); httpc->settings.enable_push = nghttp2_session_get_remote_settings( session, NGHTTP2_SETTINGS_ENABLE_PUSH); - DEBUGF(infof(conn->data, "MAX_CONCURRENT_STREAMS == %d\n", + H2BUGF(infof(conn->data, "MAX_CONCURRENT_STREAMS == %d\n", httpc->settings.max_concurrent_streams)); - DEBUGF(infof(conn->data, "ENABLE_PUSH == %s\n", + H2BUGF(infof(conn->data, "ENABLE_PUSH == %s\n", httpc->settings.enable_push?"TRUE":"false")); if(max_conn != httpc->settings.max_concurrent_streams) { /* only signal change if the value actually changed */ infof(conn->data, - "Connection state changed (MAX_CONCURRENT_STREAMS updated)!\n"); + "Connection state changed (MAX_CONCURRENT_STREAMS == %d)!\n", + httpc->settings.max_concurrent_streams); Curl_multi_connchanged(conn->data->multi); } } @@ -499,7 +554,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, lastStream = stream_id; } if(!data_s) { - DEBUGF(infof(conn->data, + H2BUGF(infof(conn->data, "No Curl_easy associated with stream: %x\n", stream_id)); return 0; @@ -507,12 +562,12 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, stream = data_s->req.protop; if(!stream) { - DEBUGF(infof(conn->data, "No proto pointer for stream: %x\n", + H2BUGF(infof(conn->data, "No proto pointer for stream: %x\n", stream_id)); return NGHTTP2_ERR_CALLBACK_FAILURE; } - DEBUGF(infof(data_s, "on_frame_recv() header %x stream %x\n", + H2BUGF(infof(data_s, "on_frame_recv() header %x stream %x\n", frame->hd.type, stream_id)); switch(frame->hd.type) { @@ -554,7 +609,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, ncopy); stream->nread_header_recvbuf += ncopy; - DEBUGF(infof(data_s, "Store %zu bytes headers from stream %u at %p\n", + H2BUGF(infof(data_s, "Store %zu bytes headers from stream %u at %p\n", ncopy, stream_id, stream->mem)); stream->len -= ncopy; @@ -568,7 +623,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, /* if we receive data for another handle, wake that up */ if(conn_s->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); } break; case NGHTTP2_PUSH_PROMISE: @@ -583,7 +638,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, } break; default: - DEBUGF(infof(conn->data, "Got frame type %x for stream %u!\n", + H2BUGF(infof(conn->data, "Got frame type %x for stream %u!\n", frame->hd.type, stream_id)); break; } @@ -596,10 +651,13 @@ static int on_invalid_frame_recv(nghttp2_session *session, { struct Curl_easy *data_s = NULL; (void)userp; +#if !defined(DEBUG_HTTP2) || defined(CURL_DISABLE_VERBOSE_STRINGS) + (void)lib_error_code; +#endif data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); if(data_s) { - DEBUGF(infof(data_s, + H2BUGF(infof(data_s, "on_invalid_frame_recv() was called, error=%d:%s\n", lib_error_code, nghttp2_strerror(lib_error_code))); } @@ -642,9 +700,9 @@ static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags, /* if we receive data for another handle, wake that up */ if(conn->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); - DEBUGF(infof(data_s, "%zu data received for stream %u " + H2BUGF(infof(data_s, "%zu data received for stream %u " "(%zu left in buffer %p, total %zu)\n", nread, stream_id, stream->len, stream->mem, @@ -653,7 +711,7 @@ static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags, if(nread < len) { stream->pausedata = data + nread; stream->pauselen = len - nread; - DEBUGF(infof(data_s, "NGHTTP2_ERR_PAUSE - %zu bytes out of buffer" + H2BUGF(infof(data_s, "NGHTTP2_ERR_PAUSE - %zu bytes out of buffer" ", stream %u\n", len - nread, stream_id)); data_s->easy_conn->proto.httpc.pause_stream_id = stream_id; @@ -681,7 +739,7 @@ static int before_frame_send(nghttp2_session *session, data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); if(data_s) { - DEBUGF(infof(data_s, "before_frame_send() was called\n")); + H2BUGF(infof(data_s, "before_frame_send() was called\n")); } return 0; @@ -695,7 +753,7 @@ static int on_frame_send(nghttp2_session *session, data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); if(data_s) { - DEBUGF(infof(data_s, "on_frame_send() was called, length = %zd\n", + H2BUGF(infof(data_s, "on_frame_send() was called, length = %zd\n", frame->hd.length)); } return 0; @@ -706,10 +764,13 @@ static int on_frame_not_send(nghttp2_session *session, { struct Curl_easy *data_s; (void)userp; +#if !defined(DEBUG_HTTP2) || defined(CURL_DISABLE_VERBOSE_STRINGS) + (void)lib_error_code; +#endif data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); if(data_s) { - DEBUGF(infof(data_s, + H2BUGF(infof(data_s, "on_frame_not_send() was called, lib_error_code = %d\n", lib_error_code)); } @@ -725,6 +786,7 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id, (void)stream_id; if(stream_id) { + struct http_conn *httpc; /* get the stream from the hash based on Stream ID, stream ID zero is for connection-oriented stuff */ data_s = nghttp2_session_get_stream_user_data(session, stream_id); @@ -733,20 +795,21 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id, decided to reject stream (e.g., PUSH_PROMISE). */ return 0; } - DEBUGF(infof(data_s, "on_stream_close(), %s (err %d), stream %u\n", + H2BUGF(infof(data_s, "on_stream_close(), %s (err %d), stream %u\n", Curl_http2_strerror(error_code), error_code, stream_id)); stream = data_s->req.protop; if(!stream) return NGHTTP2_ERR_CALLBACK_FAILURE; - stream->error_code = error_code; stream->closed = TRUE; data_s->state.drain++; - conn->proto.httpc.drain_total++; + httpc = &conn->proto.httpc; + httpc->drain_total++; + httpc->error_code = error_code; /* remove the entry from the hash as the stream is now gone */ nghttp2_session_set_stream_user_data(session, stream_id, 0); - DEBUGF(infof(data_s, "Removed stream %u hash!\n", stream_id)); + H2BUGF(infof(data_s, "Removed stream %u hash!\n", stream_id)); } return 0; } @@ -763,7 +826,7 @@ static int on_begin_headers(nghttp2_session *session, return 0; } - DEBUGF(infof(data_s, "on_begin_headers() was called\n")); + H2BUGF(infof(data_s, "on_begin_headers() was called\n")); if(frame->hd.type != NGHTTP2_HEADERS) { return 0; @@ -775,9 +838,9 @@ static int on_begin_headers(nghttp2_session *session, } /* This is trailer HEADERS started. Allocate buffer for them. */ - DEBUGF(infof(data_s, "trailer field started\n")); + H2BUGF(infof(data_s, "trailer field started\n")); - assert(stream->trailer_recvbuf == NULL); + DEBUGASSERT(stream->trailer_recvbuf == NULL); stream->trailer_recvbuf = Curl_add_buffer_init(); if(!stream->trailer_recvbuf) { @@ -873,10 +936,10 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, if(stream->bodystarted) { /* This is trailer fields. */ - /* 3 is for ":" and "\r\n". */ - uint32_t n = (uint32_t)(namelen + valuelen + 3); + /* 4 is for ": " and "\r\n". */ + uint32_t n = (uint32_t)(namelen + valuelen + 4); - DEBUGF(infof(data_s, "h2 trailer: %.*s: %.*s\n", namelen, name, valuelen, + H2BUGF(infof(data_s, "h2 trailer: %.*s: %.*s\n", namelen, name, valuelen, value)); Curl_add_buffer(stream->trailer_recvbuf, &n, sizeof(n)); @@ -902,9 +965,9 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, Curl_add_buffer(stream->header_recvbuf, " \r\n", 3); /* if we receive data for another handle, wake that up */ if(conn->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); - DEBUGF(infof(data_s, "h2 status: HTTP/2 %03d (easy %p)\n", + H2BUGF(infof(data_s, "h2 status: HTTP/2 %03d (easy %p)\n", stream->status_code, data_s)); return 0; } @@ -918,9 +981,9 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, Curl_add_buffer(stream->header_recvbuf, "\r\n", 2); /* if we receive data for another handle, wake that up */ if(conn->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); - DEBUGF(infof(data_s, "h2 header: %.*s: %.*s\n", namelen, name, valuelen, + H2BUGF(infof(data_s, "h2 header: %.*s: %.*s\n", namelen, name, valuelen, value)); return 0; /* 0 is successful */ @@ -969,7 +1032,7 @@ static ssize_t data_source_read_callback(nghttp2_session *session, else if(nread == 0) return NGHTTP2_ERR_DEFERRED; - DEBUGF(infof(data_s, "data_source_read_callback: " + H2BUGF(infof(data_s, "data_source_read_callback: " "returns %zu bytes stream %u\n", nread, stream_id)); @@ -1015,7 +1078,7 @@ void Curl_http2_done(struct connectdata *conn, bool premature) struct http_conn *httpc = &conn->proto.httpc; if(http->header_recvbuf) { - DEBUGF(infof(data, "free header_recvbuf!!\n")); + H2BUGF(infof(data, "free header_recvbuf!!\n")); Curl_add_buffer_free(http->header_recvbuf); http->header_recvbuf = NULL; /* clear the pointer */ Curl_add_buffer_free(http->trailer_recvbuf); @@ -1131,14 +1194,17 @@ CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req, httpc->local_settings_num); if(!binlen) { failf(conn->data, "nghttp2 unexpectedly failed on pack_settings_payload"); + Curl_add_buffer_free(req); return CURLE_FAILED_INIT; } conn->proto.httpc.binlen = binlen; result = Curl_base64url_encode(conn->data, (const char *)binsettings, binlen, &base64, &blen); - if(result) + if(result) { + Curl_add_buffer_free(req); return result; + } result = Curl_add_bufferf(req, "Connection: Upgrade, HTTP2-Settings\r\n" @@ -1170,13 +1236,14 @@ static int h2_session_send(struct Curl_easy *data, * This function returns 0 if it succeeds, or -1 and error code will * be assigned to *err. */ -static int h2_process_pending_input(struct Curl_easy *data, +static int h2_process_pending_input(struct connectdata *conn, struct http_conn *httpc, CURLcode *err) { ssize_t nread; char *inbuf; ssize_t rv; + struct Curl_easy *data = conn->data; nread = httpc->inbuflen - httpc->nread_inbuf; inbuf = httpc->inbuf + httpc->nread_inbuf; @@ -1191,7 +1258,7 @@ static int h2_process_pending_input(struct Curl_easy *data, } if(nread == rv) { - DEBUGF(infof(data, + H2BUGF(infof(data, "h2_process_pending_input: All data in connection buffer " "processed\n")); httpc->inbuflen = 0; @@ -1199,7 +1266,7 @@ static int h2_process_pending_input(struct Curl_easy *data, } else { httpc->nread_inbuf += rv; - DEBUGF(infof(data, + H2BUGF(infof(data, "h2_process_pending_input: %zu bytes left in connection " "buffer\n", httpc->inbuflen - httpc->nread_inbuf)); @@ -1212,9 +1279,15 @@ static int h2_process_pending_input(struct Curl_easy *data, } if(should_close_session(httpc)) { - DEBUGF(infof(data, + H2BUGF(infof(data, "h2_process_pending_input: nothing to do in this session\n")); - *err = CURLE_HTTP2; + if(httpc->error_code) + *err = CURLE_HTTP2; + else { + /* not an error per se, but should still close the connection */ + connclose(conn, "GOAWAY received"); + *err = CURLE_OK; + } return -1; } @@ -1245,7 +1318,7 @@ CURLcode Curl_http2_done_sending(struct connectdata *conn) that it can signal EOF to nghttp2 */ (void)nghttp2_session_resume_data(h2, stream->stream_id); - (void)h2_process_pending_input(conn->data, httpc, &result); + (void)h2_process_pending_input(conn, httpc, &result); } } return result; @@ -1269,7 +1342,7 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn, data->state.drain = 0; if(httpc->pause_stream_id == 0) { - if(h2_process_pending_input(data, httpc, err) != 0) { + if(h2_process_pending_input(conn, httpc, err) != 0) { return -1; } } @@ -1278,10 +1351,10 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn, /* Reset to FALSE to prevent infinite loop in readwrite_data function. */ stream->closed = FALSE; - if(stream->error_code != NGHTTP2_NO_ERROR) { + if(httpc->error_code != NGHTTP2_NO_ERROR) { failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %d)", - stream->stream_id, Curl_http2_strerror(stream->error_code), - stream->error_code); + stream->stream_id, Curl_http2_strerror(httpc->error_code), + httpc->error_code); *err = CURLE_HTTP2_STREAM; return -1; } @@ -1315,7 +1388,7 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn, stream->close_handled = TRUE; - DEBUGF(infof(data, "http2_recv returns 0, http2_handle_stream_close\n")); + H2BUGF(infof(data, "http2_recv returns 0, http2_handle_stream_close\n")); return 0; } @@ -1356,7 +1429,7 @@ static int h2_session_send(struct Curl_easy *data, h2_pri_spec(data, &pri_spec); - DEBUGF(infof(data, "Queuing PRIORITY on stream %u (easy %p)\n", + H2BUGF(infof(data, "Queuing PRIORITY on stream %u (easy %p)\n", stream->stream_id, data)); rv = nghttp2_submit_priority(h2, NGHTTP2_FLAG_NONE, stream->stream_id, &pri_spec); @@ -1380,7 +1453,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, (void)sockindex; /* we always do HTTP2 on sockindex 0 */ if(should_close_session(httpc)) { - DEBUGF(infof(data, + H2BUGF(infof(data, "http2_recv: nothing to do in this session\n")); *err = CURLE_HTTP2; return -1; @@ -1406,16 +1479,16 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, ncopy); stream->nread_header_recvbuf += ncopy; - DEBUGF(infof(data, "http2_recv: Got %d bytes from header_recvbuf\n", + H2BUGF(infof(data, "http2_recv: Got %d bytes from header_recvbuf\n", (int)ncopy)); return ncopy; } - DEBUGF(infof(data, "http2_recv: easy %p (stream %u)\n", + H2BUGF(infof(data, "http2_recv: easy %p (stream %u)\n", data, stream->stream_id)); if((data->state.drain) && stream->memlen) { - DEBUGF(infof(data, "http2_recv: DRAIN %zu bytes stream %u!! (%p => %p)\n", + H2BUGF(infof(data, "http2_recv: DRAIN %zu bytes stream %u!! (%p => %p)\n", stream->memlen, stream->stream_id, stream->mem, mem)); if(mem != stream->mem) { @@ -1429,7 +1502,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, /* We have paused nghttp2, but we have no pause data (see on_data_chunk_recv). */ httpc->pause_stream_id = 0; - if(h2_process_pending_input(data, httpc, &result) != 0) { + if(h2_process_pending_input(conn, httpc, &result) != 0) { *err = result; return -1; } @@ -1445,8 +1518,8 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, infof(data, "%zu data bytes written\n", nread); if(stream->pauselen == 0) { - DEBUGF(infof(data, "Unpaused by stream %u\n", stream->stream_id)); - assert(httpc->pause_stream_id == stream->stream_id); + H2BUGF(infof(data, "Unpaused by stream %u\n", stream->stream_id)); + DEBUGASSERT(httpc->pause_stream_id == stream->stream_id); httpc->pause_stream_id = 0; stream->pausedata = NULL; @@ -1459,12 +1532,12 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, frames, then we have to call it again with 0-length data. Without this, on_stream_close callback will not be called, and stream could be hanged. */ - if(h2_process_pending_input(data, httpc, &result) != 0) { + if(h2_process_pending_input(conn, httpc, &result) != 0) { *err = result; return -1; } } - DEBUGF(infof(data, "http2_recv: returns unpaused %zd bytes on stream %u\n", + H2BUGF(infof(data, "http2_recv: returns unpaused %zd bytes on stream %u\n", nread, stream->stream_id)); return nread; } @@ -1477,7 +1550,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, socket is not read. But it seems that usually streams are notified with its drain property, and socket is read again quickly. */ - DEBUGF(infof(data, "stream %x is paused, pause id: %x\n", + H2BUGF(infof(data, "stream %x is paused, pause id: %x\n", stream->stream_id, httpc->pause_stream_id)); *err = CURLE_AGAIN; return -1; @@ -1511,7 +1584,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, return -1; } - DEBUGF(infof(data, "nread=%zd\n", nread)); + H2BUGF(infof(data, "nread=%zd\n", nread)); httpc->inbuflen = nread; inbuf = httpc->inbuf; @@ -1520,7 +1593,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, nread = httpc->inbuflen - httpc->nread_inbuf; inbuf = httpc->inbuf + httpc->nread_inbuf; - DEBUGF(infof(data, "Use data left in connection buffer, nread=%zd\n", + H2BUGF(infof(data, "Use data left in connection buffer, nread=%zd\n", nread)); } rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread); @@ -1529,17 +1602,17 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, failf(data, "nghttp2_session_mem_recv() returned %d:%s\n", rv, nghttp2_strerror((int)rv)); *err = CURLE_RECV_ERROR; - return 0; + return -1; } - DEBUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", rv)); + H2BUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", rv)); if(nread == rv) { - DEBUGF(infof(data, "All data in connection buffer processed\n")); + H2BUGF(infof(data, "All data in connection buffer processed\n")); httpc->inbuflen = 0; httpc->nread_inbuf = 0; } else { httpc->nread_inbuf += rv; - DEBUGF(infof(data, "%zu bytes left in connection buffer\n", + H2BUGF(infof(data, "%zu bytes left in connection buffer\n", httpc->inbuflen - httpc->nread_inbuf)); } /* Always send pending frames in nghttp2 session, because @@ -1547,25 +1620,25 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, rv = h2_session_send(data, httpc->h2); if(rv != 0) { *err = CURLE_SEND_ERROR; - return 0; + return -1; } if(should_close_session(httpc)) { - DEBUGF(infof(data, "http2_recv: nothing to do in this session\n")); + H2BUGF(infof(data, "http2_recv: nothing to do in this session\n")); *err = CURLE_HTTP2; return -1; } } if(stream->memlen) { ssize_t retlen = stream->memlen; - DEBUGF(infof(data, "http2_recv: returns %zd for stream %u\n", + H2BUGF(infof(data, "http2_recv: returns %zd for stream %u\n", retlen, stream->stream_id)); stream->memlen = 0; if(httpc->pause_stream_id == stream->stream_id) { /* data for this stream is returned now, but this stream caused a pause already so we need it called again asap */ - DEBUGF(infof(data, "Data returned for PAUSED stream %u\n", + H2BUGF(infof(data, "Data returned for PAUSED stream %u\n", stream->stream_id)); } else if(!stream->closed) { @@ -1582,7 +1655,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, return http2_handle_stream_close(conn, data, stream, err); } *err = CURLE_AGAIN; - DEBUGF(infof(data, "http2_recv returns AGAIN for stream %u\n", + H2BUGF(infof(data, "http2_recv returns AGAIN for stream %u\n", stream->stream_id)); return -1; } @@ -1684,7 +1757,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, (void)sockindex; - DEBUGF(infof(conn->data, "http2_send len=%zu\n", len)); + H2BUGF(infof(conn->data, "http2_send len=%zu\n", len)); if(stream->stream_id != -1) { if(stream->close_handled) { @@ -1713,7 +1786,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, stream->upload_len = 0; if(should_close_session(httpc)) { - DEBUGF(infof(conn->data, "http2_send: nothing to do in this session\n")); + H2BUGF(infof(conn->data, "http2_send: nothing to do in this session\n")); *err = CURLE_HTTP2; return -1; } @@ -1726,7 +1799,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, nghttp2_session_resume_data(h2, stream->stream_id); } - DEBUGF(infof(conn->data, "http2_send returns %zu for stream %u\n", len, + H2BUGF(infof(conn->data, "http2_send returns %zu for stream %u\n", len, stream->stream_id)); return len; } @@ -1793,9 +1866,6 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, goto fail; } - hdbuf = end + 1; - - end = line_end; nva[2].name = (unsigned char *)":scheme"; nva[2].namelen = strlen((char *)nva[2].name); if(conn->handler->flags & PROTOPT_SSL) @@ -1885,7 +1955,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, for(i = 0; i < nheader; ++i) { acc += nva[i].namelen + nva[i].valuelen; - DEBUGF(infof(conn->data, "h2 header: %.*s:%.*s\n", + H2BUGF(infof(conn->data, "h2 header: %.*s:%.*s\n", nva[i].namelen, nva[i].name, nva[i].valuelen, nva[i].value)); } @@ -1902,6 +1972,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, switch(conn->data->set.httpreq) { case HTTPREQ_POST: case HTTPREQ_POST_FORM: + case HTTPREQ_POST_MIME: case HTTPREQ_PUT: if(conn->data->state.infilesize != -1) stream->upload_left = conn->data->state.infilesize; @@ -1922,7 +1993,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, Curl_safefree(nva); if(stream_id < 0) { - DEBUGF(infof(conn->data, "http2_send() send error\n")); + H2BUGF(infof(conn->data, "http2_send() send error\n")); *err = CURLE_SEND_ERROR; return -1; } @@ -1941,7 +2012,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, } if(should_close_session(httpc)) { - DEBUGF(infof(conn->data, "http2_send: nothing to do in this session\n")); + H2BUGF(infof(conn->data, "http2_send: nothing to do in this session\n")); *err = CURLE_HTTP2; return -1; } @@ -2099,7 +2170,7 @@ CURLcode Curl_http2_switched(struct connectdata *conn, return CURLE_HTTP2; } - DEBUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", nproc)); + H2BUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", nproc)); if((ssize_t)nread == nproc) { httpc->inbuflen = 0; @@ -2119,7 +2190,7 @@ CURLcode Curl_http2_switched(struct connectdata *conn, } if(should_close_session(httpc)) { - DEBUGF(infof(data, + H2BUGF(infof(data, "nghttp2_session_send(): nothing to do in this session\n")); return CURLE_HTTP2; } @@ -2127,40 +2198,46 @@ CURLcode Curl_http2_switched(struct connectdata *conn, return CURLE_OK; } -void Curl_http2_add_child(struct Curl_easy *parent, struct Curl_easy *child, - bool exclusive) +CURLcode Curl_http2_add_child(struct Curl_easy *parent, + struct Curl_easy *child, + bool exclusive) { - struct Curl_http2_dep **tail; - struct Curl_http2_dep *dep = calloc(1, sizeof(struct Curl_http2_dep)); - dep->data = child; - - if(parent->set.stream_dependents && exclusive) { - struct Curl_http2_dep *node = parent->set.stream_dependents; - while(node) { - node->data->set.stream_depends_on = child; - node = node->next; + if(parent) { + struct Curl_http2_dep **tail; + struct Curl_http2_dep *dep = calloc(1, sizeof(struct Curl_http2_dep)); + if(!dep) + return CURLE_OUT_OF_MEMORY; + dep->data = child; + + if(parent->set.stream_dependents && exclusive) { + struct Curl_http2_dep *node = parent->set.stream_dependents; + while(node) { + node->data->set.stream_depends_on = child; + node = node->next; + } + + tail = &child->set.stream_dependents; + while(*tail) + tail = &(*tail)->next; + + DEBUGASSERT(!*tail); + *tail = parent->set.stream_dependents; + parent->set.stream_dependents = 0; } - tail = &child->set.stream_dependents; - while(*tail) + tail = &parent->set.stream_dependents; + while(*tail) { + (*tail)->data->set.stream_depends_e = FALSE; tail = &(*tail)->next; + } DEBUGASSERT(!*tail); - *tail = parent->set.stream_dependents; - parent->set.stream_dependents = 0; - } - - tail = &parent->set.stream_dependents; - while(*tail) { - (*tail)->data->set.stream_depends_e = FALSE; - tail = &(*tail)->next; + *tail = dep; } - DEBUGASSERT(!*tail); - *tail = dep; - child->set.stream_depends_on = parent; child->set.stream_depends_e = exclusive; + return CURLE_OK; } void Curl_http2_remove_child(struct Curl_easy *parent, struct Curl_easy *child) diff --git a/lib/http2.h b/lib/http2.h index f405b3a..f597c80 100644 --- a/lib/http2.h +++ b/lib/http2.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -53,8 +53,9 @@ void Curl_http2_setup_conn(struct connectdata *conn); void Curl_http2_setup_req(struct Curl_easy *data); void Curl_http2_done(struct connectdata *conn, bool premature); CURLcode Curl_http2_done_sending(struct connectdata *conn); -void Curl_http2_add_child(struct Curl_easy *parent, struct Curl_easy *child, - bool exclusive); +CURLcode Curl_http2_add_child(struct Curl_easy *parent, + struct Curl_easy *child, + bool exclusive); void Curl_http2_remove_child(struct Curl_easy *parent, struct Curl_easy *child); void Curl_http2_cleanup_dependencies(struct Curl_easy *data); diff --git a/lib/http_chunks.c b/lib/http_chunks.c index 1bdf697..8368eec 100644 --- a/lib/http_chunks.c +++ b/lib/http_chunks.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -74,20 +74,11 @@ */ -/* Check for an ASCII hex digit. - We avoid the use of isxdigit to accommodate non-ASCII hosts. */ -static bool Curl_isxdigit(char digit) -{ - return ( (digit >= 0x30 && digit <= 0x39) /* 0-9 */ - || (digit >= 0x41 && digit <= 0x46) /* A-F */ - || (digit >= 0x61 && digit <= 0x66) /* a-f */) ? TRUE : FALSE; -} - void Curl_httpchunk_init(struct connectdata *conn) { struct Curl_chunker *chunk = &conn->chunk; - chunk->hexindex=0; /* start at 0 */ - chunk->dataleft=0; /* no data left yet! */ + chunk->hexindex = 0; /* start at 0 */ + chunk->dataleft = 0; /* no data left yet! */ chunk->state = CHUNK_HEX; /* we get hex first! */ } @@ -107,7 +98,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, ssize_t datalen, ssize_t *wrotep) { - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; struct Curl_chunker *ch = &conn->chunk; struct SingleRequest *k = &data->req; @@ -147,7 +138,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, return CHUNKE_ILLEGAL_HEX; /* length and datap are unmodified */ - ch->hexbuffer[ch->hexindex]=0; + ch->hexbuffer[ch->hexindex] = 0; /* convert to host encoding before calling strtoul */ result = Curl_convert_from_network(conn->data, ch->hexbuffer, @@ -158,9 +149,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, return CHUNKE_ILLEGAL_HEX; } - ch->datasize=curlx_strtoofft(ch->hexbuffer, &endptr, 16); - if((ch->datasize == CURL_OFF_T_MAX) && (errno == ERANGE)) - /* overflow is an error */ + if(curlx_strtoofft(ch->hexbuffer, &endptr, 16, &ch->datasize)) return CHUNKE_ILLEGAL_HEX; ch->state = CHUNK_LF; /* now wait for the CRLF */ } @@ -172,7 +161,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, /* we're now expecting data to come, unless size was zero! */ if(0 == ch->datasize) { ch->state = CHUNK_TRAILER; /* now check for trailers */ - conn->trlPos=0; + conn->trlPos = 0; } else ch->state = CHUNK_DATA; @@ -189,49 +178,17 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, piece = curlx_sotouz((ch->datasize >= length)?length:ch->datasize); /* Write the data portion available */ -#ifdef HAVE_LIBZ - switch(conn->data->set.http_ce_skip? - IDENTITY : data->req.auto_decoding) { - case IDENTITY: -#endif - if(!k->ignorebody) { - if(!data->set.http_te_skip) - result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, - piece); - else - result = CURLE_OK; - } -#ifdef HAVE_LIBZ - break; - - case DEFLATE: - /* update data->req.keep.str to point to the chunk data. */ - data->req.str = datap; - result = Curl_unencode_deflate_write(conn, &data->req, - (ssize_t)piece); - break; - - case GZIP: - /* update data->req.keep.str to point to the chunk data. */ - data->req.str = datap; - result = Curl_unencode_gzip_write(conn, &data->req, - (ssize_t)piece); - break; + if(!conn->data->set.http_te_skip && !k->ignorebody) { + if(!conn->data->set.http_ce_skip && k->writer_stack) + result = Curl_unencode_write(conn, k->writer_stack, datap, piece); + else + result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, piece); - default: - failf(conn->data, - "Unrecognized content encoding type. " - "libcurl understands `identity', `deflate' and `gzip' " - "content encodings."); - return CHUNKE_BAD_ENCODING; + if(result) + return CHUNKE_WRITE_ERROR; } -#endif - - if(result) - return CHUNKE_WRITE_ERROR; *wrote += piece; - ch->datasize -= piece; /* decrease amount left to expect */ datap += piece; /* move read pointer forward */ length -= piece; /* decrease space left in this round */ @@ -259,9 +216,9 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, if(conn->trlPos) { /* we allocate trailer with 3 bytes extra room to fit this */ - conn->trailer[conn->trlPos++]=0x0d; - conn->trailer[conn->trlPos++]=0x0a; - conn->trailer[conn->trlPos]=0; + conn->trailer[conn->trlPos++] = 0x0d; + conn->trailer[conn->trlPos++] = 0x0a; + conn->trailer[conn->trlPos] = 0; /* Convert to host encoding before calling Curl_client_write */ result = Curl_convert_from_network(conn->data, conn->trailer, @@ -277,7 +234,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, if(result) return CHUNKE_WRITE_ERROR; } - conn->trlPos=0; + conn->trlPos = 0; ch->state = CHUNK_TRAILER_CR; if(*datap == 0x0a) /* already on the LF */ @@ -301,7 +258,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, ptr = realloc(conn->trailer, conn->trlMax + 3); } else { - conn->trlMax=128; + conn->trlMax = 128; ptr = malloc(conn->trlMax + 3); } if(!ptr) diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 8a78bd2..0f1edcf 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -37,11 +37,14 @@ #include "sendf.h" #include "strcase.h" #include "http_ntlm.h" +#include "curl_ntlm_core.h" #include "curl_ntlm_wb.h" #include "vauth/vauth.h" #include "url.h" -#if defined(USE_NSS) +/* SSL backend-specific #if branches in this file must be kept in the order + documented in curl_ntlm_core. */ +#if defined(NTLM_NEEDS_NSS_INIT) #include "vtls/nssg.h" #elif defined(USE_WINDOWS_SSPI) #include "curl_sspi.h" @@ -129,7 +132,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) DEBUGASSERT(conn); DEBUGASSERT(conn->data); -#ifdef USE_NSS +#if defined(NTLM_NEEDS_NSS_INIT) if(CURLE_OK != Curl_nss_force_init(conn->data)) return CURLE_OUT_OF_MEMORY; #endif @@ -170,8 +173,8 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) case NTLMSTATE_TYPE1: default: /* for the weird cases we (re)start here */ /* Create a type-1 message */ - result = Curl_auth_create_ntlm_type1_message(userp, passwdp, ntlm, &base64, - &len); + result = Curl_auth_create_ntlm_type1_message(conn->data, userp, passwdp, + ntlm, &base64, &len); if(result) return result; diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 7fde11d..c1eb177 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,11 +22,11 @@ #include "curl_setup.h" +#include "http_proxy.h" + #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) -#include "urldata.h" #include -#include "http_proxy.h" #include "sendf.h" #include "http.h" #include "url.h" @@ -122,8 +122,7 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) remote_port = conn->conn_to_port; else remote_port = conn->remote_port; - result = Curl_proxyCONNECT(conn, sockindex, hostname, - remote_port, FALSE); + result = Curl_proxyCONNECT(conn, sockindex, hostname, remote_port); conn->data->req.protop = prot_save; if(CURLE_OK != result) return result; @@ -136,43 +135,73 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) return CURLE_OK; } -/* - * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This - * function will issue the necessary commands to get a seamless tunnel through - * this proxy. After that, the socket can be used just as a normal socket. - * - * 'blocking' set to TRUE means that this function will do the entire CONNECT - * + response in a blocking fashion. Should be avoided! - */ +bool Curl_connect_complete(struct connectdata *conn) +{ + return !conn->connect_state || + (conn->connect_state->tunnel_state == TUNNEL_COMPLETE); +} -CURLcode Curl_proxyCONNECT(struct connectdata *conn, - int sockindex, - const char *hostname, - int remote_port, - bool blocking) +bool Curl_connect_ongoing(struct connectdata *conn) +{ + return conn->connect_state && + (conn->connect_state->tunnel_state != TUNNEL_COMPLETE); +} + +static CURLcode connect_init(struct connectdata *conn, bool reinit) { - int subversion=0; - struct Curl_easy *data=conn->data; + struct http_connect_state *s; + if(!reinit) { + DEBUGASSERT(!conn->connect_state); + s = calloc(1, sizeof(struct http_connect_state)); + if(!s) + return CURLE_OUT_OF_MEMORY; + infof(conn->data, "allocate connect buffer!\n"); + conn->connect_state = s; + } + else { + DEBUGASSERT(conn->connect_state); + s = conn->connect_state; + } + s->tunnel_state = TUNNEL_INIT; + s->keepon = TRUE; + s->line_start = s->connect_buffer; + s->ptr = s->line_start; + s->cl = 0; + s->close_connection = FALSE; + return CURLE_OK; +} + +static void connect_done(struct connectdata *conn) +{ + struct http_connect_state *s = conn->connect_state; + s->tunnel_state = TUNNEL_COMPLETE; + infof(conn->data, "CONNECT phase completed!\n"); +} + +static CURLcode CONNECT(struct connectdata *conn, + int sockindex, + const char *hostname, + int remote_port) +{ + int subversion = 0; + struct Curl_easy *data = conn->data; struct SingleRequest *k = &data->req; CURLcode result; curl_socket_t tunnelsocket = conn->sock[sockindex]; - curl_off_t cl=0; - bool closeConnection = FALSE; - bool chunked_encoding = FALSE; - time_t check; + timediff_t check; + struct http_connect_state *s = conn->connect_state; #define SELECT_OK 0 #define SELECT_ERROR 1 #define SELECT_TIMEOUT 2 - int error = SELECT_OK; - if(conn->tunnel_state[sockindex] == TUNNEL_COMPLETE) + if(Curl_connect_complete(conn)) return CURLE_OK; /* CONNECT is already completed */ conn->bits.proxy_connect_closed = FALSE; do { - if(TUNNEL_INIT == conn->tunnel_state[sockindex]) { + if(TUNNEL_INIT == s->tunnel_state) { /* BEGIN CONNECT PHASE */ char *host_port; Curl_send_buffer *req_buffer; @@ -205,8 +234,8 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(!result) { char *host = NULL; - const char *proxyconn=""; - const char *useragent=""; + const char *proxyconn = ""; + const char *useragent = ""; const char *http = (conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0) ? "1.0" : "1.1"; bool ipv6_ip = conn->bits.ipv6_ip; @@ -215,7 +244,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* the hostname may be different */ if(hostname != conn->host.name) ipv6_ip = (strchr(hostname, ':') != NULL); - hostheader= /* host:port with IPv6 support */ + hostheader = /* host:port with IPv6 support */ aprintf("%s%s%s:%hu", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"", remote_port); if(!hostheader) { @@ -223,7 +252,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; } - if(!Curl_checkProxyheaders(conn, "Host:")) { + if(!Curl_checkProxyheaders(conn, "Host")) { host = aprintf("Host: %s\r\n", hostheader); if(!host) { free(hostheader); @@ -231,10 +260,10 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; } } - if(!Curl_checkProxyheaders(conn, "Proxy-Connection:")) + if(!Curl_checkProxyheaders(conn, "Proxy-Connection")) proxyconn = "Proxy-Connection: Keep-Alive\r\n"; - if(!Curl_checkProxyheaders(conn, "User-Agent:") && + if(!Curl_checkProxyheaders(conn, "User-Agent") && data->set.str[STRING_USERAGENT]) useragent = conn->allocptr.uagent; @@ -280,72 +309,46 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(result) return result; - conn->tunnel_state[sockindex] = TUNNEL_CONNECT; + s->tunnel_state = TUNNEL_CONNECT; + s->perline = 0; } /* END CONNECT PHASE */ check = Curl_timeleft(data, NULL, TRUE); if(check <= 0) { failf(data, "Proxy CONNECT aborted due to timeout"); - return CURLE_RECV_ERROR; + return CURLE_OPERATION_TIMEDOUT; } - if(!blocking) { - if(!Curl_conn_data_pending(conn, sockindex)) - /* return so we'll be called again polling-style */ - return CURLE_OK; - else { - DEBUGF(infof(data, - "Read response immediately from proxy CONNECT\n")); - } - } + if(!Curl_conn_data_pending(conn, sockindex)) + /* return so we'll be called again polling-style */ + return CURLE_OK; /* at this point, the tunnel_connecting phase is over. */ { /* READING RESPONSE PHASE */ - size_t nread; /* total size read */ - int perline; /* count bytes per line */ - int keepon=TRUE; - ssize_t gotbytes; - char *ptr; - char *line_start; - - ptr = data->state.buffer; - line_start = ptr; - - nread = 0; - perline = 0; + int error = SELECT_OK; - while(nread < BUFSIZE && keepon && !error) { - int writetype; + while(s->keepon && !error) { + ssize_t gotbytes; - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; - - if(ptr >= &data->state.buffer[BUFSIZE]) { + /* make sure we have space to read more data */ + if(s->ptr >= &s->connect_buffer[CONNECT_BUFFER_SIZE]) { failf(data, "CONNECT response too large!"); return CURLE_RECV_ERROR; } - check = Curl_timeleft(data, NULL, TRUE); - if(check <= 0) { - failf(data, "Proxy CONNECT aborted due to timeout"); - error = SELECT_TIMEOUT; /* already too little time */ - break; - } - /* Read one byte at a time to avoid a race condition. Wait at most one second before looping to ensure continuous pgrsUpdates. */ - result = Curl_read(conn, tunnelsocket, ptr, 1, &gotbytes); - if(result == CURLE_AGAIN) { - if(SOCKET_READABLE(tunnelsocket, check<1000L?check:1000) == -1) { - error = SELECT_ERROR; - failf(data, "Proxy CONNECT aborted due to select/poll error"); - break; - } - continue; - } - else if(result) { - keepon = FALSE; + result = Curl_read(conn, tunnelsocket, s->ptr, 1, &gotbytes); + if(result == CURLE_AGAIN) + /* socket buffer drained, return */ + return CURLE_OK; + + if(Curl_pgrsUpdate(conn)) + return CURLE_ABORTED_BY_CALLBACK; + + if(result) { + s->keepon = FALSE; break; } else if(gotbytes <= 0) { @@ -359,24 +362,22 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, error = SELECT_ERROR; failf(data, "Proxy CONNECT aborted"); } - keepon = FALSE; + s->keepon = FALSE; break; } - /* We got a byte of data */ - nread++; - if(keepon > TRUE) { + if(s->keepon > TRUE) { /* This means we are currently ignoring a response-body */ - nread = 0; /* make next read start over in the read buffer */ - ptr = data->state.buffer; - if(cl) { + s->ptr = s->connect_buffer; + if(s->cl) { /* A Content-Length based body: simply count down the counter and make sure to break out of the loop when we're done! */ - cl--; - if(cl <= 0) { - keepon = FALSE; + s->cl--; + if(s->cl <= 0) { + s->keepon = FALSE; + s->tunnel_state = TUNNEL_COMPLETE; break; } } @@ -388,28 +389,29 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* now parse the chunked piece of data so that we can properly tell when the stream ends */ - r = Curl_httpchunk_read(conn, ptr, 1, &tookcareof); + r = Curl_httpchunk_read(conn, s->ptr, 1, &tookcareof); if(r == CHUNKE_STOP) { /* we're done reading chunks! */ infof(data, "chunk reading DONE\n"); - keepon = FALSE; + s->keepon = FALSE; /* we did the full CONNECT treatment, go COMPLETE */ - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; + s->tunnel_state = TUNNEL_COMPLETE; } } continue; } - perline++; /* amount of bytes in this line so far */ + s->perline++; /* amount of bytes in this line so far */ /* if this is not the end of a header line then continue */ - if(*ptr != 0x0a) { - ptr++; + if(*s->ptr != 0x0a) { + s->ptr++; continue; } /* convert from the network encoding */ - result = Curl_convert_from_network(data, line_start, perline); + result = Curl_convert_from_network(data, s->line_start, + (size_t)s->perline); /* Curl_convert_from_network calls failf if unsuccessful */ if(result) return result; @@ -417,42 +419,42 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* output debug if that is requested */ if(data->set.verbose) Curl_debug(data, CURLINFO_HEADER_IN, - line_start, (size_t)perline, conn); + s->line_start, (size_t)s->perline, conn); - /* send the header to the callback */ - writetype = CLIENTWRITE_HEADER; - if(data->set.include_header) - writetype |= CLIENTWRITE_BODY; + if(!data->set.suppress_connect_headers) { + /* send the header to the callback */ + int writetype = CLIENTWRITE_HEADER; + if(data->set.include_header) + writetype |= CLIENTWRITE_BODY; - result = Curl_client_write(conn, writetype, line_start, perline); + result = Curl_client_write(conn, writetype, + s->line_start, s->perline); + if(result) + return result; + } - data->info.header_size += (long)perline; - data->req.headerbytecount += (long)perline; - - if(result) - return result; + data->info.header_size += (long)s->perline; + data->req.headerbytecount += (long)s->perline; /* Newlines are CRLF, so the CR is ignored as the line isn't really terminated until the LF comes. Treat a following CR as end-of-headers as well.*/ - if(('\r' == line_start[0]) || - ('\n' == line_start[0])) { + if(('\r' == s->line_start[0]) || + ('\n' == s->line_start[0])) { /* end of response-headers from the proxy */ - nread = 0; /* make next read start over in the read - buffer */ - ptr = data->state.buffer; + s->ptr = s->connect_buffer; if((407 == k->httpcode) && !data->state.authproblem) { /* If we get a 407 response code with content length when we have no auth problem, we must ignore the whole response-body */ - keepon = 2; + s->keepon = 2; - if(cl) { + if(s->cl) { infof(data, "Ignore %" CURL_FORMAT_CURL_OFF_T - " bytes of response-body\n", cl); + " bytes of response-body\n", s->cl); } - else if(chunked_encoding) { + else if(s->chunked_encoding) { CHUNKcode r; infof(data, "Ignore chunked response-body\n"); @@ -463,46 +465,46 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, function returns! */ k->ignorebody = TRUE; - if(line_start[1] == '\n') { + if(s->line_start[1] == '\n') { /* this can only be a LF if the letter at index 0 was a CR */ - line_start++; + s->line_start++; } /* now parse the chunked piece of data so that we can properly tell when the stream ends */ - r = Curl_httpchunk_read(conn, line_start + 1, 1, &gotbytes); + r = Curl_httpchunk_read(conn, s->line_start + 1, 1, &gotbytes); if(r == CHUNKE_STOP) { /* we're done reading chunks! */ infof(data, "chunk reading DONE\n"); - keepon = FALSE; - /* we did the full CONNECT treatment, go to - COMPLETE */ - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; + s->keepon = FALSE; + /* we did the full CONNECT treatment, go to COMPLETE */ + s->tunnel_state = TUNNEL_COMPLETE; } } else { /* without content-length or chunked encoding, we can't keep the connection alive since the close is the end signal so we bail out at once instead */ - keepon = FALSE; + s->keepon = FALSE; } } else - keepon = FALSE; - /* we did the full CONNECT treatment, go to COMPLETE */ - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; + s->keepon = FALSE; + if(!s->cl) + /* we did the full CONNECT treatment, go to COMPLETE */ + s->tunnel_state = TUNNEL_COMPLETE; continue; } - line_start[perline] = 0; /* zero terminate the buffer */ - if((checkprefix("WWW-Authenticate:", line_start) && + s->line_start[s->perline] = 0; /* zero terminate the buffer */ + if((checkprefix("WWW-Authenticate:", s->line_start) && (401 == k->httpcode)) || - (checkprefix("Proxy-authenticate:", line_start) && + (checkprefix("Proxy-authenticate:", s->line_start) && (407 == k->httpcode))) { bool proxy = (k->httpcode == 407) ? TRUE : FALSE; - char *auth = Curl_copy_header_value(line_start); + char *auth = Curl_copy_header_value(s->line_start); if(!auth) return CURLE_OUT_OF_MEMORY; @@ -513,48 +515,50 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(result) return result; } - else if(checkprefix("Content-Length:", line_start)) { + else if(checkprefix("Content-Length:", s->line_start)) { if(k->httpcode/100 == 2) { - /* A server MUST NOT send any Transfer-Encoding or - Content-Length header fields in a 2xx (Successful) - response to CONNECT. (RFC 7231 section 4.3.6) */ - failf(data, "Content-Length: in %03d response", + /* A client MUST ignore any Content-Length or Transfer-Encoding + header fields received in a successful response to CONNECT. + "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */ + infof(data, "Ignoring Content-Length in CONNECT %03d response\n", k->httpcode); - return CURLE_RECV_ERROR; } - - cl = curlx_strtoofft(line_start + - strlen("Content-Length:"), NULL, 10); + else { + (void)curlx_strtoofft(s->line_start + + strlen("Content-Length:"), NULL, 10, &s->cl); + } } - else if(Curl_compareheader(line_start, "Connection:", "close")) - closeConnection = TRUE; - else if(Curl_compareheader(line_start, - "Transfer-Encoding:", - "chunked")) { + else if(Curl_compareheader(s->line_start, "Connection:", "close")) + s->close_connection = TRUE; + else if(checkprefix("Transfer-Encoding:", s->line_start)) { if(k->httpcode/100 == 2) { - /* A server MUST NOT send any Transfer-Encoding or - Content-Length header fields in a 2xx (Successful) - response to CONNECT. (RFC 7231 section 4.3.6) */ - failf(data, "Transfer-Encoding: in %03d response", k->httpcode); - return CURLE_RECV_ERROR; + /* A client MUST ignore any Content-Length or Transfer-Encoding + header fields received in a successful response to CONNECT. + "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */ + infof(data, "Ignoring Transfer-Encoding in " + "CONNECT %03d response\n", k->httpcode); + } + else if(Curl_compareheader(s->line_start, + "Transfer-Encoding:", "chunked")) { + infof(data, "CONNECT responded chunked\n"); + s->chunked_encoding = TRUE; + /* init our chunky engine */ + Curl_httpchunk_init(conn); } - infof(data, "CONNECT responded chunked\n"); - chunked_encoding = TRUE; - /* init our chunky engine */ - Curl_httpchunk_init(conn); } - else if(Curl_compareheader(line_start, "Proxy-Connection:", "close")) - closeConnection = TRUE; - else if(2 == sscanf(line_start, "HTTP/1.%d %d", + else if(Curl_compareheader(s->line_start, + "Proxy-Connection:", "close")) + s->close_connection = TRUE; + else if(2 == sscanf(s->line_start, "HTTP/1.%d %d", &subversion, &k->httpcode)) { /* store the HTTP code from the proxy */ data->info.httpproxycode = k->httpcode; } - perline = 0; /* line starts over here */ - ptr = data->state.buffer; - line_start = ptr; + s->perline = 0; /* line starts over here */ + s->ptr = s->connect_buffer; + s->line_start = s->ptr; } /* while there's buffer left and loop is requested */ if(Curl_pgrsUpdate(conn)) @@ -563,7 +567,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(error) return CURLE_RECV_ERROR; - if(data->info.httpproxycode != 200) { + if(data->info.httpproxycode/100 != 2) { /* Deal with the possibly already received authenticate headers. 'newurl' is set to a new URL if we must loop. */ result = Curl_http_auth_act(conn); @@ -574,10 +578,10 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* the connection has been marked for closure, most likely in the Curl_http_auth_act() function and thus we can kill it at once below */ - closeConnection = TRUE; + s->close_connection = TRUE; } - if(closeConnection && data->req.newurl) { + if(s->close_connection && data->req.newurl) { /* Connection closed by server. Don't use it anymore */ Curl_closesocket(conn, conn->sock[sockindex]); conn->sock[sockindex] = CURL_SOCKET_BAD; @@ -588,19 +592,17 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* If we are supposed to continue and request a new URL, which basically * means the HTTP authentication is still going on so if the tunnel * is complete we start over in INIT state */ - if(data->req.newurl && - (TUNNEL_COMPLETE == conn->tunnel_state[sockindex])) { - conn->tunnel_state[sockindex] = TUNNEL_INIT; - infof(data, "TUNNEL_STATE switched to: %d\n", - conn->tunnel_state[sockindex]); + if(data->req.newurl && (TUNNEL_COMPLETE == s->tunnel_state)) { + connect_init(conn, TRUE); /* reinit */ } } while(data->req.newurl); - if(200 != data->req.httpcode) { - if(closeConnection && data->req.newurl) { + if(data->info.httpproxycode/100 != 2) { + if(s->close_connection && data->req.newurl) { conn->bits.proxy_connect_closed = TRUE; infof(data, "Connect me again please\n"); + connect_done(conn); } else { free(data->req.newurl); @@ -612,19 +614,17 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, } /* to back to init state */ - conn->tunnel_state[sockindex] = TUNNEL_INIT; + s->tunnel_state = TUNNEL_INIT; if(conn->bits.proxy_connect_closed) /* this is not an error, just part of the connection negotiation */ return CURLE_OK; - else { - failf(data, "Received HTTP code %d from proxy after CONNECT", - data->req.httpcode); - return CURLE_RECV_ERROR; - } + failf(data, "Received HTTP code %d from proxy after CONNECT", + data->req.httpcode); + return CURLE_RECV_ERROR; } - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; + s->tunnel_state = TUNNEL_COMPLETE; /* If a proxy-authorization header was used for the proxy, then we should make sure that it isn't accidentally used for the document request @@ -634,10 +634,53 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, data->state.authproxy.done = TRUE; - infof(data, "Proxy replied OK to CONNECT request\n"); + infof(data, "Proxy replied %d to CONNECT request\n", + data->info.httpproxycode); data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */ conn->bits.rewindaftersend = FALSE; /* make sure this isn't set for the document request */ return CURLE_OK; } + +void Curl_connect_free(struct Curl_easy *data) +{ + struct connectdata *conn = data->easy_conn; + struct http_connect_state *s = conn->connect_state; + if(s) { + free(s); + conn->connect_state = NULL; + } +} + +/* + * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This + * function will issue the necessary commands to get a seamless tunnel through + * this proxy. After that, the socket can be used just as a normal socket. + */ + +CURLcode Curl_proxyCONNECT(struct connectdata *conn, + int sockindex, + const char *hostname, + int remote_port) +{ + CURLcode result; + if(!conn->connect_state) { + result = connect_init(conn, FALSE); + if(result) + return result; + } + result = CONNECT(conn, sockindex, hostname, remote_port); + + if(result || Curl_connect_complete(conn)) + connect_done(conn); + + return result; +} + +#else +void Curl_connect_free(struct Curl_easy *data) +{ + (void)data; +} + #endif /* CURL_DISABLE_PROXY */ diff --git a/lib/http_proxy.h b/lib/http_proxy.h index d1f5a7c..e19fa85 100644 --- a/lib/http_proxy.h +++ b/lib/http_proxy.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,21 +22,30 @@ * ***************************************************************************/ +#include "curl_setup.h" +#include "urldata.h" + #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) /* ftp can use this as well */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, int tunnelsocket, - const char *hostname, int remote_port, - bool blocking); + const char *hostname, int remote_port); /* Default proxy timeout in milliseconds */ #define PROXY_TIMEOUT (3600*1000) CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex); +bool Curl_connect_complete(struct connectdata *conn); +bool Curl_connect_ongoing(struct connectdata *conn); + #else -#define Curl_proxyCONNECT(x,y,z,w,v) CURLE_NOT_BUILT_IN +#define Curl_proxyCONNECT(x,y,z,w) CURLE_NOT_BUILT_IN #define Curl_proxy_connect(x,y) CURLE_OK +#define Curl_connect_complete(x) CURLE_OK +#define Curl_connect_ongoing(x) FALSE #endif +void Curl_connect_free(struct Curl_easy *data); + #endif /* HEADER_CURL_HTTP_PROXY_H */ diff --git a/lib/if2ip.c b/lib/if2ip.c index d876615..ce38ea1 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -71,6 +71,8 @@ unsigned int Curl_ipv6_scope(const struct sockaddr *sa) const unsigned char *b = sa6->sin6_addr.s6_addr; unsigned short w = (unsigned short) ((b[0] << 8) | b[1]); + if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */ + return IPV6_SCOPE_UNIQUELOCAL; switch(w & 0xFFC0) { case 0xFE80: return IPV6_SCOPE_LINKLOCAL; @@ -101,7 +103,7 @@ bool Curl_if_is_interface_name(const char *interf) struct ifaddrs *iface, *head; if(getifaddrs(&head) >= 0) { - for(iface=head; iface != NULL; iface=iface->ifa_next) { + for(iface = head; iface != NULL; iface = iface->ifa_next) { if(strcasecompare(iface->ifa_name, interf)) { result = TRUE; break; @@ -121,15 +123,15 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, #ifndef ENABLE_IPV6 (void) remote_scope; - -#ifndef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - (void) remote_scope_id; #endif +#if !defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) || \ + !defined(ENABLE_IPV6) + (void) remote_scope_id; #endif if(getifaddrs(&head) >= 0) { - for(iface = head; iface != NULL; iface=iface->ifa_next) { + for(iface = head; iface != NULL; iface = iface->ifa_next) { if(iface->ifa_addr != NULL) { if(iface->ifa_addr->sa_family == af) { if(strcasecompare(iface->ifa_name, interf)) { @@ -228,7 +230,7 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, return IF2IP_NOT_FOUND; memset(&req, 0, sizeof(req)); - memcpy(req.ifr_name, interf, len+1); + memcpy(req.ifr_name, interf, len + 1); req.ifr_addr.sa_family = AF_INET; if(ioctl(dummy, SIOCGIFADDR, &req) < 0) { @@ -239,7 +241,7 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, return IF2IP_NOT_FOUND; } - s = (struct sockaddr_in *)&req.ifr_addr; + s = (struct sockaddr_in *)(void *)&req.ifr_addr; memcpy(&in, &s->sin_addr, sizeof(in)); Curl_inet_ntop(s->sin_family, &in, buf, buf_size); diff --git a/lib/if2ip.h b/lib/if2ip.h index f3a7ff0..a90e662 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,7 +27,8 @@ #define IPV6_SCOPE_GLOBAL 0 /* Global scope. */ #define IPV6_SCOPE_LINKLOCAL 1 /* Link-local scope. */ #define IPV6_SCOPE_SITELOCAL 2 /* Site-local scope (deprecated). */ -#define IPV6_SCOPE_NODELOCAL 3 /* Loopback. */ +#define IPV6_SCOPE_UNIQUELOCAL 3 /* Unique local */ +#define IPV6_SCOPE_NODELOCAL 4 /* Loopback. */ unsigned int Curl_ipv6_scope(const struct sockaddr *sa); diff --git a/lib/imap.c b/lib/imap.c index 44d350b..cf278a2 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -68,6 +68,7 @@ #include "http.h" /* for HTTP proxy tunnel stuff */ #include "socks.h" #include "imap.h" +#include "mime.h" #include "strtoofft.h" #include "strcase.h" #include "vtls/vtls.h" @@ -128,6 +129,7 @@ const struct Curl_handler Curl_handler_imap = { ZERO_NULL, /* perform_getsock */ imap_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_IMAP, /* defport */ CURLPROTO_IMAP, /* protocol */ PROTOPT_CLOSEACTION| /* flags */ @@ -154,69 +156,22 @@ const struct Curl_handler Curl_handler_imaps = { ZERO_NULL, /* perform_getsock */ imap_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_IMAPS, /* defport */ CURLPROTO_IMAPS, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */ }; #endif -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed IMAP protocol handler. - */ - -static const struct Curl_handler Curl_handler_imap_proxy = { - "IMAP", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_IMAP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * HTTP-proxyed IMAPS protocol handler. - */ - -static const struct Curl_handler Curl_handler_imaps_proxy = { - "IMAPS", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_IMAPS, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif +#define IMAP_RESP_OK 1 +#define IMAP_RESP_NOT_OK 2 +#define IMAP_RESP_PREAUTH 3 /* SASL parameters for the imap protocol */ static const struct SASLproto saslimap = { "imap", /* The service name */ '+', /* Code received when continuation is expected */ - 'O', /* Code to receive upon authentication success */ + IMAP_RESP_OK, /* Code to receive upon authentication success */ 0, /* Maximum initial response length (no max) */ imap_perform_authenticate, /* Send authentication command */ imap_continue_authenticate, /* Send authentication continuation */ @@ -299,15 +254,11 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len, len -= id_len + 1; if(len >= 2 && !memcmp(line, "OK", 2)) - *resp = 'O'; - else if(len >= 2 && !memcmp(line, "NO", 2)) - *resp = 'N'; - else if(len >= 3 && !memcmp(line, "BAD", 3)) - *resp = 'B'; - else { - failf(conn->data, "Bad tagged response"); - *resp = -1; - } + *resp = IMAP_RESP_OK; + else if(len >= 7 && !memcmp(line, "PREAUTH", 7)) + *resp = IMAP_RESP_PREAUTH; + else + *resp = IMAP_RESP_NOT_OK; return TRUE; } @@ -324,15 +275,15 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len, case IMAP_LIST: if((!imap->custom && !imap_matchresp(line, len, "LIST")) || (imap->custom && !imap_matchresp(line, len, imap->custom) && - (strcmp(imap->custom, "STORE") || + (!strcasecompare(imap->custom, "STORE") || !imap_matchresp(line, len, "FETCH")) && - strcmp(imap->custom, "SELECT") && - strcmp(imap->custom, "EXAMINE") && - strcmp(imap->custom, "SEARCH") && - strcmp(imap->custom, "EXPUNGE") && - strcmp(imap->custom, "LSUB") && - strcmp(imap->custom, "UID") && - strcmp(imap->custom, "NOOP"))) + !strcasecompare(imap->custom, "SELECT") && + !strcasecompare(imap->custom, "EXAMINE") && + !strcasecompare(imap->custom, "SEARCH") && + !strcasecompare(imap->custom, "EXPUNGE") && + !strcasecompare(imap->custom, "LSUB") && + !strcasecompare(imap->custom, "UID") && + !strcasecompare(imap->custom, "NOOP"))) return FALSE; break; @@ -393,23 +344,30 @@ static bool imap_endofresp(struct connectdata *conn, char *line, size_t len, */ static void imap_get_message(char *buffer, char **outptr) { - size_t len = 0; + size_t len = strlen(buffer); char *message = NULL; - /* Find the start of the message */ - for(message = buffer + 2; *message == ' ' || *message == '\t'; message++) - ; - - /* Find the end of the message */ - for(len = strlen(message); len--;) - if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && - message[len] != '\t') - break; + if(len > 2) { + /* Find the start of the message */ + len -= 2; + for(message = buffer + 2; *message == ' ' || *message == '\t'; + message++, len--) + ; + + /* Find the end of the message */ + for(; len--;) + if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && + message[len] != '\t') + break; - /* Terminate the message */ - if(++len) { - message[len] = '\0'; + /* Terminate the message */ + if(++len) { + message[len] = '\0'; + } } + else + /* junk input => zero length output */ + message = &buffer[len]; *outptr = message; } @@ -613,9 +571,10 @@ static CURLcode imap_perform_authentication(struct connectdata *conn) struct imap_conn *imapc = &conn->proto.imapc; saslprogress progress; - /* Check we have enough data to authenticate with and end the - connect phase if we don't */ - if(!Curl_sasl_can_authenticate(&imapc->sasl, conn)) { + /* Check if already authenticated OR if there is enough data to authenticate + with and end the connect phase if we don't */ + if(imapc->preauth || + !Curl_sasl_can_authenticate(&imapc->sasl, conn)) { state(conn, IMAP_STOP); return result; } @@ -757,18 +716,48 @@ static CURLcode imap_perform_fetch(struct connectdata *conn) static CURLcode imap_perform_append(struct connectdata *conn) { CURLcode result = CURLE_OK; - struct IMAP *imap = conn->data->req.protop; + struct Curl_easy *data = conn->data; + struct IMAP *imap = data->req.protop; char *mailbox; /* Check we have a mailbox */ if(!imap->mailbox) { - failf(conn->data, "Cannot APPEND without a mailbox."); + failf(data, "Cannot APPEND without a mailbox."); return CURLE_URL_MALFORMAT; } + /* Prepare the mime data if some. */ + if(data->set.mimepost.kind != MIMEKIND_NONE) { + /* Use the whole structure as data. */ + data->set.mimepost.flags &= ~MIME_BODY_ONLY; + + /* Add external headers and mime version. */ + curl_mime_headers(&data->set.mimepost, data->set.headers, 0); + result = Curl_mime_prepare_headers(&data->set.mimepost, NULL, + NULL, MIMESTRATEGY_MAIL); + + if(!result) + if(!Curl_checkheaders(conn, "Mime-Version")) + result = Curl_mime_add_header(&data->set.mimepost.curlheaders, + "Mime-Version: 1.0"); + + /* Make sure we will read the entire mime structure. */ + if(!result) + result = Curl_mime_rewind(&data->set.mimepost); + + if(result) + return result; + + data->state.infilesize = Curl_mime_size(&data->set.mimepost); + + /* Read from mime structure. */ + data->state.fread_func = (curl_read_callback) Curl_mime_read; + data->state.in = (void *) &data->set.mimepost; + } + /* Check we know the size of the upload */ - if(conn->data->state.infilesize < 0) { - failf(conn->data, "Cannot APPEND with unknown input file size\n"); + if(data->state.infilesize < 0) { + failf(data, "Cannot APPEND with unknown input file size\n"); return CURLE_UPLOAD_FAILED; } @@ -779,7 +768,7 @@ static CURLcode imap_perform_append(struct connectdata *conn) /* Send the APPEND command */ result = imap_sendf(conn, "APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}", - mailbox, conn->data->state.infilesize); + mailbox, data->state.infilesize); free(mailbox); @@ -839,19 +828,21 @@ static CURLcode imap_state_servergreet_resp(struct connectdata *conn, int imapcode, imapstate instate) { - CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; - (void)instate; /* no use for this yet */ - if(imapcode != 'O') { + if(imapcode == IMAP_RESP_PREAUTH) { + /* PREAUTH */ + struct imap_conn *imapc = &conn->proto.imapc; + imapc->preauth = TRUE; + infof(data, "PREAUTH connection, already authenticated!\n"); + } + else if(imapcode != IMAP_RESP_OK) { failf(data, "Got unexpected imap-server response"); - result = CURLE_WEIRD_SERVER_REPLY; + return CURLE_WEIRD_SERVER_REPLY; } - else - result = imap_perform_capability(conn); - return result; + return imap_perform_capability(conn); } /* For CAPABILITY responses */ @@ -918,7 +909,7 @@ static CURLcode imap_state_capability_resp(struct connectdata *conn, line += wordlen; } } - else if(imapcode == 'O') { + else if(imapcode == IMAP_RESP_OK) { if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { /* We don't have a SSL/TLS connection yet, but SSL is requested */ if(imapc->tls_supported) @@ -951,7 +942,7 @@ static CURLcode imap_state_starttls_resp(struct connectdata *conn, (void)instate; /* no use for this yet */ - if(imapcode != 'O') { + if(imapcode != IMAP_RESP_OK) { if(data->set.use_ssl != CURLUSESSL_TRY) { failf(data, "STARTTLS denied"); result = CURLE_USE_SSL_FAILED; @@ -1009,7 +1000,7 @@ static CURLcode imap_state_login_resp(struct connectdata *conn, (void)instate; /* no use for this yet */ - if(imapcode != 'O') { + if(imapcode != IMAP_RESP_OK) { failf(data, "Access denied. %c", imapcode); result = CURLE_LOGIN_DENIED; } @@ -1037,7 +1028,7 @@ static CURLcode imap_state_listsearch_resp(struct connectdata *conn, result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1); line[len] = '\0'; } - else if(imapcode != 'O') + else if(imapcode != IMAP_RESP_OK) result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */ else /* End of DO phase */ @@ -1066,10 +1057,10 @@ static CURLcode imap_state_select_resp(struct connectdata *conn, int imapcode, imapc->mailbox_uidvalidity = strdup(tmp); } } - else if(imapcode == 'O') { + else if(imapcode == IMAP_RESP_OK) { /* Check if the UIDVALIDITY has been specified and matches */ if(imap->uidvalidity && imapc->mailbox_uidvalidity && - strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)) { + !strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity)) { failf(conn->data, "Mailbox UIDVALIDITY has changed"); result = CURLE_REMOTE_FILE_NOT_FOUND; } @@ -1120,10 +1111,11 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode, if(*ptr == '{') { char *endptr; - size = curlx_strtoofft(ptr + 1, &endptr, 10); - if(endptr - ptr > 1 && endptr[0] == '}' && - endptr[1] == '\r' && endptr[2] == '\0') - parsed = TRUE; + if(!curlx_strtoofft(ptr + 1, &endptr, 10, &size)) { + if(endptr - ptr > 1 && endptr[0] == '}' && + endptr[1] == '\r' && endptr[2] == '\0') + parsed = TRUE; + } } if(parsed) { @@ -1141,6 +1133,11 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode, /* The conversion from curl_off_t to size_t is always fine here */ chunk = (size_t)size; + if(!chunk) { + /* no size, we're done with the data */ + state(conn, IMAP_STOP); + return CURLE_OK; + } result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk); if(result) return result; @@ -1197,7 +1194,7 @@ static CURLcode imap_state_fetch_final_resp(struct connectdata *conn, (void)instate; /* No use for this yet */ - if(imapcode != 'O') + if(imapcode != IMAP_RESP_OK) result = CURLE_WEIRD_SERVER_REPLY; else /* End of DONE phase */ @@ -1241,7 +1238,7 @@ static CURLcode imap_state_append_final_resp(struct connectdata *conn, (void)instate; /* No use for this yet */ - if(imapcode != 'O') + if(imapcode != IMAP_RESP_OK) result = CURLE_UPLOAD_FAILED; else /* End of DONE phase */ @@ -1469,9 +1466,10 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status, result = status; /* use the already set error code */ } else if(!data->set.connect_only && !imap->custom && - (imap->uid || data->set.upload)) { + (imap->uid || data->set.upload || + data->set.mimepost.kind != MIMEKIND_NONE)) { /* Handle responses after FETCH or APPEND transfer has finished */ - if(!data->set.upload) + if(!data->set.upload && data->set.mimepost.kind == MIMEKIND_NONE) state(conn, IMAP_FETCH_FINAL); else { /* End the APPEND command first by sending an empty line */ @@ -1535,13 +1533,13 @@ static CURLcode imap_perform(struct connectdata *conn, bool *connected, /* Determine if the requested mailbox (with the same UIDVALIDITY if set) has already been selected on this connection */ if(imap->mailbox && imapc->mailbox && - !strcmp(imap->mailbox, imapc->mailbox) && + strcasecompare(imap->mailbox, imapc->mailbox) && (!imap->uidvalidity || !imapc->mailbox_uidvalidity || - !strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity))) + strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity))) selected = TRUE; /* Start the first command in the DO phase */ - if(conn->data->set.upload) + if(conn->data->set.upload || data->set.mimepost.kind != MIMEKIND_NONE) /* APPEND can be executed directly */ result = imap_perform_append(conn); else if(imap->custom && (selected || !imap->mailbox)) @@ -1715,31 +1713,6 @@ static CURLcode imap_setup_connection(struct connectdata *conn) /* Clear the TLS upgraded flag */ conn->tls_upgraded = FALSE; - - /* Set up the proxy if necessary */ - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel IMAP operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_imap) - conn->handler = &Curl_handler_imap_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_imaps_proxy; -#else - failf(data, "IMAPS not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - /* set it up as an HTTP connection instead */ - return conn->handler->setup_connection(conn); -#else - failf(data, "IMAP over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - data->state.path++; /* don't include the initial slash */ return CURLE_OK; @@ -1749,7 +1722,7 @@ static CURLcode imap_setup_connection(struct connectdata *conn) * * imap_sendf() * - * Sends the formated string as an IMAP command to the server. + * Sends the formatted string as an IMAP command to the server. * * Designed to never block. */ @@ -1836,7 +1809,7 @@ static char *imap_atom(const char *str, bool escape_only) return strdup(str); /* Calculate the new string length */ - newlen = strlen(str) + backsp_count + quote_count + (others_exists ? 2 : 0); + newlen = strlen(str) + backsp_count + quote_count + (escape_only ? 0 : 2); /* Allocate the new string */ newstr = (char *) malloc((newlen + 1) * sizeof(char)); @@ -1845,7 +1818,7 @@ static char *imap_atom(const char *str, bool escape_only) /* Surround the string in quotes if necessary */ p2 = newstr; - if(others_exists) { + if(!escape_only) { newstr[0] = '"'; newstr[newlen - 1] = '"'; p2++; diff --git a/lib/imap.h b/lib/imap.h index 5e0e228..9fc4ff5 100644 --- a/lib/imap.h +++ b/lib/imap.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2009 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2009 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -71,6 +71,7 @@ struct imap_conn { struct pingpong pp; imapstate state; /* Always use imap.c:state() to change state! */ bool ssldone; /* Is connect() over SSL done? */ + bool preauth; /* Is this connection PREAUTH? */ struct SASL sasl; /* SASL-related parameters */ unsigned int preftype; /* Preferred authentication type */ int cmdid; /* Last used command ID */ diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index 9afbdbb..fb91a50 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -63,7 +63,7 @@ static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size) len = strlen(tmp); if(len == 0 || len >= size) { - SET_ERRNO(ENOSPC); + errno = ENOSPC; return (NULL); } strcpy(dst, tmp); @@ -141,8 +141,8 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size) */ if(i == 6 && best.base == 0 && (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { - if(!inet_ntop4(src+12, tp, sizeof(tmp) - (tp - tmp))) { - SET_ERRNO(ENOSPC); + if(!inet_ntop4(src + 12, tp, sizeof(tmp) - (tp - tmp))) { + errno = ENOSPC; return (NULL); } tp += strlen(tp); @@ -160,7 +160,7 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size) /* Check for overflow, copy, and we're done. */ if((size_t)(tp - tmp) > size) { - SET_ERRNO(ENOSPC); + errno = ENOSPC; return (NULL); } strcpy(dst, tmp); @@ -177,8 +177,8 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size) * * On Windows we store the error in the thread errno, not * in the winsock error code. This is to avoid losing the - * actual last winsock error. So use macro ERRNO to fetch the - * errno this function sets when returning NULL, not SOCKERRNO. + * actual last winsock error. So when this function returns + * NULL, check errno not SOCKERRNO. */ char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size) { @@ -190,7 +190,7 @@ char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size) return inet_ntop6((const unsigned char *)src, buf, size); #endif default: - SET_ERRNO(EAFNOSUPPORT); + errno = EAFNOSUPPORT; return NULL; } } diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 475f44a..fef9610 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -57,8 +57,8 @@ static int inet_pton6(const char *src, unsigned char *dst); * notice: * On Windows we store the error in the thread errno, not * in the winsock error code. This is to avoid losing the - * actual last winsock error. So use macro ERRNO to fetch the - * errno this function sets when returning (-1), not SOCKERRNO. + * actual last winsock error. So when this function returns + * -1, check errno not SOCKERRNO. * author: * Paul Vixie, 1996. */ @@ -73,7 +73,7 @@ Curl_inet_pton(int af, const char *src, void *dst) return (inet_pton6(src, (unsigned char *)dst)); #endif default: - SET_ERRNO(EAFNOSUPPORT); + errno = EAFNOSUPPORT; return (-1); } /* NOTREACHED */ diff --git a/lib/inet_pton.h b/lib/inet_pton.h index 9188d95..e216f4e 100644 --- a/lib/inet_pton.h +++ b/lib/inet_pton.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -29,6 +29,9 @@ int Curl_inet_pton(int, const char *, void *); #ifdef HAVE_INET_PTON #ifdef HAVE_ARPA_INET_H #include +#elif defined(HAVE_WS2TCPIP_H) +/* inet_pton() exists in Vista or later */ +#include #endif #define Curl_inet_pton(x,y,z) inet_pton(x,y,z) #endif diff --git a/lib/krb5.c b/lib/krb5.c index 067b0a5..8b5a247 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -2,7 +2,7 @@ * * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). - * Copyright (c) 2004 - 2016 Daniel Stenberg + * Copyright (c) 2004 - 2017 Daniel Stenberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -85,7 +85,7 @@ krb5_decode(void *app_data, void *buf, int len, enc.value = buf; enc.length = len; - maj = gss_unseal(&min, *context, &enc, &dec, NULL, NULL); + maj = gss_unwrap(&min, *context, &enc, &dec, NULL, NULL); if(maj != GSS_S_COMPLETE) { if(len >= 4) strcpy(buf, "599 "); @@ -119,11 +119,11 @@ krb5_encode(void *app_data, const void *from, int length, int level, void **to) int len; /* NOTE that the cast is safe, neither of the krb5, gnu gss and heimdal - * libraries modify the input buffer in gss_seal() + * libraries modify the input buffer in gss_wrap() */ dec.value = (void *)from; dec.length = length; - maj = gss_seal(&min, *context, + maj = gss_wrap(&min, *context, level == PROT_PRIVATE, GSS_C_QOP_DEFAULT, &dec, &state, &enc); @@ -164,6 +164,7 @@ krb5_auth(void *app_data, struct connectdata *conn) size_t base64_sz = 0; struct sockaddr_in **remote_addr = (struct sockaddr_in **)&conn->ip_addr->ai_addr; + char *stringp; if(getsockname(conn->sock[FIRSTSOCKET], (struct sockaddr *)&conn->local_addr, &l) < 0) @@ -193,16 +194,19 @@ krb5_auth(void *app_data, struct connectdata *conn) return -1; } - input_buffer.value = data->state.buffer; - input_buffer.length = snprintf(input_buffer.value, BUFSIZE, "%s@%s", - service, host); + stringp = aprintf("%s@%s", service, host); + if(!stringp) + return -2; + + input_buffer.value = stringp; + input_buffer.length = strlen(stringp); maj = gss_import_name(&min, &input_buffer, GSS_C_NT_HOSTBASED_SERVICE, &gssname); + free(stringp); if(maj != GSS_S_COMPLETE) { gss_release_name(&min, &gssname); if(service == srv_host) { - Curl_failf(data, "Error importing service name %s", - input_buffer.value); + Curl_failf(data, "Error importing service name %s@%s", service, host); return AUTH_ERROR; } service = srv_host; @@ -278,6 +282,7 @@ krb5_auth(void *app_data, struct connectdata *conn) break; } + _gssresp.value = NULL; /* make sure it is initialized */ p = data->state.buffer + 4; p = strstr(p, "ADAT="); if(p) { diff --git a/lib/ldap.c b/lib/ldap.c index 979ce7d..89047bc 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -150,6 +150,7 @@ const struct Curl_handler Curl_handler_ldap = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_LDAP, /* defport */ CURLPROTO_LDAP, /* protocol */ PROTOPT_NONE /* flags */ @@ -175,12 +176,89 @@ const struct Curl_handler Curl_handler_ldaps = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_LDAPS, /* defport */ CURLPROTO_LDAPS, /* protocol */ PROTOPT_SSL /* flags */ }; #endif +#if defined(USE_WIN32_LDAP) + +#if defined(USE_WINDOWS_SSPI) +static int ldap_win_bind_auth(LDAP *server, const char *user, + const char *passwd, unsigned long authflags) +{ + ULONG method = 0; + SEC_WINNT_AUTH_IDENTITY cred; + int rc = LDAP_AUTH_METHOD_NOT_SUPPORTED; + + memset(&cred, 0, sizeof(cred)); + +#if defined(USE_SPNEGO) + if(authflags & CURLAUTH_NEGOTIATE) { + method = LDAP_AUTH_NEGOTIATE; + } + else +#endif +#if defined(USE_NTLM) + if(authflags & CURLAUTH_NTLM) { + method = LDAP_AUTH_NTLM; + } + else +#endif +#if !defined(CURL_DISABLE_CRYPTO_AUTH) + if(authflags & CURLAUTH_DIGEST) { + method = LDAP_AUTH_DIGEST; + } + else +#endif + { + /* required anyway if one of upper preprocessor definitions enabled */ + } + + if(method && user && passwd) { + rc = Curl_create_sspi_identity(user, passwd, &cred); + if(!rc) { + rc = ldap_bind_s(server, NULL, (TCHAR *)&cred, method); + Curl_sspi_free_identity(&cred); + } + } + else { + /* proceed with current user credentials */ + method = LDAP_AUTH_NEGOTIATE; + rc = ldap_bind_s(server, NULL, NULL, method); + } + return rc; +} +#endif /* #if defined(USE_WINDOWS_SSPI) */ + +static int ldap_win_bind(struct connectdata *conn, LDAP *server, + const char *user, const char *passwd) +{ + int rc = LDAP_INVALID_CREDENTIALS; + + PTCHAR inuser = NULL; + PTCHAR inpass = NULL; + + if(user && passwd && (conn->data->set.httpauth & CURLAUTH_BASIC)) { + inuser = Curl_convert_UTF8_to_tchar((char *) user); + inpass = Curl_convert_UTF8_to_tchar((char *) passwd); + + rc = ldap_simple_bind_s(server, inuser, inpass); + + Curl_unicodefree(inuser); + Curl_unicodefree(inpass); + } +#if defined(USE_WINDOWS_SSPI) + else { + rc = ldap_win_bind_auth(server, user, passwd, conn->data->set.httpauth); + } +#endif + + return rc; +} +#endif /* #if defined(USE_WIN32_LDAP) */ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) { @@ -191,7 +269,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) LDAPMessage *ldapmsg = NULL; LDAPMessage *entryIterator; int num = 0; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; int ldap_proto = LDAP_VERSION3; int ldap_ssl = 0; char *val_b64 = NULL; @@ -202,13 +280,11 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) #endif #if defined(USE_WIN32_LDAP) TCHAR *host = NULL; - TCHAR *user = NULL; - TCHAR *passwd = NULL; #else char *host = NULL; +#endif char *user = NULL; char *passwd = NULL; -#endif *done = TRUE; /* unconditionally */ infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d\n", @@ -239,24 +315,14 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) goto quit; } - - if(conn->bits.user_passwd) { - user = Curl_convert_UTF8_to_tchar(conn->user); - passwd = Curl_convert_UTF8_to_tchar(conn->passwd); - if(!user || !passwd) { - result = CURLE_OUT_OF_MEMORY; - - goto quit; - } - } #else host = conn->host.name; +#endif if(conn->bits.user_passwd) { user = conn->user; passwd = conn->passwd; } -#endif #ifdef LDAP_OPT_NETWORK_TIMEOUT ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, &ldap_timeout); @@ -402,11 +468,19 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); #endif +#ifdef USE_WIN32_LDAP + rc = ldap_win_bind(conn, server, user, passwd); +#else rc = ldap_simple_bind_s(server, user, passwd); +#endif if(!ldap_ssl && rc != 0) { ldap_proto = LDAP_VERSION2; ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); +#ifdef USE_WIN32_LDAP + rc = ldap_win_bind(conn, server, user, passwd); +#else rc = ldap_simple_bind_s(server, user, passwd); +#endif } if(rc != 0) { failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc)); @@ -669,8 +743,6 @@ quit: #endif /* HAVE_LDAP_SSL && CURL_HAS_NOVELL_LDAPSDK */ #if defined(USE_WIN32_LDAP) - Curl_unicodefree(passwd); - Curl_unicodefree(user); Curl_unicodefree(host); #endif diff --git a/lib/libcurl.plist b/lib/libcurl.plist index 21119fe..da7037d 100644 --- a/lib/libcurl.plist +++ b/lib/libcurl.plist @@ -15,7 +15,7 @@ se.haxx.curl.libcurl CFBundleVersion - 7.53.1 + 7.59.0 CFBundleName libcurl @@ -27,9 +27,9 @@ ???? CFBundleShortVersionString - libcurl 7.53.1 + libcurl 7.59.0 CFBundleGetInfoString - libcurl.plist 7.53.1 + libcurl.plist 7.59.0 diff --git a/lib/llist.c b/lib/llist.c index 482aaa0..f8769c2 100644 --- a/lib/llist.c +++ b/lib/llist.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -33,8 +33,8 @@ /* * @unittest: 1300 */ -static void -llist_init(struct curl_llist *l, curl_llist_dtor dtor) +void +Curl_llist_init(struct curl_llist *l, curl_llist_dtor dtor) { l->size = 0; l->dtor = dtor; @@ -42,20 +42,6 @@ llist_init(struct curl_llist *l, curl_llist_dtor dtor) l->tail = NULL; } -struct curl_llist * -Curl_llist_alloc(curl_llist_dtor dtor) -{ - struct curl_llist *list; - - list = malloc(sizeof(struct curl_llist)); - if(!list) - return NULL; - - llist_init(list, dtor); - - return list; -} - /* * Curl_llist_insert_next() * @@ -63,18 +49,15 @@ Curl_llist_alloc(curl_llist_dtor dtor) * entry is NULL and the list already has elements, the new one will be * inserted first in the list. * - * Returns: 1 on success and 0 on failure. + * The 'ne' argument should be a pointer into the object to store. * * @unittest: 1300 */ -int +void Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, - const void *p) + const void *p, + struct curl_llist_element *ne) { - struct curl_llist_element *ne = malloc(sizeof(struct curl_llist_element)); - if(!ne) - return 0; - ne->ptr = (void *) p; if(list->size == 0) { list->head = ne; @@ -101,19 +84,18 @@ Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, } ++list->size; - - return 1; } /* * @unittest: 1300 */ -int +void Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, void *user) { + void *ptr; if(e == NULL || list->size == 0) - return 1; + return; if(e == list->head) { list->head = e->next; @@ -124,23 +106,28 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, e->next->prev = NULL; } else { - e->prev->next = e->next; + if(!e->prev) + list->head = e->next; + else + e->prev->next = e->next; + if(!e->next) list->tail = e->prev; else e->next->prev = e->prev; } - list->dtor(user, e->ptr); + ptr = e->ptr; e->ptr = NULL; e->prev = NULL; e->next = NULL; - free(e); --list->size; - return 1; + /* call the dtor() last for when it actually frees the 'e' memory itself */ + if(list->dtor) + list->dtor(user, ptr); } void @@ -149,8 +136,6 @@ Curl_llist_destroy(struct curl_llist *list, void *user) if(list) { while(list->size > 0) Curl_llist_remove(list, list->tail, user); - - free(list); } } @@ -163,13 +148,13 @@ Curl_llist_count(struct curl_llist *list) /* * @unittest: 1300 */ -int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, - struct curl_llist *to_list, - struct curl_llist_element *to_e) +void Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, + struct curl_llist *to_list, + struct curl_llist_element *to_e) { /* Remove element from list */ if(e == NULL || list->size == 0) - return 0; + return; if(e == list->head) { list->head = e->next; @@ -209,6 +194,4 @@ int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, } ++to_list->size; - - return 1; } diff --git a/lib/llist.h b/lib/llist.h index 39ff408..6b644b9 100644 --- a/lib/llist.h +++ b/lib/llist.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -29,7 +29,6 @@ typedef void (*curl_llist_dtor)(void *, void *); struct curl_llist_element { void *ptr; - struct curl_llist_element *prev; struct curl_llist_element *next; }; @@ -37,21 +36,19 @@ struct curl_llist_element { struct curl_llist { struct curl_llist_element *head; struct curl_llist_element *tail; - curl_llist_dtor dtor; - size_t size; }; -struct curl_llist *Curl_llist_alloc(curl_llist_dtor); -int Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *, - const void *); -int Curl_llist_remove(struct curl_llist *, struct curl_llist_element *, - void *); +void Curl_llist_init(struct curl_llist *, curl_llist_dtor); +void Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *, + const void *, struct curl_llist_element *node); +void Curl_llist_remove(struct curl_llist *, struct curl_llist_element *, + void *); size_t Curl_llist_count(struct curl_llist *); void Curl_llist_destroy(struct curl_llist *, void *); -int Curl_llist_move(struct curl_llist *, struct curl_llist_element *, - struct curl_llist *, struct curl_llist_element *); +void Curl_llist_move(struct curl_llist *, struct curl_llist_element *, + struct curl_llist *, struct curl_llist_element *); #endif /* HEADER_CURL_LLIST_H */ diff --git a/lib/makefile.dj b/lib/makefile.dj index 2331afe..8ab2d57 100644 --- a/lib/makefile.dj +++ b/lib/makefile.dj @@ -6,7 +6,7 @@ # \___|\___/|_| \_\_____| # # Copyright (C) 2003 - 2008, Gisle Vanem . -# Copyright (C) 2003 - 2015, Daniel Stenberg, , et al. +# Copyright (C) 2003 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -26,20 +26,19 @@ # DEPEND_PREREQ = curl_config.h -VPATH = vtls +VPATH = vtls vauth TOPDIR = .. include ../packages/DOS/common.dj include Makefile.inc +CFLAGS += -DBUILDING_LIBCURL + SOURCES = $(sort $(CSOURCES)) OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o))) CURL_LIB = libcurl.a -# NOTE: if ../include/curl/curlbuild.h is missing, you're probably building -# this from a git checkout and then you need to run buildconf.bat first. - all: $(OBJ_DIR) curl_config.h $(CURL_LIB) $(CURL_LIB): $(OBJECTS) diff --git a/lib/md4.c b/lib/md4.c index 1bdc9f3..2bb7dcc 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -37,9 +37,10 @@ #include "curl_setup.h" -/* NSS and OS/400 crypto library do not provide the MD4 hash algorithm, so - * that we have a local implementation of it */ -#if defined(USE_NSS) || defined(USE_OS400CRYPTO) +/* The NSS, OS/400 and sometimes mbed TLS crypto libraries do not provide the + * MD4 hash algorithm, so we have a local implementation of it */ +#if defined(USE_NSS) || defined(USE_OS400CRYPTO) || \ + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) #include "curl_md4.h" #include "warnless.h" @@ -89,7 +90,7 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx); */ #if defined(__i386__) || defined(__x86_64__) || defined(__vax__) #define SET(n) \ - (*(MD4_u32plus *)&ptr[(n) * 4]) + (*(MD4_u32plus *)(void *)&ptr[(n) * 4]) #define GET(n) \ SET(n) #else @@ -302,4 +303,5 @@ void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len) MD4_Update(&ctx, input, curlx_uztoui(len)); MD4_Final(output, &ctx); } -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ +#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) || + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) */ diff --git a/lib/md5.c b/lib/md5.c index f2dc16c..80301a1 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -260,7 +260,7 @@ static void MD5_Final(unsigned char *result, MD5_CTX *ctx); */ #if defined(__i386__) || defined(__x86_64__) || defined(__vax__) #define SET(n) \ - (*(MD5_u32plus *)&ptr[(n) * 4]) + (*(MD5_u32plus *)(void *)&ptr[(n) * 4]) #define GET(n) \ SET(n) #else diff --git a/lib/memdebug.c b/lib/memdebug.c index 15e8661..2b81c26 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -35,10 +35,6 @@ #include "curl_memory.h" #include "memdebug.h" -#ifndef HAVE_ASSERT_H -# define assert(x) Curl_nop_stmt -#endif - /* * Until 2011-08-17 libcurl's Memory Tracking feature also performed * automatic malloc and free filling operations using 0xA5 and 0x13 @@ -119,7 +115,8 @@ void curl_memdebug(const char *logname) logfile = stderr; #ifdef MEMDEBUG_LOG_SYNC /* Flush the log file after every line so the log isn't lost in a crash */ - setbuf(logfile, (char *)NULL); + if(logfile) + setbuf(logfile, (char *)NULL); #endif } } @@ -150,7 +147,7 @@ static bool countcheck(const char *func, int line, const char *source) source, line, func); fflush(logfile); /* because it might crash now */ } - SET_ERRNO(ENOMEM); + errno = ENOMEM; return TRUE; /* RETURN ERROR! */ } else @@ -167,13 +164,13 @@ void *curl_domalloc(size_t wantedsize, int line, const char *source) struct memdebug *mem; size_t size; - assert(wantedsize != 0); + DEBUGASSERT(wantedsize != 0); if(countcheck("malloc", line, source)) return NULL; /* alloc at least 64 bytes */ - size = sizeof(struct memdebug)+wantedsize; + size = sizeof(struct memdebug) + wantedsize; mem = (Curl_cmalloc)(size); if(mem) { @@ -196,8 +193,8 @@ void *curl_docalloc(size_t wanted_elements, size_t wanted_size, struct memdebug *mem; size_t size, user_size; - assert(wanted_elements != 0); - assert(wanted_size != 0); + DEBUGASSERT(wanted_elements != 0); + DEBUGASSERT(wanted_size != 0); if(countcheck("calloc", line, source)) return NULL; @@ -223,20 +220,20 @@ char *curl_dostrdup(const char *str, int line, const char *source) char *mem; size_t len; - assert(str != NULL); + DEBUGASSERT(str != NULL); if(countcheck("strdup", line, source)) return NULL; - len=strlen(str)+1; + len = strlen(str) + 1; - mem=curl_domalloc(len, 0, NULL); /* NULL prevents logging */ + mem = curl_domalloc(len, 0, NULL); /* NULL prevents logging */ if(mem) memcpy(mem, str, len); if(source) curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n", - source, line, (void *)str, len, (void *)mem); + source, line, (const void *)str, len, (const void *)mem); return mem; } @@ -247,7 +244,7 @@ wchar_t *curl_dowcsdup(const wchar_t *str, int line, const char *source) wchar_t *mem; size_t wsiz, bsiz; - assert(str != NULL); + DEBUGASSERT(str != NULL); if(countcheck("wcsdup", line, source)) return NULL; @@ -272,11 +269,11 @@ wchar_t *curl_dowcsdup(const wchar_t *str, int line, const char *source) void *curl_dorealloc(void *ptr, size_t wantedsize, int line, const char *source) { - struct memdebug *mem=NULL; + struct memdebug *mem = NULL; - size_t size = sizeof(struct memdebug)+wantedsize; + size_t size = sizeof(struct memdebug) + wantedsize; - assert(wantedsize != 0); + DEBUGASSERT(wantedsize != 0); if(countcheck("realloc", line, source)) return NULL; @@ -346,7 +343,12 @@ curl_socket_t curl_socket(int domain, int type, int protocol, "FD %s:%d socket() = %ld\n" : "FD %s:%d socket() = %zd\n"; - curl_socket_t sockfd = socket(domain, type, protocol); + curl_socket_t sockfd; + + if(countcheck("socket", line, source)) + return CURL_SOCKET_BAD; + + sockfd = socket(domain, type, protocol); if(source && (sockfd != CURL_SOCKET_BAD)) curl_memlog(fmt, source, line, sockfd); @@ -354,6 +356,35 @@ curl_socket_t curl_socket(int domain, int type, int protocol, return sockfd; } +SEND_TYPE_RETV curl_dosend(SEND_TYPE_ARG1 sockfd, + SEND_QUAL_ARG2 SEND_TYPE_ARG2 buf, + SEND_TYPE_ARG3 len, SEND_TYPE_ARG4 flags, int line, + const char *source) +{ + SEND_TYPE_RETV rc; + if(countcheck("send", line, source)) + return -1; + rc = send(sockfd, buf, len, flags); + if(source) + curl_memlog("SEND %s:%d send(%lu) = %ld\n", + source, line, (unsigned long)len, (long)rc); + return rc; +} + +RECV_TYPE_RETV curl_dorecv(RECV_TYPE_ARG1 sockfd, RECV_TYPE_ARG2 buf, + RECV_TYPE_ARG3 len, RECV_TYPE_ARG4 flags, int line, + const char *source) +{ + RECV_TYPE_RETV rc; + if(countcheck("recv", line, source)) + return -1; + rc = recv(sockfd, buf, len, flags); + if(source) + curl_memlog("RECV %s:%d recv(%lu) = %ld\n", + source, line, (unsigned long)len, (long)rc); + return rc; +} + #ifdef HAVE_SOCKETPAIR int curl_socketpair(int domain, int type, int protocol, curl_socket_t socket_vector[2], @@ -410,7 +441,7 @@ void curl_mark_sclose(curl_socket_t sockfd, int line, const char *source) /* this is our own defined way to close sockets on *ALL* platforms */ int curl_sclose(curl_socket_t sockfd, int line, const char *source) { - int res=sclose(sockfd); + int res = sclose(sockfd); curl_mark_sclose(sockfd, line, source); return res; } @@ -418,7 +449,7 @@ int curl_sclose(curl_socket_t sockfd, int line, const char *source) FILE *curl_fopen(const char *file, const char *mode, int line, const char *source) { - FILE *res=fopen(file, mode); + FILE *res = fopen(file, mode); if(source) curl_memlog("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n", @@ -431,7 +462,7 @@ FILE *curl_fopen(const char *file, const char *mode, FILE *curl_fdopen(int filedes, const char *mode, int line, const char *source) { - FILE *res=fdopen(filedes, mode); + FILE *res = fdopen(filedes, mode); if(source) curl_memlog("FILE %s:%d fdopen(\"%d\",\"%s\") = %p\n", @@ -445,9 +476,9 @@ int curl_fclose(FILE *file, int line, const char *source) { int res; - assert(file != NULL); + DEBUGASSERT(file != NULL); - res=fclose(file); + res = fclose(file); if(source) curl_memlog("FILE %s:%d fclose(%p)\n", @@ -458,7 +489,7 @@ int curl_fclose(FILE *file, int line, const char *source) #define LOGLINE_BUFSIZE 1024 -/* this does the writting to the memory tracking log file */ +/* this does the writing to the memory tracking log file */ void curl_memlog(const char *format, ...) { char *buf; @@ -480,7 +511,7 @@ void curl_memlog(const char *format, ...) nchars = LOGLINE_BUFSIZE - 1; if(nchars > 0) - fwrite(buf, 1, nchars, logfile); + fwrite(buf, 1, (size_t)nchars, logfile); (Curl_cfree)(buf); } diff --git a/lib/memdebug.h b/lib/memdebug.h index 835dab3..6fb8b68 100644 --- a/lib/memdebug.h +++ b/lib/memdebug.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -66,6 +66,17 @@ CURL_EXTERN int curl_socketpair(int domain, int type, int protocol, int line, const char *source); #endif +/* send/receive sockets */ +CURL_EXTERN SEND_TYPE_RETV curl_dosend(SEND_TYPE_ARG1 sockfd, + SEND_QUAL_ARG2 SEND_TYPE_ARG2 buf, + SEND_TYPE_ARG3 len, + SEND_TYPE_ARG4 flags, int line, + const char *source); +CURL_EXTERN RECV_TYPE_RETV curl_dorecv(RECV_TYPE_ARG1 sockfd, + RECV_TYPE_ARG2 buf, RECV_TYPE_ARG3 len, + RECV_TYPE_ARG4 flags, int line, + const char *source); + /* FILE functions */ CURL_EXTERN FILE *curl_fopen(const char *file, const char *mode, int line, const char *source); @@ -84,6 +95,8 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source); #define calloc(nbelem,size) curl_docalloc(nbelem, size, __LINE__, __FILE__) #define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__) #define free(ptr) curl_dofree(ptr, __LINE__, __FILE__) +#define send(a,b,c,d) curl_dosend(a,b,c,d, __LINE__, __FILE__) +#define recv(a,b,c,d) curl_dorecv(a,b,c,d, __LINE__, __FILE__) #ifdef WIN32 # ifdef UNICODE diff --git a/lib/mime.c b/lib/mime.c new file mode 100644 index 0000000..0ccb346 --- /dev/null +++ b/lib/mime.c @@ -0,0 +1,1982 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" + +#include + +#include "mime.h" +#include "non-ascii.h" +#include "urldata.h" +#include "sendf.h" + +#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) || \ + !defined(CURL_DISABLE_IMAP) + +#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME) +#include +#endif + +#include "rand.h" +#include "slist.h" +#include "strcase.h" +/* The last 3 #include files should be in this order */ +#include "curl_printf.h" +#include "curl_memory.h" +#include "memdebug.h" + +#ifdef WIN32 +# ifndef R_OK +# define R_OK 4 +# endif +#endif + + +#define READ_ERROR ((size_t) -1) + +/* Encoders. */ +static size_t encoder_nop_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part); +static curl_off_t encoder_nop_size(curl_mimepart *part); +static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part); +static size_t encoder_base64_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part); +static curl_off_t encoder_base64_size(curl_mimepart *part); +static size_t encoder_qp_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part); +static curl_off_t encoder_qp_size(curl_mimepart *part); + +static const mime_encoder encoders[] = { + {"binary", encoder_nop_read, encoder_nop_size}, + {"8bit", encoder_nop_read, encoder_nop_size}, + {"7bit", encoder_7bit_read, encoder_nop_size}, + {"base64", encoder_base64_read, encoder_base64_size}, + {"quoted-printable", encoder_qp_read, encoder_qp_size}, + {ZERO_NULL, ZERO_NULL, ZERO_NULL} +}; + +/* Base64 encoding table */ +static const char base64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +/* Quoted-printable character class table. + * + * We cannot rely on ctype functions since quoted-printable input data + * is assumed to be ascii-compatible, even on non-ascii platforms. */ +#define QP_OK 1 /* Can be represented by itself. */ +#define QP_SP 2 /* Space or tab. */ +#define QP_CR 3 /* Carriage return. */ +#define QP_LF 4 /* Line-feed. */ +static const unsigned char qp_class[] = { + 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 07 */ + 0, QP_SP, QP_LF, 0, 0, QP_CR, 0, 0, /* 08 - 0F */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 17 */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 18 - 1F */ + QP_SP, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 20 - 27 */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 28 - 2F */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 30 - 37 */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0 , QP_OK, QP_OK, /* 38 - 3F */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 40 - 47 */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 48 - 4F */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 50 - 57 */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 58 - 5F */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 60 - 67 */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 68 - 6F */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, /* 70 - 77 */ + QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0, /* 78 - 7F */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* F0 - FF */ +}; + + +/* Binary --> hexadecimal ASCII table. */ +static const char aschex[] = + "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x41\x42\x43\x44\x45\x46"; + + + +#ifndef __VMS +#define filesize(name, stat_data) (stat_data.st_size) +#define fopen_read fopen + +#else + +#include +/* + * get_vms_file_size does what it takes to get the real size of the file + * + * For fixed files, find out the size of the EOF block and adjust. + * + * For all others, have to read the entire file in, discarding the contents. + * Most posted text files will be small, and binary files like zlib archives + * and CD/DVD images should be either a STREAM_LF format or a fixed format. + * + */ +curl_off_t VmsRealFileSize(const char *name, + const struct_stat *stat_buf) +{ + char buffer[8192]; + curl_off_t count; + int ret_stat; + FILE * file; + + file = fopen(name, FOPEN_READTEXT); /* VMS */ + if(file == NULL) + return 0; + + count = 0; + ret_stat = 1; + while(ret_stat > 0) { + ret_stat = fread(buffer, 1, sizeof(buffer), file); + if(ret_stat != 0) + count += ret_stat; + } + fclose(file); + + return count; +} + +/* + * + * VmsSpecialSize checks to see if the stat st_size can be trusted and + * if not to call a routine to get the correct size. + * + */ +static curl_off_t VmsSpecialSize(const char *name, + const struct_stat *stat_buf) +{ + switch(stat_buf->st_fab_rfm) { + case FAB$C_VAR: + case FAB$C_VFC: + return VmsRealFileSize(name, stat_buf); + break; + default: + return stat_buf->st_size; + } +} + +#define filesize(name, stat_data) VmsSpecialSize(name, &stat_data) + +/* + * vmsfopenread + * + * For upload to work as expected on VMS, different optional + * parameters must be added to the fopen command based on + * record format of the file. + * + */ +static FILE * vmsfopenread(const char *file, const char *mode) +{ + struct_stat statbuf; + int result; + + result = stat(file, &statbuf); + + switch(statbuf.st_fab_rfm) { + case FAB$C_VAR: + case FAB$C_VFC: + case FAB$C_STMCR: + return fopen(file, FOPEN_READTEXT); /* VMS */ + break; + default: + return fopen(file, FOPEN_READTEXT, "rfm=stmlf", "ctx=stm"); + } +} + +#define fopen_read vmsfopenread +#endif + + +#ifndef HAVE_BASENAME +/* + (Quote from The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 + Edition) + + The basename() function shall take the pathname pointed to by path and + return a pointer to the final component of the pathname, deleting any + trailing '/' characters. + + If the string pointed to by path consists entirely of the '/' character, + basename() shall return a pointer to the string "/". If the string pointed + to by path is exactly "//", it is implementation-defined whether '/' or "//" + is returned. + + If path is a null pointer or points to an empty string, basename() shall + return a pointer to the string ".". + + The basename() function may modify the string pointed to by path, and may + return a pointer to static storage that may then be overwritten by a + subsequent call to basename(). + + The basename() function need not be reentrant. A function that is not + required to be reentrant is not required to be thread-safe. + +*/ +static char *Curl_basename(char *path) +{ + /* Ignore all the details above for now and make a quick and simple + implementaion here */ + char *s1; + char *s2; + + s1 = strrchr(path, '/'); + s2 = strrchr(path, '\\'); + + if(s1 && s2) { + path = (s1 > s2? s1 : s2) + 1; + } + else if(s1) + path = s1 + 1; + else if(s2) + path = s2 + 1; + + return path; +} + +#define basename(x) Curl_basename((x)) +#endif + + +/* Set readback state. */ +static void mimesetstate(mime_state *state, enum mimestate tok, void *ptr) +{ + state->state = tok; + state->ptr = ptr; + state->offset = 0; +} + + +/* Escape header string into allocated memory. */ +static char *escape_string(const char *src) +{ + size_t bytecount = 0; + size_t i; + char *dst; + + for(i = 0; src[i]; i++) + if(src[i] == '"' || src[i] == '\\') + bytecount++; + + bytecount += i; + dst = malloc(bytecount + 1); + if(!dst) + return NULL; + + for(i = 0; *src; src++) { + if(*src == '"' || *src == '\\') + dst[i++] = '\\'; + dst[i++] = *src; + } + + dst[i] = '\0'; + return dst; +} + +/* Check if header matches. */ +static char *match_header(struct curl_slist *hdr, const char *lbl, size_t len) +{ + char *value = NULL; + + if(strncasecompare(hdr->data, lbl, len) && hdr->data[len] == ':') + for(value = hdr->data + len + 1; *value == ' '; value++) + ; + return value; +} + +/* Get a header from an slist. */ +static char *search_header(struct curl_slist *hdrlist, const char *hdr) +{ + size_t len = strlen(hdr); + char *value = NULL; + + for(; !value && hdrlist; hdrlist = hdrlist->next) + value = match_header(hdrlist, hdr, len); + + return value; +} + +static char *strippath(const char *fullfile) +{ + char *filename; + char *base; + filename = strdup(fullfile); /* duplicate since basename() may ruin the + buffer it works on */ + if(!filename) + return NULL; + base = strdup(basename(filename)); + + free(filename); /* free temporary buffer */ + + return base; /* returns an allocated string or NULL ! */ +} + +/* Initialize data encoder state. */ +static void cleanup_encoder_state(mime_encoder_state *p) +{ + p->pos = 0; + p->bufbeg = 0; + p->bufend = 0; +} + + +/* Dummy encoder. This is used for 8bit and binary content encodings. */ +static size_t encoder_nop_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part) +{ + mime_encoder_state *st = &part->encstate; + size_t insize = st->bufend - st->bufbeg; + + (void) ateof; + + if(size > insize) + size = insize; + if(size) + memcpy(buffer, st->buf, size); + st->bufbeg += size; + return size; +} + +static curl_off_t encoder_nop_size(curl_mimepart *part) +{ + return part->datasize; +} + + +/* 7bit encoder: the encoder is just a data validity check. */ +static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part) +{ + mime_encoder_state *st = &part->encstate; + size_t cursize = st->bufend - st->bufbeg; + + (void) ateof; + + if(size > cursize) + size = cursize; + + for(cursize = 0; cursize < size; cursize++) { + *buffer = st->buf[st->bufbeg]; + if(*buffer++ & 0x80) + return cursize? cursize: READ_ERROR; + st->bufbeg++; + } + + return cursize; +} + + +/* Base64 content encoder. */ +static size_t encoder_base64_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part) +{ + mime_encoder_state *st = &part->encstate; + size_t cursize = 0; + int i; + char *ptr = buffer; + + while(st->bufbeg < st->bufend) { + /* Line full ? */ + if(st->pos > MAX_ENCODED_LINE_LENGTH - 4) { + /* Yes, we need 2 characters for CRLF. */ + if(size < 2) + break; + *ptr++ = '\r'; + *ptr++ = '\n'; + st->pos = 0; + cursize += 2; + size -= 2; + } + + /* Be sure there is enough space and input data for a base64 group. */ + if(size < 4 || st->bufend - st->bufbeg < 3) + break; + + /* Encode three bytes as four characters. */ + i = st->buf[st->bufbeg++] & 0xFF; + i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF); + i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF); + *ptr++ = base64[(i >> 18) & 0x3F]; + *ptr++ = base64[(i >> 12) & 0x3F]; + *ptr++ = base64[(i >> 6) & 0x3F]; + *ptr++ = base64[i & 0x3F]; + cursize += 4; + st->pos += 4; + size -= 4; + } + + /* If at eof, we have to flush the buffered data. */ + if(ateof && size >= 4) { + /* Buffered data size can only be 0, 1 or 2. */ + ptr[2] = ptr[3] = '='; + i = 0; + switch(st->bufend - st->bufbeg) { + case 2: + i = (st->buf[st->bufbeg + 1] & 0xFF) << 8; + /* FALLTHROUGH */ + case 1: + i |= (st->buf[st->bufbeg] & 0xFF) << 16; + ptr[0] = base64[(i >> 18) & 0x3F]; + ptr[1] = base64[(i >> 12) & 0x3F]; + if(++st->bufbeg != st->bufend) { + ptr[2] = base64[(i >> 6) & 0x3F]; + st->bufbeg++; + } + cursize += 4; + st->pos += 4; + break; + } + } + +#ifdef CURL_DOES_CONVERSIONS + /* This is now textual data, Convert character codes. */ + if(part->easy && cursize) { + CURLcode result = Curl_convert_to_network(part->easy, buffer, cursize); + if(result) + return READ_ERROR; + } +#endif + + return cursize; +} + +static curl_off_t encoder_base64_size(curl_mimepart *part) +{ + curl_off_t size = part->datasize; + + if(size <= 0) + return size; /* Unknown size or no data. */ + + /* Compute base64 character count. */ + size = 4 * (1 + (size - 1) / 3); + + /* Effective character count must include CRLFs. */ + return size + 2 * ((size - 1) / MAX_ENCODED_LINE_LENGTH); +} + + +/* Quoted-printable lookahead. + * + * Check if a CRLF or end of data is in input buffer at current position + n. + * Return -1 if more data needed, 1 if CRLF or end of data, else 0. + */ +static int qp_lookahead_eol(mime_encoder_state *st, int ateof, size_t n) +{ + n += st->bufbeg; + if(n >= st->bufend && ateof) + return 1; + if(n + 2 > st->bufend) + return ateof? 0: -1; + if(qp_class[st->buf[n] & 0xFF] == QP_CR && + qp_class[st->buf[n + 1] & 0xFF] == QP_LF) + return 1; + return 0; +} + +/* Quoted-printable encoder. */ +static size_t encoder_qp_read(char *buffer, size_t size, bool ateof, + curl_mimepart *part) +{ + mime_encoder_state *st = &part->encstate; + char *ptr = buffer; + size_t cursize = 0; + int i; + size_t len; + size_t consumed; + int softlinebreak; + char buf[4]; + + /* On all platforms, input is supposed to be ASCII compatible: for this + reason, we use hexadecimal ASCII codes in this function rather than + character constants that can be interpreted as non-ascii on some + platforms. Preserve ASCII encoding on output too. */ + while(st->bufbeg < st->bufend) { + len = 1; + consumed = 1; + i = st->buf[st->bufbeg]; + buf[0] = (char) i; + buf[1] = aschex[(i >> 4) & 0xF]; + buf[2] = aschex[i & 0xF]; + + switch(qp_class[st->buf[st->bufbeg] & 0xFF]) { + case QP_OK: /* Not a special character. */ + break; + case QP_SP: /* Space or tab. */ + /* Spacing must be escaped if followed by CRLF. */ + switch(qp_lookahead_eol(st, ateof, 1)) { + case -1: /* More input data needed. */ + return cursize; + case 0: /* No encoding needed. */ + break; + default: /* CRLF after space or tab. */ + buf[0] = '\x3D'; /* '=' */ + len = 3; + break; + } + break; + case QP_CR: /* Carriage return. */ + /* If followed by a line-feed, output the CRLF pair. + Else escape it. */ + switch(qp_lookahead_eol(st, ateof, 0)) { + case -1: /* Need more data. */ + return cursize; + case 1: /* CRLF found. */ + buf[len++] = '\x0A'; /* Append '\n'. */ + consumed = 2; + break; + default: /* Not followed by LF: escape. */ + buf[0] = '\x3D'; /* '=' */ + len = 3; + break; + } + break; + default: /* Character must be escaped. */ + buf[0] = '\x3D'; /* '=' */ + len = 3; + break; + } + + /* Be sure the encoded character fits within maximum line length. */ + if(buf[len - 1] != '\x0A') { /* '\n' */ + softlinebreak = st->pos + len > MAX_ENCODED_LINE_LENGTH; + if(!softlinebreak && st->pos + len == MAX_ENCODED_LINE_LENGTH) { + /* We may use the current line only if end of data or followed by + a CRLF. */ + switch(qp_lookahead_eol(st, ateof, consumed)) { + case -1: /* Need more data. */ + return cursize; + break; + case 0: /* Not followed by a CRLF. */ + softlinebreak = 1; + break; + } + } + if(softlinebreak) { + strcpy(buf, "\x3D\x0D\x0A"); /* "=\r\n" */ + len = 3; + consumed = 0; + } + } + + /* If the output buffer would overflow, do not store. */ + if(len > size) + break; + + /* Append to output buffer. */ + memcpy(ptr, buf, len); + cursize += len; + ptr += len; + size -= len; + st->pos += len; + if(buf[len - 1] == '\x0A') /* '\n' */ + st->pos = 0; + st->bufbeg += consumed; + } + + return cursize; +} + +static curl_off_t encoder_qp_size(curl_mimepart *part) +{ + /* Determining the size can only be done by reading the data: unless the + data size is 0, we return it as unknown (-1). */ + return part->datasize? -1: 0; +} + + +/* In-memory data callbacks. */ +/* Argument is a pointer to the mime part. */ +static size_t mime_mem_read(char *buffer, size_t size, size_t nitems, + void *instream) +{ + curl_mimepart *part = (curl_mimepart *) instream; + size_t sz = (size_t) part->datasize - part->state.offset; + (void) size; /* Always 1.*/ + + if(sz > nitems) + sz = nitems; + + if(sz) + memcpy(buffer, (char *) &part->data[part->state.offset], sz); + + part->state.offset += sz; + return sz; +} + +static int mime_mem_seek(void *instream, curl_off_t offset, int whence) +{ + curl_mimepart *part = (curl_mimepart *) instream; + + switch(whence) { + case SEEK_CUR: + offset += part->state.offset; + break; + case SEEK_END: + offset += part->datasize; + break; + } + + if(offset < 0 || offset > part->datasize) + return CURL_SEEKFUNC_FAIL; + + part->state.offset = (size_t) offset; + return CURL_SEEKFUNC_OK; +} + +static void mime_mem_free(void *ptr) +{ + Curl_safefree(((curl_mimepart *) ptr)->data); +} + + +/* Named file callbacks. */ +/* Argument is a pointer to the mime part. */ +static int mime_open_file(curl_mimepart * part) +{ + /* Open a MIMEKIND_FILE part. */ + + if(part->fp) + return 0; + part->fp = fopen_read(part->data, "rb"); + return part->fp? 0: -1; +} + +static size_t mime_file_read(char *buffer, size_t size, size_t nitems, + void *instream) +{ + curl_mimepart *part = (curl_mimepart *) instream; + + if(mime_open_file(part)) + return READ_ERROR; + + return fread(buffer, size, nitems, part->fp); +} + +static int mime_file_seek(void *instream, curl_off_t offset, int whence) +{ + curl_mimepart *part = (curl_mimepart *) instream; + + if(whence == SEEK_SET && !offset && !part->fp) + return CURL_SEEKFUNC_OK; /* Not open: implicitly already at BOF. */ + + if(mime_open_file(part)) + return CURL_SEEKFUNC_FAIL; + + return fseek(part->fp, (long) offset, whence)? + CURL_SEEKFUNC_CANTSEEK: CURL_SEEKFUNC_OK; +} + +static void mime_file_free(void *ptr) +{ + curl_mimepart *part = (curl_mimepart *) ptr; + + if(part->fp) { + fclose(part->fp); + part->fp = NULL; + } + Curl_safefree(part->data); + part->data = NULL; +} + + +/* Subparts callbacks. */ +/* Argument is a pointer to the mime structure. */ + +/* Readback a byte string segment. */ +static size_t readback_bytes(mime_state *state, + char *buffer, size_t bufsize, + const char *bytes, size_t numbytes, + const char *trail) +{ + size_t sz; + + if(numbytes > state->offset) { + sz = numbytes - state->offset; + bytes += state->offset; + } + else { + size_t tsz = strlen(trail); + + sz = state->offset - numbytes; + if(sz >= tsz) + return 0; + bytes = trail + sz; + sz = tsz - sz; + } + + if(sz > bufsize) + sz = bufsize; + + memcpy(buffer, bytes, sz); + state->offset += sz; + return sz; +} + +/* Read a non-encoded part content. */ +static size_t read_part_content(curl_mimepart *part, + char *buffer, size_t bufsize) +{ + size_t sz = 0; + + if(part->readfunc) + sz = part->readfunc(buffer, 1, bufsize, part->arg); + return sz; +} + +/* Read and encode part content. */ +static size_t read_encoded_part_content(curl_mimepart *part, + char *buffer, size_t bufsize) +{ + mime_encoder_state *st = &part->encstate; + size_t cursize = 0; + size_t sz; + bool ateof = FALSE; + + while(bufsize) { + if(st->bufbeg < st->bufend || ateof) { + /* Encode buffered data. */ + sz = part->encoder->encodefunc(buffer, bufsize, ateof, part); + switch(sz) { + case 0: + if(ateof) + return cursize; + break; + case CURL_READFUNC_ABORT: + case CURL_READFUNC_PAUSE: + case READ_ERROR: + return cursize? cursize: sz; + default: + cursize += sz; + buffer += sz; + bufsize -= sz; + continue; + } + } + + /* We need more data in input buffer. */ + if(st->bufbeg) { + size_t len = st->bufend - st->bufbeg; + + if(len) + memmove(st->buf, st->buf + st->bufbeg, len); + st->bufbeg = 0; + st->bufend = len; + } + if(st->bufend >= sizeof st->buf) + return cursize? cursize: READ_ERROR; /* Buffer full. */ + sz = read_part_content(part, st->buf + st->bufend, + sizeof st->buf - st->bufend); + switch(sz) { + case 0: + ateof = TRUE; + break; + case CURL_READFUNC_ABORT: + case CURL_READFUNC_PAUSE: + case READ_ERROR: + return cursize? cursize: sz; + default: + st->bufend += sz; + break; + } + } + + return cursize; +} + +/* Readback a mime part. */ +static size_t readback_part(curl_mimepart *part, + char *buffer, size_t bufsize) +{ + size_t cursize = 0; + size_t sz; + struct curl_slist *hdr; +#ifdef CURL_DOES_CONVERSIONS + char *convbuf = buffer; +#endif + + /* Readback from part. */ + + while(bufsize) { + sz = 0; + hdr = (struct curl_slist *) part->state.ptr; + switch(part->state.state) { + case MIMESTATE_BEGIN: + mimesetstate(&part->state, part->flags & MIME_BODY_ONLY? MIMESTATE_BODY: + MIMESTATE_CURLHEADERS, part->curlheaders); + break; + case MIMESTATE_USERHEADERS: + if(!hdr) { + mimesetstate(&part->state, MIMESTATE_EOH, NULL); + break; + } + if(match_header(hdr, "Content-Type", 12)) { + mimesetstate(&part->state, MIMESTATE_USERHEADERS, hdr->next); + break; + } + /* FALLTHROUGH */ + case MIMESTATE_CURLHEADERS: + if(!hdr) + mimesetstate(&part->state, MIMESTATE_USERHEADERS, part->userheaders); + else { + sz = readback_bytes(&part->state, buffer, bufsize, + hdr->data, strlen(hdr->data), "\r\n"); + if(!sz) + mimesetstate(&part->state, part->state.state, hdr->next); + } + break; + case MIMESTATE_EOH: + sz = readback_bytes(&part->state, buffer, bufsize, "\r\n", 2, ""); + if(!sz) + mimesetstate(&part->state, MIMESTATE_BODY, NULL); + break; + case MIMESTATE_BODY: +#ifdef CURL_DOES_CONVERSIONS + if(part->easy && convbuf < buffer) { + CURLcode result = Curl_convert_to_network(part->easy, convbuf, + buffer - convbuf); + if(result) + return READ_ERROR; + convbuf = buffer; + } +#endif + cleanup_encoder_state(&part->encstate); + mimesetstate(&part->state, MIMESTATE_CONTENT, NULL); + break; + case MIMESTATE_CONTENT: + if(part->encoder) + sz = read_encoded_part_content(part, buffer, bufsize); + else + sz = read_part_content(part, buffer, bufsize); + switch(sz) { + case 0: + mimesetstate(&part->state, MIMESTATE_END, NULL); + /* Try sparing open file descriptors. */ + if(part->kind == MIMEKIND_FILE && part->fp) { + fclose(part->fp); + part->fp = NULL; + } + /* FALLTHROUGH */ + case CURL_READFUNC_ABORT: + case CURL_READFUNC_PAUSE: + case READ_ERROR: + return cursize? cursize: sz; + } + break; + case MIMESTATE_END: + return cursize; + default: + break; /* Other values not in part state. */ + } + + /* Bump buffer and counters according to read size. */ + cursize += sz; + buffer += sz; + bufsize -= sz; + } + +#ifdef CURL_DOES_CONVERSIONS + if(part->easy && convbuf < buffer && + part->state.state < MIMESTATE_BODY) { + CURLcode result = Curl_convert_to_network(part->easy, convbuf, + buffer - convbuf); + if(result) + return READ_ERROR; + } +#endif + + return cursize; +} + +/* Readback from mime. */ +static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems, + void *instream) +{ + curl_mime *mime = (curl_mime *) instream; + size_t cursize = 0; + size_t sz; + curl_mimepart *part; +#ifdef CURL_DOES_CONVERSIONS + char *convbuf = buffer; +#endif + + (void) size; /* Always 1. */ + + while(nitems) { + sz = 0; + part = mime->state.ptr; + switch(mime->state.state) { + case MIMESTATE_BEGIN: + case MIMESTATE_BODY: +#ifdef CURL_DOES_CONVERSIONS + convbuf = buffer; +#endif + mimesetstate(&mime->state, MIMESTATE_BOUNDARY1, mime->firstpart); + /* The first boundary always follows the header termination empty line, + so is always preceded by a CRLK. We can then spare 2 characters + by skipping the leading CRLF in boundary. */ + mime->state.offset += 2; + break; + case MIMESTATE_BOUNDARY1: + sz = readback_bytes(&mime->state, buffer, nitems, "\r\n--", 4, ""); + if(!sz) + mimesetstate(&mime->state, MIMESTATE_BOUNDARY2, part); + break; + case MIMESTATE_BOUNDARY2: + sz = readback_bytes(&mime->state, buffer, nitems, mime->boundary, + strlen(mime->boundary), part? "\r\n": "--\r\n"); + if(!sz) { +#ifdef CURL_DOES_CONVERSIONS + if(mime->easy && convbuf < buffer) { + CURLcode result = Curl_convert_to_network(mime->easy, convbuf, + buffer - convbuf); + if(result) + return READ_ERROR; + convbuf = buffer; + } +#endif + mimesetstate(&mime->state, MIMESTATE_CONTENT, part); + } + break; + case MIMESTATE_CONTENT: + if(!part) { + mimesetstate(&mime->state, MIMESTATE_END, NULL); + break; + } + sz = readback_part(part, buffer, nitems); + switch(sz) { + case CURL_READFUNC_ABORT: + case CURL_READFUNC_PAUSE: + case READ_ERROR: + return cursize? cursize: sz; + case 0: +#ifdef CURL_DOES_CONVERSIONS + convbuf = buffer; +#endif + mimesetstate(&mime->state, MIMESTATE_BOUNDARY1, part->nextpart); + break; + } + break; + case MIMESTATE_END: + return cursize; + default: + break; /* other values not used in mime state. */ + } + + /* Bump buffer and counters according to read size. */ + cursize += sz; + buffer += sz; + nitems -= sz; + } + +#ifdef CURL_DOES_CONVERSIONS + if(mime->easy && convbuf < buffer && + mime->state.state <= MIMESTATE_CONTENT) { + CURLcode result = Curl_convert_to_network(mime->easy, convbuf, + buffer - convbuf); + if(result) + return READ_ERROR; + } +#endif + + return cursize; +} + +static int mime_part_rewind(curl_mimepart *part) +{ + int res = CURL_SEEKFUNC_OK; + enum mimestate targetstate = MIMESTATE_BEGIN; + + if(part->flags & MIME_BODY_ONLY) + targetstate = MIMESTATE_BODY; + cleanup_encoder_state(&part->encstate); + if(part->state.state > targetstate) { + res = CURL_SEEKFUNC_CANTSEEK; + if(part->seekfunc) { + res = part->seekfunc(part->arg, (curl_off_t) 0, SEEK_SET); + switch(res) { + case CURL_SEEKFUNC_OK: + case CURL_SEEKFUNC_FAIL: + case CURL_SEEKFUNC_CANTSEEK: + break; + case -1: /* For fseek() error. */ + res = CURL_SEEKFUNC_CANTSEEK; + break; + default: + res = CURL_SEEKFUNC_FAIL; + break; + } + } + } + + if(res == CURL_SEEKFUNC_OK) + mimesetstate(&part->state, targetstate, NULL); + + return res; +} + +static int mime_subparts_seek(void *instream, curl_off_t offset, int whence) +{ + curl_mime *mime = (curl_mime *) instream; + curl_mimepart *part; + int result = CURL_SEEKFUNC_OK; + int res; + + if(whence != SEEK_SET || offset) + return CURL_SEEKFUNC_CANTSEEK; /* Only support full rewind. */ + + if(mime->state.state == MIMESTATE_BEGIN) + return CURL_SEEKFUNC_OK; /* Already rewound. */ + + for(part = mime->firstpart; part; part = part->nextpart) { + res = mime_part_rewind(part); + if(res != CURL_SEEKFUNC_OK) + result = res; + } + + if(result == CURL_SEEKFUNC_OK) + mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL); + + return result; +} + +/* Release part content. */ +static void cleanup_part_content(curl_mimepart *part) +{ + if(part->freefunc) + part->freefunc(part->arg); + + part->readfunc = NULL; + part->seekfunc = NULL; + part->freefunc = NULL; + part->arg = (void *) part; /* Defaults to part itself. */ + part->data = NULL; + part->fp = NULL; + part->datasize = (curl_off_t) 0; /* No size yet. */ + cleanup_encoder_state(&part->encstate); + part->kind = MIMEKIND_NONE; +} + +static void mime_subparts_free(void *ptr) +{ + curl_mime *mime = (curl_mime *) ptr; + + if(mime && mime->parent) { + mime->parent->freefunc = NULL; /* Be sure we won't be called again. */ + cleanup_part_content(mime->parent); /* Avoid dangling pointer in part. */ + } + curl_mime_free(mime); +} + +/* Do not free subparts: unbind them. This is used for the top level only. */ +static void mime_subparts_unbind(void *ptr) +{ + curl_mime *mime = (curl_mime *) ptr; + + if(mime && mime->parent) { + mime->parent->freefunc = NULL; /* Be sure we won't be called again. */ + cleanup_part_content(mime->parent); /* Avoid dangling pointer in part. */ + mime->parent = NULL; + } +} + + +void Curl_mime_cleanpart(curl_mimepart *part) +{ + cleanup_part_content(part); + curl_slist_free_all(part->curlheaders); + if(part->flags & MIME_USERHEADERS_OWNER) + curl_slist_free_all(part->userheaders); + Curl_safefree(part->mimetype); + Curl_safefree(part->name); + Curl_safefree(part->filename); + Curl_mime_initpart(part, part->easy); +} + +/* Recursively delete a mime handle and its parts. */ +void curl_mime_free(curl_mime *mime) +{ + curl_mimepart *part; + + if(mime) { + mime_subparts_unbind(mime); /* Be sure it's not referenced anymore. */ + while(mime->firstpart) { + part = mime->firstpart; + mime->firstpart = part->nextpart; + Curl_mime_cleanpart(part); + free(part); + } + + free(mime->boundary); + free(mime); + } +} + +CURLcode Curl_mime_duppart(curl_mimepart *dst, const curl_mimepart *src) +{ + curl_mime *mime; + curl_mimepart *d; + const curl_mimepart *s; + CURLcode res = CURLE_OK; + + /* Duplicate content. */ + switch(src->kind) { + case MIMEKIND_NONE: + break; + case MIMEKIND_DATA: + res = curl_mime_data(dst, src->data, (size_t) src->datasize); + break; + case MIMEKIND_FILE: + res = curl_mime_filedata(dst, src->data); + /* Do not abort duplication if file is not readable. */ + if(res == CURLE_READ_ERROR) + res = CURLE_OK; + break; + case MIMEKIND_CALLBACK: + res = curl_mime_data_cb(dst, src->datasize, src->readfunc, + src->seekfunc, src->freefunc, src->arg); + break; + case MIMEKIND_MULTIPART: + /* No one knows about the cloned subparts, thus always attach ownership + to the part. */ + mime = curl_mime_init(dst->easy); + res = mime? curl_mime_subparts(dst, mime): CURLE_OUT_OF_MEMORY; + + /* Duplicate subparts. */ + for(s = ((curl_mime *) src->arg)->firstpart; !res && s; s = s->nextpart) { + d = curl_mime_addpart(mime); + res = d? Curl_mime_duppart(d, s): CURLE_OUT_OF_MEMORY; + } + break; + default: /* Invalid kind: should not occur. */ + res = CURLE_BAD_FUNCTION_ARGUMENT; /* Internal error? */ + break; + } + + /* Duplicate headers. */ + if(!res && src->userheaders) { + struct curl_slist *hdrs = Curl_slist_duplicate(src->userheaders); + + if(!hdrs) + res = CURLE_OUT_OF_MEMORY; + else { + /* No one but this procedure knows about the new header list, + so always take ownership. */ + res = curl_mime_headers(dst, hdrs, TRUE); + if(res) + curl_slist_free_all(hdrs); + } + } + + /* Duplicate other fields. */ + dst->encoder = src->encoder; + if(!res) + res = curl_mime_type(dst, src->mimetype); + if(!res) + res = curl_mime_name(dst, src->name); + if(!res) + res = curl_mime_filename(dst, src->filename); + + /* If an error occurred, rollback. */ + if(res) + Curl_mime_cleanpart(dst); + + return res; +} + +/* + * Mime build functions. + */ + +/* Create a mime handle. */ +curl_mime *curl_mime_init(struct Curl_easy *easy) +{ + curl_mime *mime; + + mime = (curl_mime *) malloc(sizeof *mime); + + if(mime) { + mime->easy = easy; + mime->parent = NULL; + mime->firstpart = NULL; + mime->lastpart = NULL; + + /* Get a part boundary. */ + mime->boundary = malloc(24 + MIME_RAND_BOUNDARY_CHARS + 1); + if(!mime->boundary) { + free(mime); + return NULL; + } + + memset(mime->boundary, '-', 24); + Curl_rand_hex(easy, (unsigned char *) mime->boundary + 24, + MIME_RAND_BOUNDARY_CHARS + 1); + mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL); + } + + return mime; +} + +/* Initialize a mime part. */ +void Curl_mime_initpart(curl_mimepart *part, struct Curl_easy *easy) +{ + memset((char *) part, 0, sizeof *part); + part->easy = easy; + mimesetstate(&part->state, MIMESTATE_BEGIN, NULL); +} + +/* Create a mime part and append it to a mime handle's part list. */ +curl_mimepart *curl_mime_addpart(curl_mime *mime) +{ + curl_mimepart *part; + + if(!mime) + return NULL; + + part = (curl_mimepart *) malloc(sizeof *part); + + if(part) { + Curl_mime_initpart(part, mime->easy); + part->parent = mime; + + if(mime->lastpart) + mime->lastpart->nextpart = part; + else + mime->firstpart = part; + + mime->lastpart = part; + } + + return part; +} + +/* Set mime part name. */ +CURLcode curl_mime_name(curl_mimepart *part, const char *name) +{ + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + Curl_safefree(part->name); + part->name = NULL; + + if(name) { + part->name = strdup(name); + if(!part->name) + return CURLE_OUT_OF_MEMORY; + } + + return CURLE_OK; +} + +/* Set mime part remote file name. */ +CURLcode curl_mime_filename(curl_mimepart *part, const char *filename) +{ + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + Curl_safefree(part->filename); + part->filename = NULL; + + if(filename) { + part->filename = strdup(filename); + if(!part->filename) + return CURLE_OUT_OF_MEMORY; + } + + return CURLE_OK; +} + +/* Set mime part content from memory data. */ +CURLcode curl_mime_data(curl_mimepart *part, + const char *data, size_t datasize) +{ + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + cleanup_part_content(part); + + if(data) { + if(datasize == CURL_ZERO_TERMINATED) + datasize = strlen(data); + + part->data = malloc(datasize + 1); + if(!part->data) + return CURLE_OUT_OF_MEMORY; + + part->datasize = datasize; + + if(datasize) + memcpy(part->data, data, datasize); + part->data[datasize] = '\0'; /* Set a nul terminator as sentinel. */ + + part->readfunc = mime_mem_read; + part->seekfunc = mime_mem_seek; + part->freefunc = mime_mem_free; + part->kind = MIMEKIND_DATA; + } + + return CURLE_OK; +} + +/* Set mime part content from named local file. */ +CURLcode curl_mime_filedata(curl_mimepart *part, const char *filename) +{ + CURLcode result = CURLE_OK; + char *base; + + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + cleanup_part_content(part); + + if(filename) { + struct_stat sbuf; + + if(stat(filename, &sbuf) || access(filename, R_OK)) + result = CURLE_READ_ERROR; + + part->data = strdup(filename); + if(!part->data) + result = CURLE_OUT_OF_MEMORY; + + part->datasize = -1; + if(!result && S_ISREG(sbuf.st_mode)) { + part->datasize = filesize(filename, sbuf); + part->seekfunc = mime_file_seek; + } + + part->readfunc = mime_file_read; + part->freefunc = mime_file_free; + part->kind = MIMEKIND_FILE; + + /* As a side effect, set the filename to the current file's base name. + It is possible to withdraw this by explicitly calling + curl_mime_filename() with a NULL filename argument after the current + call. */ + base = strippath(filename); + if(!base) + result = CURLE_OUT_OF_MEMORY; + else { + CURLcode res = curl_mime_filename(part, base); + + if(res) + result = res; + free(base); + } + } + return result; +} + +/* Set mime part type. */ +CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype) +{ + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + Curl_safefree(part->mimetype); + part->mimetype = NULL; + + if(mimetype) { + part->mimetype = strdup(mimetype); + if(!part->mimetype) + return CURLE_OUT_OF_MEMORY; + } + + return CURLE_OK; +} + +/* Set mime data transfer encoder. */ +CURLcode curl_mime_encoder(curl_mimepart *part, const char *encoding) +{ + CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; + const mime_encoder *mep; + + if(!part) + return result; + + part->encoder = NULL; + + if(!encoding) + return CURLE_OK; /* Removing current encoder. */ + + for(mep = encoders; mep->name; mep++) + if(strcasecompare(encoding, mep->name)) { + part->encoder = mep; + result = CURLE_OK; + } + + return result; +} + +/* Set mime part headers. */ +CURLcode curl_mime_headers(curl_mimepart *part, + struct curl_slist *headers, int take_ownership) +{ + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + if(part->flags & MIME_USERHEADERS_OWNER) { + if(part->userheaders != headers) /* Allow setting twice the same list. */ + curl_slist_free_all(part->userheaders); + part->flags &= ~MIME_USERHEADERS_OWNER; + } + part->userheaders = headers; + if(headers && take_ownership) + part->flags |= MIME_USERHEADERS_OWNER; + return CURLE_OK; +} + +/* Set mime part content from callback. */ +CURLcode curl_mime_data_cb(curl_mimepart *part, curl_off_t datasize, + curl_read_callback readfunc, + curl_seek_callback seekfunc, + curl_free_callback freefunc, void *arg) +{ + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + cleanup_part_content(part); + + if(readfunc) { + part->readfunc = readfunc; + part->seekfunc = seekfunc; + part->freefunc = freefunc; + part->arg = arg; + part->datasize = datasize; + part->kind = MIMEKIND_CALLBACK; + } + + return CURLE_OK; +} + +/* Set mime part content from subparts. */ +CURLcode Curl_mime_set_subparts(curl_mimepart *part, + curl_mime *subparts, int take_ownership) +{ + curl_mime *root; + + if(!part) + return CURLE_BAD_FUNCTION_ARGUMENT; + + /* Accept setting twice the same subparts. */ + if(part->kind == MIMEKIND_MULTIPART && part->arg == subparts) + return CURLE_OK; + + cleanup_part_content(part); + + if(subparts) { + /* Must belong to the same data handle. */ + if(part->easy && subparts->easy && part->easy != subparts->easy) + return CURLE_BAD_FUNCTION_ARGUMENT; + + /* Should not have been attached already. */ + if(subparts->parent) + return CURLE_BAD_FUNCTION_ARGUMENT; + + /* Should not be the part's root. */ + root = part->parent; + if(root) { + while(root->parent && root->parent->parent) + root = root->parent->parent; + if(subparts == root) { + if(part->easy) + failf(part->easy, "Can't add itself as a subpart!"); + return CURLE_BAD_FUNCTION_ARGUMENT; + } + } + + subparts->parent = part; + part->readfunc = mime_subparts_read; + part->seekfunc = mime_subparts_seek; + part->freefunc = take_ownership? mime_subparts_free: mime_subparts_unbind; + part->arg = subparts; + part->datasize = -1; + part->kind = MIMEKIND_MULTIPART; + } + + return CURLE_OK; +} + +CURLcode curl_mime_subparts(curl_mimepart *part, curl_mime *subparts) +{ + return Curl_mime_set_subparts(part, subparts, TRUE); +} + + +/* Readback from top mime. */ +/* Argument is the dummy top part. */ +size_t Curl_mime_read(char *buffer, size_t size, size_t nitems, void *instream) +{ + curl_mimepart *part = (curl_mimepart *) instream; + + (void) size; /* Always 1. */ + return readback_part(part, buffer, nitems); +} + +/* Rewind mime stream. */ +CURLcode Curl_mime_rewind(curl_mimepart *part) +{ + return mime_part_rewind(part) == CURL_SEEKFUNC_OK? + CURLE_OK: CURLE_SEND_FAIL_REWIND; +} + +/* Compute header list size. */ +static size_t slist_size(struct curl_slist *s, + size_t overhead, const char *skip) +{ + size_t size = 0; + size_t skiplen = skip? strlen(skip): 0; + + for(; s; s = s->next) + if(!skip || !match_header(s, skip, skiplen)) + size += strlen(s->data) + overhead; + return size; +} + +/* Get/compute multipart size. */ +static curl_off_t multipart_size(curl_mime *mime) +{ + curl_off_t size; + curl_off_t sz; + size_t boundarysize; + curl_mimepart *part; + + if(!mime) + return 0; /* Not present -> empty. */ + + boundarysize = 4 + strlen(mime->boundary) + 2; + size = boundarysize; /* Final boundary - CRLF after headers. */ + + for(part = mime->firstpart; part; part = part->nextpart) { + sz = Curl_mime_size(part); + + if(sz < 0) + size = sz; + + if(size >= 0) + size += boundarysize + sz; + } + + return size; +} + +/* Get/compute mime size. */ +curl_off_t Curl_mime_size(curl_mimepart *part) +{ + curl_off_t size; + + if(part->kind == MIMEKIND_MULTIPART) + part->datasize = multipart_size(part->arg); + + size = part->datasize; + + if(part->encoder) + size = part->encoder->sizefunc(part); + + if(size >= 0 && !(part->flags & MIME_BODY_ONLY)) { + /* Compute total part size. */ + size += slist_size(part->curlheaders, 2, NULL); + size += slist_size(part->userheaders, 2, "Content-Type"); + size += 2; /* CRLF after headers. */ + } + return size; +} + +/* Add a header. */ +/* VARARGS2 */ +CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...) +{ + struct curl_slist *hdr = NULL; + char *s = NULL; + va_list ap; + + va_start(ap, fmt); + s = curl_mvaprintf(fmt, ap); + va_end(ap); + + if(s) { + hdr = Curl_slist_append_nodup(*slp, s); + if(hdr) + *slp = hdr; + else + free(s); + } + + return hdr? CURLE_OK: CURLE_OUT_OF_MEMORY; +} + +/* Add a content type header. */ +static CURLcode add_content_type(struct curl_slist **slp, + const char *type, const char *boundary) +{ + return Curl_mime_add_header(slp, "Content-Type: %s%s%s", type, + boundary? "; boundary=": "", + boundary? boundary: ""); +} + +const char *Curl_mime_contenttype(const char *filename) +{ + unsigned int i; + + /* + * If no content type was specified, we scan through a few well-known + * extensions and pick the first we match! + */ + struct ContentType { + const char *extension; + const char *type; + }; + static const struct ContentType ctts[] = { + {".gif", "image/gif"}, + {".jpg", "image/jpeg"}, + {".jpeg", "image/jpeg"}, + {".png", "image/png"}, + {".svg", "image/svg+xml"}, + {".txt", "text/plain"}, + {".htm", "text/html"}, + {".html", "text/html"}, + {".pdf", "application/pdf"}, + {".xml", "application/xml"} + }; + + if(filename) { + size_t len1 = strlen(filename); + const char *nameend = filename + len1; + + for(i = 0; i < sizeof ctts / sizeof ctts[0]; i++) { + size_t len2 = strlen(ctts[i].extension); + + if(len1 >= len2 && strcasecompare(nameend - len2, ctts[i].extension)) + return ctts[i].type; + } + } + return NULL; +} + +CURLcode Curl_mime_prepare_headers(curl_mimepart *part, + const char *contenttype, + const char *disposition, + enum mimestrategy strategy) +{ + curl_mime *mime = NULL; + const char *boundary = NULL; + char *customct; + const char *cte = NULL; + CURLcode ret = CURLE_OK; + + /* Get rid of previously prepared headers. */ + curl_slist_free_all(part->curlheaders); + part->curlheaders = NULL; + + /* Be sure we won't access old headers later. */ + if(part->state.state == MIMESTATE_CURLHEADERS) + mimesetstate(&part->state, MIMESTATE_CURLHEADERS, NULL); + + /* Check if content type is specified. */ + customct = part->mimetype; + if(!customct) + customct = search_header(part->userheaders, "Content-Type"); + if(customct) + contenttype = customct; + + /* If content type is not specified, try to determine it. */ + if(!contenttype) { + switch(part->kind) { + case MIMEKIND_MULTIPART: + contenttype = MULTIPART_CONTENTTYPE_DEFAULT; + break; + case MIMEKIND_FILE: + contenttype = Curl_mime_contenttype(part->filename); + if(!contenttype) + contenttype = Curl_mime_contenttype(part->data); + if(!contenttype && part->filename) + contenttype = FILE_CONTENTTYPE_DEFAULT; + break; + default: + contenttype = Curl_mime_contenttype(part->filename); + break; + } + } + + if(part->kind == MIMEKIND_MULTIPART) { + mime = (curl_mime *) part->arg; + if(mime) + boundary = mime->boundary; + } + else if(contenttype && !customct && + strcasecompare(contenttype, "text/plain")) + if(strategy == MIMESTRATEGY_MAIL || !part->filename) + contenttype = NULL; + + /* Issue content-disposition header only if not already set by caller. */ + if(!search_header(part->userheaders, "Content-Disposition")) { + if(!disposition) + if(part->filename || part->name || + (contenttype && !strncasecompare(contenttype, "multipart/", 10))) + disposition = DISPOSITION_DEFAULT; + if(disposition && curl_strequal(disposition, "attachment") && + !part->name && !part->filename) + disposition = NULL; + if(disposition) { + char *name = NULL; + char *filename = NULL; + + if(part->name) { + name = escape_string(part->name); + if(!name) + ret = CURLE_OUT_OF_MEMORY; + } + if(!ret && part->filename) { + filename = escape_string(part->filename); + if(!filename) + ret = CURLE_OUT_OF_MEMORY; + } + if(!ret) + ret = Curl_mime_add_header(&part->curlheaders, + "Content-Disposition: %s%s%s%s%s%s%s", + disposition, + name? "; name=\"": "", + name? name: "", + name? "\"": "", + filename? "; filename=\"": "", + filename? filename: "", + filename? "\"": ""); + Curl_safefree(name); + Curl_safefree(filename); + if(ret) + return ret; + } + } + + /* Issue Content-Type header. */ + if(contenttype) { + ret = add_content_type(&part->curlheaders, contenttype, boundary); + if(ret) + return ret; + } + + /* Content-Transfer-Encoding header. */ + if(!search_header(part->userheaders, "Content-Transfer-Encoding")) { + if(part->encoder) + cte = part->encoder->name; + else if(contenttype && strategy == MIMESTRATEGY_MAIL && + part->kind != MIMEKIND_MULTIPART) + cte = "8bit"; + if(cte) { + ret = Curl_mime_add_header(&part->curlheaders, + "Content-Transfer-Encoding: %s", cte); + if(ret) + return ret; + } + } + + /* If we were reading curl-generated headers, restart with new ones (this + should not occur). */ + if(part->state.state == MIMESTATE_CURLHEADERS) + mimesetstate(&part->state, MIMESTATE_CURLHEADERS, part->curlheaders); + + /* Process subparts. */ + if(part->kind == MIMEKIND_MULTIPART && mime) { + curl_mimepart *subpart; + + disposition = NULL; + if(strcasecompare(contenttype, "multipart/form-data")) + disposition = "form-data"; + for(subpart = mime->firstpart; subpart; subpart = subpart->nextpart) { + ret = Curl_mime_prepare_headers(subpart, NULL, disposition, strategy); + if(ret) + return ret; + } + } + return ret; +} + +#else /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */ + +/* Mime not compiled in: define stubs for externally-referenced functions. */ +curl_mime *curl_mime_init(CURL *easy) +{ + (void) easy; + return NULL; +} + +void curl_mime_free(curl_mime *mime) +{ + (void) mime; +} + +curl_mimepart *curl_mime_addpart(curl_mime *mime) +{ + (void) mime; + return NULL; +} + +CURLcode curl_mime_name(curl_mimepart *part, const char *name) +{ + (void) part; + (void) name; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_filename(curl_mimepart *part, const char *filename) +{ + (void) part; + (void) filename; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype) +{ + (void) part; + (void) mimetype; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_encoder(curl_mimepart *part, const char *encoding) +{ + (void) part; + (void) encoding; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_data(curl_mimepart *part, + const char *data, size_t datasize) +{ + (void) part; + (void) data; + (void) datasize; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_filedata(curl_mimepart *part, const char *filename) +{ + (void) part; + (void) filename; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_data_cb(curl_mimepart *part, + curl_off_t datasize, + curl_read_callback readfunc, + curl_seek_callback seekfunc, + curl_free_callback freefunc, + void *arg) +{ + (void) part; + (void) datasize; + (void) readfunc; + (void) seekfunc; + (void) freefunc; + (void) arg; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_subparts(curl_mimepart *part, curl_mime *subparts) +{ + (void) part; + (void) subparts; + return CURLE_NOT_BUILT_IN; +} + +CURLcode curl_mime_headers(curl_mimepart *part, + struct curl_slist *headers, int take_ownership) +{ + (void) part; + (void) headers; + (void) take_ownership; + return CURLE_NOT_BUILT_IN; +} + +void Curl_mime_initpart(curl_mimepart *part, struct Curl_easy *easy) +{ + (void) part; + (void) easy; +} + +void Curl_mime_cleanpart(curl_mimepart *part) +{ + (void) part; +} + +CURLcode Curl_mime_duppart(curl_mimepart *dst, const curl_mimepart *src) +{ + (void) dst; + (void) src; + return CURLE_OK; /* Nothing to duplicate: always succeed. */ +} + +CURLcode Curl_mime_set_subparts(curl_mimepart *part, + curl_mime *subparts, int take_ownership) +{ + (void) part; + (void) subparts; + (void) take_ownership; + return CURLE_NOT_BUILT_IN; +} + +CURLcode Curl_mime_prepare_headers(curl_mimepart *part, + const char *contenttype, + const char *disposition, + enum mimestrategy strategy) +{ + (void) part; + (void) contenttype; + (void) disposition; + (void) strategy; + return CURLE_NOT_BUILT_IN; +} + +curl_off_t Curl_mime_size(curl_mimepart *part) +{ + (void) part; + return (curl_off_t) -1; +} + +size_t Curl_mime_read(char *buffer, size_t size, size_t nitems, void *instream) +{ + (void) buffer; + (void) size; + (void) nitems; + (void) instream; + return 0; +} + +CURLcode Curl_mime_rewind(curl_mimepart *part) +{ + (void) part; + return CURLE_NOT_BUILT_IN; +} + +/* VARARGS2 */ +CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...) +{ + (void) slp; + (void) fmt; + return CURLE_NOT_BUILT_IN; +} + +#endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */ diff --git a/lib/mime.h b/lib/mime.h new file mode 100644 index 0000000..4d5c704 --- /dev/null +++ b/lib/mime.h @@ -0,0 +1,143 @@ +#ifndef HEADER_CURL_MIME_H +#define HEADER_CURL_MIME_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#define MIME_RAND_BOUNDARY_CHARS 16 /* Nb. of random boundary chars. */ +#define MAX_ENCODED_LINE_LENGTH 76 /* Maximum encoded line length. */ +#define ENCODING_BUFFER_SIZE 256 /* Encoding temp buffers size. */ + +/* Part flags. */ +#define MIME_USERHEADERS_OWNER (1 << 0) +#define MIME_BODY_ONLY (1 << 1) + +#define FILE_CONTENTTYPE_DEFAULT "application/octet-stream" +#define MULTIPART_CONTENTTYPE_DEFAULT "multipart/mixed" +#define DISPOSITION_DEFAULT "attachment" + +/* Part source kinds. */ +enum mimekind { + MIMEKIND_NONE = 0, /* Part not set. */ + MIMEKIND_DATA, /* Allocated mime data. */ + MIMEKIND_FILE, /* Data from file. */ + MIMEKIND_CALLBACK, /* Data from `read' callback. */ + MIMEKIND_MULTIPART, /* Data is a mime subpart. */ + MIMEKIND_LAST +}; + +/* Readback state tokens. */ +enum mimestate { + MIMESTATE_BEGIN, /* Readback has not yet started. */ + MIMESTATE_CURLHEADERS, /* In curl-generated headers. */ + MIMESTATE_USERHEADERS, /* In caller's supplied headers. */ + MIMESTATE_EOH, /* End of headers. */ + MIMESTATE_BODY, /* Placeholder. */ + MIMESTATE_BOUNDARY1, /* In boundary prefix. */ + MIMESTATE_BOUNDARY2, /* In boundary. */ + MIMESTATE_CONTENT, /* In content. */ + MIMESTATE_END, /* End of part reached. */ + MIMESTATE_LAST +}; + +/* Mime headers strategies. */ +enum mimestrategy { + MIMESTRATEGY_MAIL, /* Mime mail. */ + MIMESTRATEGY_FORM, /* HTTP post form. */ + MIMESTRATEGY_LAST +}; + +/* Content transfer encoder. */ +typedef struct { + const char * name; /* Encoding name. */ + size_t (*encodefunc)(char *buffer, size_t size, bool ateof, + curl_mimepart *part); /* Encoded read. */ + curl_off_t (*sizefunc)(curl_mimepart *part); /* Encoded size. */ +} mime_encoder; + +/* Content transfer encoder state. */ +typedef struct { + size_t pos; /* Position on output line. */ + size_t bufbeg; /* Next data index in input buffer. */ + size_t bufend; /* First unused byte index in input buffer. */ + char buf[ENCODING_BUFFER_SIZE]; /* Input buffer. */ +} mime_encoder_state; + +/* Mime readback state. */ +typedef struct { + enum mimestate state; /* Current state token. */ + void *ptr; /* State-dependent pointer. */ + size_t offset; /* State-dependent offset. */ +} mime_state; + +/* A mime multipart. */ +struct curl_mime_s { + struct Curl_easy *easy; /* The associated easy handle. */ + curl_mimepart *parent; /* Parent part. */ + curl_mimepart *firstpart; /* First part. */ + curl_mimepart *lastpart; /* Last part. */ + char *boundary; /* The part boundary. */ + mime_state state; /* Current readback state. */ +}; + +/* A mime part. */ +struct curl_mimepart_s { + struct Curl_easy *easy; /* The associated easy handle. */ + curl_mime *parent; /* Parent mime structure. */ + curl_mimepart *nextpart; /* Forward linked list. */ + enum mimekind kind; /* The part kind. */ + char *data; /* Memory data or file name. */ + curl_read_callback readfunc; /* Read function. */ + curl_seek_callback seekfunc; /* Seek function. */ + curl_free_callback freefunc; /* Argument free function. */ + void *arg; /* Argument to callback functions. */ + FILE *fp; /* File pointer. */ + struct curl_slist *curlheaders; /* Part headers. */ + struct curl_slist *userheaders; /* Part headers. */ + char *mimetype; /* Part mime type. */ + char *filename; /* Remote file name. */ + char *name; /* Data name. */ + curl_off_t datasize; /* Expected data size. */ + unsigned int flags; /* Flags. */ + mime_state state; /* Current readback state. */ + const mime_encoder *encoder; /* Content data encoder. */ + mime_encoder_state encstate; /* Data encoder state. */ +}; + + +/* Prototypes. */ +void Curl_mime_initpart(curl_mimepart *part, struct Curl_easy *easy); +void Curl_mime_cleanpart(curl_mimepart *part); +CURLcode Curl_mime_duppart(curl_mimepart *dst, const curl_mimepart *src); +CURLcode Curl_mime_set_subparts(curl_mimepart *part, + curl_mime *subparts, int take_ownership); +CURLcode Curl_mime_prepare_headers(curl_mimepart *part, + const char *contenttype, + const char *disposition, + enum mimestrategy strategy); +curl_off_t Curl_mime_size(curl_mimepart *part); +size_t Curl_mime_read(char *buffer, size_t size, size_t nitems, + void *instream); +CURLcode Curl_mime_rewind(curl_mimepart *part); +CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...); +const char *Curl_mime_contenttype(const char *filename); + +#endif /* HEADER_CURL_MIME_H */ diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 9574f1d..5a84f6b 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # *************************************************************************** # * _ _ ____ _ # * Project ___| | | | _ \| | @@ -34,6 +34,7 @@ use Encode; use Getopt::Std; use MIME::Base64; use strict; +use warnings; use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_k $opt_l $opt_m $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w); use List::Util; use Text::Wrap; @@ -47,11 +48,9 @@ eval "require LWP::UserAgent"; my %urls = ( 'nss' => - 'https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt', + 'https://hg.mozilla.org/projects/nss/raw-file/default/lib/ckfw/builtins/certdata.txt', 'central' => 'https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', - 'aurora' => - 'https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', 'beta' => 'https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', 'release' => @@ -310,7 +309,7 @@ if(!$opt_n) { my $proto = !$opt_k ? "--proto =https" : ""; my $quiet = $opt_q ? "-s" : ""; my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; - if(@out && $out[0] == 200) { + if(!$? && @out && $out[0] == 200) { $fetched = 1; report "Downloaded $txt"; } diff --git a/lib/mk-ca-bundle.vbs b/lib/mk-ca-bundle.vbs index a9b983e..bd4e4a3 100755 --- a/lib/mk-ca-bundle.vbs +++ b/lib/mk-ca-bundle.vbs @@ -1,431 +1,431 @@ -'*************************************************************************** -'* _ _ ____ _ -'* Project ___| | | | _ \| | -'* / __| | | | |_) | | -'* | (__| |_| | _ <| |___ -'* \___|\___/|_| \_\_____| -'* -'* Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. -'* -'* This software is licensed as described in the file COPYING, which -'* you should have received as part of this distribution. The terms -'* are also available at https://curl.haxx.se/docs/copyright.html. -'* -'* You may opt to use, copy, modify, merge, publish, distribute and/or sell -'* copies of the Software, and permit persons to whom the Software is -'* furnished to do so, under the terms of the COPYING file. -'* -'* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -'* KIND, either express or implied. -'* -'*************************************************************************** -'* Script to fetch certdata.txt from Mozilla.org site and create a -'* ca-bundle.crt for use with OpenSSL / libcurl / libcurl bindings -'* Requires WinHttp.WinHttpRequest.5.1 and ADODB.Stream which are part of -'* W2000 SP3 or later, WXP SP1 or later, W2003 Server SP1 or later. -'* Hacked by Guenter Knauf -'*************************************************************************** -Option Explicit -Const myVersion = "0.4.0" - -Const myUrl = "https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt" - -Const myOpenSSL = "openssl.exe" -Dim myUseOpenSSL -myUseOpenSSL = TRUE ' Flag: TRUE to use OpenSSL. If TRUE and is not - ' found then a warning is shown before continuing. - -Const myCdSavF = TRUE ' Flag: save downloaded data to file certdata.txt -Const myCaBakF = TRUE ' Flag: backup existing ca-bundle certificate -Const myAskLiF = TRUE ' Flag: display certdata.txt license agreement -Const myWrapLe = 76 ' Default length of base64 output lines - -' cert info code doesn't work properly with any recent openssl, leave disabled. -' Also: we want our certificate output by default to be as similar as possible -' to mk-ca-bundle.pl and setting this TRUE changes the base64 width to -' OpenSSL's built-in default width, which is not the same as mk-ca-bundle.pl. -Const myAskTiF = FALSE ' Flag: ask to include certificate text info - -' -'******************* Nothing to configure below! ******************* -' -Const adTypeBinary = 1 -Const adTypeText = 2 -Const adSaveCreateNotExist = 1 -Const adSaveCreateOverWrite = 2 -Dim objShell, objNetwork, objFSO, objHttp -Dim myBase, mySelf, myStream, myTmpFh, myCdData, myCdFile -Dim myCaFile, myTmpName, myBakNum, myOptTxt, i -Set objNetwork = WScript.CreateObject("WScript.Network") -Set objShell = WScript.CreateObject("WScript.Shell") -Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") -Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest.5.1") -If objHttp Is Nothing Then Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest") -myBase = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\")) -mySelf = Left(WScript.ScriptName, InstrRev(WScript.ScriptName, ".") - 1) & " " & myVersion - -myCdFile = Mid(myUrl, InstrRev(myUrl, "/") + 1) -myCaFile = "ca-bundle.crt" -myTmpName = InputBox("It will take a minute to download and parse the " & _ - "certificate data." & _ - vbLf & vbLf & _ - "Please enter the output filename:", mySelf, myCaFile) -If (myTmpName = "") Then - WScript.Quit 1 -End If -myCaFile = myTmpName -If (myCdFile = "") Then - MsgBox("URL does not contain filename!"), vbCritical, mySelf - WScript.Quit 1 -End If - -' Don't use OpenSSL if it's not present. -If (myUseOpenSSL = TRUE) Then - Dim errnum - - On Error Resume Next - Call objShell.Run("""" & myOpenSSL & """ version", 0, TRUE) - errnum = Err.Number - On Error GoTo 0 - - If Not (errnum = 0) Then - myUseOpenSSL = FALSE - MsgBox("OpenSSL was not found so the certificate bundle will not " & _ - "include the SHA256 hash of the raw certificate data file " & _ - "that was used to generate the certificates in the bundle. " & _ - vbLf & vbLf & _ - "This does not have any effect on the certificate output, " & _ - "so this script will continue." & _ - vbLf & vbLf & _ - "If you want to set a custom location for OpenSSL or disable " & _ - "this message then edit the variables at the start of the " & _ - "script."), vbInformation, mySelf - End If -End If - -If (myAskTiF = TRUE) And (myUseOpenSSL = TRUE) Then - If (6 = objShell.PopUp("Do you want to include text information about " & _ - "each certificate?" & vbLf & _ - "(Requires OpenSSL.exe in the current directory " & _ - "or search path)",, _ - mySelf, vbQuestion + vbYesNo + vbDefaultButton2)) Then - myOptTxt = TRUE - Else - myOptTxt = FALSE - End If -End If - -' Uncomment the line below to ignore SSL invalid cert errors -' objHttp.Option(4) = 256 + 512 + 4096 + 8192 -objHttp.SetTimeouts 0, 5000, 10000, 10000 -objHttp.Open "GET", myUrl, FALSE -objHttp.setRequestHeader "User-Agent", WScript.ScriptName & "/" & myVersion -objHttp.Send "" -If Not (objHttp.Status = 200) Then - MsgBox("Failed to download '" & myCdFile & "': " & objHttp.Status & " - " & objHttp.StatusText), vbCritical, mySelf - WScript.Quit 1 -End If -' Write received data to file if enabled -If (myCdSavF = TRUE) Then - Call SaveBinaryData(myCdFile, objHttp.ResponseBody) -End If -' Convert data from ResponseBody instead of using ResponseText because of UTF-8 -myCdData = ConvertBinaryToUTF8(objHttp.ResponseBody) -Set objHttp = Nothing -' Backup exitsing ca-bundle certificate file -If (myCaBakF = TRUE) Then - If objFSO.FileExists(myCaFile) Then - Dim myBakFile, b - b = 1 - myBakFile = myCaFile & ".~" & b & "~" - While objFSO.FileExists(myBakFile) - b = b + 1 - myBakFile = myCaFile & ".~" & b & "~" - Wend - Set myTmpFh = objFSO.GetFile(myCaFile) - myTmpFh.Move myBakFile - End If -End If - -' Process the received data -Dim myLines, myPattern, myInsideCert, myInsideLicense, myLicenseText, myNumCerts, myNumSkipped -Dim myLabel, myOctets, myData, myPem, myRev, myUntrusted, j -myNumSkipped = 0 -myNumCerts = 0 -myData = "" -myLines = Split(myCdData, vbLf, -1) -Set myStream = CreateObject("ADODB.Stream") -myStream.Open -myStream.Type = adTypeText -myStream.Charset = "utf-8" -myStream.WriteText "##" & vbLf & _ - "## Bundle of CA Root Certificates" & vbLf & _ - "##" & vbLf & _ - "## Certificate data from Mozilla as of: " & _ - ConvertDateToString(LocalDateToUTC(Now)) & " GMT" & vbLf & _ - "##" & vbLf & _ - "## This is a bundle of X.509 certificates of public Certificate Authorities" & vbLf & _ - "## (CA). These were automatically extracted from Mozilla's root certificates" & vbLf & _ - "## file (certdata.txt). This file can be found in the mozilla source tree:" & vbLf & _ - "## " & myUrl & vbLf & _ - "##" & vbLf & _ - "## It contains the certificates in PEM format and therefore" & vbLf & _ - "## can be directly used with curl / libcurl / php_curl, or with" & vbLf & _ - "## an Apache+mod_ssl webserver for SSL client authentication." & vbLf & _ - "## Just configure this file as the SSLCACertificateFile." & vbLf & _ - "##" & vbLf & _ - "## Conversion done with mk-ca-bundle.vbs version " & myVersion & "." & vbLf -If (myCdSavF = TRUE) And (myUseOpenSSL = TRUE) Then - myStream.WriteText "## SHA256: " & FileSHA256(myCdFile) & vbLf -End If -myStream.WriteText "##" & vbLf & vbLf - -myStream.WriteText vbLf -For i = 0 To UBound(myLines) - If InstrRev(myLines(i), "CKA_LABEL ") Then - myPattern = "^CKA_LABEL\s+[A-Z0-9]+\s+""(.+?)""" - myLabel = RegExprFirst(myPattern, myLines(i)) - End If - If (myInsideCert = TRUE) Then - If InstrRev(myLines(i), "END") Then - myInsideCert = FALSE - While (i < UBound(myLines)) And Not (myLines(i) = "#") - i = i + 1 - If InstrRev(myLines(i), "CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR") Then - myUntrusted = FALSE - End If - Wend - If (myUntrusted = TRUE) Then - myNumSkipped = myNumSkipped + 1 - Else - myStream.WriteText myLabel & vbLf - myStream.WriteText String(Len(myLabel), "=") & vbLf - myPem = "-----BEGIN CERTIFICATE-----" & vbLf & _ - Base64Encode(myData) & vbLf & _ - "-----END CERTIFICATE-----" & vbLf - If (myOptTxt = FALSE) Then - myStream.WriteText myPem & vbLf - Else - Dim myCmd, myRval, myTmpIn, myTmpOut - myTmpIn = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName - myTmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName - Set myTmpFh = objFSO.OpenTextFile(myTmpIn, 2, TRUE) - myTmpFh.Write myPem - myTmpFh.Close - myCmd = """" & myOpenSSL & """ x509 -md5 -fingerprint -text " & _ - "-inform PEM -in " & myTmpIn & " -out " & myTmpOut - myRval = objShell.Run (myCmd, 0, TRUE) - objFSO.DeleteFile myTmpIn, TRUE - If Not (myRval = 0) Then - MsgBox("Failed to process PEM cert with OpenSSL commandline!"), vbCritical, mySelf - objFSO.DeleteFile myTmpOut, TRUE - WScript.Quit 3 - End If - Set myTmpFh = objFSO.OpenTextFile(myTmpOut, 1) - myStream.WriteText myTmpFh.ReadAll & vbLf - myTmpFh.Close - objFSO.DeleteFile myTmpOut, TRUE - End If - myNumCerts = myNumCerts + 1 - End If - Else - myOctets = Split(myLines(i), "\") - For j = 1 To UBound(myOctets) - myData = myData & Chr(CByte("&o" & myOctets(j))) - Next - End If - End If - If InstrRev(myLines(i), "CVS_ID ") Then - myPattern = "^CVS_ID\s+""(.+?)""" - myRev = RegExprFirst(myPattern, myLines(i)) - myStream.WriteText "# " & myRev & vbLf & vbLf - End If - If InstrRev(myLines(i), "CKA_VALUE MULTILINE_OCTAL") Then - myInsideCert = TRUE - myUntrusted = TRUE - myData = "" - End If - If InstrRev(myLines(i), "***** BEGIN LICENSE BLOCK *****") Then - myInsideLicense = TRUE - End If - If (myInsideLicense = TRUE) Then - myStream.WriteText myLines(i) & vbLf - myLicenseText = myLicenseText & Mid(myLines(i), 2) & vbLf - End If - If InstrRev(myLines(i), "***** END LICENSE BLOCK *****") Then - myInsideLicense = FALSE - If (myAskLiF = TRUE) Then - If Not (6 = objShell.PopUp(myLicenseText & vbLf & _ - "Do you agree to the license shown above (required to proceed) ?",, _ - mySelf, vbQuestion + vbYesNo + vbDefaultButton1)) Then - myStream.Close - objFSO.DeleteFile myCaFile, TRUE - WScript.Quit 2 - End If - End If - End If -Next - -' To stop the UTF-8 BOM from being written the stream has to be copied and -' then saved as binary. -Dim myCopy -Set myCopy = CreateObject("ADODB.Stream") -myCopy.Type = adTypeBinary -myCopy.Open -myStream.Position = 3 ' Skip UTF-8 BOM -myStream.CopyTo myCopy -myCopy.SaveToFile myCaFile, adSaveCreateOverWrite -myCopy.Close -myStream.Close -Set myCopy = Nothing -Set myStream = Nothing - -' Done -objShell.PopUp "Done (" & myNumCerts & " CA certs processed, " & myNumSkipped & _ - " untrusted skipped).", 20, mySelf, vbInformation -WScript.Quit 0 - -Function ConvertBinaryToUTF8(arrBytes) - Dim objStream - Set objStream = CreateObject("ADODB.Stream") - objStream.Open - objStream.Type = adTypeBinary - objStream.Write arrBytes - objStream.Position = 0 - objStream.Type = adTypeText - objStream.Charset = "utf-8" - ConvertBinaryToUTF8 = objStream.ReadText - Set objStream = Nothing -End Function - -Function SaveBinaryData(filename, data) - Dim objStream - Set objStream = CreateObject("ADODB.Stream") - objStream.Type = adTypeBinary - objStream.Open - objStream.Write data - objStream.SaveToFile filename, adSaveCreateOverWrite - objStream.Close - Set objStream = Nothing -End Function - -Function RegExprFirst(SearchPattern, TheString) - Dim objRegExp, Matches ' create variables. - Set objRegExp = New RegExp ' create a regular expression. - objRegExp.Pattern = SearchPattern ' sets the search pattern. - objRegExp.IgnoreCase = TRUE ' set to ignores case. - objRegExp.Global = TRUE ' set to gloabal search. - Set Matches = objRegExp.Execute(TheString) ' do the search. - If (Matches.Count) Then - RegExprFirst = Matches(0).SubMatches(0) ' return first match. - Else - RegExprFirst = "" - End If - Set objRegExp = Nothing -End Function - -Function Base64Encode(inData) - Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" - Dim cOut, sOut, lWrap, I - lWrap = Int(myWrapLe * 3 / 4) - - 'For each group of 3 bytes - For I = 1 To Len(inData) Step 3 - Dim nGroup, pOut, sGroup - - 'Create one long from this 3 bytes. - nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ - &H100 * MyASC(Mid(inData, I + 1, 1)) + _ - MyASC(Mid(inData, I + 2, 1)) - - 'Oct splits the long To 8 groups with 3 bits - nGroup = Oct(nGroup) - - 'Add leading zeros - nGroup = String(8 - Len(nGroup), "0") & nGroup - - 'Convert To base64 - pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) & _ - Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) & _ - Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) & _ - Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) - - 'Add the part To OutPut string - sOut = sOut + pOut - - 'Add a new line For Each myWrapLe chars In dest - If (I < Len(inData) - 2) Then - If (I + 2) Mod lWrap = 0 Then sOut = sOut & vbLf - End If - Next - Select Case Len(inData) Mod 3 - Case 1: '8 bit final - sOut = Left(sOut, Len(sOut) - 2) & "==" - Case 2: '16 bit final - sOut = Left(sOut, Len(sOut) - 1) & "=" - End Select - Base64Encode = sOut -End Function - -Function MyASC(OneChar) - If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) -End Function - -' Return the date in the same format as perl to match mk-ca-bundle.pl output: -' Wed Sep 7 03:12:05 2016 -Function ConvertDateToString(input) - Dim output - output = WeekDayName(WeekDay(input), TRUE) & " " & _ - MonthName(Month(input), TRUE) & " " - If (Len(Day(input)) = 1) Then - output = output & " " - End If - output = output & _ - Day(input) & " " & _ - FormatDateTime(input, vbShortTime) & ":" - If (Len(Second(input)) = 1) Then - output = output & "0" - End If - output = output & _ - Second(input) & " " & _ - Year(input) - ConvertDateToString = output -End Function - -' Convert local Date to UTC. Microsoft says: -' Use Win32_ComputerSystem CurrentTimeZone property, because it automatically -' adjusts the Time Zone bias for daylight saving time; Win32_Time Zone Bias -' property does not. -' https://msdn.microsoft.com/en-us/library/windows/desktop/ms696015.aspx -Function LocalDateToUTC(localdate) - Dim item, offset - For Each item In GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem") - offset = item.CurrentTimeZone ' the offset in minutes - Next - If (offset < 0) Then - LocalDateToUTC = DateAdd("n", ABS(offset), localdate) - Else - LocalDateToUTC = DateAdd("n", -ABS(offset), localdate) - End If - 'objShell.PopUp LocalDateToUTC -End Function - -Function FileSHA256(filename) - Dim cmd, rval, tmpOut, tmpFh - if (myUseOpenSSL = TRUE) Then - tmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName - cmd = """" & myOpenSSL & """ dgst -r -sha256 -out """ & tmpOut & """ """ & filename & """" - rval = objShell.Run(cmd, 0, TRUE) - If Not (rval = 0) Then - MsgBox("Failed to get sha256 of """ & filename & """ with OpenSSL commandline!"), vbCritical, mySelf - objFSO.DeleteFile tmpOut, TRUE - WScript.Quit 3 - End If - Set tmpFh = objFSO.OpenTextFile(tmpOut, 1) - FileSHA256 = RegExprFirst("^([0-9a-f]{64}) .+", tmpFh.ReadAll) - tmpFh.Close - objFSO.DeleteFile tmpOut, TRUE - Else - FileSHA256 = "" - End If -End Function +'*************************************************************************** +'* _ _ ____ _ +'* Project ___| | | | _ \| | +'* / __| | | | |_) | | +'* | (__| |_| | _ <| |___ +'* \___|\___/|_| \_\_____| +'* +'* Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. +'* +'* This software is licensed as described in the file COPYING, which +'* you should have received as part of this distribution. The terms +'* are also available at https://curl.haxx.se/docs/copyright.html. +'* +'* You may opt to use, copy, modify, merge, publish, distribute and/or sell +'* copies of the Software, and permit persons to whom the Software is +'* furnished to do so, under the terms of the COPYING file. +'* +'* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +'* KIND, either express or implied. +'* +'*************************************************************************** +'* Script to fetch certdata.txt from Mozilla.org site and create a +'* ca-bundle.crt for use with OpenSSL / libcurl / libcurl bindings +'* Requires WinHttp.WinHttpRequest.5.1 and ADODB.Stream which are part of +'* W2000 SP3 or later, WXP SP1 or later, W2003 Server SP1 or later. +'* Hacked by Guenter Knauf +'*************************************************************************** +Option Explicit +Const myVersion = "0.4.0" + +Const myUrl = "https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt" + +Const myOpenSSL = "openssl.exe" +Dim myUseOpenSSL +myUseOpenSSL = TRUE ' Flag: TRUE to use OpenSSL. If TRUE and is not + ' found then a warning is shown before continuing. + +Const myCdSavF = TRUE ' Flag: save downloaded data to file certdata.txt +Const myCaBakF = TRUE ' Flag: backup existing ca-bundle certificate +Const myAskLiF = TRUE ' Flag: display certdata.txt license agreement +Const myWrapLe = 76 ' Default length of base64 output lines + +' cert info code doesn't work properly with any recent openssl, leave disabled. +' Also: we want our certificate output by default to be as similar as possible +' to mk-ca-bundle.pl and setting this TRUE changes the base64 width to +' OpenSSL's built-in default width, which is not the same as mk-ca-bundle.pl. +Const myAskTiF = FALSE ' Flag: ask to include certificate text info + +' +'******************* Nothing to configure below! ******************* +' +Const adTypeBinary = 1 +Const adTypeText = 2 +Const adSaveCreateNotExist = 1 +Const adSaveCreateOverWrite = 2 +Dim objShell, objNetwork, objFSO, objHttp +Dim myBase, mySelf, myStream, myTmpFh, myCdData, myCdFile +Dim myCaFile, myTmpName, myBakNum, myOptTxt, i +Set objNetwork = WScript.CreateObject("WScript.Network") +Set objShell = WScript.CreateObject("WScript.Shell") +Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") +Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest.5.1") +If objHttp Is Nothing Then Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest") +myBase = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\")) +mySelf = Left(WScript.ScriptName, InstrRev(WScript.ScriptName, ".") - 1) & " " & myVersion + +myCdFile = Mid(myUrl, InstrRev(myUrl, "/") + 1) +myCaFile = "ca-bundle.crt" +myTmpName = InputBox("It will take a minute to download and parse the " & _ + "certificate data." & _ + vbLf & vbLf & _ + "Please enter the output filename:", mySelf, myCaFile) +If (myTmpName = "") Then + WScript.Quit 1 +End If +myCaFile = myTmpName +If (myCdFile = "") Then + MsgBox("URL does not contain filename!"), vbCritical, mySelf + WScript.Quit 1 +End If + +' Don't use OpenSSL if it's not present. +If (myUseOpenSSL = TRUE) Then + Dim errnum + + On Error Resume Next + Call objShell.Run("""" & myOpenSSL & """ version", 0, TRUE) + errnum = Err.Number + On Error GoTo 0 + + If Not (errnum = 0) Then + myUseOpenSSL = FALSE + MsgBox("OpenSSL was not found so the certificate bundle will not " & _ + "include the SHA256 hash of the raw certificate data file " & _ + "that was used to generate the certificates in the bundle. " & _ + vbLf & vbLf & _ + "This does not have any effect on the certificate output, " & _ + "so this script will continue." & _ + vbLf & vbLf & _ + "If you want to set a custom location for OpenSSL or disable " & _ + "this message then edit the variables at the start of the " & _ + "script."), vbInformation, mySelf + End If +End If + +If (myAskTiF = TRUE) And (myUseOpenSSL = TRUE) Then + If (6 = objShell.PopUp("Do you want to include text information about " & _ + "each certificate?" & vbLf & _ + "(Requires OpenSSL.exe in the current directory " & _ + "or search path)",, _ + mySelf, vbQuestion + vbYesNo + vbDefaultButton2)) Then + myOptTxt = TRUE + Else + myOptTxt = FALSE + End If +End If + +' Uncomment the line below to ignore SSL invalid cert errors +' objHttp.Option(4) = 256 + 512 + 4096 + 8192 +objHttp.SetTimeouts 0, 5000, 10000, 10000 +objHttp.Open "GET", myUrl, FALSE +objHttp.setRequestHeader "User-Agent", WScript.ScriptName & "/" & myVersion +objHttp.Send "" +If Not (objHttp.Status = 200) Then + MsgBox("Failed to download '" & myCdFile & "': " & objHttp.Status & " - " & objHttp.StatusText), vbCritical, mySelf + WScript.Quit 1 +End If +' Write received data to file if enabled +If (myCdSavF = TRUE) Then + Call SaveBinaryData(myCdFile, objHttp.ResponseBody) +End If +' Convert data from ResponseBody instead of using ResponseText because of UTF-8 +myCdData = ConvertBinaryToUTF8(objHttp.ResponseBody) +Set objHttp = Nothing +' Backup exitsing ca-bundle certificate file +If (myCaBakF = TRUE) Then + If objFSO.FileExists(myCaFile) Then + Dim myBakFile, b + b = 1 + myBakFile = myCaFile & ".~" & b & "~" + While objFSO.FileExists(myBakFile) + b = b + 1 + myBakFile = myCaFile & ".~" & b & "~" + Wend + Set myTmpFh = objFSO.GetFile(myCaFile) + myTmpFh.Move myBakFile + End If +End If + +' Process the received data +Dim myLines, myPattern, myInsideCert, myInsideLicense, myLicenseText, myNumCerts, myNumSkipped +Dim myLabel, myOctets, myData, myPem, myRev, myUntrusted, j +myNumSkipped = 0 +myNumCerts = 0 +myData = "" +myLines = Split(myCdData, vbLf, -1) +Set myStream = CreateObject("ADODB.Stream") +myStream.Open +myStream.Type = adTypeText +myStream.Charset = "utf-8" +myStream.WriteText "##" & vbLf & _ + "## Bundle of CA Root Certificates" & vbLf & _ + "##" & vbLf & _ + "## Certificate data from Mozilla as of: " & _ + ConvertDateToString(LocalDateToUTC(Now)) & " GMT" & vbLf & _ + "##" & vbLf & _ + "## This is a bundle of X.509 certificates of public Certificate Authorities" & vbLf & _ + "## (CA). These were automatically extracted from Mozilla's root certificates" & vbLf & _ + "## file (certdata.txt). This file can be found in the mozilla source tree:" & vbLf & _ + "## " & myUrl & vbLf & _ + "##" & vbLf & _ + "## It contains the certificates in PEM format and therefore" & vbLf & _ + "## can be directly used with curl / libcurl / php_curl, or with" & vbLf & _ + "## an Apache+mod_ssl webserver for SSL client authentication." & vbLf & _ + "## Just configure this file as the SSLCACertificateFile." & vbLf & _ + "##" & vbLf & _ + "## Conversion done with mk-ca-bundle.vbs version " & myVersion & "." & vbLf +If (myCdSavF = TRUE) And (myUseOpenSSL = TRUE) Then + myStream.WriteText "## SHA256: " & FileSHA256(myCdFile) & vbLf +End If +myStream.WriteText "##" & vbLf & vbLf + +myStream.WriteText vbLf +For i = 0 To UBound(myLines) + If InstrRev(myLines(i), "CKA_LABEL ") Then + myPattern = "^CKA_LABEL\s+[A-Z0-9]+\s+""(.+?)""" + myLabel = RegExprFirst(myPattern, myLines(i)) + End If + If (myInsideCert = TRUE) Then + If InstrRev(myLines(i), "END") Then + myInsideCert = FALSE + While (i < UBound(myLines)) And Not (myLines(i) = "#") + i = i + 1 + If InstrRev(myLines(i), "CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR") Then + myUntrusted = FALSE + End If + Wend + If (myUntrusted = TRUE) Then + myNumSkipped = myNumSkipped + 1 + Else + myStream.WriteText myLabel & vbLf + myStream.WriteText String(Len(myLabel), "=") & vbLf + myPem = "-----BEGIN CERTIFICATE-----" & vbLf & _ + Base64Encode(myData) & vbLf & _ + "-----END CERTIFICATE-----" & vbLf + If (myOptTxt = FALSE) Then + myStream.WriteText myPem & vbLf + Else + Dim myCmd, myRval, myTmpIn, myTmpOut + myTmpIn = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName + myTmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName + Set myTmpFh = objFSO.OpenTextFile(myTmpIn, 2, TRUE) + myTmpFh.Write myPem + myTmpFh.Close + myCmd = """" & myOpenSSL & """ x509 -md5 -fingerprint -text " & _ + "-inform PEM -in " & myTmpIn & " -out " & myTmpOut + myRval = objShell.Run (myCmd, 0, TRUE) + objFSO.DeleteFile myTmpIn, TRUE + If Not (myRval = 0) Then + MsgBox("Failed to process PEM cert with OpenSSL commandline!"), vbCritical, mySelf + objFSO.DeleteFile myTmpOut, TRUE + WScript.Quit 3 + End If + Set myTmpFh = objFSO.OpenTextFile(myTmpOut, 1) + myStream.WriteText myTmpFh.ReadAll & vbLf + myTmpFh.Close + objFSO.DeleteFile myTmpOut, TRUE + End If + myNumCerts = myNumCerts + 1 + End If + Else + myOctets = Split(myLines(i), "\") + For j = 1 To UBound(myOctets) + myData = myData & Chr(CByte("&o" & myOctets(j))) + Next + End If + End If + If InstrRev(myLines(i), "CVS_ID ") Then + myPattern = "^CVS_ID\s+""(.+?)""" + myRev = RegExprFirst(myPattern, myLines(i)) + myStream.WriteText "# " & myRev & vbLf & vbLf + End If + If InstrRev(myLines(i), "CKA_VALUE MULTILINE_OCTAL") Then + myInsideCert = TRUE + myUntrusted = TRUE + myData = "" + End If + If InstrRev(myLines(i), "***** BEGIN LICENSE BLOCK *****") Then + myInsideLicense = TRUE + End If + If (myInsideLicense = TRUE) Then + myStream.WriteText myLines(i) & vbLf + myLicenseText = myLicenseText & Mid(myLines(i), 2) & vbLf + End If + If InstrRev(myLines(i), "***** END LICENSE BLOCK *****") Then + myInsideLicense = FALSE + If (myAskLiF = TRUE) Then + If Not (6 = objShell.PopUp(myLicenseText & vbLf & _ + "Do you agree to the license shown above (required to proceed) ?",, _ + mySelf, vbQuestion + vbYesNo + vbDefaultButton1)) Then + myStream.Close + objFSO.DeleteFile myCaFile, TRUE + WScript.Quit 2 + End If + End If + End If +Next + +' To stop the UTF-8 BOM from being written the stream has to be copied and +' then saved as binary. +Dim myCopy +Set myCopy = CreateObject("ADODB.Stream") +myCopy.Type = adTypeBinary +myCopy.Open +myStream.Position = 3 ' Skip UTF-8 BOM +myStream.CopyTo myCopy +myCopy.SaveToFile myCaFile, adSaveCreateOverWrite +myCopy.Close +myStream.Close +Set myCopy = Nothing +Set myStream = Nothing + +' Done +objShell.PopUp "Done (" & myNumCerts & " CA certs processed, " & myNumSkipped & _ + " untrusted skipped).", 20, mySelf, vbInformation +WScript.Quit 0 + +Function ConvertBinaryToUTF8(arrBytes) + Dim objStream + Set objStream = CreateObject("ADODB.Stream") + objStream.Open + objStream.Type = adTypeBinary + objStream.Write arrBytes + objStream.Position = 0 + objStream.Type = adTypeText + objStream.Charset = "utf-8" + ConvertBinaryToUTF8 = objStream.ReadText + Set objStream = Nothing +End Function + +Function SaveBinaryData(filename, data) + Dim objStream + Set objStream = CreateObject("ADODB.Stream") + objStream.Type = adTypeBinary + objStream.Open + objStream.Write data + objStream.SaveToFile filename, adSaveCreateOverWrite + objStream.Close + Set objStream = Nothing +End Function + +Function RegExprFirst(SearchPattern, TheString) + Dim objRegExp, Matches ' create variables. + Set objRegExp = New RegExp ' create a regular expression. + objRegExp.Pattern = SearchPattern ' sets the search pattern. + objRegExp.IgnoreCase = TRUE ' set to ignores case. + objRegExp.Global = TRUE ' set to global search. + Set Matches = objRegExp.Execute(TheString) ' do the search. + If (Matches.Count) Then + RegExprFirst = Matches(0).SubMatches(0) ' return first match. + Else + RegExprFirst = "" + End If + Set objRegExp = Nothing +End Function + +Function Base64Encode(inData) + Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + Dim cOut, sOut, lWrap, I + lWrap = Int(myWrapLe * 3 / 4) + + 'For each group of 3 bytes + For I = 1 To Len(inData) Step 3 + Dim nGroup, pOut, sGroup + + 'Create one long from this 3 bytes. + nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ + &H100 * MyASC(Mid(inData, I + 1, 1)) + _ + MyASC(Mid(inData, I + 2, 1)) + + 'Oct splits the long To 8 groups with 3 bits + nGroup = Oct(nGroup) + + 'Add leading zeros + nGroup = String(8 - Len(nGroup), "0") & nGroup + + 'Convert To base64 + pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) & _ + Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) & _ + Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) & _ + Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) + + 'Add the part To OutPut string + sOut = sOut + pOut + + 'Add a new line For Each myWrapLe chars In dest + If (I < Len(inData) - 2) Then + If (I + 2) Mod lWrap = 0 Then sOut = sOut & vbLf + End If + Next + Select Case Len(inData) Mod 3 + Case 1: '8 bit final + sOut = Left(sOut, Len(sOut) - 2) & "==" + Case 2: '16 bit final + sOut = Left(sOut, Len(sOut) - 1) & "=" + End Select + Base64Encode = sOut +End Function + +Function MyASC(OneChar) + If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) +End Function + +' Return the date in the same format as perl to match mk-ca-bundle.pl output: +' Wed Sep 7 03:12:05 2016 +Function ConvertDateToString(input) + Dim output + output = WeekDayName(WeekDay(input), TRUE) & " " & _ + MonthName(Month(input), TRUE) & " " + If (Len(Day(input)) = 1) Then + output = output & " " + End If + output = output & _ + Day(input) & " " & _ + FormatDateTime(input, vbShortTime) & ":" + If (Len(Second(input)) = 1) Then + output = output & "0" + End If + output = output & _ + Second(input) & " " & _ + Year(input) + ConvertDateToString = output +End Function + +' Convert local Date to UTC. Microsoft says: +' Use Win32_ComputerSystem CurrentTimeZone property, because it automatically +' adjusts the Time Zone bias for daylight saving time; Win32_Time Zone Bias +' property does not. +' https://msdn.microsoft.com/en-us/library/windows/desktop/ms696015.aspx +Function LocalDateToUTC(localdate) + Dim item, offset + For Each item In GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem") + offset = item.CurrentTimeZone ' the offset in minutes + Next + If (offset < 0) Then + LocalDateToUTC = DateAdd("n", ABS(offset), localdate) + Else + LocalDateToUTC = DateAdd("n", -ABS(offset), localdate) + End If + 'objShell.PopUp LocalDateToUTC +End Function + +Function FileSHA256(filename) + Dim cmd, rval, tmpOut, tmpFh + if (myUseOpenSSL = TRUE) Then + tmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName + cmd = """" & myOpenSSL & """ dgst -r -sha256 -out """ & tmpOut & """ """ & filename & """" + rval = objShell.Run(cmd, 0, TRUE) + If Not (rval = 0) Then + MsgBox("Failed to get sha256 of """ & filename & """ with OpenSSL commandline!"), vbCritical, mySelf + objFSO.DeleteFile tmpOut, TRUE + WScript.Quit 3 + End If + Set tmpFh = objFSO.OpenTextFile(tmpOut, 1) + FileSHA256 = RegExprFirst("^([0-9a-f]{64}) .+", tmpFh.ReadAll) + tmpFh.Close + objFSO.DeleteFile tmpOut, TRUE + Else + FileSHA256 = "" + End If +End Function diff --git a/lib/mprintf.c b/lib/mprintf.c index e4270ab..d2d91d7 100644 --- a/lib/mprintf.c +++ b/lib/mprintf.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1999 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -42,18 +42,10 @@ /* The last #include file should be: */ #include "memdebug.h" -#ifndef SIZEOF_LONG_DOUBLE -#define SIZEOF_LONG_DOUBLE 0 -#endif - /* * If SIZEOF_SIZE_T has not been defined, default to the size of long. */ -#ifndef SIZEOF_SIZE_T -# define SIZEOF_SIZE_T CURL_SIZEOF_LONG -#endif - #ifdef HAVE_LONGLONG # define LONG_LONG_TYPE long long # define HAVE_LONG_LONG_TYPE @@ -115,7 +107,7 @@ static const char upper_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } WHILE_FALSE /* Data type to read from the arglist */ -typedef enum { +typedef enum { FORMAT_UNKNOWN = 0, FORMAT_STRING, FORMAT_PTR, @@ -185,7 +177,7 @@ struct asprintf { static long dprintf_DollarString(char *input, char **end) { - int number=0; + int number = 0; while(ISDIGIT(*input)) { number *= 10; number += *input-'0'; @@ -241,7 +233,7 @@ static int dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos, long width; long precision; int flags; - long max_param=0; + long max_param = 0; long i; while(*fmt) { @@ -330,7 +322,7 @@ static int dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos, break; #if defined(MP_HAVE_INT_EXTENSIONS) case 'I': -#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG) +#if (SIZEOF_CURL_OFF_T > SIZEOF_LONG) flags |= FLAGS_LONGLONG; #else flags |= FLAGS_LONG; @@ -352,14 +344,14 @@ static int dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos, case 'z': /* the code below generates a warning if -Wunreachable-code is used */ -#if (SIZEOF_SIZE_T > CURL_SIZEOF_LONG) +#if (SIZEOF_SIZE_T > SIZEOF_LONG) flags |= FLAGS_LONGLONG; #else flags |= FLAGS_LONG; #endif break; case 'O': -#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG) +#if (SIZEOF_CURL_OFF_T > SIZEOF_LONG) flags |= FLAGS_LONGLONG; #else flags |= FLAGS_LONG; @@ -384,7 +376,7 @@ static int dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos, else width = param_num; if(width > max_param) - max_param=width; + max_param = width; break; default: break; @@ -490,7 +482,7 @@ static int dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos, } /* Read the arg list parameters into our data list */ - for(i=0; i$ sequence */ - param=dprintf_DollarString(f, &f); + param = dprintf_DollarString(f, &f); if(!param) param = param_num; @@ -955,10 +947,8 @@ static int dprintf_formatf( /* NOTE NOTE NOTE!! Not all sprintf implementations return number of output characters */ (sprintf)(work, formatbuf, p->data.dnum); -#ifdef CURLDEBUG - assert(strlen(work) <= sizeof(work)); -#endif - for(fptr=work; *fptr; fptr++) + DEBUGASSERT(strlen(work) <= sizeof(work)); + for(fptr = work; *fptr; fptr++) OUTCHAR(*fptr); } break; @@ -990,7 +980,7 @@ static int dprintf_formatf( /* fputc() look-alike */ static int addbyter(int output, FILE *data) { - struct nsprintf *infop=(struct nsprintf *)data; + struct nsprintf *infop = (struct nsprintf *)data; unsigned char outc = (unsigned char)output; if(infop->length < infop->max) { @@ -1038,7 +1028,7 @@ int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...) /* fputc() look-alike */ static int alloc_addbyter(int output, FILE *data) { - struct asprintf *infop=(struct asprintf *)data; + struct asprintf *infop = (struct asprintf *)data; unsigned char outc = (unsigned char)output; if(!infop->buffer) { @@ -1048,9 +1038,9 @@ static int alloc_addbyter(int output, FILE *data) return -1; /* fail */ } infop->alloc = 32; - infop->len =0; + infop->len = 0; } - else if(infop->len+1 >= infop->alloc) { + else if(infop->len + 1 >= infop->alloc) { char *newptr = NULL; size_t newsize = infop->alloc*2; @@ -1096,8 +1086,7 @@ char *curl_maprintf(const char *format, ...) info.buffer[info.len] = 0; /* we terminate this with a zero byte */ return info.buffer; } - else - return strdup(""); + return strdup(""); } char *curl_mvaprintf(const char *format, va_list ap_save) @@ -1121,8 +1110,7 @@ char *curl_mvaprintf(const char *format, va_list ap_save) info.buffer[info.len] = 0; /* we terminate this with a zero byte */ return info.buffer; } - else - return strdup(""); + return strdup(""); } static int storebuffer(int output, FILE *data) @@ -1141,7 +1129,7 @@ int curl_msprintf(char *buffer, const char *format, ...) va_start(ap_save, format); retcode = dprintf_formatf(&buffer, storebuffer, format, ap_save); va_end(ap_save); - *buffer=0; /* we terminate this with a zero byte */ + *buffer = 0; /* we terminate this with a zero byte */ return retcode; } @@ -1170,7 +1158,7 @@ int curl_mvsprintf(char *buffer, const char *format, va_list ap_save) { int retcode; retcode = dprintf_formatf(&buffer, storebuffer, format, ap_save); - *buffer=0; /* we terminate this with a zero byte */ + *buffer = 0; /* we terminate this with a zero byte */ return retcode; } diff --git a/lib/multi.c b/lib/multi.c index bb31dc1..98e5fca 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -44,6 +44,7 @@ #include "sigpipe.h" #include "vtls/vtls.h" #include "connect.h" +#include "http_proxy.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" @@ -58,7 +59,9 @@ #define CURL_SOCKET_HASH_TABLE_SIZE 911 #endif +#ifndef CURL_CONNECTION_HASH_SIZE #define CURL_CONNECTION_HASH_SIZE 97 +#endif #define CURL_MULTI_HANDLE 0x000bab1e @@ -69,7 +72,7 @@ static void singlesocket(struct Curl_multi *multi, struct Curl_easy *data); static int update_timer(struct Curl_multi *multi); -static CURLMcode add_next_timeout(struct timeval now, +static CURLMcode add_next_timeout(struct curltime now, struct Curl_multi *multi, struct Curl_easy *d); static CURLMcode multi_timeout(struct Curl_multi *multi, @@ -99,8 +102,6 @@ static const char * const statename[]={ }; #endif -static void multi_freetimeout(void *a, void *b); - /* function pointer called once when switching TO a state */ typedef void (*init_multistate_func)(struct Curl_easy *data); @@ -116,6 +117,13 @@ static void mstate(struct Curl_easy *data, CURLMstate state NULL, NULL, Curl_init_CONNECT, /* CONNECT */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + Curl_connect_free /* DO */ /* the rest is NULL too */ }; @@ -280,9 +288,8 @@ static int sh_init(struct curl_hash *hash, int hashsize) static CURLMcode multi_addmsg(struct Curl_multi *multi, struct Curl_message *msg) { - if(!Curl_llist_insert_next(multi->msglist, multi->msglist->tail, msg)) - return CURLM_OUT_OF_MEMORY; - + Curl_llist_insert_next(&multi->msglist, multi->msglist.tail, msg, + &msg->list); return CURLM_OK; } @@ -316,21 +323,8 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */ if(Curl_conncache_init(&multi->conn_cache, chashsize)) goto error; - multi->msglist = Curl_llist_alloc(multi_freeamsg); - if(!multi->msglist) - goto error; - - multi->pending = Curl_llist_alloc(multi_freeamsg); - if(!multi->pending) - goto error; - - /* allocate a new easy handle to use when closing cached connections */ - multi->closure_handle = curl_easy_init(); - if(!multi->closure_handle) - goto error; - - multi->closure_handle->multi = multi; - multi->closure_handle->state.conn_cache = &multi->conn_cache; + Curl_llist_init(&multi->msglist, multi_freeamsg); + Curl_llist_init(&multi->pending, multi_freeamsg); multi->max_pipeline_length = 5; @@ -343,10 +337,8 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */ Curl_hash_destroy(&multi->sockhash); Curl_hash_destroy(&multi->hostcache); Curl_conncache_destroy(&multi->conn_cache); - Curl_close(multi->closure_handle); - multi->closure_handle = NULL; - Curl_llist_destroy(multi->msglist, NULL); - Curl_llist_destroy(multi->pending, NULL); + Curl_llist_destroy(&multi->msglist, NULL); + Curl_llist_destroy(&multi->pending, NULL); free(multi); return NULL; @@ -361,8 +353,6 @@ struct Curl_multi *curl_multi_init(void) CURLMcode curl_multi_add_handle(struct Curl_multi *multi, struct Curl_easy *data) { - struct curl_llist *timeoutlist; - /* First, make some basic checks that the CURLM handle is a good handle */ if(!GOOD_MULTI_HANDLE(multi)) return CURLM_BAD_HANDLE; @@ -376,10 +366,11 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, if(data->multi) return CURLM_ADDED_ALREADY; - /* Allocate and initialize timeout list for easy handle */ - timeoutlist = Curl_llist_alloc(multi_freetimeout); - if(!timeoutlist) - return CURLM_OUT_OF_MEMORY; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + + /* Initialize timeout list for this handle */ + Curl_llist_init(&data->state.timeoutlist, NULL); /* * No failure allowed in this function beyond this point. And no @@ -388,10 +379,6 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, * function no matter what. */ - /* Make easy handle use timeout list initialized above */ - data->state.timeoutlist = timeoutlist; - timeoutlist = NULL; - /* set the easy handle */ multistate(data, CURLM_STATE_INIT); @@ -413,8 +400,11 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, data->dns.hostcachetype = HCACHE_MULTI; } - /* Point to the multi's connection cache */ - data->state.conn_cache = &multi->conn_cache; + /* Point to the shared or multi handle connection cache */ + if(data->share && (data->share->specifier & (1<< CURL_LOCK_DATA_CONNECT))) + data->state.conn_cache = &data->share->conn_cache; + else + data->state.conn_cache = &multi->conn_cache; /* This adds the new entry at the 'end' of the doubly-linked circular list of Curl_easy structs to try and maintain a FIFO queue so @@ -444,7 +434,7 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, sockets that time-out or have actions will be dealt with. Since this handle has no action yet, we make sure it times out to get things to happen. */ - Curl_expire(data, 0); + Curl_expire(data, 0, EXPIRE_RUN_NOW); /* increase the node-counter */ multi->num_easy++; @@ -468,8 +458,8 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, state somewhat we clone the timeouts from each added handle so that the closure handle always has the same timeouts as the most recently added easy handle. */ - multi->closure_handle->set.timeout = data->set.timeout; - multi->closure_handle->set.server_response_timeout = + data->state.conn_cache->closure_handle->set.timeout = data->set.timeout; + data->state.conn_cache->closure_handle->set.server_response_timeout = data->set.server_response_timeout; update_timer(multi); @@ -492,38 +482,6 @@ static void debug_print_sock_hash(void *p) } #endif -/* Mark the connection as 'idle', or close it if the cache is full. - Returns TRUE if the connection is kept, or FALSE if it was closed. */ -static bool -ConnectionDone(struct Curl_easy *data, struct connectdata *conn) -{ - /* data->multi->maxconnects can be negative, deal with it. */ - size_t maxconnects = - (data->multi->maxconnects < 0) ? data->multi->num_easy * 4: - data->multi->maxconnects; - struct connectdata *conn_candidate = NULL; - - /* Mark the current connection as 'unused' */ - conn->inuse = FALSE; - - if(maxconnects > 0 && - data->state.conn_cache->num_connections > maxconnects) { - infof(data, "Connection cache is full, closing the oldest one.\n"); - - conn_candidate = Curl_oldest_idle_connection(data); - - if(conn_candidate) { - /* Set the connection's owner correctly */ - conn_candidate->data = data; - - /* the winner gets the honour of being disconnected */ - (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE); - } - } - - return (conn_candidate == conn) ? FALSE : TRUE; -} - static CURLcode multi_done(struct connectdata **connp, CURLcode status, /* an error if this is called after an error was detected */ @@ -532,6 +490,7 @@ static CURLcode multi_done(struct connectdata **connp, CURLcode result; struct connectdata *conn; struct Curl_easy *data; + unsigned int i; DEBUGASSERT(*connp); @@ -579,11 +538,8 @@ static CURLcode multi_done(struct connectdata **connp, result = CURLE_ABORTED_BY_CALLBACK; } - if(conn->send_pipe->size + conn->recv_pipe->size != 0 && - !data->set.reuse_forbid && - !conn->bits.close) { - /* Stop if pipeline is not empty and we do not have to close - connection. */ + if(conn->send_pipe.size || conn->recv_pipe.size) { + /* Stop if pipeline is not empty . */ data->easy_conn = NULL; DEBUGF(infof(data, "Connection still in use, no more multi_done now!\n")); return CURLE_OK; @@ -596,11 +552,14 @@ static CURLcode multi_done(struct connectdata **connp, Curl_resolv_unlock(data, conn->dns_entry); /* done with this */ conn->dns_entry = NULL; } + Curl_hostcache_prune(data); /* if the transfer was completed in a paused state there can be buffered - data left to write and then kill */ - free(data->state.tempwrite); - data->state.tempwrite = NULL; + data left to free */ + for(i = 0; i < data->state.tempcount; i++) { + free(data->state.tempwrite[i].buf); + } + data->state.tempcount = 0; /* if data->set.reuse_forbid is TRUE, it means the libcurl client has forced us to close this connection. This is ignored for requests taking @@ -622,7 +581,8 @@ static CURLcode multi_done(struct connectdata **connp, && !(conn->ntlm.state == NTLMSTATE_TYPE2 || conn->proxyntlm.state == NTLMSTATE_TYPE2) #endif - ) || conn->bits.close || premature) { + ) || conn->bits.close + || (premature && !(conn->handler->flags & PROTOPT_STREAM))) { CURLcode res2 = Curl_disconnect(conn, premature); /* close connection */ /* If we had an error already, make sure we return that one. But @@ -631,17 +591,21 @@ static CURLcode multi_done(struct connectdata **connp, result = res2; } else { + char buffer[256]; + /* create string before returning the connection */ + snprintf(buffer, sizeof(buffer), + "Connection #%ld to host %s left intact", + conn->connection_id, + conn->bits.socksproxy ? conn->socks_proxy.host.dispname : + conn->bits.httpproxy ? conn->http_proxy.host.dispname : + conn->bits.conn_to_host ? conn->conn_to_host.dispname : + conn->host.dispname); + /* the connection is no longer in use */ - if(ConnectionDone(data, conn)) { + if(Curl_conncache_return_conn(conn)) { /* remember the most recently used connection */ data->state.lastconnect = conn; - - infof(data, "Connection #%ld to host %s left intact\n", - conn->connection_id, - conn->bits.socksproxy ? conn->socks_proxy.host.dispname : - conn->bits.httpproxy ? conn->http_proxy.host.dispname : - conn->bits.conn_to_host ? conn->conn_to_host.dispname : - conn->host.dispname); + infof(data, "%s\n", buffer); } else data->state.lastconnect = NULL; @@ -676,6 +640,9 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, if(!data->multi) return CURLM_OK; /* it is already removed so let's say it is fine! */ + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE; easy_owns_conn = (data->easy_conn && (data->easy_conn->data == easy)) ? TRUE : FALSE; @@ -695,13 +662,13 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, if(data->easy_conn && data->mstate > CURLM_STATE_DO && data->mstate < CURLM_STATE_COMPLETED) { + /* Set connection owner so that the DONE function closes it. We can + safely do this here since connection is killed. */ + data->easy_conn->data = easy; /* If the handle is in a pipeline and has started sending off its request but not received its response yet, we need to close connection. */ streamclose(data->easy_conn, "Removed with partial response"); - /* Set connection owner so that the DONE function closes it. We can - safely do this here since connection is killed. */ - data->easy_conn->data = easy; easy_owns_conn = TRUE; } @@ -710,12 +677,6 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, curl_easy_cleanup is called. */ Curl_expire_clear(data); - if(data->dns.hostcachetype == HCACHE_MULTI) { - /* stop using the multi handle's DNS cache */ - data->dns.hostcache = NULL; - data->dns.hostcachetype = HCACHE_NONE; - } - if(data->easy_conn) { /* we must call multi_done() here (if we still own the connection) so that @@ -734,14 +695,18 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, Curl_getoff_all_pipelines(data, data->easy_conn); } + if(data->dns.hostcachetype == HCACHE_MULTI) { + /* stop using the multi handle's DNS cache, *after* the possible + multi_done() call above */ + data->dns.hostcache = NULL; + data->dns.hostcachetype = HCACHE_NONE; + } + Curl_wildcard_dtor(&data->wildcard); /* destroy the timeout list that is held in the easy handle, do this *after* multi_done() as that may actually call Curl_expire that uses this */ - if(data->state.timeoutlist) { - Curl_llist_destroy(data->state.timeoutlist, NULL); - data->state.timeoutlist = NULL; - } + Curl_llist_destroy(&data->state.timeoutlist, NULL); /* as this was using a shared connection cache we clear the pointer to that since we're not part of that multi handle anymore */ @@ -764,11 +729,11 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, /* make sure there's no pending message in the queue sent from this easy handle */ - for(e = multi->msglist->head; e; e = e->next) { + for(e = multi->msglist.head; e; e = e->next) { struct Curl_message *msg = e->ptr; if(msg->extmsg.easy_handle == easy) { - Curl_llist_remove(multi->msglist, e, NULL); + Curl_llist_remove(&multi->msglist, e, NULL); /* there can only be one from this specific handle */ break; } @@ -810,8 +775,8 @@ static int waitconnect_getsock(struct connectdata *conn, int numsocks) { int i; - int s=0; - int rc=0; + int s = 0; + int rc = 0; if(!numsocks) return GETSOCK_BLANK; @@ -821,7 +786,7 @@ static int waitconnect_getsock(struct connectdata *conn, return Curl_ssl_getsock(conn, sock, numsocks); #endif - for(i=0; i<2; i++) { + for(i = 0; i<2; i++) { if(conn->tempsock[i] != CURL_SOCKET_BAD) { sock[s] = conn->tempsock[i]; rc |= GETSOCK_WRITESOCK(s++); @@ -842,7 +807,7 @@ static int waitproxyconnect_getsock(struct connectdata *conn, /* when we've sent a CONNECT to a proxy, we should rather wait for the socket to become readable to be able to get the response headers */ - if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) + if(conn->connect_state) return GETSOCK_READSOCK(0); return GETSOCK_WRITESOCK(0); @@ -932,7 +897,7 @@ CURLMcode curl_multi_fdset(struct Curl_multi *multi, Some easy handles may not have connected to the remote host yet, and then we must make sure that is done. */ struct Curl_easy *data; - int this_max_fd=-1; + int this_max_fd = -1; curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; int bitmap; int i; @@ -941,11 +906,14 @@ CURLMcode curl_multi_fdset(struct Curl_multi *multi, if(!GOOD_MULTI_HANDLE(multi)) return CURLM_BAD_HANDLE; - data=multi->easyp; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + + data = multi->easyp; while(data) { bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) { + for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++) { curl_socket_t s = CURL_SOCKET_BAD; if((bitmap & GETSOCK_READSOCK(i)) && VALID_SOCK((sockbunch[i]))) { @@ -959,10 +927,8 @@ CURLMcode curl_multi_fdset(struct Curl_multi *multi, if(s == CURL_SOCKET_BAD) /* this socket is unused, break out of loop */ break; - else { - if((int)s > this_max_fd) - this_max_fd = (int)s; - } + if((int)s > this_max_fd) + this_max_fd = (int)s; } data = data->next; /* check next handle */ @@ -973,6 +939,8 @@ CURLMcode curl_multi_fdset(struct Curl_multi *multi, return CURLM_OK; } +#define NUM_POLLS_ON_STACK 10 + CURLMcode curl_multi_wait(struct Curl_multi *multi, struct curl_waitfd extra_fds[], unsigned int extra_nfds, @@ -986,12 +954,17 @@ CURLMcode curl_multi_wait(struct Curl_multi *multi, unsigned int nfds = 0; unsigned int curlfds; struct pollfd *ufds = NULL; + bool ufds_malloc = FALSE; long timeout_internal; int retcode = 0; + struct pollfd a_few_on_stack[NUM_POLLS_ON_STACK]; if(!GOOD_MULTI_HANDLE(multi)) return CURLM_BAD_HANDLE; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + /* If the internally desired timeout is actually shorter than requested from the outside, then use the shorter time! But only if the internal timer is actually larger than -1! */ @@ -1000,11 +973,11 @@ CURLMcode curl_multi_wait(struct Curl_multi *multi, timeout_ms = (int)timeout_internal; /* Count up how many fds we have from the multi handle */ - data=multi->easyp; + data = multi->easyp; while(data) { bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) { + for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++) { curl_socket_t s = CURL_SOCKET_BAD; if(bitmap & GETSOCK_READSOCK(i)) { @@ -1026,10 +999,19 @@ CURLMcode curl_multi_wait(struct Curl_multi *multi, curlfds = nfds; /* number of internal file descriptors */ nfds += extra_nfds; /* add the externally provided ones */ - if(nfds || extra_nfds) { - ufds = malloc(nfds * sizeof(struct pollfd)); - if(!ufds) - return CURLM_OUT_OF_MEMORY; + if(nfds) { + if(nfds > NUM_POLLS_ON_STACK) { + /* 'nfds' is a 32 bit value and 'struct pollfd' is typically 8 bytes + big, so at 2^29 sockets this value might wrap. When a process gets + the capability to actually handle over 500 million sockets this + calculation needs a integer overflow check. */ + ufds = malloc(nfds * sizeof(struct pollfd)); + if(!ufds) + return CURLM_OUT_OF_MEMORY; + ufds_malloc = TRUE; + } + else + ufds = &a_few_on_stack[0]; } nfds = 0; @@ -1038,11 +1020,11 @@ CURLMcode curl_multi_wait(struct Curl_multi *multi, if(curlfds) { /* Add the curl handles to our pollfds first */ - data=multi->easyp; + data = multi->easyp; while(data) { bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) { + for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++) { curl_socket_t s = CURL_SOCKET_BAD; if(bitmap & GETSOCK_READSOCK(i)) { @@ -1107,7 +1089,8 @@ CURLMcode curl_multi_wait(struct Curl_multi *multi, } } - free(ufds); + if(ufds_malloc) + free(ufds); if(ret) *ret = retcode; return CURLM_OK; @@ -1147,6 +1130,9 @@ CURLMcode Curl_multi_add_perform(struct Curl_multi *multi, { CURLMcode rc; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + rc = curl_multi_add_handle(multi, data); if(!rc) { struct SingleRequest *k = &data->req; @@ -1225,15 +1211,15 @@ static CURLcode multi_reconnect_request(struct connectdata **connp) */ static void do_complete(struct connectdata *conn) { - conn->data->req.chunk=FALSE; + conn->data->req.chunk = FALSE; conn->data->req.maxfd = (conn->sockfd>conn->writesockfd? - conn->sockfd:conn->writesockfd)+1; + conn->sockfd:conn->writesockfd) + 1; Curl_pgrsTime(conn->data, TIMER_PRETRANSFER); } static CURLcode multi_do(struct connectdata **connp, bool *done) { - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; struct connectdata *conn = *connp; struct Curl_easy *data = conn->data; @@ -1282,7 +1268,7 @@ static CURLcode multi_do(struct connectdata **connp, bool *done) static CURLcode multi_do_more(struct connectdata *conn, int *complete) { - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; *complete = 0; @@ -1297,7 +1283,7 @@ static CURLcode multi_do_more(struct connectdata *conn, int *complete) } static CURLMcode multi_runsingle(struct Curl_multi *multi, - struct timeval now, + struct curltime now, struct Curl_easy *data) { struct Curl_message *msg = NULL; @@ -1311,7 +1297,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, struct SingleRequest *k; time_t timeout_ms; time_t recv_timeout_ms; - time_t send_timeout_ms; + timediff_t send_timeout_ms; int control; if(!GOOD_EASY_HANDLE(data)) @@ -1357,16 +1343,16 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, } if(data->easy_conn && data->mstate > CURLM_STATE_CONNECT && - data->mstate < CURLM_STATE_COMPLETED) + data->mstate < CURLM_STATE_COMPLETED) { /* Make sure we set the connection's current owner */ data->easy_conn->data = data; + } if(data->easy_conn && (data->mstate >= CURLM_STATE_CONNECT) && (data->mstate < CURLM_STATE_COMPLETED)) { /* we need to wait for the connect state as only then is the start time stored, but we must not check already completed handles */ - timeout_ms = Curl_timeleft(data, &now, (data->mstate <= CURLM_STATE_WAITDO)? TRUE:FALSE); @@ -1375,23 +1361,23 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* Handle timed out */ if(data->mstate == CURLM_STATE_WAITRESOLVE) failf(data, "Resolving timed out after %ld milliseconds", - Curl_tvdiff(now, data->progress.t_startsingle)); + Curl_timediff(now, data->progress.t_startsingle)); else if(data->mstate == CURLM_STATE_WAITCONNECT) failf(data, "Connection timed out after %ld milliseconds", - Curl_tvdiff(now, data->progress.t_startsingle)); + Curl_timediff(now, data->progress.t_startsingle)); else { k = &data->req; if(k->size != -1) { failf(data, "Operation timed out after %ld milliseconds with %" CURL_FORMAT_CURL_OFF_T " out of %" CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(now, data->progress.t_startsingle), + Curl_timediff(now, data->progress.t_startsingle), k->bytecount, k->size); } else { failf(data, "Operation timed out after %ld milliseconds with %" CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(now, data->progress.t_startsingle), + Curl_timediff(now, data->progress.t_startsingle), k->bytecount); } } @@ -1411,7 +1397,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, switch(data->mstate) { case CURLM_STATE_INIT: /* init this transfer. */ - result=Curl_pretransfer(data); + result = Curl_pretransfer(data); if(!result) { /* after init, go CONNECT */ @@ -1437,10 +1423,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multistate(data, CURLM_STATE_CONNECT_PEND); /* add this handle to the list of connect-pending handles */ - if(!Curl_llist_insert_next(multi->pending, multi->pending->tail, data)) - result = CURLE_OUT_OF_MEMORY; - else - result = CURLE_OK; + Curl_llist_insert_next(&multi->pending, multi->pending.tail, data, + &data->connect_queue); + result = CURLE_OK; break; } @@ -1464,7 +1449,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, CURLM_STATE_WAITDO:CURLM_STATE_DO); else { #ifndef CURL_DISABLE_HTTP - if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) + if(Curl_connect_ongoing(data->easy_conn)) multistate(data, CURLM_STATE_WAITPROXYCONNECT); else #endif @@ -1529,7 +1514,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, CURLM_STATE_WAITDO:CURLM_STATE_DO); else { #ifndef CURL_DISABLE_HTTP - if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) + if(Curl_connect_ongoing(data->easy_conn)) multistate(data, CURLM_STATE_WAITPROXYCONNECT); else #endif @@ -1561,7 +1546,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, else if(!result) { if((data->easy_conn->http_proxy.proxytype != CURLPROXY_HTTPS || data->easy_conn->bits.proxy_ssl_connected[FIRSTSOCKET]) && - (data->easy_conn->tunnel_state[FIRSTSOCKET] != TUNNEL_CONNECT)) { + Curl_connect_complete(data->easy_conn)) { rc = CURLM_CALL_MULTI_PERFORM; /* initiate protocol connect phase */ multistate(data, CURLM_STATE_SENDPROTOCONNECT); @@ -1577,7 +1562,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, #ifndef CURL_DISABLE_HTTP if((data->easy_conn->http_proxy.proxytype == CURLPROXY_HTTPS && !data->easy_conn->bits.proxy_ssl_connected[FIRSTSOCKET]) || - (data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)) { + Curl_connect_ongoing(data->easy_conn)) { multistate(data, CURLM_STATE_WAITPROXYCONNECT); break; } @@ -1657,7 +1642,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(!result) { if(!dophase_done) { /* some steps needed for wildcard matching */ - if(data->set.wildcardmatch) { + if(data->state.wildcardmatch) { struct WildcardData *wc = &data->wildcard; if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) { /* skip some states if it is important */ @@ -1694,7 +1679,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, * back to the CONNECT phase so we can try again. */ char *newurl = NULL; - followtype follow=FOLLOW_NONE; + followtype follow = FOLLOW_NONE; CURLcode drc; bool retry = FALSE; @@ -1724,20 +1709,18 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, else { /* Follow failed */ result = drc; - free(newurl); } } else { /* done didn't return OK or SEND_ERROR */ result = drc; - free(newurl); } } else { /* Have error handler disconnect conn if we can't retry */ stream_error = TRUE; - free(newurl); } + free(newurl); } else { /* failure detected */ @@ -1782,7 +1765,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(control) { /* if positive, advance to DO_DONE if negative, go back to DOING */ - multistate(data, control==1? + multistate(data, control == 1? CURLM_STATE_DO_DONE: CURLM_STATE_DOING); rc = CURLM_CALL_MULTI_PERFORM; @@ -1811,7 +1794,13 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, (data->easy_conn->writesockfd != CURL_SOCKET_BAD)) multistate(data, CURLM_STATE_WAITPERFORM); else + { + if(data->state.wildcardmatch && + ((data->easy_conn->handler->flags & PROTOPT_WILDCARD) == 0)) { + data->wildcard.state = CURLWC_DONE; + } multistate(data, CURLM_STATE_DONE); + } rc = CURLM_CALL_MULTI_PERFORM; break; @@ -1851,9 +1840,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(send_timeout_ms <= 0 && recv_timeout_ms <= 0) multistate(data, CURLM_STATE_PERFORM); else if(send_timeout_ms >= recv_timeout_ms) - Curl_expire_latest(data, send_timeout_ms); + Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST); else - Curl_expire_latest(data, recv_timeout_ms); + Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST); } break; @@ -1884,9 +1873,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(send_timeout_ms > 0 || recv_timeout_ms > 0) { multistate(data, CURLM_STATE_TOOFAST); if(send_timeout_ms >= recv_timeout_ms) - Curl_expire_latest(data, send_timeout_ms); + Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST); else - Curl_expire_latest(data, recv_timeout_ms); + Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST); break; } @@ -1937,17 +1926,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multi_done(&data->easy_conn, result, TRUE); } else if(done) { - followtype follow=FOLLOW_NONE; + followtype follow = FOLLOW_NONE; /* call this even if the readwrite function returned error */ Curl_posttransfer(data); /* we're no longer receiving */ - Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); + Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe); /* expire the new receiving pipeline head */ - if(data->easy_conn->recv_pipe->head) - Curl_expire_latest(data->easy_conn->recv_pipe->head->ptr, 0); + if(data->easy_conn->recv_pipe.head) + Curl_expire(data->easy_conn->recv_pipe.head->ptr, 0, EXPIRE_RUN_NOW); /* Check if we can move pending requests to send pipe */ Curl_multi_process_pending_handles(multi); @@ -1971,9 +1960,6 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(!result) { multistate(data, CURLM_STATE_CONNECT); rc = CURLM_CALL_MULTI_PERFORM; - newurl = NULL; /* handed over the memory ownership to - Curl_follow(), make sure we don't free() it - here */ } } } @@ -1987,9 +1973,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, newurl = data->req.location; data->req.location = NULL; result = Curl_follow(data, newurl, FOLLOW_FAKE); - if(!result) - newurl = NULL; /* allocation was handed over Curl_follow() */ - else + if(result) stream_error = TRUE; } @@ -2012,7 +1996,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, CURLcode res; /* Remove ourselves from the receive pipeline, if we are there. */ - Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); + Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe); /* Check if we can move pending requests to send pipe */ Curl_multi_process_pending_handles(multi); @@ -2033,7 +2017,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, data->easy_conn = NULL; } - if(data->set.wildcardmatch) { + if(data->state.wildcardmatch) { if(data->wildcard.state != CURLWC_DONE) { /* if a wildcard is set and we are not ending -> lets start again with CURLM_STATE_INIT */ @@ -2088,8 +2072,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* if this has a connection, unsubscribe from the pipelines */ Curl_pipeline_leave_write(data->easy_conn); Curl_pipeline_leave_read(data->easy_conn); - Curl_removeHandleFromPipeline(data, data->easy_conn->send_pipe); - Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); + Curl_removeHandleFromPipeline(data, &data->easy_conn->send_pipe); + Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe); if(stream_error) { /* Don't attempt to send data over a connection that timed out */ @@ -2148,14 +2132,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, CURLMcode curl_multi_perform(struct Curl_multi *multi, int *running_handles) { struct Curl_easy *data; - CURLMcode returncode=CURLM_OK; + CURLMcode returncode = CURLM_OK; struct Curl_tree *t; - struct timeval now = Curl_tvnow(); + struct curltime now = Curl_now(); if(!GOOD_MULTI_HANDLE(multi)) return CURLM_BAD_HANDLE; - data=multi->easyp; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + + data = multi->easyp; while(data) { CURLMcode result; SIGPIPE_VARIABLE(pipe_st); @@ -2196,61 +2183,24 @@ CURLMcode curl_multi_perform(struct Curl_multi *multi, int *running_handles) return returncode; } -static void close_all_connections(struct Curl_multi *multi) -{ - struct connectdata *conn; - - conn = Curl_conncache_find_first_connection(&multi->conn_cache); - while(conn) { - SIGPIPE_VARIABLE(pipe_st); - conn->data = multi->closure_handle; - - sigpipe_ignore(conn->data, &pipe_st); - conn->data->easy_conn = NULL; /* clear the easy handle's connection - pointer */ - /* This will remove the connection from the cache */ - connclose(conn, "kill all"); - (void)Curl_disconnect(conn, FALSE); - sigpipe_restore(&pipe_st); - - conn = Curl_conncache_find_first_connection(&multi->conn_cache); - } -} - CURLMcode curl_multi_cleanup(struct Curl_multi *multi) { struct Curl_easy *data; struct Curl_easy *nextdata; if(GOOD_MULTI_HANDLE(multi)) { - bool restore_pipe = FALSE; - SIGPIPE_VARIABLE(pipe_st); + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; multi->type = 0; /* not good anymore */ - /* Close all the connections in the connection cache */ - close_all_connections(multi); - - if(multi->closure_handle) { - sigpipe_ignore(multi->closure_handle, &pipe_st); - restore_pipe = TRUE; - - multi->closure_handle->dns.hostcache = &multi->hostcache; - Curl_hostcache_clean(multi->closure_handle, - multi->closure_handle->dns.hostcache); - - Curl_close(multi->closure_handle); - } - - Curl_hash_destroy(&multi->sockhash); - Curl_conncache_destroy(&multi->conn_cache); - Curl_llist_destroy(multi->msglist, NULL); - Curl_llist_destroy(multi->pending, NULL); - - /* remove all easy handles */ + /* Firsrt remove all remaining easy handles */ data = multi->easyp; while(data) { - nextdata=data->next; + nextdata = data->next; + if(!data->state.done && data->easy_conn) + /* if DONE was never called for this handle */ + (void)multi_done(&data->easy_conn, CURLE_OK, TRUE); if(data->dns.hostcachetype == HCACHE_MULTI) { /* clear out the usage of the shared DNS cache */ Curl_hostcache_clean(data, data->dns.hostcache); @@ -2265,6 +2215,14 @@ CURLMcode curl_multi_cleanup(struct Curl_multi *multi) data = nextdata; } + /* Close all the connections in the connection cache */ + Curl_conncache_close_all_connections(&multi->conn_cache); + + Curl_hash_destroy(&multi->sockhash); + Curl_conncache_destroy(&multi->conn_cache); + Curl_llist_destroy(&multi->msglist, NULL); + Curl_llist_destroy(&multi->pending, NULL); + Curl_hash_destroy(&multi->hostcache); /* Free the blacklists by setting them to NULL */ @@ -2272,13 +2230,10 @@ CURLMcode curl_multi_cleanup(struct Curl_multi *multi) Curl_pipeline_set_server_blacklist(NULL, &multi->pipelining_server_bl); free(multi); - if(restore_pipe) - sigpipe_restore(&pipe_st); return CURLM_OK; } - else - return CURLM_BAD_HANDLE; + return CURLM_BAD_HANDLE; } /* @@ -2297,24 +2252,25 @@ CURLMsg *curl_multi_info_read(struct Curl_multi *multi, int *msgs_in_queue) *msgs_in_queue = 0; /* default to none */ - if(GOOD_MULTI_HANDLE(multi) && Curl_llist_count(multi->msglist)) { + if(GOOD_MULTI_HANDLE(multi) && + !multi->in_callback && + Curl_llist_count(&multi->msglist)) { /* there is one or more messages in the list */ struct curl_llist_element *e; /* extract the head of the list to return */ - e = multi->msglist->head; + e = multi->msglist.head; msg = e->ptr; /* remove the extracted entry */ - Curl_llist_remove(multi->msglist, e, NULL); + Curl_llist_remove(&multi->msglist, e, NULL); - *msgs_in_queue = curlx_uztosi(Curl_llist_count(multi->msglist)); + *msgs_in_queue = curlx_uztosi(Curl_llist_count(&multi->msglist)); return &msg->extmsg; } - else - return NULL; + return NULL; } /* @@ -2332,7 +2288,7 @@ static void singlesocket(struct Curl_multi *multi, int num; unsigned int curraction; - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) + for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++) socks[i] = CURL_SOCKET_BAD; /* Fill in the 'current' struct with the state as it is now: what sockets to @@ -2344,7 +2300,7 @@ static void singlesocket(struct Curl_multi *multi, longer supervised ones and add new ones */ /* walk over the sockets we got right now */ - for(i=0; (i< MAX_SOCKSPEREASYHANDLE) && + for(i = 0; (i< MAX_SOCKSPEREASYHANDLE) && (curraction & (GETSOCK_READSOCK(i) | GETSOCK_WRITESOCK(i))); i++) { int action = CURL_POLL_NONE; @@ -2388,10 +2344,10 @@ static void singlesocket(struct Curl_multi *multi, /* when we've walked over all the sockets we should have right now, we must make sure to detect sockets that are removed */ - for(i=0; i< data->numsocks; i++) { + for(i = 0; i< data->numsocks; i++) { int j; s = data->sockets[i]; - for(j=0; jeasy_conn; if(easy_conn) { - if(easy_conn->recv_pipe && easy_conn->recv_pipe->size > 1) { + if(easy_conn->recv_pipe.size > 1) { /* the handle should not be removed from the pipe yet */ remove_sock_from_hash = FALSE; @@ -2418,12 +2374,12 @@ static void singlesocket(struct Curl_multi *multi, isn't already) */ if(entry->easy == data) { if(Curl_recvpipe_head(data, easy_conn)) - entry->easy = easy_conn->recv_pipe->head->next->ptr; + entry->easy = easy_conn->recv_pipe.head->next->ptr; else - entry->easy = easy_conn->recv_pipe->head->ptr; + entry->easy = easy_conn->recv_pipe.head->ptr; } } - if(easy_conn->send_pipe && easy_conn->send_pipe->size > 1) { + if(easy_conn->send_pipe.size > 1) { /* the handle should not be removed from the pipe yet */ remove_sock_from_hash = FALSE; @@ -2432,9 +2388,9 @@ static void singlesocket(struct Curl_multi *multi, isn't already) */ if(entry->easy == data) { if(Curl_sendpipe_head(data, easy_conn)) - entry->easy = easy_conn->send_pipe->head->next->ptr; + entry->easy = easy_conn->send_pipe.head->next->ptr; else - entry->easy = easy_conn->send_pipe->head->ptr; + entry->easy = easy_conn->send_pipe.head->ptr; } } /* Don't worry about overwriting recv_pipe head with send_pipe_head, @@ -2490,8 +2446,6 @@ void Curl_multi_closed(struct connectdata *conn, curl_socket_t s) } } - - /* * add_next_timeout() * @@ -2504,20 +2458,23 @@ void Curl_multi_closed(struct connectdata *conn, curl_socket_t s) * The splay tree only has each sessionhandle as a single node and the nearest * timeout is used to sort it on. */ -static CURLMcode add_next_timeout(struct timeval now, +static CURLMcode add_next_timeout(struct curltime now, struct Curl_multi *multi, struct Curl_easy *d) { - struct timeval *tv = &d->state.expiretime; - struct curl_llist *list = d->state.timeoutlist; + struct curltime *tv = &d->state.expiretime; + struct curl_llist *list = &d->state.timeoutlist; struct curl_llist_element *e; + struct time_node *node = NULL; /* move over the timeout list for this specific handle and remove all timeouts that are now passed tense and store the next pending timeout in *tv */ for(e = list->head; e;) { struct curl_llist_element *n = e->next; - time_t diff = curlx_tvdiff(*(struct timeval *)e->ptr, now); + timediff_t diff; + node = (struct time_node *)e->ptr; + diff = Curl_timediff(node->time, now); if(diff <= 0) /* remove outdated entry */ Curl_llist_remove(list, e, NULL); @@ -2535,12 +2492,10 @@ static CURLMcode add_next_timeout(struct timeval now, } else { /* copy the first entry to 'tv' */ - memcpy(tv, e->ptr, sizeof(*tv)); + memcpy(tv, &node->time, sizeof(*tv)); - /* remove first entry from list */ - Curl_llist_remove(list, e, NULL); - - /* insert this node again into the splay */ + /* Insert this node again into the splay. Keep the timer in the list in + case we need to recompute future timers. */ multi->timetree = Curl_splayinsert(*tv, multi->timetree, &d->state.timenode); } @@ -2556,7 +2511,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi, CURLMcode result = CURLM_OK; struct Curl_easy *data = NULL; struct Curl_tree *t; - struct timeval now = Curl_tvnow(); + struct curltime now = Curl_now(); if(checkall) { /* *perform() deals with running_handles on its own */ @@ -2565,7 +2520,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi, /* walk through each easy handle and do the socket state change magic and callbacks */ if(result != CURLM_BAD_HANDLE) { - data=multi->easyp; + data = multi->easyp; while(data) { singlesocket(multi, data); data = data->next; @@ -2575,7 +2530,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi, /* or should we fall-through and do the timer-based stuff? */ return result; } - else if(s != CURL_SOCKET_TIMEOUT) { + if(s != CURL_SOCKET_TIMEOUT) { struct Curl_sh_entry *entry = sh_getentry(&multi->sockhash, s); @@ -2600,13 +2555,11 @@ static CURLMcode multi_socket(struct Curl_multi *multi, head. If we should read from the socket, take the recv_pipe head. */ if(data->easy_conn) { if((ev_bitmask & CURL_POLL_OUT) && - data->easy_conn->send_pipe && - data->easy_conn->send_pipe->head) - data = data->easy_conn->send_pipe->head->ptr; + data->easy_conn->send_pipe.head) + data = data->easy_conn->send_pipe.head->ptr; else if((ev_bitmask & CURL_POLL_IN) && - data->easy_conn->recv_pipe && - data->easy_conn->recv_pipe->head) - data = data->easy_conn->recv_pipe->head->ptr; + data->easy_conn->recv_pipe.head) + data = data->easy_conn->recv_pipe.head->ptr; } if(data->easy_conn && @@ -2634,8 +2587,8 @@ static CURLMcode multi_socket(struct Curl_multi *multi, data = NULL; /* set data to NULL again to avoid calling multi_runsingle() in case there's no need to */ - now = Curl_tvnow(); /* get a newer time since the multi_runsingle() loop - may have taken some time */ + now = Curl_now(); /* get a newer time since the multi_runsingle() loop + may have taken some time */ } } else { @@ -2691,6 +2644,9 @@ CURLMcode curl_multi_setopt(struct Curl_multi *multi, if(!GOOD_MULTI_HANDLE(multi)) return CURLM_BAD_HANDLE; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + va_start(param, option); switch(option) { @@ -2755,7 +2711,10 @@ CURLMcode curl_multi_setopt(struct Curl_multi *multi, CURLMcode curl_multi_socket(struct Curl_multi *multi, curl_socket_t s, int *running_handles) { - CURLMcode result = multi_socket(multi, FALSE, s, 0, running_handles); + CURLMcode result; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + result = multi_socket(multi, FALSE, s, 0, running_handles); if(CURLM_OK >= result) update_timer(multi); return result; @@ -2764,8 +2723,10 @@ CURLMcode curl_multi_socket(struct Curl_multi *multi, curl_socket_t s, CURLMcode curl_multi_socket_action(struct Curl_multi *multi, curl_socket_t s, int ev_bitmask, int *running_handles) { - CURLMcode result = multi_socket(multi, FALSE, s, - ev_bitmask, running_handles); + CURLMcode result; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + result = multi_socket(multi, FALSE, s, ev_bitmask, running_handles); if(CURLM_OK >= result) update_timer(multi); return result; @@ -2774,8 +2735,10 @@ CURLMcode curl_multi_socket_action(struct Curl_multi *multi, curl_socket_t s, CURLMcode curl_multi_socket_all(struct Curl_multi *multi, int *running_handles) { - CURLMcode result = multi_socket(multi, TRUE, CURL_SOCKET_BAD, 0, - running_handles); + CURLMcode result; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + result = multi_socket(multi, TRUE, CURL_SOCKET_BAD, 0, running_handles); if(CURLM_OK >= result) update_timer(multi); return result; @@ -2784,19 +2747,19 @@ CURLMcode curl_multi_socket_all(struct Curl_multi *multi, int *running_handles) static CURLMcode multi_timeout(struct Curl_multi *multi, long *timeout_ms) { - static struct timeval tv_zero = {0, 0}; + static struct curltime tv_zero = {0, 0}; if(multi->timetree) { /* we have a tree of expire times */ - struct timeval now = Curl_tvnow(); + struct curltime now = Curl_now(); /* splay the lowest to the bottom */ multi->timetree = Curl_splay(tv_zero, multi->timetree); if(Curl_splaycomparekeys(multi->timetree->key, now) > 0) { /* some time left before expiration */ - *timeout_ms = (long)curlx_tvdiff(multi->timetree->key, now); - if(!*timeout_ms) + timediff_t diff = Curl_timediff(multi->timetree->key, now); + if(diff <= 0) /* * Since we only provide millisecond resolution on the returned value * and the diff might be less than one millisecond here, we don't @@ -2804,7 +2767,11 @@ static CURLMcode multi_timeout(struct Curl_multi *multi, * processors while the diff is still present but less than one * millisecond! instead we return 1 until the time is ripe. */ - *timeout_ms=1; + *timeout_ms = 1; + else + /* this should be safe even on 64 bit archs, as we don't use that + overly long timeouts */ + *timeout_ms = (long)diff; } else /* 0 means immediately */ @@ -2823,6 +2790,9 @@ CURLMcode curl_multi_timeout(struct Curl_multi *multi, if(!GOOD_MULTI_HANDLE(multi)) return CURLM_BAD_HANDLE; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + return multi_timeout(multi, timeout_ms); } @@ -2840,7 +2810,7 @@ static int update_timer(struct Curl_multi *multi) return -1; } if(timeout_ms < 0) { - static const struct timeval none={0, 0}; + static const struct curltime none = {0, 0}; if(Curl_splaycomparekeys(none, multi->timer_lastcall)) { multi->timer_lastcall = none; /* there's no timeout now but there was one previously, tell the app to @@ -2863,17 +2833,23 @@ static int update_timer(struct Curl_multi *multi) } /* - * multi_freetimeout() + * multi_deltimeout() * - * Callback used by the llist system when a single timeout list entry is - * destroyed. + * Remove a given timestamp from the list of timeouts. */ -static void multi_freetimeout(void *user, void *entryptr) +static void +multi_deltimeout(struct Curl_easy *data, expire_id eid) { - (void)user; - - /* the entry was plain malloc()'ed */ - free(entryptr); + struct curl_llist_element *e; + struct curl_llist *timeoutlist = &data->state.timeoutlist; + /* find and remove the specific node from the list */ + for(e = timeoutlist->head; e; e = e->next) { + struct time_node *n = (struct time_node *)e->ptr; + if(n->eid == eid) { + Curl_llist_remove(timeoutlist, e, NULL); + return; + } + } } /* @@ -2884,25 +2860,28 @@ static void multi_freetimeout(void *user, void *entryptr) * */ static CURLMcode -multi_addtimeout(struct curl_llist *timeoutlist, - struct timeval *stamp) +multi_addtimeout(struct Curl_easy *data, + struct curltime *stamp, + expire_id eid) { struct curl_llist_element *e; - struct timeval *timedup; + struct time_node *node; struct curl_llist_element *prev = NULL; + size_t n; + struct curl_llist *timeoutlist = &data->state.timeoutlist; - timedup = malloc(sizeof(*timedup)); - if(!timedup) - return CURLM_OUT_OF_MEMORY; + node = &data->state.expires[eid]; - /* copy the timestamp */ - memcpy(timedup, stamp, sizeof(*timedup)); + /* copy the timestamp and id */ + memcpy(&node->time, stamp, sizeof(*stamp)); + node->eid = eid; /* also marks it as in use */ - if(Curl_llist_count(timeoutlist)) { + n = Curl_llist_count(timeoutlist); + if(n) { /* find the correct spot in the list */ for(e = timeoutlist->head; e; e = e->next) { - struct timeval *checktime = e->ptr; - time_t diff = curlx_tvdiff(*checktime, *timedup); + struct time_node *check = (struct time_node *)e->ptr; + timediff_t diff = Curl_timediff(check->time, node->time); if(diff > 0) break; prev = e; @@ -2912,11 +2891,7 @@ multi_addtimeout(struct curl_llist *timeoutlist, /* else this is the first timeout on the list */ - if(!Curl_llist_insert_next(timeoutlist, prev, timedup)) { - free(timedup); - return CURLM_OUT_OF_MEMORY; - } - + Curl_llist_insert_next(timeoutlist, prev, node, &node->list); return CURLM_OK; } @@ -2928,44 +2903,51 @@ multi_addtimeout(struct curl_llist *timeoutlist, * * The timeout will be added to a queue of timeouts if it defines a moment in * time that is later than the current head of queue. + * + * Expire replaces a former timeout using the same id if already set. */ -void Curl_expire(struct Curl_easy *data, time_t milli) +void Curl_expire(struct Curl_easy *data, time_t milli, expire_id id) { struct Curl_multi *multi = data->multi; - struct timeval *nowp = &data->state.expiretime; + struct curltime *nowp = &data->state.expiretime; int rc; - struct timeval set; + struct curltime set; /* this is only interesting while there is still an associated multi struct remaining! */ if(!multi) return; - set = Curl_tvnow(); - set.tv_sec += (long)(milli/1000); - set.tv_usec += (milli%1000)*1000; + DEBUGASSERT(id < EXPIRE_LAST); + + set = Curl_now(); + set.tv_sec += milli/1000; + set.tv_usec += (unsigned int)(milli%1000)*1000; if(set.tv_usec >= 1000000) { set.tv_sec++; set.tv_usec -= 1000000; } + /* Remove any timer with the same id just in case. */ + multi_deltimeout(data, id); + + /* Add it to the timer list. It must stay in the list until it has expired + in case we need to recompute the minimum timer later. */ + multi_addtimeout(data, &set, id); + if(nowp->tv_sec || nowp->tv_usec) { /* This means that the struct is added as a node in the splay tree. Compare if the new time is earlier, and only remove-old/add-new if it is. */ - time_t diff = curlx_tvdiff(set, *nowp); + timediff_t diff = Curl_timediff(set, *nowp); + if(diff > 0) { - /* the new expire time was later so just add it to the queue - and get out */ - multi_addtimeout(data->state.timeoutlist, &set); + /* The current splay tree entry is sooner than this new expiry time. + We don't need to update our splay tree entry. */ return; } - /* the new time is newer than the presently set one, so add the current - to the queue and update the head */ - multi_addtimeout(data->state.timeoutlist, nowp); - /* Since this is an updated time, we must remove the previous entry from the splay tree first and then re-add the new value */ rc = Curl_splayremovebyaddr(multi->timetree, @@ -2975,6 +2957,8 @@ void Curl_expire(struct Curl_easy *data, time_t milli) infof(data, "Internal error removing splay node = %d\n", rc); } + /* Indicate that we are in the splay tree and insert the new timer expiry + value since it is our local minimum. */ *nowp = set; data->state.timenode.payload = data; multi->timetree = Curl_splayinsert(*nowp, multi->timetree, @@ -2982,46 +2966,17 @@ void Curl_expire(struct Curl_easy *data, time_t milli) } /* - * Curl_expire_latest() - * - * This is like Curl_expire() but will only add a timeout node to the list of - * timers if there is no timeout that will expire before the given time. + * Curl_expire_done() * - * Use this function if the code logic risks calling this function many times - * or if there's no particular conditional wait in the code for this specific - * time-out period to expire. + * Removes the expire timer. Marks it as done. * */ -void Curl_expire_latest(struct Curl_easy *data, time_t milli) +void Curl_expire_done(struct Curl_easy *data, expire_id id) { - struct timeval *expire = &data->state.expiretime; - - struct timeval set; - - set = Curl_tvnow(); - set.tv_sec += (long)(milli / 1000); - set.tv_usec += (milli % 1000) * 1000; - - if(set.tv_usec >= 1000000) { - set.tv_sec++; - set.tv_usec -= 1000000; - } - - if(expire->tv_sec || expire->tv_usec) { - /* This means that the struct is added as a node in the splay tree. - Compare if the new time is earlier, and only remove-old/add-new if it - is. */ - time_t diff = curlx_tvdiff(set, *expire); - if(diff > 0) - /* the new expire time was later than the top time, so just skip this */ - return; - } - - /* Just add the timeout like normal */ - Curl_expire(data, milli); + /* remove the timer, if there */ + multi_deltimeout(data, id); } - /* * Curl_expire_clear() * @@ -3030,7 +2985,7 @@ void Curl_expire_latest(struct Curl_easy *data, time_t milli) void Curl_expire_clear(struct Curl_easy *data) { struct Curl_multi *multi = data->multi; - struct timeval *nowp = &data->state.expiretime; + struct curltime *nowp = &data->state.expiretime; int rc; /* this is only interesting while there is still an associated multi struct @@ -3041,7 +2996,7 @@ void Curl_expire_clear(struct Curl_easy *data) if(nowp->tv_sec || nowp->tv_usec) { /* Since this is an cleared time, we must remove the previous entry from the splay tree */ - struct curl_llist *list = data->state.timeoutlist; + struct curl_llist *list = &data->state.timeoutlist; rc = Curl_splayremovebyaddr(multi->timetree, &data->state.timenode, @@ -3050,8 +3005,9 @@ void Curl_expire_clear(struct Curl_easy *data) infof(data, "Internal error clearing splay node = %d\n", rc); /* flush the timeout list too */ - while(list->size > 0) + while(list->size > 0) { Curl_llist_remove(list, list->tail, NULL); + } #ifdef DEBUGBUILD infof(data, "Expire cleared\n"); @@ -3069,6 +3025,9 @@ CURLMcode curl_multi_assign(struct Curl_multi *multi, curl_socket_t s, { struct Curl_sh_entry *there = NULL; + if(multi->in_callback) + return CURLM_RECURSIVE_API_CALL; + there = sh_getentry(&multi->sockhash, s); if(!there) @@ -3101,17 +3060,17 @@ curl_off_t Curl_multi_chunk_length_penalty_size(struct Curl_multi *multi) struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi) { - return multi->pipelining_site_bl; + return &multi->pipelining_site_bl; } struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi) { - return multi->pipelining_server_bl; + return &multi->pipelining_server_bl; } void Curl_multi_process_pending_handles(struct Curl_multi *multi) { - struct curl_llist_element *e = multi->pending->head; + struct curl_llist_element *e = multi->pending.head; while(e) { struct Curl_easy *data = e->ptr; @@ -3121,16 +3080,30 @@ void Curl_multi_process_pending_handles(struct Curl_multi *multi) multistate(data, CURLM_STATE_CONNECT); /* Remove this node from the list */ - Curl_llist_remove(multi->pending, e, NULL); + Curl_llist_remove(&multi->pending, e, NULL); /* Make sure that the handle will be processed soonish. */ - Curl_expire_latest(data, 0); + Curl_expire(data, 0, EXPIRE_RUN_NOW); } e = next; /* operate on next handle */ } } +void Curl_set_in_callback(struct Curl_easy *easy, bool value) +{ + if(easy->multi_easy) + easy->multi_easy->in_callback = value; + else if(easy->multi) + easy->multi->in_callback = value; +} + +bool Curl_is_in_callback(struct Curl_easy *easy) +{ + return ((easy->multi && easy->multi->in_callback) || + (easy->multi_easy && easy->multi_easy->in_callback)); +} + #ifdef DEBUGBUILD void Curl_multi_dump(struct Curl_multi *multi) { @@ -3138,13 +3111,13 @@ void Curl_multi_dump(struct Curl_multi *multi) int i; fprintf(stderr, "* Multi status: %d handles, %d alive\n", multi->num_easy, multi->num_alive); - for(data=multi->easyp; data; data = data->next) { + for(data = multi->easyp; data; data = data->next) { if(data->mstate < CURLM_STATE_COMPLETED) { /* only display handles that are not completed */ fprintf(stderr, "handle %p, state %s, %d sockets\n", (void *)data, statename[data->mstate], data->numsocks); - for(i=0; i < data->numsocks; i++) { + for(i = 0; i < data->numsocks; i++) { curl_socket_t s = data->sockets[i]; struct Curl_sh_entry *entry = sh_getentry(&multi->sockhash, s); diff --git a/lib/multihandle.h b/lib/multihandle.h index 0b78de9..1a5017f 100644 --- a/lib/multihandle.h +++ b/lib/multihandle.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,6 +25,7 @@ #include "conncache.h" struct Curl_message { + struct curl_llist_element list; /* the 'CURLMsg' is the part that is visible to the external user */ struct CURLMsg extmsg; }; @@ -80,10 +81,10 @@ struct Curl_multi { int num_alive; /* amount of easy handles that are added but have not yet reached COMPLETE state */ - struct curl_llist *msglist; /* a list of messages from completed transfers */ + struct curl_llist msglist; /* a list of messages from completed transfers */ - struct curl_llist *pending; /* Curl_easys that are in the - CURLM_STATE_CONNECT_PEND state */ + struct curl_llist pending; /* Curl_easys that are in the + CURLM_STATE_CONNECT_PEND state */ /* callback function and user data pointer for the *socket() API */ curl_socket_callback socket_cb; @@ -113,10 +114,6 @@ struct Curl_multi { /* Shared connection cache (bundles)*/ struct conncache conn_cache; - /* This handle will be used for closing the cached connections in - curl_multi_cleanup() */ - struct Curl_easy *closure_handle; - long maxconnects; /* if >0, a fixed limit of the maximum number of entries we're allowed to grow the connection cache to */ @@ -138,17 +135,18 @@ struct Curl_multi { bigger than this is not considered for pipelining */ - struct curl_llist *pipelining_site_bl; /* List of sites that are blacklisted - from pipelining */ + struct curl_llist pipelining_site_bl; /* List of sites that are blacklisted + from pipelining */ - struct curl_llist *pipelining_server_bl; /* List of server types that are - blacklisted from pipelining */ + struct curl_llist pipelining_server_bl; /* List of server types that are + blacklisted from pipelining */ /* timer callback and user data pointer for the *socket() API */ curl_multi_timer_callback timer_cb; void *timer_userp; - struct timeval timer_lastcall; /* the fixed time for the timeout for the + struct curltime timer_lastcall; /* the fixed time for the timeout for the previous callback */ + bool in_callback; /* true while executing a callback */ }; #endif /* HEADER_CURL_MULTIHANDLE_H */ diff --git a/lib/multiif.h b/lib/multiif.h index e5de1fc..a988bfd 100644 --- a/lib/multiif.h +++ b/lib/multiif.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,11 +25,14 @@ /* * Prototypes for library-wide functions provided by multi.c */ -void Curl_expire(struct Curl_easy *data, time_t milli); + +void Curl_expire(struct Curl_easy *data, time_t milli, expire_id); void Curl_expire_clear(struct Curl_easy *data); -void Curl_expire_latest(struct Curl_easy *data, time_t milli); +void Curl_expire_done(struct Curl_easy *data, expire_id id); bool Curl_pipeline_wanted(const struct Curl_multi* multi, int bits); void Curl_multi_handlePipeBreak(struct Curl_easy *data); +void Curl_set_in_callback(struct Curl_easy *data, bool value); +bool Curl_is_in_callback(struct Curl_easy *easy); /* Internal version of curl_multi_init() accepts size parameters for the socket and connection hashes */ diff --git a/lib/netrc.c b/lib/netrc.c index 996711d..dbcc59a 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -56,14 +56,15 @@ int Curl_parsenetrc(const char *host, char *netrcfile) { FILE *file; - int retcode=1; + int retcode = 1; int specific_login = (*loginp && **loginp != 0); bool netrc_alloc = FALSE; - enum host_lookup_state state=NOTHING; + enum host_lookup_state state = NOTHING; - char state_login=0; /* Found a login keyword */ - char state_password=0; /* Found a password keyword */ - int state_our_login=FALSE; /* With specific_login, found *our* login name */ + char state_login = 0; /* Found a login keyword */ + char state_password = 0; /* Found a password keyword */ + int state_our_login = FALSE; /* With specific_login, found *our* login + name */ #define NETRC DOT_CHAR "netrc" @@ -88,7 +89,7 @@ int Curl_parsenetrc(const char *host, } else { struct passwd *pw; - pw= getpwuid(geteuid()); + pw = getpwuid(geteuid()); if(pw) { home = pw->pw_dir; } @@ -113,16 +114,19 @@ int Curl_parsenetrc(const char *host, if(file) { char *tok; char *tok_buf; - bool done=FALSE; + bool done = FALSE; char netrcbuffer[256]; int netrcbuffsize = (int)sizeof(netrcbuffer); while(!done && fgets(netrcbuffer, netrcbuffsize, file)) { - tok=strtok_r(netrcbuffer, " \t\n", &tok_buf); + tok = strtok_r(netrcbuffer, " \t\n", &tok_buf); + if(tok && *tok == '#') + /* treat an initial hash as a comment line */ + continue; while(!done && tok) { if((*loginp && **loginp) && (*passwordp && **passwordp)) { - done=TRUE; + done = TRUE; break; } @@ -133,22 +137,22 @@ int Curl_parsenetrc(const char *host, delimiter that starts the stuff entered for this machine, after this we need to search for 'login' and 'password'. */ - state=HOSTFOUND; + state = HOSTFOUND; } else if(strcasecompare("default", tok)) { - state=HOSTVALID; - retcode=0; /* we did find our host */ + state = HOSTVALID; + retcode = 0; /* we did find our host */ } break; case HOSTFOUND: if(strcasecompare(host, tok)) { /* and yes, this is our host! */ - state=HOSTVALID; - retcode=0; /* we did find our host */ + state = HOSTVALID; + retcode = 0; /* we did find our host */ } else /* not our host */ - state=NOTHING; + state = NOTHING; break; case HOSTVALID: /* we are now parsing sub-keywords concerning "our" host */ @@ -164,7 +168,7 @@ int Curl_parsenetrc(const char *host, goto out; } } - state_login=0; + state_login = 0; } else if(state_password) { if(state_our_login || !specific_login) { @@ -175,12 +179,12 @@ int Curl_parsenetrc(const char *host, goto out; } } - state_password=0; + state_password = 0; } else if(strcasecompare("login", tok)) - state_login=1; + state_login = 1; else if(strcasecompare("password", tok)) - state_password=1; + state_password = 1; else if(strcasecompare("machine", tok)) { /* ok, there's machine here go => */ state = HOSTFOUND; diff --git a/lib/non-ascii.c b/lib/non-ascii.c index 2f5de4c..1414324 100644 --- a/lib/non-ascii.c +++ b/lib/non-ascii.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -30,6 +30,7 @@ #include "formdata.h" #include "sendf.h" #include "urldata.h" +#include "multiif.h" #include "curl_memory.h" /* The last #include file should be: */ @@ -82,9 +83,12 @@ CURLcode Curl_convert_clone(struct Curl_easy *data, CURLcode Curl_convert_to_network(struct Curl_easy *data, char *buffer, size_t length) { - if(data->set.convtonetwork) { + if(data && data->set.convtonetwork) { /* use translation callback */ - CURLcode result = data->set.convtonetwork(buffer, length); + CURLcode result; + Curl_set_in_callback(data, true); + result = data->set.convtonetwork(buffer, length); + Curl_set_in_callback(data, false); if(result) { failf(data, "CURLOPT_CONV_TO_NETWORK_FUNCTION callback returned %d: %s", @@ -96,34 +100,37 @@ CURLcode Curl_convert_to_network(struct Curl_easy *data, else { #ifdef HAVE_ICONV /* do the translation ourselves */ + iconv_t tmpcd = (iconv_t) -1; + iconv_t *cd = &tmpcd; char *input_ptr, *output_ptr; size_t in_bytes, out_bytes, rc; - int error; /* open an iconv conversion descriptor if necessary */ - if(data->outbound_cd == (iconv_t)-1) { - data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK, - CURL_ICONV_CODESET_OF_HOST); - if(data->outbound_cd == (iconv_t)-1) { - error = ERRNO; + if(data) + cd = &data->outbound_cd; + if(*cd == (iconv_t)-1) { + *cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK, + CURL_ICONV_CODESET_OF_HOST); + if(*cd == (iconv_t)-1) { failf(data, "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s", CURL_ICONV_CODESET_OF_NETWORK, CURL_ICONV_CODESET_OF_HOST, - error, strerror(error)); + errno, strerror(errno)); return CURLE_CONV_FAILED; } } /* call iconv */ input_ptr = output_ptr = buffer; in_bytes = out_bytes = length; - rc = iconv(data->outbound_cd, (const char **)&input_ptr, &in_bytes, + rc = iconv(*cd, &input_ptr, &in_bytes, &output_ptr, &out_bytes); + if(!data) + iconv_close(tmpcd); if((rc == ICONV_ERROR) || (in_bytes != 0)) { - error = ERRNO; failf(data, "The Curl_convert_to_network iconv call failed with errno %i: %s", - error, strerror(error)); + errno, strerror(errno)); return CURLE_CONV_FAILED; } #else @@ -142,9 +149,12 @@ CURLcode Curl_convert_to_network(struct Curl_easy *data, CURLcode Curl_convert_from_network(struct Curl_easy *data, char *buffer, size_t length) { - if(data->set.convfromnetwork) { + if(data && data->set.convfromnetwork) { /* use translation callback */ - CURLcode result = data->set.convfromnetwork(buffer, length); + CURLcode result; + Curl_set_in_callback(data, true); + result = data->set.convfromnetwork(buffer, length); + Curl_set_in_callback(data, false); if(result) { failf(data, "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback returned %d: %s", @@ -156,34 +166,37 @@ CURLcode Curl_convert_from_network(struct Curl_easy *data, else { #ifdef HAVE_ICONV /* do the translation ourselves */ + iconv_t tmpcd = (iconv_t) -1; + iconv_t *cd = &tmpcd; char *input_ptr, *output_ptr; size_t in_bytes, out_bytes, rc; - int error; /* open an iconv conversion descriptor if necessary */ - if(data->inbound_cd == (iconv_t)-1) { - data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_OF_NETWORK); - if(data->inbound_cd == (iconv_t)-1) { - error = ERRNO; + if(data) + cd = &data->inbound_cd; + if(*cd == (iconv_t)-1) { + *cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, + CURL_ICONV_CODESET_OF_NETWORK); + if(*cd == (iconv_t)-1) { failf(data, "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s", CURL_ICONV_CODESET_OF_HOST, CURL_ICONV_CODESET_OF_NETWORK, - error, strerror(error)); + errno, strerror(errno)); return CURLE_CONV_FAILED; } } /* call iconv */ input_ptr = output_ptr = buffer; in_bytes = out_bytes = length; - rc = iconv(data->inbound_cd, (const char **)&input_ptr, &in_bytes, + rc = iconv(*cd, &input_ptr, &in_bytes, &output_ptr, &out_bytes); + if(!data) + iconv_close(tmpcd); if((rc == ICONV_ERROR) || (in_bytes != 0)) { - error = ERRNO; failf(data, "Curl_convert_from_network iconv call failed with errno %i: %s", - error, strerror(error)); + errno, strerror(errno)); return CURLE_CONV_FAILED; } #else @@ -202,9 +215,12 @@ CURLcode Curl_convert_from_network(struct Curl_easy *data, CURLcode Curl_convert_from_utf8(struct Curl_easy *data, char *buffer, size_t length) { - if(data->set.convfromutf8) { + if(data && data->set.convfromutf8) { /* use translation callback */ - CURLcode result = data->set.convfromutf8(buffer, length); + CURLcode result; + Curl_set_in_callback(data, true); + result = data->set.convfromutf8(buffer, length); + Curl_set_in_callback(data, false); if(result) { failf(data, "CURLOPT_CONV_FROM_UTF8_FUNCTION callback returned %d: %s", @@ -216,35 +232,38 @@ CURLcode Curl_convert_from_utf8(struct Curl_easy *data, else { #ifdef HAVE_ICONV /* do the translation ourselves */ - const char *input_ptr; + iconv_t tmpcd = (iconv_t) -1; + iconv_t *cd = &tmpcd; + char *input_ptr; char *output_ptr; size_t in_bytes, out_bytes, rc; - int error; /* open an iconv conversion descriptor if necessary */ - if(data->utf8_cd == (iconv_t)-1) { - data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_FOR_UTF8); - if(data->utf8_cd == (iconv_t)-1) { - error = ERRNO; + if(data) + cd = &data->utf8_cd; + if(*cd == (iconv_t)-1) { + *cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, + CURL_ICONV_CODESET_FOR_UTF8); + if(*cd == (iconv_t)-1) { failf(data, "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s", CURL_ICONV_CODESET_OF_HOST, CURL_ICONV_CODESET_FOR_UTF8, - error, strerror(error)); + errno, strerror(errno)); return CURLE_CONV_FAILED; } } /* call iconv */ input_ptr = output_ptr = buffer; in_bytes = out_bytes = length; - rc = iconv(data->utf8_cd, &input_ptr, &in_bytes, + rc = iconv(*cd, &input_ptr, &in_bytes, &output_ptr, &out_bytes); + if(!data) + iconv_close(tmpcd); if((rc == ICONV_ERROR) || (in_bytes != 0)) { - error = ERRNO; failf(data, "The Curl_convert_from_utf8 iconv call failed with errno %i: %s", - error, strerror(error)); + errno, strerror(errno)); return CURLE_CONV_FAILED; } if(output_ptr < input_ptr) { @@ -310,29 +329,4 @@ void Curl_convert_close(struct Curl_easy *data) #endif /* HAVE_ICONV */ } -/* - * Curl_convert_form() is used from http.c, this converts any form items that - need to be sent in the network encoding. Returns CURLE_OK on success. - */ -CURLcode Curl_convert_form(struct Curl_easy *data, struct FormData *form) -{ - CURLcode result; - - if(!data) - return CURLE_BAD_FUNCTION_ARGUMENT; - - while(form) { - if(form->type == FORM_DATA) { - result = Curl_convert_to_network(data, form->line, form->length); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; - } - - form = form->next; - } - - return CURLE_OK; -} - #endif /* CURL_DOES_CONVERSIONS */ diff --git a/lib/non-ascii.h b/lib/non-ascii.h index e27f1f4..5fb5771 100644 --- a/lib/non-ascii.h +++ b/lib/non-ascii.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,7 +48,6 @@ CURLcode Curl_convert_from_network(struct Curl_easy *data, char *buffer, size_t length); CURLcode Curl_convert_from_utf8(struct Curl_easy *data, char *buffer, size_t length); -CURLcode Curl_convert_form(struct Curl_easy *data, struct FormData *form); #else #define Curl_convert_clone(a,b,c,d) ((void)a, CURLE_OK) #define Curl_convert_init(x) Curl_nop_stmt @@ -57,7 +56,6 @@ CURLcode Curl_convert_form(struct Curl_easy *data, struct FormData *form); #define Curl_convert_to_network(a,b,c) ((void)a, CURLE_OK) #define Curl_convert_from_network(a,b,c) ((void)a, CURLE_OK) #define Curl_convert_from_utf8(a,b,c) ((void)a, CURLE_OK) -#define Curl_convert_form(a,b) CURLE_OK #endif #endif /* HEADER_CURL_NON_ASCII_H */ diff --git a/lib/nonblock.c b/lib/nonblock.c index b764278..5959281 100644 --- a/lib/nonblock.c +++ b/lib/nonblock.c @@ -58,8 +58,7 @@ int curlx_nonblock(curl_socket_t sockfd, /* operate on this */ flags = sfcntl(sockfd, F_GETFL, 0); if(nonblock) return sfcntl(sockfd, F_SETFL, flags | O_NONBLOCK); - else - return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); + return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); #elif defined(HAVE_IOCTL_FIONBIO) diff --git a/lib/objnames.inc b/lib/objnames.inc index b895528..e362f6e 100644 --- a/lib/objnames.inc +++ b/lib/objnames.inc @@ -5,7 +5,7 @@ # * | (__| |_| | _ <| |___ # * \___|\___/|_| \_\_____| # * -# * Copyright (C) 2012, Daniel Stenberg, , et al. +# * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. # * # * This software is licensed as described in the file COPYING, which # * you should have received as part of this distribution. The terms @@ -36,7 +36,7 @@ # file name that may be longer than 10 characters, or not, into a string # with at most 10 characters which may be used as an OS/400 object name. # -# This function might not be universally usefull, nor we care about it. +# This function might not be universally useful, nor we care about it. # # It is intended to be used with libcurl's (*.c) source file names, so # dependency on libcurl's source file naming scheme is acceptable and @@ -86,7 +86,7 @@ curl_10char_object_name() { # curl_8char_object_name # # Same as curl_10char_object_name() description and details above, except -# that object name is limited to 8 charcters maximum. +# that object name is limited to 8 characters maximum. # curl_8char_object_name() { diff --git a/lib/openldap.c b/lib/openldap.c index 4b8cfb9..187c899 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2010, Howard Chu, - * Copyright (C) 2011 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2011 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -51,6 +51,25 @@ #include "curl_memory.h" #include "memdebug.h" +/* + * Uncommenting this will enable the built-in debug logging of the openldap + * library. The debug log level can be set using the CURL_OPENLDAP_TRACE + * environment variable. The debug output is written to stderr. + * + * The library supports the following debug flags: + * LDAP_DEBUG_NONE 0x0000 + * LDAP_DEBUG_TRACE 0x0001 + * LDAP_DEBUG_CONSTRUCT 0x0002 + * LDAP_DEBUG_DESTROY 0x0004 + * LDAP_DEBUG_PARAMETER 0x0008 + * LDAP_DEBUG_ANY 0xffff + * + * For example, use CURL_OPENLDAP_TRACE=0 for no debug, + * CURL_OPENLDAP_TRACE=2 for LDAP_DEBUG_CONSTRUCT messages only, + * CURL_OPENLDAP_TRACE=65535 for all debug message levels. + */ +/* #define CURL_OPENLDAP_DEBUG */ + #ifndef _LDAP_PVT_H extern int ldap_pvt_url_scheme2proto(const char *); extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url, @@ -85,6 +104,7 @@ const struct Curl_handler Curl_handler_ldap = { ZERO_NULL, /* perform_getsock */ ldap_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_LDAP, /* defport */ CURLPROTO_LDAP, /* protocol */ PROTOPT_NONE /* flags */ @@ -110,6 +130,7 @@ const struct Curl_handler Curl_handler_ldaps = { ZERO_NULL, /* perform_getsock */ ldap_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_LDAPS, /* defport */ CURLPROTO_LDAP, /* protocol */ PROTOPT_SSL /* flags */ @@ -150,7 +171,7 @@ static CURLcode ldap_setup_connection(struct connectdata *conn) { ldapconninfo *li; LDAPURLDesc *lud; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; int rc, proto; CURLcode status; @@ -196,11 +217,20 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done) (void)done; strcpy(hosturl, "ldap"); - ptr = hosturl+4; + ptr = hosturl + 4; if(conn->handler->flags & PROTOPT_SSL) *ptr++ = 's'; snprintf(ptr, sizeof(hosturl)-(ptr-hosturl), "://%s:%d", - conn->host.name, conn->remote_port); + conn->host.name, conn->remote_port); + +#ifdef CURL_OPENLDAP_DEBUG + static int do_trace = 0; + const char *env = getenv("CURL_OPENLDAP_TRACE"); + do_trace = (env && strtol(env, NULL, 10) > 0); + if(do_trace) { + ldap_set_option(li->ld, LDAP_OPT_DEBUG_LEVEL, &do_trace); + } +#endif rc = ldap_init_fd(conn->sock[FIRSTSOCKET], li->proto, hosturl, &li->ld); if(rc) { @@ -256,7 +286,7 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done) tvp = &tv; -retry: + retry: if(!li->didbind) { char *binddn; struct berval passwd; @@ -352,7 +382,7 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done) int rc = 0; LDAPURLDesc *ludp = NULL; int msgid; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; connkeep(conn, "OpenLDAP do"); @@ -442,8 +472,8 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, return ret; for(ent = ldap_first_message(li->ld, msg); ent; - ent = ldap_next_message(li->ld, ent)) { - struct berval bv, *bvals, **bvp = &bvals; + ent = ldap_next_message(li->ld, ent)) { + struct berval bv, *bvals; int binary = 0, msgtype; CURLcode writeerr; @@ -505,19 +535,20 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, } data->req.bytecount += bv.bv_len + 5; - for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp); - rc == LDAP_SUCCESS; - rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp)) { + for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals); + (rc == LDAP_SUCCESS) && bvals; + rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals)) { int i; - if(bv.bv_val == NULL) break; + if(bv.bv_val == NULL) + break; if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7)) binary = 1; else binary = 0; - for(i=0; bvals[i].bv_val != NULL; i++) { + for(i = 0; bvals[i].bv_val != NULL; i++) { int binval = 0; writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1); if(writeerr) { @@ -525,29 +556,29 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, return -1; } - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, - bv.bv_len); - if(writeerr) { - *err = writeerr; - return -1; - } + writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, + bv.bv_len); + if(writeerr) { + *err = writeerr; + return -1; + } writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":", 1); - if(writeerr) { - *err = writeerr; - return -1; - } + if(writeerr) { + *err = writeerr; + return -1; + } data->req.bytecount += bv.bv_len + 2; if(!binary) { /* check for leading or trailing whitespace */ if(ISSPACE(bvals[i].bv_val[0]) || - ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1])) + ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1])) binval = 1; else { /* check for unprintable characters */ unsigned int j; - for(j=0; jreq.bytecount += 2; if(val_b64_sz > 0) { writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, - val_b64_sz); + val_b64_sz); if(writeerr) { *err = writeerr; return -1; @@ -675,7 +706,7 @@ ldapsb_tls_read(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) ber_slen_t ret; CURLcode err = CURLE_RECV_ERROR; - ret = li->recv(conn, FIRSTSOCKET, buf, len, &err); + ret = (li->recv)(conn, FIRSTSOCKET, buf, len, &err); if(ret < 0 && err == CURLE_AGAIN) { SET_SOCKERRNO(EWOULDBLOCK); } @@ -690,7 +721,7 @@ ldapsb_tls_write(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) ber_slen_t ret; CURLcode err = CURLE_SEND_ERROR; - ret = li->send(conn, FIRSTSOCKET, buf, len, &err); + ret = (li->send)(conn, FIRSTSOCKET, buf, len, &err); if(ret < 0 && err == CURLE_AGAIN) { SET_SOCKERRNO(EWOULDBLOCK); } diff --git a/lib/parsedate.c b/lib/parsedate.c index 3c783be..aa27303 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -75,9 +75,7 @@ #include "curl_setup.h" -#ifdef HAVE_LIMITS_H #include -#endif #include #include "strcase.h" @@ -167,20 +165,20 @@ static const struct tzinfo tz[]= { RFC 1123) had their signs wrong. Here we use the correct signs to match actual military usage. */ - {"A", +1 * 60}, /* Alpha */ - {"B", +2 * 60}, /* Bravo */ - {"C", +3 * 60}, /* Charlie */ - {"D", +4 * 60}, /* Delta */ - {"E", +5 * 60}, /* Echo */ - {"F", +6 * 60}, /* Foxtrot */ - {"G", +7 * 60}, /* Golf */ - {"H", +8 * 60}, /* Hotel */ - {"I", +9 * 60}, /* India */ + {"A", 1 * 60}, /* Alpha */ + {"B", 2 * 60}, /* Bravo */ + {"C", 3 * 60}, /* Charlie */ + {"D", 4 * 60}, /* Delta */ + {"E", 5 * 60}, /* Echo */ + {"F", 6 * 60}, /* Foxtrot */ + {"G", 7 * 60}, /* Golf */ + {"H", 8 * 60}, /* Hotel */ + {"I", 9 * 60}, /* India */ /* "J", Juliet is not used as a timezone, to indicate the observer's local time */ - {"K", +10 * 60}, /* Kilo */ - {"L", +11 * 60}, /* Lima */ - {"M", +12 * 60}, /* Mike */ + {"K", 10 * 60}, /* Kilo */ + {"L", 11 * 60}, /* Lima */ + {"M", 12 * 60}, /* Mike */ {"N", -1 * 60}, /* November */ {"O", -2 * 60}, /* Oscar */ {"P", -3 * 60}, /* Papa */ @@ -205,14 +203,14 @@ static int checkday(const char *check, size_t len) { int i; const char * const *what; - bool found= FALSE; + bool found = FALSE; if(len > 3) what = &weekday[0]; else what = &Curl_wkday[0]; - for(i=0; i<7; i++) { + for(i = 0; i<7; i++) { if(strcasecompare(check, what[0])) { - found=TRUE; + found = TRUE; break; } what++; @@ -224,12 +222,12 @@ static int checkmonth(const char *check) { int i; const char * const *what; - bool found= FALSE; + bool found = FALSE; what = &Curl_month[0]; - for(i=0; i<12; i++) { + for(i = 0; i<12; i++) { if(strcasecompare(check, what[0])) { - found=TRUE; + found = TRUE; break; } what++; @@ -244,12 +242,12 @@ static int checktz(const char *check) { unsigned int i; const struct tzinfo *what; - bool found= FALSE; + bool found = FALSE; what = tz; - for(i=0; i< sizeof(tz)/sizeof(tz[0]); i++) { + for(i = 0; i< sizeof(tz)/sizeof(tz[0]); i++) { if(strcasecompare(check, what->name)) { - found=TRUE; + found = TRUE; break; } what++; @@ -278,26 +276,23 @@ struct my_tm { int tm_hour; int tm_mday; int tm_mon; - int tm_year; + int tm_year; /* full year */ }; /* struct tm to time since epoch in GMT time zone. * This is similar to the standard mktime function but for GMT only, and * doesn't suffer from the various bugs and portability problems that * some systems' implementations have. + * + * Returns 0 on success, otherwise non-zero. */ -static time_t my_timegm(struct my_tm *tm) +static void my_timegm(struct my_tm *tm, time_t *t) { static const int month_days_cumulative [12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; int month, year, leap_days; - if(tm->tm_year < 70) - /* we don't support years before 1970 as they will cause this function - to return a negative value */ - return -1; - - year = tm->tm_year + 1900; + year = tm->tm_year; month = tm->tm_mon; if(month < 0) { year += (11 - month) / 12; @@ -312,9 +307,9 @@ static time_t my_timegm(struct my_tm *tm) leap_days = ((leap_days / 4) - (leap_days / 100) + (leap_days / 400) - (1969 / 4) + (1969 / 100) - (1969 / 400)); - return ((((time_t) (year - 1970) * 365 - + leap_days + month_days_cumulative [month] + tm->tm_mday - 1) * 24 - + tm->tm_hour) * 60 + tm->tm_min) * 60 + tm->tm_sec; + *t = ((((time_t) (year - 1970) * 365 + + leap_days + month_days_cumulative[month] + tm->tm_mday - 1) * 24 + + tm->tm_hour) * 60 + tm->tm_min) * 60 + tm->tm_sec; } /* @@ -331,21 +326,21 @@ static time_t my_timegm(struct my_tm *tm) static int parsedate(const char *date, time_t *output) { time_t t = 0; - int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */ - int monnum=-1; /* month of the year number, 0-11 */ - int mdaynum=-1; /* day of month, 1 - 31 */ - int hournum=-1; - int minnum=-1; - int secnum=-1; - int yearnum=-1; - int tzoff=-1; + int wdaynum = -1; /* day of the week number, 0-6 (mon-sun) */ + int monnum = -1; /* month of the year number, 0-11 */ + int mdaynum = -1; /* day of month, 1 - 31 */ + int hournum = -1; + int minnum = -1; + int secnum = -1; + int yearnum = -1; + int tzoff = -1; struct my_tm tm; enum assume dignext = DATE_MDAY; const char *indate = date; /* save the original pointer */ int part = 0; /* max 6 parts */ while(*date && (part < 6)) { - bool found=FALSE; + bool found = FALSE; skip(&date); @@ -386,7 +381,7 @@ static int parsedate(const char *date, time_t *output) /* a digit */ int val; char *end; - int len=0; + int len = 0; if((secnum == -1) && (3 == sscanf(date, "%02d:%02d:%02d%n", &hournum, &minnum, &secnum, &len))) { @@ -404,12 +399,12 @@ static int parsedate(const char *date, time_t *output) int error; int old_errno; - old_errno = ERRNO; - SET_ERRNO(0); + old_errno = errno; + errno = 0; lval = strtol(date, &end, 10); - error = ERRNO; - if(error != old_errno) - SET_ERRNO(old_errno); + error = errno; + if(errno != old_errno) + errno = old_errno; if(error) return PARSEDATE_FAIL; @@ -438,7 +433,7 @@ static int parsedate(const char *date, time_t *output) tzoff = (val/100 * 60 + val%100)*60; /* the + and - prefix indicates the local time compared to GMT, - this we need ther reversed math to get what we want */ + this we need their reversed math to get what we want */ tzoff = date[-1]=='+'?-tzoff:tzoff; } @@ -464,7 +459,7 @@ static int parsedate(const char *date, time_t *output) if(!found && (dignext == DATE_YEAR) && (yearnum == -1)) { yearnum = val; found = TRUE; - if(yearnum < 1900) { + if(yearnum < 100) { if(yearnum > 70) yearnum += 1900; else @@ -493,18 +488,39 @@ static int parsedate(const char *date, time_t *output) /* lacks vital info, fail */ return PARSEDATE_FAIL; -#if SIZEOF_TIME_T < 5 - /* 32 bit time_t can only hold dates to the beginning of 2038 */ - if(yearnum > 2037) { - *output = 0x7fffffff; - return PARSEDATE_LATER; +#ifdef HAVE_TIME_T_UNSIGNED + if(yearnum < 1970) { + /* only positive numbers cannot return earlier */ + *output = TIME_T_MIN; + return PARSEDATE_SOONER; } #endif - if(yearnum < 1970) { - *output = 0; +#if (SIZEOF_TIME_T < 5) + +#ifdef HAVE_TIME_T_UNSIGNED + /* an unsigned 32 bit time_t can only hold dates to 2106 */ + if(yearnum > 2105) { + *output = TIME_T_MAX; + return PARSEDATE_LATER; + } +#else + /* a signed 32 bit time_t can only hold dates to the beginning of 2038 */ + if(yearnum > 2037) { + *output = TIME_T_MAX; + return PARSEDATE_LATER; + } + if(yearnum < 1903) { + *output = TIME_T_MIN; return PARSEDATE_SOONER; } +#endif + +#else + /* The Gregorian calendar was introduced 1582 */ + if(yearnum < 1583) + return PARSEDATE_FAIL; +#endif if((mdaynum > 31) || (monnum > 11) || (hournum > 23) || (minnum > 59) || (secnum > 60)) @@ -515,31 +531,25 @@ static int parsedate(const char *date, time_t *output) tm.tm_hour = hournum; tm.tm_mday = mdaynum; tm.tm_mon = monnum; - tm.tm_year = yearnum - 1900; - - /* my_timegm() returns a time_t. time_t is often 32 bits, even on many - architectures that feature 64 bit 'long'. + tm.tm_year = yearnum; - Some systems have 64 bit time_t and deal with years beyond 2038. However, - even on some of the systems with 64 bit time_t mktime() returns -1 for - dates beyond 03:14:07 UTC, January 19, 2038. (Such as AIX 5100-06) + /* my_timegm() returns a time_t. time_t is often 32 bits, sometimes even on + architectures that feature 64 bit 'long' but ultimately time_t is the + correct data type to use. */ - t = my_timegm(&tm); - - /* time zone adjust (cast t to int to compare to negative one) */ - if(-1 != (int)t) { + my_timegm(&tm, &t); - /* Add the time zone diff between local time zone and GMT. */ - long delta = (long)(tzoff!=-1?tzoff:0); + /* Add the time zone diff between local time zone and GMT. */ + if(tzoff == -1) + tzoff = 0; - if((delta>0) && (t > LONG_MAX - delta)) { - *output = 0x7fffffff; - return PARSEDATE_LATER; /* time_t overflow */ - } - - t += delta; + if((tzoff > 0) && (t > TIME_T_MAX - tzoff)) { + *output = TIME_T_MAX; + return PARSEDATE_LATER; /* time_t overflow */ } + t += tzoff; + *output = t; return PARSEDATE_OK; @@ -551,10 +561,10 @@ time_t curl_getdate(const char *p, const time_t *now) int rc = parsedate(p, &parsed); (void)now; /* legacy argument from the past that we ignore */ - switch(rc) { - case PARSEDATE_OK: - case PARSEDATE_LATER: - case PARSEDATE_SOONER: + if(rc == PARSEDATE_OK) { + if(parsed == -1) + /* avoid returning -1 for a working scenario */ + parsed++; return parsed; } /* everything else is fail */ diff --git a/lib/pingpong.c b/lib/pingpong.c index 7a99357..438856a 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,10 +47,10 @@ time_t Curl_pp_state_timeout(struct pingpong *pp) { struct connectdata *conn = pp->conn; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; time_t timeout_ms; /* in milliseconds */ time_t timeout2_ms; /* in milliseconds */ - long response_time= (data->set.server_response_timeout)? + long response_time = (data->set.server_response_timeout)? data->set.server_response_timeout: pp->response_time; /* if CURLOPT_SERVER_RESPONSE_TIMEOUT is set, use that to determine @@ -61,12 +61,12 @@ time_t Curl_pp_state_timeout(struct pingpong *pp) /* Without a requested timeout, we only wait 'response_time' seconds for the full response to arrive before we bail out */ timeout_ms = response_time - - Curl_tvdiff(Curl_tvnow(), pp->response); /* spent time */ + Curl_timediff(Curl_now(), pp->response); /* spent time */ if(data->set.timeout) { /* if timeout is requested, find out how much remaining time we have */ timeout2_ms = data->set.timeout - /* timeout time */ - Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */ + Curl_timediff(Curl_now(), conn->now); /* spent time */ /* pick the lowest number */ timeout_ms = CURLMIN(timeout_ms, timeout2_ms); @@ -85,10 +85,10 @@ CURLcode Curl_pp_statemach(struct pingpong *pp, bool block) int rc; time_t interval_ms; time_t timeout_ms = Curl_pp_state_timeout(pp); - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; CURLcode result = CURLE_OK; - if(timeout_ms <=0) { + if(timeout_ms <= 0) { failf(data, "server response timeout"); return CURLE_OPERATION_TIMEDOUT; /* already too little time */ } @@ -120,7 +120,7 @@ CURLcode Curl_pp_statemach(struct pingpong *pp, bool block) if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, Curl_tvnow()); + result = Curl_speedcheck(data, Curl_now()); if(result) return result; @@ -143,7 +143,7 @@ void Curl_pp_init(struct pingpong *pp) pp->nread_resp = 0; pp->linestart_resp = conn->data->state.buffer; pp->pending_resp = TRUE; - pp->response = Curl_tvnow(); /* start response time-out now! */ + pp->response = Curl_now(); /* start response time-out now! */ } @@ -152,7 +152,7 @@ void Curl_pp_init(struct pingpong *pp) * * Curl_pp_vsendf() * - * Send the formated string as a command to a pingpong server. Note that + * Send the formatted string as a command to a pingpong server. Note that * the string should not have any CRLF appended, as this function will * append the necessary things itself. * @@ -168,16 +168,22 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp, char *s; CURLcode result; struct connectdata *conn = pp->conn; - struct Curl_easy *data = conn->data; + struct Curl_easy *data; #ifdef HAVE_GSSAPI - enum protection_level data_sec = conn->data_prot; + enum protection_level data_sec; #endif DEBUGASSERT(pp->sendleft == 0); DEBUGASSERT(pp->sendsize == 0); DEBUGASSERT(pp->sendthis == NULL); + if(!conn) + /* can't send without a connection! */ + return CURLE_SEND_ERROR; + + data = conn->data; + fmt_crlf = aprintf("%s\r\n", fmt); /* append a trailing CRLF */ if(!fmt_crlf) return CURLE_OUT_OF_MEMORY; @@ -205,6 +211,7 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp, result = Curl_write(conn, conn->sock[FIRSTSOCKET], s, write_len, &bytes_written); #ifdef HAVE_GSSAPI + data_sec = conn->data_prot; DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST); conn->data_prot = data_sec; #endif @@ -228,7 +235,7 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp, free(s); pp->sendthis = NULL; pp->sendleft = pp->sendsize = 0; - pp->response = Curl_tvnow(); + pp->response = Curl_now(); } return CURLE_OK; @@ -239,7 +246,7 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp, * * Curl_pp_sendf() * - * Send the formated string as a command to a pingpong server. Note that + * Send the formatted string as a command to a pingpong server. Note that * the string should not have any CRLF appended, as this function will * append the necessary things itself. * @@ -270,7 +277,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, size_t *size) /* size of the response */ { ssize_t perline; /* count bytes per line */ - bool keepon=TRUE; + bool keepon = TRUE; ssize_t gotbytes; char *ptr; struct connectdata *conn = pp->conn; @@ -281,12 +288,13 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, *code = 0; /* 0 for errors or not done */ *size = 0; - ptr=buf + pp->nread_resp; + ptr = buf + pp->nread_resp; /* number of bytes in the current line, so far */ perline = (ssize_t)(ptr-pp->linestart_resp); - while((pp->nread_respnread_resp < (size_t)data->set.buffer_size) && + (keepon && !result)) { if(pp->cache) { /* we had data in the "cache", copy that instead of doing an actual @@ -296,7 +304,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, * it would have been populated with something of size int to begin * with, even though its datatype may be larger than an int. */ - DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1)); + DEBUGASSERT((ptr + pp->cache_size) <= (buf + data->set.buffer_size + 1)); memcpy(ptr, pp->cache, pp->cache_size); gotbytes = (ssize_t)pp->cache_size; free(pp->cache); /* free the cache */ @@ -308,8 +316,10 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, enum protection_level prot = conn->data_prot; conn->data_prot = PROT_CLEAR; #endif - DEBUGASSERT((ptr+BUFSIZE-pp->nread_resp) <= (buf+BUFSIZE+1)); - result = Curl_read(conn, sockfd, ptr, BUFSIZE-pp->nread_resp, + DEBUGASSERT((ptr + data->set.buffer_size - pp->nread_resp) <= + (buf + data->set.buffer_size + 1)); + result = Curl_read(conn, sockfd, ptr, + data->set.buffer_size - pp->nread_resp, &gotbytes); #ifdef HAVE_GSSAPI DEBUGASSERT(prot > PROT_NONE && prot < PROT_LAST); @@ -348,7 +358,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, pp->nread_resp += gotbytes; for(i = 0; i < gotbytes; ptr++, i++) { perline++; - if(*ptr=='\n') { + if(*ptr == '\n') { /* a newline is CRLF in pp-talk, so the CR is ignored as the line isn't really terminated until the LF comes */ @@ -375,17 +385,17 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, start of the buffer and zero terminate, for old times sake */ size_t n = ptr - pp->linestart_resp; memmove(buf, pp->linestart_resp, n); - buf[n]=0; /* zero terminate */ - keepon=FALSE; - pp->linestart_resp = ptr+1; /* advance pointer */ + buf[n] = 0; /* zero terminate */ + keepon = FALSE; + pp->linestart_resp = ptr + 1; /* advance pointer */ i++; /* skip this before getting out */ *size = pp->nread_resp; /* size of the response */ pp->nread_resp = 0; /* restart */ break; } - perline=0; /* line starts over here */ - pp->linestart_resp = ptr+1; + perline = 0; /* line starts over here */ + pp->linestart_resp = ptr + 1; } } @@ -402,7 +412,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, } else if(keepon) { - if((perline == gotbytes) && (gotbytes > BUFSIZE/2)) { + if((perline == gotbytes) && (gotbytes > data->set.buffer_size/2)) { /* We got an excessive line without newlines and we need to deal with it. We keep the first bytes of the line then we throw away the rest. */ @@ -414,7 +424,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, interested in the first piece */ clipamount = 40; } - else if(pp->nread_resp > BUFSIZE/2) { + else if(pp->nread_resp > (size_t)data->set.buffer_size/2) { /* We got a large chunk of data and there's potentially still trailing data to take care of, so we put any such part in the "cache", clear the buffer to make space and restart. */ @@ -487,9 +497,9 @@ CURLcode Curl_pp_flushsend(struct pingpong *pp) } else { free(pp->sendthis); - pp->sendthis=NULL; + pp->sendthis = NULL; pp->sendleft = pp->sendsize = 0; - pp->response = Curl_tvnow(); + pp->response = Curl_now(); } return CURLE_OK; } diff --git a/lib/pingpong.h b/lib/pingpong.h index 500100a..5ac8df8 100644 --- a/lib/pingpong.h +++ b/lib/pingpong.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -58,8 +58,8 @@ struct pingpong { server */ size_t sendleft; /* number of bytes left to send from the sendthis buffer */ size_t sendsize; /* total size of the sendthis buffer */ - struct timeval response; /* set to Curl_tvnow() when a command has been sent - off, used to time-out response reading */ + struct curltime response; /* set to Curl_now() when a command has been sent + off, used to time-out response reading */ long response_time; /* When no timeout is given, this is the amount of milliseconds we await for a server response. */ @@ -95,7 +95,7 @@ time_t Curl_pp_state_timeout(struct pingpong *pp); * * Curl_pp_sendf() * - * Send the formated string as a command to a pingpong server. Note that + * Send the formatted string as a command to a pingpong server. Note that * the string should not have any CRLF appended, as this function will * append the necessary things itself. * @@ -108,7 +108,7 @@ CURLcode Curl_pp_sendf(struct pingpong *pp, * * Curl_pp_vsendf() * - * Send the formated string as a command to a pingpong server. Note that + * Send the formatted string as a command to a pingpong server. Note that * the string should not have any CRLF appended, as this function will * append the necessary things itself. * diff --git a/lib/pipeline.c b/lib/pipeline.c index 40a5e82..4d41b04 100644 --- a/lib/pipeline.c +++ b/lib/pipeline.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2013, Linus Nielsen Feltzing, - * Copyright (C) 2013-2016, Daniel Stenberg, , et al. + * Copyright (C) 2013 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -38,16 +38,15 @@ #include "memdebug.h" struct site_blacklist_entry { - char *hostname; + struct curl_llist_element list; unsigned short port; + char hostname[1]; }; static void site_blacklist_llist_dtor(void *user, void *element) { struct site_blacklist_entry *entry = element; (void)user; - - Curl_safefree(entry->hostname); free(entry); } @@ -69,8 +68,8 @@ bool Curl_pipeline_penalized(struct Curl_easy *data, curl_off_t recv_size = -2; /* Make it easy to spot in the log */ /* Find the head of the recv pipe, if any */ - if(conn->recv_pipe && conn->recv_pipe->head) { - struct Curl_easy *recv_handle = conn->recv_pipe->head->ptr; + if(conn->recv_pipe.head) { + struct Curl_easy *recv_handle = conn->recv_pipe.head->ptr; recv_size = recv_handle->req.size; @@ -94,8 +93,8 @@ bool Curl_pipeline_penalized(struct Curl_easy *data, static CURLcode addHandleToPipeline(struct Curl_easy *data, struct curl_llist *pipeline) { - if(!Curl_llist_insert_next(pipeline, pipeline->tail, data)) - return CURLE_OUT_OF_MEMORY; + Curl_llist_insert_next(pipeline, pipeline->tail, data, + &data->pipeline_queue); return CURLE_OK; } @@ -103,18 +102,18 @@ static CURLcode addHandleToPipeline(struct Curl_easy *data, CURLcode Curl_add_handle_to_pipeline(struct Curl_easy *handle, struct connectdata *conn) { - struct curl_llist_element *sendhead = conn->send_pipe->head; + struct curl_llist_element *sendhead = conn->send_pipe.head; struct curl_llist *pipeline; CURLcode result; - pipeline = conn->send_pipe; + pipeline = &conn->send_pipe; result = addHandleToPipeline(handle, pipeline); - if(pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) { + if(pipeline == &conn->send_pipe && sendhead != conn->send_pipe.head) { /* this is a new one as head, expire it */ Curl_pipeline_leave_write(conn); /* not in use yet */ - Curl_expire(conn->send_pipe->head->ptr, 0); + Curl_expire(conn->send_pipe.head->ptr, 0, EXPIRE_RUN_NOW); } #if 0 /* enable for pipeline debugging */ @@ -135,21 +134,21 @@ void Curl_move_handle_from_send_to_recv_pipe(struct Curl_easy *handle, { struct curl_llist_element *curr; - curr = conn->send_pipe->head; + curr = conn->send_pipe.head; while(curr) { if(curr->ptr == handle) { - Curl_llist_move(conn->send_pipe, curr, - conn->recv_pipe, conn->recv_pipe->tail); + Curl_llist_move(&conn->send_pipe, curr, + &conn->recv_pipe, conn->recv_pipe.tail); - if(conn->send_pipe->head) { + if(conn->send_pipe.head) { /* Since there's a new easy handle at the start of the send pipeline, set its timeout value to 1ms to make it trigger instantly */ Curl_pipeline_leave_write(conn); /* not used now */ #ifdef DEBUGBUILD infof(conn->data, "%p is at send pipe head B!\n", - (void *)conn->send_pipe->head->ptr); + (void *)conn->send_pipe.head->ptr); #endif - Curl_expire(conn->send_pipe->head->ptr, 0); + Curl_expire(conn->send_pipe.head->ptr, 0, EXPIRE_RUN_NOW); } /* The receiver's list is not really interesting here since either this @@ -191,36 +190,28 @@ bool Curl_pipeline_site_blacklisted(struct Curl_easy *handle, } CURLMcode Curl_pipeline_set_site_blacklist(char **sites, - struct curl_llist **list_ptr) + struct curl_llist *list) { - struct curl_llist *old_list = *list_ptr; - struct curl_llist *new_list = NULL; + /* Free the old list */ + if(list->size) + Curl_llist_destroy(list, NULL); if(sites) { - new_list = Curl_llist_alloc((curl_llist_dtor) site_blacklist_llist_dtor); - if(!new_list) - return CURLM_OUT_OF_MEMORY; + Curl_llist_init(list, (curl_llist_dtor) site_blacklist_llist_dtor); /* Parse the URLs and populate the list */ while(*sites) { - char *hostname; char *port; struct site_blacklist_entry *entry; - hostname = strdup(*sites); - if(!hostname) { - Curl_llist_destroy(new_list, NULL); - return CURLM_OUT_OF_MEMORY; - } - - entry = malloc(sizeof(struct site_blacklist_entry)); + entry = malloc(sizeof(struct site_blacklist_entry) + strlen(*sites)); if(!entry) { - free(hostname); - Curl_llist_destroy(new_list, NULL); + Curl_llist_destroy(list, NULL); return CURLM_OUT_OF_MEMORY; } + strcpy(entry->hostname, *sites); - port = strchr(hostname, ':'); + port = strchr(entry->hostname, ':'); if(port) { *port = '\0'; port++; @@ -231,51 +222,35 @@ CURLMcode Curl_pipeline_set_site_blacklist(char **sites, entry->port = 80; } - entry->hostname = hostname; - - if(!Curl_llist_insert_next(new_list, new_list->tail, entry)) { - site_blacklist_llist_dtor(NULL, entry); - Curl_llist_destroy(new_list, NULL); - return CURLM_OUT_OF_MEMORY; - } - + Curl_llist_insert_next(list, list->tail, entry, &entry->list); sites++; } } - /* Free the old list */ - if(old_list) { - Curl_llist_destroy(old_list, NULL); - } - - /* This might be NULL if sites == NULL, i.e the blacklist is cleared */ - *list_ptr = new_list; - return CURLM_OK; } +struct blacklist_node { + struct curl_llist_element list; + char server_name[1]; +}; + bool Curl_pipeline_server_blacklisted(struct Curl_easy *handle, char *server_name) { if(handle->multi && server_name) { - struct curl_llist *blacklist = + struct curl_llist *list = Curl_multi_pipelining_server_bl(handle->multi); - if(blacklist) { - struct curl_llist_element *curr; - - curr = blacklist->head; - while(curr) { - char *bl_server_name; - - bl_server_name = curr->ptr; - if(strncasecompare(bl_server_name, server_name, - strlen(bl_server_name))) { - infof(handle, "Server %s is blacklisted\n", server_name); - return TRUE; - } - curr = curr->next; + struct curl_llist_element *e = list->head; + while(e) { + struct blacklist_node *bl = (struct blacklist_node *)e; + if(strncasecompare(bl->server_name, server_name, + strlen(bl->server_name))) { + infof(handle, "Server %s is blacklisted\n", server_name); + return TRUE; } + e = e->next; } DEBUGF(infof(handle, "Server %s is not blacklisted\n", server_name)); @@ -284,43 +259,32 @@ bool Curl_pipeline_server_blacklisted(struct Curl_easy *handle, } CURLMcode Curl_pipeline_set_server_blacklist(char **servers, - struct curl_llist **list_ptr) + struct curl_llist *list) { - struct curl_llist *old_list = *list_ptr; - struct curl_llist *new_list = NULL; + /* Free the old list */ + if(list->size) + Curl_llist_destroy(list, NULL); if(servers) { - new_list = Curl_llist_alloc((curl_llist_dtor) server_blacklist_llist_dtor); - if(!new_list) - return CURLM_OUT_OF_MEMORY; + Curl_llist_init(list, (curl_llist_dtor) server_blacklist_llist_dtor); /* Parse the URLs and populate the list */ while(*servers) { - char *server_name; - - server_name = strdup(*servers); - if(!server_name) { - Curl_llist_destroy(new_list, NULL); - return CURLM_OUT_OF_MEMORY; - } + struct blacklist_node *n; + size_t len = strlen(*servers); - if(!Curl_llist_insert_next(new_list, new_list->tail, server_name)) { - Curl_llist_destroy(new_list, NULL); - Curl_safefree(server_name); + n = malloc(sizeof(struct blacklist_node) + len); + if(!n) { + Curl_llist_destroy(list, NULL); return CURLM_OUT_OF_MEMORY; } + strcpy(n->server_name, *servers); + Curl_llist_insert_next(list, list->tail, n, &n->list); servers++; } } - /* Free the old list */ - if(old_list) { - Curl_llist_destroy(old_list, NULL); - } - - /* This might be NULL if sites == NULL, i.e the blacklist is cleared */ - *list_ptr = new_list; return CURLM_OK; } @@ -340,14 +304,14 @@ static bool pipe_head(struct Curl_easy *data, bool Curl_recvpipe_head(struct Curl_easy *data, struct connectdata *conn) { - return pipe_head(data, conn->recv_pipe); + return pipe_head(data, &conn->recv_pipe); } /* returns TRUE if the given handle is head of the send pipe */ bool Curl_sendpipe_head(struct Curl_easy *data, struct connectdata *conn) { - return pipe_head(data, conn->send_pipe); + return pipe_head(data, &conn->send_pipe); } diff --git a/lib/pipeline.h b/lib/pipeline.h index a64f710..413ba31 100644 --- a/lib/pipeline.h +++ b/lib/pipeline.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2015, Daniel Stenberg, , et al. + * Copyright (C) 2015 - 2017, Daniel Stenberg, , et al. * Copyright (C) 2013 - 2014, Linus Nielsen Feltzing, * * This software is licensed as described in the file COPYING, which @@ -34,13 +34,13 @@ bool Curl_pipeline_site_blacklisted(struct Curl_easy *handle, struct connectdata *conn); CURLMcode Curl_pipeline_set_site_blacklist(char **sites, - struct curl_llist **list_ptr); + struct curl_llist *list_ptr); bool Curl_pipeline_server_blacklisted(struct Curl_easy *handle, char *server_name); CURLMcode Curl_pipeline_set_server_blacklist(char **servers, - struct curl_llist **list_ptr); + struct curl_llist *list_ptr); bool Curl_pipeline_checkget_write(struct Curl_easy *data, struct connectdata *conn); diff --git a/lib/pop3.c b/lib/pop3.c index 3feb3be..78f6afe 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -125,6 +125,7 @@ const struct Curl_handler Curl_handler_pop3 = { ZERO_NULL, /* perform_getsock */ pop3_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_POP3, /* defport */ CURLPROTO_POP3, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY | /* flags */ @@ -151,6 +152,7 @@ const struct Curl_handler Curl_handler_pop3s = { ZERO_NULL, /* perform_getsock */ pop3_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_POP3S, /* defport */ CURLPROTO_POP3S, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_SSL @@ -158,58 +160,6 @@ const struct Curl_handler Curl_handler_pop3s = { }; #endif -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed POP3 protocol handler. - */ - -static const struct Curl_handler Curl_handler_pop3_proxy = { - "POP3", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_POP3, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * HTTP-proxyed POP3S protocol handler. - */ - -static const struct Curl_handler Curl_handler_pop3s_proxy = { - "POP3S", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_POP3S, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif - /* SASL parameters for the pop3 protocol */ static const struct SASLproto saslpop3 = { "pop", /* The service name */ @@ -293,23 +243,30 @@ static bool pop3_endofresp(struct connectdata *conn, char *line, size_t len, */ static void pop3_get_message(char *buffer, char **outptr) { - size_t len = 0; + size_t len = strlen(buffer); char *message = NULL; - /* Find the start of the message */ - for(message = buffer + 2; *message == ' ' || *message == '\t'; message++) - ; - - /* Find the end of the message */ - for(len = strlen(message); len--;) - if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && - message[len] != '\t') - break; - - /* Terminate the message */ - if(++len) { - message[len] = '\0'; + if(len > 2) { + /* Find the start of the message */ + len -= 2; + for(message = buffer + 2; *message == ' ' || *message == '\t'; + message++, len--) + ; + + /* Find the end of the message */ + for(; len--;) + if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && + message[len] != '\t') + break; + + /* Terminate the message */ + if(++len) { + message[len] = '\0'; + } } + else + /* junk input => zero length output */ + message = &buffer[len]; *outptr = message; } @@ -1355,31 +1312,6 @@ static CURLcode pop3_setup_connection(struct connectdata *conn) /* Clear the TLS upgraded flag */ conn->tls_upgraded = FALSE; - - /* Set up the proxy if necessary */ - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel POP3 operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_pop3) - conn->handler = &Curl_handler_pop3_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_pop3s_proxy; -#else - failf(data, "POP3S not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - /* set it up as an HTTP connection instead */ - return conn->handler->setup_connection(conn); -#else - failf(data, "POP3 over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - data->state.path++; /* don't include the initial slash */ return CURLE_OK; diff --git a/lib/progress.c b/lib/progress.c index 60627b2..ce8be7f 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -24,6 +24,7 @@ #include "urldata.h" #include "sendf.h" +#include "multiif.h" #include "progress.h" #include "curl_printf.h" @@ -134,7 +135,7 @@ int Curl_pgrsDone(struct connectdata *conn) { int rc; struct Curl_easy *data = conn->data; - data->progress.lastshow=0; + data->progress.lastshow = 0; rc = Curl_pgrsUpdate(conn); /* the final (forced) update */ if(rc) return rc; @@ -149,21 +150,20 @@ int Curl_pgrsDone(struct connectdata *conn) return 0; } -/* reset all times except redirect, and reset the known transfer sizes */ -void Curl_pgrsResetTimesSizes(struct Curl_easy *data) +/* reset the known transfer sizes */ +void Curl_pgrsResetTransferSizes(struct Curl_easy *data) { - data->progress.t_nslookup = 0.0; - data->progress.t_connect = 0.0; - data->progress.t_pretransfer = 0.0; - data->progress.t_starttransfer = 0.0; - Curl_pgrsSetDownloadSize(data, -1); Curl_pgrsSetUploadSize(data, -1); } +/* + * @unittest: 1399 + */ void Curl_pgrsTime(struct Curl_easy *data, timerid timer) { - struct timeval now = Curl_tvnow(); + struct curltime now = Curl_now(); + time_t *delta = NULL; switch(timer) { default: @@ -177,45 +177,58 @@ void Curl_pgrsTime(struct Curl_easy *data, timerid timer) case TIMER_STARTSINGLE: /* This is set at the start of each single fetch */ data->progress.t_startsingle = now; + data->progress.is_t_startransfer_set = false; break; - case TIMER_STARTACCEPT: - data->progress.t_acceptdata = Curl_tvnow(); + data->progress.t_acceptdata = now; break; - case TIMER_NAMELOOKUP: - data->progress.t_nslookup = - Curl_tvdiff_secs(now, data->progress.t_startsingle); + delta = &data->progress.t_nslookup; break; case TIMER_CONNECT: - data->progress.t_connect = - Curl_tvdiff_secs(now, data->progress.t_startsingle); + delta = &data->progress.t_connect; break; case TIMER_APPCONNECT: - data->progress.t_appconnect = - Curl_tvdiff_secs(now, data->progress.t_startsingle); + delta = &data->progress.t_appconnect; break; case TIMER_PRETRANSFER: - data->progress.t_pretransfer = - Curl_tvdiff_secs(now, data->progress.t_startsingle); + delta = &data->progress.t_pretransfer; break; case TIMER_STARTTRANSFER: - data->progress.t_starttransfer = - Curl_tvdiff_secs(now, data->progress.t_startsingle); - break; + delta = &data->progress.t_starttransfer; + /* prevent updating t_starttransfer unless: + * 1) this is the first time we're setting t_starttransfer + * 2) a redirect has occurred since the last time t_starttransfer was set + * This prevents repeated invocations of the function from incorrectly + * changing the t_starttransfer time. + */ + if(data->progress.is_t_startransfer_set) { + return; + } + else { + data->progress.is_t_startransfer_set = true; + break; + } case TIMER_POSTRANSFER: /* this is the normal end-of-transfer thing */ break; case TIMER_REDIRECT: - data->progress.t_redirect = Curl_tvdiff_secs(now, data->progress.start); + data->progress.t_redirect = Curl_timediff_us(now, data->progress.start); break; } + if(delta) { + timediff_t us = Curl_timediff_us(now, data->progress.t_startsingle); + if(us < 1) + us = 1; /* make sure at least one microsecond passed */ + *delta += us; + } } void Curl_pgrsStartNow(struct Curl_easy *data) { data->progress.speeder_c = 0; /* reset the progress meter display */ - data->progress.start = Curl_tvnow(); + data->progress.start = Curl_now(); + data->progress.is_t_startransfer_set = false; data->progress.ul_limit_start.tv_sec = 0; data->progress.ul_limit_start.tv_usec = 0; data->progress.dl_limit_start.tv_sec = 0; @@ -225,29 +238,28 @@ void Curl_pgrsStartNow(struct Curl_easy *data) } /* - * This is used to handle speed limits, calculating how much milliseconds we - * need to wait until we're back under the speed limit, if needed. + * This is used to handle speed limits, calculating how many milliseconds to + * wait until we're back under the speed limit, if needed. * * The way it works is by having a "starting point" (time & amount of data - * transfered by then) used in the speed computation, to be used instead of the - * start of the transfer. - * This starting point is regularly moved as transfer goes on, to keep getting - * accurate values (instead of average over the entire tranfer). + * transferred by then) used in the speed computation, to be used instead of + * the start of the transfer. This starting point is regularly moved as + * transfer goes on, to keep getting accurate values (instead of average over + * the entire transfer). * - * This function takes the current amount of data transfered, the amount at the - * starting point, the limit (in bytes/s), the time of the starting point and - * the current time. + * This function takes the current amount of data transferred, the amount at + * the starting point, the limit (in bytes/s), the time of the starting point + * and the current time. * - * Returns -1 if no waiting is needed (not enough data transfered since - * starting point yet), 0 when no waiting is needed but the starting point - * should be reset (to current), or the number of milliseconds to wait to get - * back under the speed limit. + * Returns 0 if no waiting is needed or when no waiting is needed but the + * starting point should be reset (to current); or the number of milliseconds + * to wait to get back under the speed limit. */ -long Curl_pgrsLimitWaitTime(curl_off_t cursize, - curl_off_t startsize, - curl_off_t limit, - struct timeval start, - struct timeval now) +timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize, + curl_off_t startsize, + curl_off_t limit, + struct curltime start, + struct curltime now) { curl_off_t size = cursize - startsize; time_t minimum; @@ -257,23 +269,30 @@ long Curl_pgrsLimitWaitTime(curl_off_t cursize, if(start.tv_sec == 0 && start.tv_usec == 0) return 0; - /* not enough data yet */ - if(size < limit) - return -1; + if(!limit) + return 0; + + if(size < CURL_OFF_T_MAX/1000) + minimum = (time_t) (CURL_OFF_T_C(1000) * size / limit); + else { + minimum = (time_t) (size / limit); + if(minimum < TIME_T_MAX/1000) + minimum *= 1000; + else + minimum = TIME_T_MAX; + } - minimum = (time_t) (CURL_OFF_T_C(1000) * size / limit); - actual = Curl_tvdiff(now, start); + actual = Curl_timediff(now, start); if(actual < minimum) - /* this is a conversion on some systems (64bit time_t => 32bit long) */ - return (long)(minimum - actual); - else - return 0; + return (minimum - actual); + + return 0; } void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size) { - struct timeval now = Curl_tvnow(); + struct curltime now = Curl_now(); data->progress.downloaded = size; @@ -291,7 +310,7 @@ void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size) void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size) { - struct timeval now = Curl_tvnow(); + struct curltime now = Curl_now(); data->progress.uploaded = size; @@ -337,15 +356,16 @@ void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size) */ int Curl_pgrsUpdate(struct connectdata *conn) { - struct timeval now; + struct curltime now; int result; char max5[6][10]; - curl_off_t dlpercen=0; - curl_off_t ulpercen=0; - curl_off_t total_percen=0; + curl_off_t dlpercen = 0; + curl_off_t ulpercen = 0; + curl_off_t total_percen = 0; curl_off_t total_transfer; curl_off_t total_expected_transfer; curl_off_t timespent; + curl_off_t timespent_ms; /* milliseconds */ struct Curl_easy *data = conn->data; int nowindex = data->progress.speeder_c% CURR_TIME; int checkindex; @@ -353,26 +373,31 @@ int Curl_pgrsUpdate(struct connectdata *conn) char time_left[10]; char time_total[10]; char time_spent[10]; - curl_off_t ulestimate=0; - curl_off_t dlestimate=0; + curl_off_t ulestimate = 0; + curl_off_t dlestimate = 0; curl_off_t total_estimate; - bool shownow=FALSE; + bool shownow = FALSE; + curl_off_t dl = data->progress.downloaded; + curl_off_t ul = data->progress.uploaded; - now = Curl_tvnow(); /* what time is it */ + now = Curl_now(); /* what time is it */ /* The time spent so far (from the start) */ - data->progress.timespent = curlx_tvdiff_secs(now, data->progress.start); - timespent = (curl_off_t)data->progress.timespent; + data->progress.timespent = Curl_timediff_us(now, data->progress.start); + timespent = (curl_off_t)data->progress.timespent/1000000; /* seconds */ + timespent_ms = (curl_off_t)data->progress.timespent/1000; /* ms */ /* The average download speed this far */ - data->progress.dlspeed = (curl_off_t) - ((double)data->progress.downloaded/ - (data->progress.timespent>0?data->progress.timespent:1)); + if(dl < CURL_OFF_T_MAX/1000) + data->progress.dlspeed = (dl * 1000 / (timespent_ms>0?timespent_ms:1)); + else + data->progress.dlspeed = (dl / (timespent>0?timespent:1)); /* The average upload speed this far */ - data->progress.ulspeed = (curl_off_t) - ((double)data->progress.uploaded/ - (data->progress.timespent>0?data->progress.timespent:1)); + if(ul < CURL_OFF_T_MAX/1000) + data->progress.ulspeed = (ul * 1000 / (timespent_ms>0?timespent_ms:1)); + else + data->progress.ulspeed = (ul / (timespent>0?timespent:1)); /* Calculations done at most once a second, unless end is reached */ if(data->progress.lastshow != now.tv_sec) { @@ -380,11 +405,10 @@ int Curl_pgrsUpdate(struct connectdata *conn) data->progress.lastshow = now.tv_sec; - /* Let's do the "current speed" thing, which should use the fastest - of the dl/ul speeds. Store the faster speed at entry 'nowindex'. */ + /* Let's do the "current speed" thing, with the dl + ul speeds + combined. Store the speed at entry 'nowindex'. */ data->progress.speeder[ nowindex ] = - data->progress.downloaded>data->progress.uploaded? - data->progress.downloaded:data->progress.uploaded; + data->progress.downloaded + data->progress.uploaded; /* remember the exact time for this moment */ data->progress.speeder_time [ nowindex ] = now; @@ -397,24 +421,24 @@ int Curl_pgrsUpdate(struct connectdata *conn) array. With N_ENTRIES filled in, we have about N_ENTRIES-1 seconds of transfer. Imagine, after one second we have filled in two entries, after two seconds we've filled in three entries etc. */ - countindex = ((data->progress.speeder_c>=CURR_TIME)? + countindex = ((data->progress.speeder_c >= CURR_TIME)? CURR_TIME:data->progress.speeder_c) - 1; /* first of all, we don't do this if there's no counted seconds yet */ if(countindex) { - time_t span_ms; + timediff_t span_ms; /* Get the index position to compare with the 'nowindex' position. Get the oldest entry possible. While we have less than CURR_TIME entries, the first entry will remain the oldest. */ - checkindex = (data->progress.speeder_c>=CURR_TIME)? + checkindex = (data->progress.speeder_c >= CURR_TIME)? data->progress.speeder_c%CURR_TIME:0; /* Figure out the exact time for the time span */ - span_ms = Curl_tvdiff(now, - data->progress.speeder_time[checkindex]); + span_ms = Curl_timediff(now, + data->progress.speeder_time[checkindex]); if(0 == span_ms) - span_ms=1; /* at least one millisecond MUST have passed */ + span_ms = 1; /* at least one millisecond MUST have passed */ /* Calculate the average speed the last 'span_ms' milliseconds */ { @@ -433,10 +457,9 @@ int Curl_pgrsUpdate(struct connectdata *conn) } } else - /* the first second we use the main average */ + /* the first second we use the average */ data->progress.current_speed = - (data->progress.ulspeed>data->progress.dlspeed)? - data->progress.ulspeed:data->progress.dlspeed; + data->progress.ulspeed + data->progress.dlspeed; } /* Calculations end */ @@ -445,22 +468,26 @@ int Curl_pgrsUpdate(struct connectdata *conn) if(data->set.fxferinfo) { /* There's a callback set, call that */ - result= data->set.fxferinfo(data->set.progress_client, - data->progress.size_dl, - data->progress.downloaded, - data->progress.size_ul, - data->progress.uploaded); + Curl_set_in_callback(data, true); + result = data->set.fxferinfo(data->set.progress_client, + data->progress.size_dl, + data->progress.downloaded, + data->progress.size_ul, + data->progress.uploaded); + Curl_set_in_callback(data, false); if(result) failf(data, "Callback aborted"); return result; } - else if(data->set.fprogress) { + if(data->set.fprogress) { /* The older deprecated callback is set, call that */ - result= data->set.fprogress(data->set.progress_client, - (double)data->progress.size_dl, - (double)data->progress.downloaded, - (double)data->progress.size_ul, - (double)data->progress.uploaded); + Curl_set_in_callback(data, true); + result = data->set.fprogress(data->set.progress_client, + (double)data->progress.size_dl, + (double)data->progress.downloaded, + (double)data->progress.size_ul, + (double)data->progress.uploaded); + Curl_set_in_callback(data, false); if(result) failf(data, "Callback aborted"); return result; diff --git a/lib/progress.h b/lib/progress.h index 155ff04..3c2231c 100644 --- a/lib/progress.h +++ b/lib/progress.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,13 +47,13 @@ void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size); void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size); void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size); int Curl_pgrsUpdate(struct connectdata *); -void Curl_pgrsResetTimesSizes(struct Curl_easy *data); +void Curl_pgrsResetTransferSizes(struct Curl_easy *data); void Curl_pgrsTime(struct Curl_easy *data, timerid timer); -long Curl_pgrsLimitWaitTime(curl_off_t cursize, - curl_off_t startsize, - curl_off_t limit, - struct timeval start, - struct timeval now); +timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize, + curl_off_t startsize, + curl_off_t limit, + struct curltime start, + struct curltime now); /* Don't show progress for sizes smaller than: */ #define LEAST_SIZE_PROGRESS BUFSIZE diff --git a/lib/rand.c b/lib/rand.c index 4da37b9..0769ed1 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,10 +47,12 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) char *force_entropy = getenv("CURL_ENTROPY"); if(force_entropy) { if(!seeded) { + unsigned int seed = 0; size_t elen = strlen(force_entropy); - size_t clen = sizeof(randseed); + size_t clen = sizeof(seed); size_t min = elen < clen ? elen : clen; - memcpy((char *)&randseed, force_entropy, min); + memcpy((char *)&seed, force_entropy, min); + randseed = ntohl(seed); seeded = TRUE; } else @@ -63,7 +65,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) /* data may be NULL! */ result = Curl_ssl_random(data, (unsigned char *)rnd, sizeof(*rnd)); if(result != CURLE_NOT_BUILT_IN) - /* only if there is no random funtion in the TLS backend do the non crypto + /* only if there is no random function in the TLS backend do the non crypto version, otherwise return result */ return result; @@ -84,7 +86,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) #endif if(!seeded) { - struct timeval now = curlx_tvnow(); + struct curltime now = Curl_now(); infof(data, "WARNING: Using weak random seed\n"); randseed += (unsigned int)now.tv_usec + (unsigned int)now.tv_sec; randseed = randseed * 1103515245 + 12345; @@ -115,18 +117,69 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) * */ -CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rndptr, - unsigned int num) +CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num) { CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; - unsigned int i; - assert(num > 0); + DEBUGASSERT(num > 0); - for(i = 0; i < num; i++) { - result = randit(data, rndptr++); + while(num) { + unsigned int r; + size_t left = num < sizeof(unsigned int) ? num : sizeof(unsigned int); + + result = randit(data, &r); if(result) return result; + + while(left) { + *rnd++ = (unsigned char)(r & 0xFF); + r >>= 8; + --num; + --left; + } } + + return result; +} + +/* + * Curl_rand_hex() fills the 'rnd' buffer with a given 'num' size with random + * hexadecimal digits PLUS a zero terminating byte. It must be an odd number + * size. + */ + +CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd, + size_t num) +{ + CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; + const char *hex = "0123456789abcdef"; + unsigned char buffer[128]; + unsigned char *bufp = buffer; + DEBUGASSERT(num > 1); + +#ifdef __clang_analyzer__ + /* This silences a scan-build warning about accesssing this buffer with + uninitialized memory. */ + memset(buffer, 0, sizeof(buffer)); +#endif + + if((num/2 >= sizeof(buffer)) || !(num&1)) + /* make sure it fits in the local buffer and that it is an odd number! */ + return CURLE_BAD_FUNCTION_ARGUMENT; + + num--; /* save one for zero termination */ + + result = Curl_rand(data, buffer, num/2); + if(result) + return result; + + while(num) { + *rnd++ = hex[(*bufp & 0xF0)>>4]; + *rnd++ = hex[*bufp & 0x0F]; + bufp++; + num -= 2; + } + *rnd = 0; + return result; } diff --git a/lib/rand.h b/lib/rand.h index 0f89861..c6fae35 100644 --- a/lib/rand.h +++ b/lib/rand.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,7 +23,7 @@ ***************************************************************************/ /* - * Curl_rand() stores 'num' number of random unsigned integers in the buffer + * Curl_rand() stores 'num' number of random unsigned characters in the buffer * 'rnd' points to. * * If libcurl is built without TLS support or with a TLS backend that lacks a @@ -37,7 +37,11 @@ * easy handle! * */ -CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rnd, - unsigned int num); +CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num); + +/* Same as above but outputs only random lowercase hex characters. + Does NOT terminate.*/ +CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd, + size_t num); #endif /* HEADER_CURL_RAND_H */ diff --git a/lib/rtsp.c b/lib/rtsp.c index 65c6c3b..194bc94 100644 --- a/lib/rtsp.c +++ b/lib/rtsp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -47,7 +47,7 @@ * -incoming server requests * -server CSeq counter * -digest authentication - * -connect thru proxy + * -connect through proxy * -pipelining? */ @@ -81,6 +81,9 @@ static CURLcode rtsp_rtp_readwrite(struct Curl_easy *data, static CURLcode rtsp_setup_connection(struct connectdata *conn); +bool rtsp_connisdead(struct connectdata *check); +static unsigned int rtsp_conncheck(struct connectdata *check, + unsigned int checks_to_perform); /* this returns the socket to wait for in the DO and DOING state for the multi interface and then we're always _sending_ a request and thus we wait for @@ -117,6 +120,7 @@ const struct Curl_handler Curl_handler_rtsp = { ZERO_NULL, /* perform_getsock */ rtsp_disconnect, /* disconnect */ rtsp_rtp_readwrite, /* readwrite */ + rtsp_conncheck, /* connection_check */ PORT_RTSP, /* defport */ CURLPROTO_RTSP, /* protocol */ PROTOPT_NONE /* flags */ @@ -143,7 +147,7 @@ static CURLcode rtsp_setup_connection(struct connectdata *conn) * Instead, if it is readable, run Curl_connalive() to peek at the socket * and distinguish between closed and data. */ -bool Curl_rtsp_connisdead(struct connectdata *check) +bool rtsp_connisdead(struct connectdata *check) { int sval; bool ret_val = TRUE; @@ -165,6 +169,23 @@ bool Curl_rtsp_connisdead(struct connectdata *check) return ret_val; } +/* + * Function to check on various aspects of a connection. + */ +static unsigned int rtsp_conncheck(struct connectdata *check, + unsigned int checks_to_perform) +{ + unsigned int ret_val = CONNRESULT_NONE; + + if(checks_to_perform & CONNCHECK_ISDEAD) { + if(rtsp_connisdead(check)) + ret_val |= CONNRESULT_DEAD; + } + + return ret_val; +} + + static CURLcode rtsp_connect(struct connectdata *conn, bool *done) { CURLcode httpStatus; @@ -216,7 +237,7 @@ static CURLcode rtsp_done(struct connectdata *conn, CSeq_sent, CSeq_recv); return CURLE_RTSP_CSEQ_ERROR; } - else if(data->set.rtspreq == RTSPREQ_RECEIVE && + if(data->set.rtspreq == RTSPREQ_RECEIVE && (conn->proto.rtspc.rtp_channel == -1)) { infof(data, "Got an RTP Receive with a CSeq of %ld\n", CSeq_recv); /* TODO CPC: Server -> Client logic here */ @@ -229,7 +250,7 @@ static CURLcode rtsp_done(struct connectdata *conn, static CURLcode rtsp_do(struct connectdata *conn, bool *done) { struct Curl_easy *data = conn->data; - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; Curl_RtspReq rtspreq = data->set.rtspreq; struct RTSP *rtsp = data->req.protop; struct HTTP *http; @@ -336,7 +357,7 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) } /* Transport Header for SETUP requests */ - p_transport = Curl_checkheaders(conn, "Transport:"); + p_transport = Curl_checkheaders(conn, "Transport"); if(rtspreq == RTSPREQ_SETUP && !p_transport) { /* New Transport: setting? */ if(data->set.str[STRING_RTSP_TRANSPORT]) { @@ -360,11 +381,11 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) /* Accept Headers for DESCRIBE requests */ if(rtspreq == RTSPREQ_DESCRIBE) { /* Accept Header */ - p_accept = Curl_checkheaders(conn, "Accept:")? + p_accept = Curl_checkheaders(conn, "Accept")? NULL:"Accept: application/sdp\r\n"; /* Accept-Encoding header */ - if(!Curl_checkheaders(conn, "Accept-Encoding:") && + if(!Curl_checkheaders(conn, "Accept-Encoding") && data->set.str[STRING_ENCODING]) { Curl_safefree(conn->allocptr.accept_encoding); conn->allocptr.accept_encoding = @@ -381,11 +402,11 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) it might have been used in the proxy connect, but if we have got a header with the user-agent string specified, we erase the previously made string here. */ - if(Curl_checkheaders(conn, "User-Agent:") && conn->allocptr.uagent) { + if(Curl_checkheaders(conn, "User-Agent") && conn->allocptr.uagent) { Curl_safefree(conn->allocptr.uagent); conn->allocptr.uagent = NULL; } - else if(!Curl_checkheaders(conn, "User-Agent:") && + else if(!Curl_checkheaders(conn, "User-Agent") && data->set.str[STRING_USERAGENT]) { p_uagent = conn->allocptr.uagent; } @@ -400,7 +421,7 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) /* Referrer */ Curl_safefree(conn->allocptr.ref); - if(data->change.referer && !Curl_checkheaders(conn, "Referer:")) + if(data->change.referer && !Curl_checkheaders(conn, "Referer")) conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer); else conn->allocptr.ref = NULL; @@ -417,7 +438,7 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) (rtspreq & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) { /* Check to see if there is a range set in the custom headers */ - if(!Curl_checkheaders(conn, "Range:") && data->state.range) { + if(!Curl_checkheaders(conn, "Range") && data->state.range) { Curl_safefree(conn->allocptr.rangeline); conn->allocptr.rangeline = aprintf("Range: %s\r\n", data->state.range); p_range = conn->allocptr.rangeline; @@ -427,11 +448,11 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) /* * Sanity check the custom headers */ - if(Curl_checkheaders(conn, "CSeq:")) { + if(Curl_checkheaders(conn, "CSeq")) { failf(data, "CSeq cannot be set as a custom header."); return CURLE_RTSP_CSEQ_ERROR; } - if(Curl_checkheaders(conn, "Session:")) { + if(Curl_checkheaders(conn, "Session")) { failf(data, "Session ID cannot be set as a custom header."); return CURLE_BAD_FUNCTION_ARGUMENT; } @@ -521,7 +542,7 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) if(putsize > 0 || postsize > 0) { /* As stated in the http comments, it is probably not wise to * actually set a custom Content-Length in the headers */ - if(!Curl_checkheaders(conn, "Content-Length:")) { + if(!Curl_checkheaders(conn, "Content-Length")) { result = Curl_add_bufferf(req_buffer, "Content-Length: %" CURL_FORMAT_CURL_OFF_T"\r\n", (data->set.upload ? putsize : postsize)); @@ -531,7 +552,7 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) if(rtspreq == RTSPREQ_SET_PARAMETER || rtspreq == RTSPREQ_GET_PARAMETER) { - if(!Curl_checkheaders(conn, "Content-Type:")) { + if(!Curl_checkheaders(conn, "Content-Type")) { result = Curl_add_bufferf(req_buffer, "Content-Type: text/parameters\r\n"); if(result) @@ -540,7 +561,7 @@ static CURLcode rtsp_do(struct connectdata *conn, bool *done) } if(rtspreq == RTSPREQ_ANNOUNCE) { - if(!Curl_checkheaders(conn, "Content-Type:")) { + if(!Curl_checkheaders(conn, "Content-Type")) { result = Curl_add_bufferf(req_buffer, "Content-Type: application/sdp\r\n"); if(result) @@ -648,31 +669,29 @@ static CURLcode rtsp_rtp_readwrite(struct Curl_easy *data, *readmore = TRUE; break; } - else { - /* We have the full RTP interleaved packet - * Write out the header including the leading '$' */ - DEBUGF(infof(data, "RTP write channel %d rtp_length %d\n", - rtspc->rtp_channel, rtp_length)); - result = rtp_client_write(conn, &rtp[0], rtp_length + 4); - if(result) { - failf(data, "Got an error writing an RTP packet"); - *readmore = FALSE; - Curl_safefree(rtspc->rtp_buf); - rtspc->rtp_buf = NULL; - rtspc->rtp_bufsize = 0; - return result; - } + /* We have the full RTP interleaved packet + * Write out the header including the leading '$' */ + DEBUGF(infof(data, "RTP write channel %d rtp_length %d\n", + rtspc->rtp_channel, rtp_length)); + result = rtp_client_write(conn, &rtp[0], rtp_length + 4); + if(result) { + failf(data, "Got an error writing an RTP packet"); + *readmore = FALSE; + Curl_safefree(rtspc->rtp_buf); + rtspc->rtp_buf = NULL; + rtspc->rtp_bufsize = 0; + return result; + } - /* Move forward in the buffer */ - rtp_dataleft -= rtp_length + 4; - rtp += rtp_length + 4; + /* Move forward in the buffer */ + rtp_dataleft -= rtp_length + 4; + rtp += rtp_length + 4; - if(data->set.rtspreq == RTSPREQ_RECEIVE) { - /* If we are in a passive receive, give control back - * to the app as often as we can. - */ - k->keepon &= ~KEEP_RECV; - } + if(data->set.rtspreq == RTSPREQ_RECEIVE) { + /* If we are in a passive receive, give control back + * to the app as often as we can. + */ + k->keepon &= ~KEEP_RECV; } } else { @@ -703,20 +722,18 @@ static CURLcode rtsp_rtp_readwrite(struct Curl_easy *data, *nread = 0; return CURLE_OK; } - else { - /* Fix up k->str to point just after the last RTP packet */ - k->str += *nread - rtp_dataleft; + /* Fix up k->str to point just after the last RTP packet */ + k->str += *nread - rtp_dataleft; - /* either all of the data has been read or... - * rtp now points at the next byte to parse - */ - if(rtp_dataleft > 0) - DEBUGASSERT(k->str[0] == rtp[0]); + /* either all of the data has been read or... + * rtp now points at the next byte to parse + */ + if(rtp_dataleft > 0) + DEBUGASSERT(k->str[0] == rtp[0]); - DEBUGASSERT(rtp_dataleft <= *nread); /* sanity check */ + DEBUGASSERT(rtp_dataleft <= *nread); /* sanity check */ - *nread = rtp_dataleft; - } + *nread = rtp_dataleft; /* If we get here, we have finished with the leftover/merge buffer */ Curl_safefree(rtspc->rtp_buf); @@ -732,14 +749,30 @@ CURLcode rtp_client_write(struct connectdata *conn, char *ptr, size_t len) struct Curl_easy *data = conn->data; size_t wrote; curl_write_callback writeit; + void *user_ptr; if(len == 0) { failf(data, "Cannot write a 0 size RTP packet."); return CURLE_WRITE_ERROR; } - writeit = data->set.fwrite_rtp?data->set.fwrite_rtp:data->set.fwrite_func; - wrote = writeit(ptr, 1, len, data->set.rtp_out); + /* If the user has configured CURLOPT_INTERLEAVEFUNCTION then use that + function and any configured CURLOPT_INTERLEAVEDATA to write out the RTP + data. Otherwise, use the CURLOPT_WRITEFUNCTION with the CURLOPT_WRITEDATA + pointer to write out the RTP data. */ + if(data->set.fwrite_rtp) { + writeit = data->set.fwrite_rtp; + user_ptr = data->set.rtp_out; + } + else + { + writeit = data->set.fwrite_func; + user_ptr = data->set.out; + } + + Curl_set_in_callback(data, true); + wrote = writeit(ptr, 1, len, user_ptr); + Curl_set_in_callback(data, false); if(CURL_WRITEFUNC_PAUSE == wrote) { failf(data, "Cannot pause RTP"); @@ -797,7 +830,7 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn, /* If the Session ID is not set, and we find it in a response, then set * it. * - * Allow any non whitespace content, up to the field seperator or end of + * Allow any non whitespace content, up to the field separator or end of * line. RFC 2326 isn't 100% clear on the session ID and for example * gstreamer does url-encoded session ID's not covered by the standard. */ diff --git a/lib/rtsp.h b/lib/rtsp.h index 5a8d555..8375a53 100644 --- a/lib/rtsp.h +++ b/lib/rtsp.h @@ -25,13 +25,11 @@ extern const struct Curl_handler Curl_handler_rtsp; -bool Curl_rtsp_connisdead(struct connectdata *check); CURLcode Curl_rtsp_parseheader(struct connectdata *conn, char *header); #else /* disabled */ #define Curl_rtsp_parseheader(x,y) CURLE_NOT_BUILT_IN -#define Curl_rtsp_connisdead(x) TRUE #endif /* CURL_DISABLE_RTSP */ diff --git a/lib/security.c b/lib/security.c index f4a8763..ac39dae 100644 --- a/lib/security.c +++ b/lib/security.c @@ -7,7 +7,7 @@ * rewrite to work around the paragraph 2 in the BSD licenses as explained * below. * - * Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1998, 1999, 2017 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * * Copyright (C) 2001 - 2015, Daniel Stenberg, , et al. @@ -50,9 +50,7 @@ #include #endif -#ifdef HAVE_LIMITS_H #include -#endif #include "urldata.h" #include "curl_base64.h" @@ -115,7 +113,7 @@ static char level_to_char(int level) static int ftp_send_command(struct connectdata *conn, const char *message, ...) { int ftp_code; - ssize_t nread=0; + ssize_t nread = 0; va_list args; char print_buffer[50]; diff --git a/lib/select.c b/lib/select.c index 03af645..28390a4 100644 --- a/lib/select.c +++ b/lib/select.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -51,7 +51,7 @@ #include "warnless.h" /* Convenience local macros */ -#define ELAPSED_MS() (int)curlx_tvdiff(curlx_tvnow(), initial_tv) +#define ELAPSED_MS() (int)Curl_timediff(Curl_now(), initial_tv) int Curl_ack_eintr = 0; #define ERROR_NOT_EINTR(error) (Curl_ack_eintr || error != EINTR) @@ -78,7 +78,7 @@ int Curl_wait_ms(int timeout_ms) #ifndef HAVE_POLL_FINE struct timeval pending_tv; #endif - struct timeval initial_tv; + struct curltime initial_tv; int pending_ms; int error; #endif @@ -96,7 +96,7 @@ int Curl_wait_ms(int timeout_ms) Sleep(timeout_ms); #else pending_ms = timeout_ms; - initial_tv = curlx_tvnow(); + initial_tv = Curl_now(); do { #if defined(HAVE_POLL_FINE) r = poll(NULL, 0, pending_ms); @@ -129,7 +129,7 @@ int Curl_wait_ms(int timeout_ms) * and a file descriptor is too large for FD_SETSIZE. * * A negative timeout value makes this function wait indefinitely, - * unles no valid file descriptor is given, when this happens the + * unless no valid file descriptor is given, when this happens the * negative timeout is ignored and the function times out immediately. * * Return values: @@ -158,13 +158,13 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */ fd_set fds_err; curl_socket_t maxfd; #endif - struct timeval initial_tv = {0, 0}; + struct curltime initial_tv = {0, 0}; int pending_ms = 0; int error; int r; int ret; -#if SIZEOF_LONG != SIZEOF_INT +#if SIZEOF_TIME_T != SIZEOF_INT /* wrap-around precaution */ if(timeout_ms >= INT_MAX) timeout_ms = INT_MAX; @@ -177,14 +177,14 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */ return r; } - /* Avoid initial timestamp, avoid curlx_tvnow() call, when elapsed + /* Avoid initial timestamp, avoid Curl_now() call, when elapsed time in this function does not need to be measured. This happens when function is called with a zero timeout or a negative timeout value indicating a blocking call should be performed. */ if(timeout_ms > 0) { pending_ms = (int)timeout_ms; - initial_tv = curlx_tvnow(); + initial_tv = Curl_now(); } #ifdef HAVE_POLL_FINE @@ -380,7 +380,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */ * select() is used instead. An error is returned if select() is * being used and a file descriptor is too large for FD_SETSIZE. * A negative timeout value makes this function wait indefinitely, - * unles no valid file descriptor is given, when this happens the + * unless no valid file descriptor is given, when this happens the * negative timeout is ignored and the function times out immediately. * * Return values: @@ -398,7 +398,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) fd_set fds_err; curl_socket_t maxfd; #endif - struct timeval initial_tv = {0, 0}; + struct curltime initial_tv = {0, 0}; bool fds_none = TRUE; unsigned int i; int pending_ms = 0; @@ -418,14 +418,14 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) return r; } - /* Avoid initial timestamp, avoid curlx_tvnow() call, when elapsed + /* Avoid initial timestamp, avoid Curl_now() call, when elapsed time in this function does not need to be measured. This happens when function is called with a zero timeout or a negative timeout value indicating a blocking call should be performed. */ if(timeout_ms > 0) { pending_ms = timeout_ms; - initial_tv = curlx_tvnow(); + initial_tv = Curl_now(); } #ifdef HAVE_POLL_FINE @@ -571,8 +571,8 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) * * Return values are the same as select's. */ -int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes, - fd_set* excepts, struct timeval* tv) +int tpf_select_libcurl(int maxfds, fd_set *reads, fd_set *writes, + fd_set *excepts, struct timeval *tv) { int rc; diff --git a/lib/select.h b/lib/select.h index e247bd9..4351786 100644 --- a/lib/select.h +++ b/lib/select.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -24,10 +24,10 @@ #include "curl_setup.h" -#ifdef HAVE_SYS_POLL_H -#include -#elif defined(HAVE_POLL_H) +#ifdef HAVE_POLL_H #include +#elif defined(HAVE_SYS_POLL_H) +#include #endif /* @@ -36,7 +36,8 @@ #if !defined(HAVE_STRUCT_POLLFD) && \ !defined(HAVE_SYS_POLL_H) && \ - !defined(HAVE_POLL_H) + !defined(HAVE_POLL_H) && \ + !defined(POLLIN) #define POLLIN 0x01 #define POLLPRI 0x02 diff --git a/lib/sendf.c b/lib/sendf.c index 7601697..27c0ccc 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,14 @@ #include "curl_setup.h" +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_LINUX_TCP_H +#include +#endif + #include #include "urldata.h" @@ -29,10 +37,12 @@ #include "connect.h" #include "vtls/vtls.h" #include "ssh.h" +#include "easyif.h" #include "multiif.h" #include "non-ascii.h" #include "strerror.h" #include "select.h" +#include "strdup.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" @@ -62,7 +72,7 @@ static size_t convert_lineends(struct Curl_easy *data, if(*startPtr == '\n') { /* This block of incoming data starts with the previous block's LF so get rid of it */ - memmove(startPtr, startPtr+1, size-1); + memmove(startPtr, startPtr + 1, size-1); size--; /* and it wasn't a bare CR but a CRLF conversion instead */ data->state.crlf_conversions++; @@ -74,7 +84,7 @@ static size_t convert_lineends(struct Curl_easy *data, inPtr = outPtr = memchr(startPtr, '\r', size); if(inPtr) { /* at least one CR, now look for CRLF */ - while(inPtr < (startPtr+size-1)) { + while(inPtr < (startPtr + size-1)) { /* note that it's size-1, so we'll never look past the last byte */ if(memcmp(inPtr, "\r\n", 2) == 0) { /* CRLF found, bump past the CR and copy the NL */ @@ -97,7 +107,7 @@ static size_t convert_lineends(struct Curl_easy *data, inPtr++; } /* end of while loop */ - if(inPtr < startPtr+size) { + if(inPtr < startPtr + size) { /* handle last byte */ if(*inPtr == '\r') { /* deal with a CR at the end of the buffer */ @@ -111,7 +121,7 @@ static size_t convert_lineends(struct Curl_easy *data, } outPtr++; } - if(outPtr < startPtr+size) + if(outPtr < startPtr + size) /* tidy up by null terminating the now shorter data */ *outPtr = '\0'; @@ -148,7 +158,7 @@ static void pre_receive_plain(struct connectdata *conn, int num) /* Have some incoming data */ if(!psnd->buffer) { /* Use buffer double default size for intermediate buffer */ - psnd->allocated_size = 2 * BUFSIZE; + psnd->allocated_size = 2 * conn->data->set.buffer_size; psnd->buffer = malloc(psnd->allocated_size); psnd->recv_size = 0; psnd->recv_processed = 0; @@ -240,29 +250,28 @@ void Curl_infof(struct Curl_easy *data, const char *fmt, ...) void Curl_failf(struct Curl_easy *data, const char *fmt, ...) { - va_list ap; - size_t len; - va_start(ap, fmt); - - vsnprintf(data->state.buffer, BUFSIZE, fmt, ap); + if(data->set.verbose || data->set.errorbuffer) { + va_list ap; + size_t len; + char error[CURL_ERROR_SIZE + 2]; + va_start(ap, fmt); + vsnprintf(error, CURL_ERROR_SIZE, fmt, ap); + len = strlen(error); - if(data->set.errorbuffer && !data->state.errorbuf) { - snprintf(data->set.errorbuffer, CURL_ERROR_SIZE, "%s", data->state.buffer); - data->state.errorbuf = TRUE; /* wrote error string */ - } - if(data->set.verbose) { - len = strlen(data->state.buffer); - if(len < BUFSIZE - 1) { - data->state.buffer[len] = '\n'; - data->state.buffer[++len] = '\0'; + if(data->set.errorbuffer && !data->state.errorbuf) { + strcpy(data->set.errorbuffer, error); + data->state.errorbuf = TRUE; /* wrote error string */ + } + if(data->set.verbose) { + error[len] = '\n'; + error[++len] = '\0'; + Curl_debug(data, CURLINFO_TEXT, error, len, NULL); } - Curl_debug(data, CURLINFO_TEXT, data->state.buffer, len, NULL); + va_end(ap); } - - va_end(ap); } -/* Curl_sendf() sends formated data to the server */ +/* Curl_sendf() sends formatted data to the server */ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, const char *fmt, ...) { @@ -279,7 +288,7 @@ CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, if(!s) return CURLE_OUT_OF_MEMORY; /* failure */ - bytes_written=0; + bytes_written = 0; write_len = strlen(s); sptr = s; @@ -360,7 +369,7 @@ ssize_t Curl_send_plain(struct connectdata *conn, int num, available. */ pre_receive_plain(conn, num); -#ifdef MSG_FASTOPEN /* Linux */ +#if defined(MSG_FASTOPEN) && !defined(TCP_FASTOPEN_CONNECT) /* Linux */ if(conn->bits.tcp_fastopen) { bytes_written = sendto(sockfd, mem, len, MSG_FASTOPEN, conn->ip_addr->ai_addr, conn->ip_addr->ai_addrlen); @@ -380,14 +389,14 @@ ssize_t Curl_send_plain(struct connectdata *conn, int num, (WSAEWOULDBLOCK == err) #else /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned - due to its inability to send off data without blocking. We therefor + due to its inability to send off data without blocking. We therefore treat both error codes the same here */ (EWOULDBLOCK == err) || (EAGAIN == err) || (EINTR == err) || (EINPROGRESS == err) #endif ) { /* this is just a case of EWOULDBLOCK */ - bytes_written=0; + bytes_written = 0; *code = CURLE_AGAIN; } else { @@ -447,7 +456,7 @@ ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf, (WSAEWOULDBLOCK == err) #else /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned - due to its inability to send off data without blocking. We therefor + due to its inability to send off data without blocking. We therefore treat both error codes the same here */ (EWOULDBLOCK == err) || (EAGAIN == err) || (EINTR == err) #endif @@ -474,68 +483,86 @@ static CURLcode pausewrite(struct Curl_easy *data, we want to send we need to dup it to save a copy for when the sending is again enabled */ struct SingleRequest *k = &data->req; - char *dupl = malloc(len); - if(!dupl) - return CURLE_OUT_OF_MEMORY; + struct UrlState *s = &data->state; + char *dupl; + unsigned int i; + bool newtype = TRUE; + + if(s->tempcount) { + for(i = 0; i< s->tempcount; i++) { + if(s->tempwrite[i].type == type) { + /* data for this type exists */ + newtype = FALSE; + break; + } + } + DEBUGASSERT(i < 3); + } + else + i = 0; - memcpy(dupl, ptr, len); + if(!newtype) { + /* append new data to old data */ - /* store this information in the state struct for later use */ - data->state.tempwrite = dupl; - data->state.tempwritesize = len; - data->state.tempwritetype = type; + /* figure out the new size of the data to save */ + size_t newlen = len + s->tempwrite[i].len; + /* allocate the new memory area */ + char *newptr = realloc(s->tempwrite[i].buf, newlen); + if(!newptr) + return CURLE_OUT_OF_MEMORY; + /* copy the new data to the end of the new area */ + memcpy(newptr + s->tempwrite[i].len, ptr, len); + + /* update the pointer and the size */ + s->tempwrite[i].buf = newptr; + s->tempwrite[i].len = newlen; + } + else { + dupl = Curl_memdup(ptr, len); + if(!dupl) + return CURLE_OUT_OF_MEMORY; + + /* store this information in the state struct for later use */ + s->tempwrite[i].buf = dupl; + s->tempwrite[i].len = len; + s->tempwrite[i].type = type; + + if(newtype) + s->tempcount++; + } /* mark the connection as RECV paused */ k->keepon |= KEEP_RECV_PAUSE; - DEBUGF(infof(data, "Pausing with %zu bytes in buffer for type %02x\n", + DEBUGF(infof(data, "Paused %zu bytes in buffer for type %02x\n", len, type)); return CURLE_OK; } -/* Curl_client_chop_write() writes chunks of data not larger than - * CURL_MAX_WRITE_SIZE via client write callback(s) and - * takes care of pause requests from the callbacks. +/* chop_write() writes chunks of data not larger than CURL_MAX_WRITE_SIZE via + * client write callback(s) and takes care of pause requests from the + * callbacks. */ -CURLcode Curl_client_chop_write(struct connectdata *conn, - int type, - char *ptr, - size_t len) +static CURLcode chop_write(struct connectdata *conn, + int type, + char *optr, + size_t olen) { struct Curl_easy *data = conn->data; curl_write_callback writeheader = NULL; curl_write_callback writebody = NULL; + char *ptr = optr; + size_t len = olen; if(!len) return CURLE_OK; - /* If reading is actually paused, we're forced to append this chunk of data - to the already held data, but only if it is the same type as otherwise it - can't work and it'll return error instead. */ - if(data->req.keepon & KEEP_RECV_PAUSE) { - size_t newlen; - char *newptr; - if(type != data->state.tempwritetype) - /* major internal confusion */ - return CURLE_RECV_ERROR; - - DEBUGASSERT(data->state.tempwrite); - - /* figure out the new size of the data to save */ - newlen = len + data->state.tempwritesize; - /* allocate the new memory area */ - newptr = realloc(data->state.tempwrite, newlen); - if(!newptr) - return CURLE_OUT_OF_MEMORY; - /* copy the new data to the end of the new area */ - memcpy(newptr + data->state.tempwritesize, ptr, len); - /* update the pointer and the size */ - data->state.tempwrite = newptr; - data->state.tempwritesize = newlen; - return CURLE_OK; - } + /* If reading is paused, append this data to the already held data for this + type. */ + if(data->req.keepon & KEEP_RECV_PAUSE) + return pausewrite(data, type, ptr, len); /* Determine the callback(s) to use. */ if(type & CLIENTWRITE_BODY) @@ -565,26 +592,10 @@ CURLcode Curl_client_chop_write(struct connectdata *conn, failf(data, "Write callback asked for PAUSE when not supported!"); return CURLE_WRITE_ERROR; } - else - return pausewrite(data, type, ptr, len); - } - else if(wrote != chunklen) { - failf(data, "Failed writing body (%zu != %zu)", wrote, chunklen); - return CURLE_WRITE_ERROR; + return pausewrite(data, type, ptr, len); } - } - - if(writeheader) { - size_t wrote = writeheader(ptr, 1, chunklen, data->set.writeheader); - - if(CURL_WRITEFUNC_PAUSE == wrote) - /* here we pass in the HEADER bit only since if this was body as well - then it was passed already and clearly that didn't trigger the - pause, so this is saved for later with the HEADER bit only */ - return pausewrite(data, CLIENTWRITE_HEADER, ptr, len); - if(wrote != chunklen) { - failf(data, "Failed writing header"); + failf(data, "Failed writing body (%zu != %zu)", wrote, chunklen); return CURLE_WRITE_ERROR; } } @@ -593,6 +604,26 @@ CURLcode Curl_client_chop_write(struct connectdata *conn, len -= chunklen; } + if(writeheader) { + size_t wrote; + ptr = optr; + len = olen; + Curl_set_in_callback(data, true); + wrote = writeheader(ptr, 1, len, data->set.writeheader); + Curl_set_in_callback(data, false); + + if(CURL_WRITEFUNC_PAUSE == wrote) + /* here we pass in the HEADER bit only since if this was body as well + then it was passed already and clearly that didn't trigger the + pause, so this is saved for later with the HEADER bit only */ + return pausewrite(data, CLIENTWRITE_HEADER, ptr, len); + + if(wrote != len) { + failf(data, "Failed writing header"); + return CURLE_WRITE_ERROR; + } + } + return CURLE_OK; } @@ -616,6 +647,8 @@ CURLcode Curl_client_write(struct connectdata *conn, if(0 == len) len = strlen(ptr); + DEBUGASSERT(type <= 3); + /* FTP data may need conversion. */ if((type & CLIENTWRITE_BODY) && (conn->handler->protocol & PROTO_FAMILY_FTP) && @@ -632,7 +665,7 @@ CURLcode Curl_client_write(struct connectdata *conn, #endif /* CURL_DO_LINEEND_CONV */ } - return Curl_client_chop_write(conn, type, ptr, len); + return chop_write(conn, type, ptr, len); } CURLcode Curl_read_plain(curl_socket_t sockfd, @@ -652,8 +685,7 @@ CURLcode Curl_read_plain(curl_socket_t sockfd, #endif if(return_error) return CURLE_AGAIN; - else - return CURLE_RECV_ERROR; + return CURLE_RECV_ERROR; } /* we only return number of bytes read when we return OK */ @@ -677,9 +709,10 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */ ssize_t nread = 0; size_t bytesfromsocket = 0; char *buffertofill = NULL; + struct Curl_easy *data = conn->data; /* if HTTP/1 pipelining is both wanted and possible */ - bool pipelining = Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1) && + bool pipelining = Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1) && (conn->bundle->multiuse == BUNDLE_PIPELINING); /* Set 'num' to 0 or 1, depending on which socket that has been sent here. @@ -687,7 +720,7 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */ us use the correct ssl handle. */ int num = (sockfd == conn->sock[SECONDARYSOCKET]); - *n=0; /* reset amount to zero */ + *n = 0; /* reset amount to zero */ /* If session can pipeline, check connection buffer */ if(pipelining) { @@ -705,13 +738,11 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */ } /* If we come here, it means that there is no data to read from the buffer, * so we read from the socket */ - bytesfromsocket = CURLMIN(sizerequested, BUFSIZE * sizeof(char)); + bytesfromsocket = CURLMIN(sizerequested, MASTERBUF_SIZE); buffertofill = conn->master_buffer; } else { - bytesfromsocket = CURLMIN((long)sizerequested, - conn->data->set.buffer_size ? - conn->data->set.buffer_size : BUFSIZE); + bytesfromsocket = CURLMIN(sizerequested, (size_t)data->set.buffer_size); buffertofill = buf; } @@ -736,21 +767,19 @@ static int showit(struct Curl_easy *data, curl_infotype type, { static const char s_infotype[CURLINFO_END][3] = { "* ", "< ", "> ", "{ ", "} ", "{ ", "} " }; + int rc = 0; #ifdef CURL_DOES_CONVERSIONS - char buf[BUFSIZE+1]; + char *buf = NULL; size_t conv_size = 0; switch(type) { case CURLINFO_HEADER_OUT: - /* assume output headers are ASCII */ - /* copy the data into my buffer so the original is unchanged */ - if(size > BUFSIZE) { - size = BUFSIZE; /* truncate if necessary */ - buf[BUFSIZE] = '\0'; - } + buf = Curl_memdup(ptr, size); + if(!buf) + return 1; conv_size = size; - memcpy(buf, ptr, size); + /* Special processing is needed for this block if it * contains both headers and data (separated by CRLFCRLF). * We want to convert just the headers, leaving the data as-is. @@ -777,27 +806,33 @@ static int showit(struct Curl_easy *data, curl_infotype type, } #endif /* CURL_DOES_CONVERSIONS */ - if(data->set.fdebug) - return (*data->set.fdebug)(data, type, ptr, size, - data->set.debugdata); - - switch(type) { - case CURLINFO_TEXT: - case CURLINFO_HEADER_OUT: - case CURLINFO_HEADER_IN: - fwrite(s_infotype[type], 2, 1, data->set.err); - fwrite(ptr, size, 1, data->set.err); + if(data->set.fdebug) { + Curl_set_in_callback(data, true); + rc = (*data->set.fdebug)(data, type, ptr, size, data->set.debugdata); + Curl_set_in_callback(data, false); + } + else { + switch(type) { + case CURLINFO_TEXT: + case CURLINFO_HEADER_OUT: + case CURLINFO_HEADER_IN: + fwrite(s_infotype[type], 2, 1, data->set.err); + fwrite(ptr, size, 1, data->set.err); #ifdef CURL_DOES_CONVERSIONS - if(size != conv_size) { - /* we had untranslated data so we need an explicit newline */ - fwrite("\n", 1, 1, data->set.err); - } + if(size != conv_size) { + /* we had untranslated data so we need an explicit newline */ + fwrite("\n", 1, 1, data->set.err); + } #endif - break; - default: /* nada */ - break; + break; + default: /* nada */ + break; + } } - return 0; +#ifdef CURL_DOES_CONVERSIONS + free(buf); +#endif + return rc; } int Curl_debug(struct Curl_easy *data, curl_infotype type, @@ -807,8 +842,8 @@ int Curl_debug(struct Curl_easy *data, curl_infotype type, int rc; if(data->set.printhost && conn && conn->host.dispname) { char buffer[160]; - const char *t=NULL; - const char *w="Data"; + const char *t = NULL; + const char *w = "Data"; switch(type) { case CURLINFO_HEADER_IN: w = "Header"; diff --git a/lib/sendf.h b/lib/sendf.h index fbe4f99..7c9134d 100644 --- a/lib/sendf.h +++ b/lib/sendf.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -51,8 +51,6 @@ void Curl_failf(struct Curl_easy *, const char *fmt, ...); #define CLIENTWRITE_HEADER (1<<1) #define CLIENTWRITE_BOTH (CLIENTWRITE_BODY|CLIENTWRITE_HEADER) -CURLcode Curl_client_chop_write(struct connectdata *conn, int type, char *ptr, - size_t len) WARN_UNUSED_RESULT; CURLcode Curl_client_write(struct connectdata *conn, int type, char *ptr, size_t len) WARN_UNUSED_RESULT; diff --git a/lib/setopt.c b/lib/setopt.c new file mode 100644 index 0000000..9c96eb3 --- /dev/null +++ b/lib/setopt.c @@ -0,0 +1,2589 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" + +#include + +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_LINUX_TCP_H +#include +#endif + +#include "urldata.h" +#include "url.h" +#include "progress.h" +#include "content_encoding.h" +#include "strcase.h" +#include "share.h" +#include "vtls/vtls.h" +#include "warnless.h" +#include "sendf.h" +#include "http2.h" +#include "setopt.h" +#include "multiif.h" + +/* The last 3 #include files should be in this order */ +#include "curl_printf.h" +#include "curl_memory.h" +#include "memdebug.h" + +CURLcode Curl_setstropt(char **charp, const char *s) +{ + /* Release the previous storage at `charp' and replace by a dynamic storage + copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */ + + Curl_safefree(*charp); + + if(s) { + char *str = strdup(s); + + if(!str) + return CURLE_OUT_OF_MEMORY; + + *charp = str; + } + + return CURLE_OK; +} + +static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp) +{ + CURLcode result = CURLE_OK; + char *user = NULL; + char *passwd = NULL; + + /* Parse the login details if specified. It not then we treat NULL as a hint + to clear the existing data */ + if(option) { + result = Curl_parse_login_details(option, strlen(option), + (userp ? &user : NULL), + (passwdp ? &passwd : NULL), + NULL); + } + + if(!result) { + /* Store the username part of option if required */ + if(userp) { + if(!user && option && option[0] == ':') { + /* Allocate an empty string instead of returning NULL as user name */ + user = strdup(""); + if(!user) + result = CURLE_OUT_OF_MEMORY; + } + + Curl_safefree(*userp); + *userp = user; + } + + /* Store the password part of option if required */ + if(passwdp) { + Curl_safefree(*passwdp); + *passwdp = passwd; + } + } + + return result; +} + +#define C_SSLVERSION_VALUE(x) (x & 0xffff) +#define C_SSLVERSION_MAX_VALUE(x) (x & 0xffff0000) + +CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, + va_list param) +{ + char *argptr; + CURLcode result = CURLE_OK; + long arg; + curl_off_t bigsize; + + switch(option) { + case CURLOPT_DNS_CACHE_TIMEOUT: + arg = va_arg(param, long); + if(arg < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.dns_cache_timeout = arg; + break; + case CURLOPT_DNS_USE_GLOBAL_CACHE: + /* remember we want this enabled */ + arg = va_arg(param, long); + data->set.global_dns_cache = (0 != arg) ? TRUE : FALSE; + break; + case CURLOPT_SSL_CIPHER_LIST: + /* set a list of cipher we want to use in the SSL connection */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_SSL_CIPHER_LIST: + /* set a list of cipher we want to use in the SSL connection for proxy */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_PROXY], + va_arg(param, char *)); + break; + + case CURLOPT_RANDOM_FILE: + /* + * This is the path name to a file that contains random data to seed + * the random SSL stuff with. The file is only used for reading. + */ + result = Curl_setstropt(&data->set.str[STRING_SSL_RANDOM_FILE], + va_arg(param, char *)); + break; + case CURLOPT_EGDSOCKET: + /* + * The Entropy Gathering Daemon socket pathname + */ + result = Curl_setstropt(&data->set.str[STRING_SSL_EGDSOCKET], + va_arg(param, char *)); + break; + case CURLOPT_MAXCONNECTS: + /* + * Set the absolute number of maximum simultaneous alive connection that + * libcurl is allowed to have. + */ + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.maxconnects = arg; + break; + case CURLOPT_FORBID_REUSE: + /* + * When this transfer is done, it must not be left to be reused by a + * subsequent transfer but shall be closed immediately. + */ + data->set.reuse_forbid = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_FRESH_CONNECT: + /* + * This transfer shall not use a previously cached connection but + * should be made with a fresh new connect! + */ + data->set.reuse_fresh = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_VERBOSE: + /* + * Verbose means infof() calls that give a lot of information about + * the connection and transfer procedures as well as internal choices. + */ + data->set.verbose = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_HEADER: + /* + * Set to include the header in the general data output stream. + */ + data->set.include_header = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_NOPROGRESS: + /* + * Shut off the internal supported progress meter + */ + data->set.hide_progress = (0 != va_arg(param, long)) ? TRUE : FALSE; + if(data->set.hide_progress) + data->progress.flags |= PGRS_HIDE; + else + data->progress.flags &= ~PGRS_HIDE; + break; + case CURLOPT_NOBODY: + /* + * Do not include the body part in the output data stream. + */ + data->set.opt_no_body = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_FAILONERROR: + /* + * Don't output the >=400 error code HTML-page, but instead only + * return error. + */ + data->set.http_fail_on_error = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_KEEP_SENDING_ON_ERROR: + data->set.http_keep_sending_on_error = (0 != va_arg(param, long)) ? + TRUE : FALSE; + break; + case CURLOPT_UPLOAD: + case CURLOPT_PUT: + /* + * We want to sent data to the remote host. If this is HTTP, that equals + * using the PUT request. + */ + data->set.upload = (0 != va_arg(param, long)) ? TRUE : FALSE; + if(data->set.upload) { + /* If this is HTTP, PUT is what's needed to "upload" */ + data->set.httpreq = HTTPREQ_PUT; + data->set.opt_no_body = FALSE; /* this is implied */ + } + else + /* In HTTP, the opposite of upload is GET (unless NOBODY is true as + then this can be changed to HEAD later on) */ + data->set.httpreq = HTTPREQ_GET; + break; + case CURLOPT_REQUEST_TARGET: + result = Curl_setstropt(&data->set.str[STRING_TARGET], + va_arg(param, char *)); + break; + case CURLOPT_FILETIME: + /* + * Try to get the file time of the remote document. The time will + * later (possibly) become available using curl_easy_getinfo(). + */ + data->set.get_filetime = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_FTP_CREATE_MISSING_DIRS: + /* + * An FTP option that modifies an upload to create missing directories on + * the server. + */ + switch(va_arg(param, long)) { + case 0: + data->set.ftp_create_missing_dirs = 0; + break; + case 1: + data->set.ftp_create_missing_dirs = 1; + break; + case 2: + data->set.ftp_create_missing_dirs = 2; + break; + default: + /* reserve other values for future use */ + result = CURLE_UNKNOWN_OPTION; + break; + } + break; + case CURLOPT_SERVER_RESPONSE_TIMEOUT: + /* + * Option that specifies how quickly an server response must be obtained + * before it is considered failure. For pingpong protocols. + */ + arg = va_arg(param, long); + if((arg >= 0) && (arg <= (INT_MAX/1000))) + data->set.server_response_timeout = arg * 1000; + else + return CURLE_BAD_FUNCTION_ARGUMENT; + break; + case CURLOPT_TFTP_NO_OPTIONS: + /* + * Option that prevents libcurl from sending TFTP option requests to the + * server. + */ + data->set.tftp_no_options = va_arg(param, long) != 0; + break; + case CURLOPT_TFTP_BLKSIZE: + /* + * TFTP option that specifies the block size to use for data transmission. + */ + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.tftp_blksize = arg; + break; + case CURLOPT_DIRLISTONLY: + /* + * An option that changes the command to one that asks for a list + * only, no file info details. + */ + data->set.ftp_list_only = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_APPEND: + /* + * We want to upload and append to an existing file. + */ + data->set.ftp_append = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_FTP_FILEMETHOD: + /* + * How do access files over FTP. + */ + arg = va_arg(param, long); + if((arg < CURLFTPMETHOD_DEFAULT) || (arg > CURLFTPMETHOD_SINGLECWD)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.ftp_filemethod = (curl_ftpfile)arg; + break; + case CURLOPT_NETRC: + /* + * Parse the $HOME/.netrc file + */ + arg = va_arg(param, long); + if((arg < CURL_NETRC_IGNORED) || (arg > CURL_NETRC_REQUIRED)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.use_netrc = (enum CURL_NETRC_OPTION)arg; + break; + case CURLOPT_NETRC_FILE: + /* + * Use this file instead of the $HOME/.netrc file + */ + result = Curl_setstropt(&data->set.str[STRING_NETRC_FILE], + va_arg(param, char *)); + break; + case CURLOPT_TRANSFERTEXT: + /* + * This option was previously named 'FTPASCII'. Renamed to work with + * more protocols than merely FTP. + * + * Transfer using ASCII (instead of BINARY). + */ + data->set.prefer_ascii = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_TIMECONDITION: + /* + * Set HTTP time condition. This must be one of the defines in the + * curl/curl.h header file. + */ + arg = va_arg(param, long); + if((arg < CURL_TIMECOND_NONE) || (arg > CURL_TIMECOND_LASTMOD)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.timecondition = (curl_TimeCond)arg; + break; + case CURLOPT_TIMEVALUE: + /* + * This is the value to compare with the remote document with the + * method set with CURLOPT_TIMECONDITION + */ + data->set.timevalue = (time_t)va_arg(param, long); + break; + + case CURLOPT_TIMEVALUE_LARGE: + /* + * This is the value to compare with the remote document with the + * method set with CURLOPT_TIMECONDITION + */ + data->set.timevalue = (time_t)va_arg(param, curl_off_t); + break; + + case CURLOPT_SSLVERSION: + case CURLOPT_PROXY_SSLVERSION: + /* + * Set explicit SSL version to try to connect with, as some SSL + * implementations are lame. + */ +#ifdef USE_SSL + { + long version, version_max; + struct ssl_primary_config *primary = (option == CURLOPT_SSLVERSION ? + &data->set.ssl.primary : + &data->set.proxy_ssl.primary); + + arg = va_arg(param, long); + + version = C_SSLVERSION_VALUE(arg); + version_max = C_SSLVERSION_MAX_VALUE(arg); + + if(version < CURL_SSLVERSION_DEFAULT || + version >= CURL_SSLVERSION_LAST || + version_max < CURL_SSLVERSION_MAX_NONE || + version_max >= CURL_SSLVERSION_MAX_LAST) + return CURLE_BAD_FUNCTION_ARGUMENT; + + primary->version = version; + primary->version_max = version_max; + } +#else + result = CURLE_UNKNOWN_OPTION; +#endif + break; + +#ifndef CURL_DISABLE_HTTP + case CURLOPT_AUTOREFERER: + /* + * Switch on automatic referer that gets set if curl follows locations. + */ + data->set.http_auto_referer = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_ACCEPT_ENCODING: + /* + * String to use at the value of Accept-Encoding header. + * + * If the encoding is set to "" we use an Accept-Encoding header that + * encompasses all the encodings we support. + * If the encoding is set to NULL we don't send an Accept-Encoding header + * and ignore an received Content-Encoding header. + * + */ + argptr = va_arg(param, char *); + if(argptr && !*argptr) { + argptr = Curl_all_content_encodings(); + if(!argptr) + result = CURLE_OUT_OF_MEMORY; + else { + result = Curl_setstropt(&data->set.str[STRING_ENCODING], argptr); + free(argptr); + } + } + else + result = Curl_setstropt(&data->set.str[STRING_ENCODING], argptr); + break; + + case CURLOPT_TRANSFER_ENCODING: + data->set.http_transfer_encoding = (0 != va_arg(param, long)) ? + TRUE : FALSE; + break; + + case CURLOPT_FOLLOWLOCATION: + /* + * Follow Location: header hints on a HTTP-server. + */ + data->set.http_follow_location = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_UNRESTRICTED_AUTH: + /* + * Send authentication (user+password) when following locations, even when + * hostname changed. + */ + data->set.allow_auth_to_other_hosts = + (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_MAXREDIRS: + /* + * The maximum amount of hops you allow curl to follow Location: + * headers. This should mostly be used to detect never-ending loops. + */ + arg = va_arg(param, long); + if(arg < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.maxredirs = arg; + break; + + case CURLOPT_POSTREDIR: + /* + * Set the behaviour of POST when redirecting + * CURL_REDIR_GET_ALL - POST is changed to GET after 301 and 302 + * CURL_REDIR_POST_301 - POST is kept as POST after 301 + * CURL_REDIR_POST_302 - POST is kept as POST after 302 + * CURL_REDIR_POST_303 - POST is kept as POST after 303 + * CURL_REDIR_POST_ALL - POST is kept as POST after 301, 302 and 303 + * other - POST is kept as POST after 301 and 302 + */ + arg = va_arg(param, long); + if(arg < CURL_REDIR_GET_ALL) + /* no return error on too high numbers since the bitmask could be + extended in a future */ + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.keep_post = arg & CURL_REDIR_POST_ALL; + break; + + case CURLOPT_POST: + /* Does this option serve a purpose anymore? Yes it does, when + CURLOPT_POSTFIELDS isn't used and the POST data is read off the + callback! */ + if(va_arg(param, long)) { + data->set.httpreq = HTTPREQ_POST; + data->set.opt_no_body = FALSE; /* this is implied */ + } + else + data->set.httpreq = HTTPREQ_GET; + break; + + case CURLOPT_COPYPOSTFIELDS: + /* + * A string with POST data. Makes curl HTTP POST. Even if it is NULL. + * If needed, CURLOPT_POSTFIELDSIZE must have been set prior to + * CURLOPT_COPYPOSTFIELDS and not altered later. + */ + argptr = va_arg(param, char *); + + if(!argptr || data->set.postfieldsize == -1) + result = Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], argptr); + else { + /* + * Check that requested length does not overflow the size_t type. + */ + + if((data->set.postfieldsize < 0) || + ((sizeof(curl_off_t) != sizeof(size_t)) && + (data->set.postfieldsize > (curl_off_t)((size_t)-1)))) + result = CURLE_OUT_OF_MEMORY; + else { + char *p; + + (void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); + + /* Allocate even when size == 0. This satisfies the need of possible + later address compare to detect the COPYPOSTFIELDS mode, and + to mark that postfields is used rather than read function or + form data. + */ + p = malloc((size_t)(data->set.postfieldsize? + data->set.postfieldsize:1)); + + if(!p) + result = CURLE_OUT_OF_MEMORY; + else { + if(data->set.postfieldsize) + memcpy(p, argptr, (size_t)data->set.postfieldsize); + + data->set.str[STRING_COPYPOSTFIELDS] = p; + } + } + } + + data->set.postfields = data->set.str[STRING_COPYPOSTFIELDS]; + data->set.httpreq = HTTPREQ_POST; + break; + + case CURLOPT_POSTFIELDS: + /* + * Like above, but use static data instead of copying it. + */ + data->set.postfields = va_arg(param, void *); + /* Release old copied data. */ + (void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); + data->set.httpreq = HTTPREQ_POST; + break; + + case CURLOPT_POSTFIELDSIZE: + /* + * The size of the POSTFIELD data to prevent libcurl to do strlen() to + * figure it out. Enables binary posts. + */ + bigsize = va_arg(param, long); + if(bigsize < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + + if(data->set.postfieldsize < bigsize && + data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { + /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */ + (void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); + data->set.postfields = NULL; + } + + data->set.postfieldsize = bigsize; + break; + + case CURLOPT_POSTFIELDSIZE_LARGE: + /* + * The size of the POSTFIELD data to prevent libcurl to do strlen() to + * figure it out. Enables binary posts. + */ + bigsize = va_arg(param, curl_off_t); + if(bigsize < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + + if(data->set.postfieldsize < bigsize && + data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { + /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */ + (void) Curl_setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); + data->set.postfields = NULL; + } + + data->set.postfieldsize = bigsize; + break; + + case CURLOPT_HTTPPOST: + /* + * Set to make us do HTTP POST + */ + data->set.httppost = va_arg(param, struct curl_httppost *); + data->set.httpreq = HTTPREQ_POST_FORM; + data->set.opt_no_body = FALSE; /* this is implied */ + break; +#endif /* CURL_DISABLE_HTTP */ + + case CURLOPT_MIMEPOST: + /* + * Set to make us do MIME/form POST + */ + result = Curl_mime_set_subparts(&data->set.mimepost, + va_arg(param, curl_mime *), FALSE); + if(!result) { + data->set.httpreq = HTTPREQ_POST_MIME; + data->set.opt_no_body = FALSE; /* this is implied */ + } + break; + + case CURLOPT_REFERER: + /* + * String to set in the HTTP Referer: field. + */ + if(data->change.referer_alloc) { + Curl_safefree(data->change.referer); + data->change.referer_alloc = FALSE; + } + result = Curl_setstropt(&data->set.str[STRING_SET_REFERER], + va_arg(param, char *)); + data->change.referer = data->set.str[STRING_SET_REFERER]; + break; + + case CURLOPT_USERAGENT: + /* + * String to use in the HTTP User-Agent field + */ + result = Curl_setstropt(&data->set.str[STRING_USERAGENT], + va_arg(param, char *)); + break; + + case CURLOPT_HTTPHEADER: + /* + * Set a list with HTTP headers to use (or replace internals with) + */ + data->set.headers = va_arg(param, struct curl_slist *); + break; + +#ifndef CURL_DISABLE_HTTP + case CURLOPT_PROXYHEADER: + /* + * Set a list with proxy headers to use (or replace internals with) + * + * Since CURLOPT_HTTPHEADER was the only way to set HTTP headers for a + * long time we remain doing it this way until CURLOPT_PROXYHEADER is + * used. As soon as this option has been used, if set to anything but + * NULL, custom headers for proxies are only picked from this list. + * + * Set this option to NULL to restore the previous behavior. + */ + data->set.proxyheaders = va_arg(param, struct curl_slist *); + break; + + case CURLOPT_HEADEROPT: + /* + * Set header option. + */ + arg = va_arg(param, long); + data->set.sep_headers = (arg & CURLHEADER_SEPARATE)? TRUE: FALSE; + break; + + case CURLOPT_HTTP200ALIASES: + /* + * Set a list of aliases for HTTP 200 in response header + */ + data->set.http200aliases = va_arg(param, struct curl_slist *); + break; + +#if !defined(CURL_DISABLE_COOKIES) + case CURLOPT_COOKIE: + /* + * Cookie string to send to the remote server in the request. + */ + result = Curl_setstropt(&data->set.str[STRING_COOKIE], + va_arg(param, char *)); + break; + + case CURLOPT_COOKIEFILE: + /* + * Set cookie file to read and parse. Can be used multiple times. + */ + argptr = (char *)va_arg(param, void *); + if(argptr) { + struct curl_slist *cl; + /* append the cookie file name to the list of file names, and deal with + them later */ + cl = curl_slist_append(data->change.cookielist, argptr); + if(!cl) { + curl_slist_free_all(data->change.cookielist); + data->change.cookielist = NULL; + return CURLE_OUT_OF_MEMORY; + } + data->change.cookielist = cl; /* store the list for later use */ + } + break; + + case CURLOPT_COOKIEJAR: + /* + * Set cookie file name to dump all cookies to when we're done. + */ + { + struct CookieInfo *newcookies; + result = Curl_setstropt(&data->set.str[STRING_COOKIEJAR], + va_arg(param, char *)); + + /* + * Activate the cookie parser. This may or may not already + * have been made. + */ + newcookies = Curl_cookie_init(data, NULL, data->cookies, + data->set.cookiesession); + if(!newcookies) + result = CURLE_OUT_OF_MEMORY; + data->cookies = newcookies; + } + break; + + case CURLOPT_COOKIESESSION: + /* + * Set this option to TRUE to start a new "cookie session". It will + * prevent the forthcoming read-cookies-from-file actions to accept + * cookies that are marked as being session cookies, as they belong to a + * previous session. + * + * In the original Netscape cookie spec, "session cookies" are cookies + * with no expire date set. RFC2109 describes the same action if no + * 'Max-Age' is set and RFC2965 includes the RFC2109 description and adds + * a 'Discard' action that can enforce the discard even for cookies that + * have a Max-Age. + * + * We run mostly with the original cookie spec, as hardly anyone implements + * anything else. + */ + data->set.cookiesession = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_COOKIELIST: + argptr = va_arg(param, char *); + + if(argptr == NULL) + break; + + if(strcasecompare(argptr, "ALL")) { + /* clear all cookies */ + Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); + Curl_cookie_clearall(data->cookies); + Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); + } + else if(strcasecompare(argptr, "SESS")) { + /* clear session cookies */ + Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); + Curl_cookie_clearsess(data->cookies); + Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); + } + else if(strcasecompare(argptr, "FLUSH")) { + /* flush cookies to file, takes care of the locking */ + Curl_flush_cookies(data, 0); + } + else if(strcasecompare(argptr, "RELOAD")) { + /* reload cookies from file */ + Curl_cookie_loadfiles(data); + break; + } + else { + if(!data->cookies) + /* if cookie engine was not running, activate it */ + data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE); + + argptr = strdup(argptr); + if(!argptr || !data->cookies) { + result = CURLE_OUT_OF_MEMORY; + free(argptr); + } + else { + Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); + + if(checkprefix("Set-Cookie:", argptr)) + /* HTTP Header format line */ + Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL); + + else + /* Netscape format line */ + Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL); + + Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); + free(argptr); + } + } + + break; +#endif /* !CURL_DISABLE_COOKIES */ + + case CURLOPT_HTTPGET: + /* + * Set to force us do HTTP GET + */ + if(va_arg(param, long)) { + data->set.httpreq = HTTPREQ_GET; + data->set.upload = FALSE; /* switch off upload */ + data->set.opt_no_body = FALSE; /* this is implied */ + } + break; + + case CURLOPT_HTTP_VERSION: + /* + * This sets a requested HTTP version to be used. The value is one of + * the listed enums in curl/curl.h. + */ + arg = va_arg(param, long); + if(arg < CURL_HTTP_VERSION_NONE) + return CURLE_BAD_FUNCTION_ARGUMENT; +#ifndef USE_NGHTTP2 + if(arg >= CURL_HTTP_VERSION_2) + return CURLE_UNSUPPORTED_PROTOCOL; +#else + if(arg > CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) + return CURLE_UNSUPPORTED_PROTOCOL; +#endif + data->set.httpversion = arg; + break; + + case CURLOPT_EXPECT_100_TIMEOUT_MS: + /* + * Time to wait for a response to a HTTP request containing an + * Expect: 100-continue header before sending the data anyway. + */ + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.expect_100_timeout = arg; + break; + +#endif /* CURL_DISABLE_HTTP */ + + case CURLOPT_HTTPAUTH: + /* + * Set HTTP Authentication type BITMASK. + */ + { + int bitcheck; + bool authbits; + unsigned long auth = va_arg(param, unsigned long); + + if(auth == CURLAUTH_NONE) { + data->set.httpauth = auth; + break; + } + + /* the DIGEST_IE bit is only used to set a special marker, for all the + rest we need to handle it as normal DIGEST */ + data->state.authhost.iestyle = (auth & CURLAUTH_DIGEST_IE) ? TRUE : FALSE; + + if(auth & CURLAUTH_DIGEST_IE) { + auth |= CURLAUTH_DIGEST; /* set standard digest bit */ + auth &= ~CURLAUTH_DIGEST_IE; /* unset ie digest bit */ + } + + /* switch off bits we can't support */ +#ifndef USE_NTLM + auth &= ~CURLAUTH_NTLM; /* no NTLM support */ + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ +#elif !defined(NTLM_WB_ENABLED) + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ +#endif +#ifndef USE_SPNEGO + auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without + GSS-API or SSPI */ +#endif + + /* check if any auth bit lower than CURLAUTH_ONLY is still set */ + bitcheck = 0; + authbits = FALSE; + while(bitcheck < 31) { + if(auth & (1UL << bitcheck++)) { + authbits = TRUE; + break; + } + } + if(!authbits) + return CURLE_NOT_BUILT_IN; /* no supported types left! */ + + data->set.httpauth = auth; + } + break; + + case CURLOPT_CUSTOMREQUEST: + /* + * Set a custom string to use as request + */ + result = Curl_setstropt(&data->set.str[STRING_CUSTOMREQUEST], + va_arg(param, char *)); + + /* we don't set + data->set.httpreq = HTTPREQ_CUSTOM; + here, we continue as if we were using the already set type + and this just changes the actual request keyword */ + break; + +#ifndef CURL_DISABLE_PROXY + case CURLOPT_HTTPPROXYTUNNEL: + /* + * Tunnel operations through the proxy instead of normal proxy use + */ + data->set.tunnel_thru_httpproxy = (0 != va_arg(param, long)) ? + TRUE : FALSE; + break; + + case CURLOPT_PROXYPORT: + /* + * Explicitly set HTTP proxy port number. + */ + arg = va_arg(param, long); + if((arg < 0) || (arg > 65535)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.proxyport = arg; + break; + + case CURLOPT_PROXYAUTH: + /* + * Set HTTP Authentication type BITMASK. + */ + { + int bitcheck; + bool authbits; + unsigned long auth = va_arg(param, unsigned long); + + if(auth == CURLAUTH_NONE) { + data->set.proxyauth = auth; + break; + } + + /* the DIGEST_IE bit is only used to set a special marker, for all the + rest we need to handle it as normal DIGEST */ + data->state.authproxy.iestyle = (auth & CURLAUTH_DIGEST_IE) ? TRUE : FALSE; + + if(auth & CURLAUTH_DIGEST_IE) { + auth |= CURLAUTH_DIGEST; /* set standard digest bit */ + auth &= ~CURLAUTH_DIGEST_IE; /* unset ie digest bit */ + } + /* switch off bits we can't support */ +#ifndef USE_NTLM + auth &= ~CURLAUTH_NTLM; /* no NTLM support */ + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ +#elif !defined(NTLM_WB_ENABLED) + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ +#endif +#ifndef USE_SPNEGO + auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without + GSS-API or SSPI */ +#endif + + /* check if any auth bit lower than CURLAUTH_ONLY is still set */ + bitcheck = 0; + authbits = FALSE; + while(bitcheck < 31) { + if(auth & (1UL << bitcheck++)) { + authbits = TRUE; + break; + } + } + if(!authbits) + return CURLE_NOT_BUILT_IN; /* no supported types left! */ + + data->set.proxyauth = auth; + } + break; + + case CURLOPT_PROXY: + /* + * Set proxy server:port to use as proxy. + * + * If the proxy is set to "" (and CURLOPT_SOCKS_PROXY is set to "" or NULL) + * we explicitly say that we don't want to use a proxy + * (even though there might be environment variables saying so). + * + * Setting it to NULL, means no proxy but allows the environment variables + * to decide for us (if CURLOPT_SOCKS_PROXY setting it to NULL). + */ + result = Curl_setstropt(&data->set.str[STRING_PROXY], + va_arg(param, char *)); + break; + + case CURLOPT_PRE_PROXY: + /* + * Set proxy server:port to use as SOCKS proxy. + * + * If the proxy is set to "" or NULL we explicitly say that we don't want + * to use the socks proxy. + */ + result = Curl_setstropt(&data->set.str[STRING_PRE_PROXY], + va_arg(param, char *)); + break; + + case CURLOPT_PROXYTYPE: + /* + * Set proxy type. HTTP/HTTP_1_0/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME + */ + arg = va_arg(param, long); + if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_SOCKS5_HOSTNAME)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.proxytype = (curl_proxytype)arg; + break; + + case CURLOPT_PROXY_TRANSFER_MODE: + /* + * set transfer mode (;type=) when doing FTP via an HTTP proxy + */ + switch(va_arg(param, long)) { + case 0: + data->set.proxy_transfer_mode = FALSE; + break; + case 1: + data->set.proxy_transfer_mode = TRUE; + break; + default: + /* reserve other values for future use */ + result = CURLE_UNKNOWN_OPTION; + break; + } + break; +#endif /* CURL_DISABLE_PROXY */ + + case CURLOPT_SOCKS5_AUTH: + data->set.socks5auth = va_arg(param, unsigned long); + if(data->set.socks5auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI)) + result = CURLE_NOT_BUILT_IN; + break; +#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) + case CURLOPT_SOCKS5_GSSAPI_NEC: + /* + * Set flag for NEC SOCK5 support + */ + data->set.socks5_gssapi_nec = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_SOCKS5_GSSAPI_SERVICE: + case CURLOPT_PROXY_SERVICE_NAME: + /* + * Set proxy authentication service name for Kerberos 5 and SPNEGO + */ + result = Curl_setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME], + va_arg(param, char *)); + break; +#endif + +#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ + defined(USE_SPNEGO) + case CURLOPT_SERVICE_NAME: + /* + * Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO + */ + result = Curl_setstropt(&data->set.str[STRING_SERVICE_NAME], + va_arg(param, char *)); + break; + +#endif + + case CURLOPT_HEADERDATA: + /* + * Custom pointer to pass the header write callback function + */ + data->set.writeheader = (void *)va_arg(param, void *); + break; + case CURLOPT_ERRORBUFFER: + /* + * Error buffer provided by the caller to get the human readable + * error string in. + */ + data->set.errorbuffer = va_arg(param, char *); + break; + case CURLOPT_WRITEDATA: + /* + * FILE pointer to write to. Or possibly + * used as argument to the write callback. + */ + data->set.out = va_arg(param, void *); + break; + case CURLOPT_FTPPORT: + /* + * Use FTP PORT, this also specifies which IP address to use + */ + result = Curl_setstropt(&data->set.str[STRING_FTPPORT], + va_arg(param, char *)); + data->set.ftp_use_port = (data->set.str[STRING_FTPPORT]) ? TRUE : FALSE; + break; + + case CURLOPT_FTP_USE_EPRT: + data->set.ftp_use_eprt = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_FTP_USE_EPSV: + data->set.ftp_use_epsv = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_FTP_USE_PRET: + data->set.ftp_use_pret = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_FTP_SSL_CCC: + arg = va_arg(param, long); + if((arg < CURLFTPSSL_CCC_NONE) || (arg > CURLFTPSSL_CCC_ACTIVE)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.ftp_ccc = (curl_ftpccc)arg; + break; + + case CURLOPT_FTP_SKIP_PASV_IP: + /* + * Enable or disable FTP_SKIP_PASV_IP, which will disable/enable the + * bypass of the IP address in PASV responses. + */ + data->set.ftp_skip_ip = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_READDATA: + /* + * FILE pointer to read the file to be uploaded from. Or possibly + * used as argument to the read callback. + */ + data->set.in_set = va_arg(param, void *); + break; + case CURLOPT_INFILESIZE: + /* + * If known, this should inform curl about the file size of the + * to-be-uploaded file. + */ + arg = va_arg(param, long); + if(arg < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.filesize = arg; + break; + case CURLOPT_INFILESIZE_LARGE: + /* + * If known, this should inform curl about the file size of the + * to-be-uploaded file. + */ + bigsize = va_arg(param, curl_off_t); + if(bigsize < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.filesize = bigsize; + break; + case CURLOPT_LOW_SPEED_LIMIT: + /* + * The low speed limit that if transfers are below this for + * CURLOPT_LOW_SPEED_TIME, the transfer is aborted. + */ + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.low_speed_limit = arg; + break; + case CURLOPT_MAX_SEND_SPEED_LARGE: + /* + * When transfer uploads are faster then CURLOPT_MAX_SEND_SPEED_LARGE + * bytes per second the transfer is throttled.. + */ + bigsize = va_arg(param, curl_off_t); + if(bigsize < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.max_send_speed = bigsize; + break; + case CURLOPT_MAX_RECV_SPEED_LARGE: + /* + * When receiving data faster than CURLOPT_MAX_RECV_SPEED_LARGE bytes per + * second the transfer is throttled.. + */ + bigsize = va_arg(param, curl_off_t); + if(bigsize < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.max_recv_speed = bigsize; + break; + case CURLOPT_LOW_SPEED_TIME: + /* + * The low speed time that if transfers are below the set + * CURLOPT_LOW_SPEED_LIMIT during this time, the transfer is aborted. + */ + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.low_speed_time = arg; + break; + case CURLOPT_URL: + /* + * The URL to fetch. + */ + if(data->change.url_alloc) { + /* the already set URL is allocated, free it first! */ + Curl_safefree(data->change.url); + data->change.url_alloc = FALSE; + } + result = Curl_setstropt(&data->set.str[STRING_SET_URL], + va_arg(param, char *)); + data->change.url = data->set.str[STRING_SET_URL]; + break; + case CURLOPT_PORT: + /* + * The port number to use when getting the URL + */ + arg = va_arg(param, long); + if((arg < 0) || (arg > 65535)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.use_port = arg; + break; + case CURLOPT_TIMEOUT: + /* + * The maximum time you allow curl to use for a single transfer + * operation. + */ + arg = va_arg(param, long); + if((arg >= 0) && (arg <= (INT_MAX/1000))) + data->set.timeout = arg * 1000; + else + return CURLE_BAD_FUNCTION_ARGUMENT; + break; + + case CURLOPT_TIMEOUT_MS: + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.timeout = arg; + break; + + case CURLOPT_CONNECTTIMEOUT: + /* + * The maximum time you allow curl to use to connect. + */ + arg = va_arg(param, long); + if((arg >= 0) && (arg <= (INT_MAX/1000))) + data->set.connecttimeout = arg * 1000; + else + return CURLE_BAD_FUNCTION_ARGUMENT; + break; + + case CURLOPT_CONNECTTIMEOUT_MS: + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.connecttimeout = arg; + break; + + case CURLOPT_ACCEPTTIMEOUT_MS: + /* + * The maximum time you allow curl to wait for server connect + */ + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.accepttimeout = arg; + break; + + case CURLOPT_USERPWD: + /* + * user:password to use in the operation + */ + result = setstropt_userpwd(va_arg(param, char *), + &data->set.str[STRING_USERNAME], + &data->set.str[STRING_PASSWORD]); + break; + + case CURLOPT_USERNAME: + /* + * authentication user name to use in the operation + */ + result = Curl_setstropt(&data->set.str[STRING_USERNAME], + va_arg(param, char *)); + break; + + case CURLOPT_PASSWORD: + /* + * authentication password to use in the operation + */ + result = Curl_setstropt(&data->set.str[STRING_PASSWORD], + va_arg(param, char *)); + break; + + case CURLOPT_LOGIN_OPTIONS: + /* + * authentication options to use in the operation + */ + result = Curl_setstropt(&data->set.str[STRING_OPTIONS], + va_arg(param, char *)); + break; + + case CURLOPT_XOAUTH2_BEARER: + /* + * OAuth 2.0 bearer token to use in the operation + */ + result = Curl_setstropt(&data->set.str[STRING_BEARER], + va_arg(param, char *)); + break; + + case CURLOPT_POSTQUOTE: + /* + * List of RAW FTP commands to use after a transfer + */ + data->set.postquote = va_arg(param, struct curl_slist *); + break; + case CURLOPT_PREQUOTE: + /* + * List of RAW FTP commands to use prior to RETR (Wesley Laxton) + */ + data->set.prequote = va_arg(param, struct curl_slist *); + break; + case CURLOPT_QUOTE: + /* + * List of RAW FTP commands to use before a transfer + */ + data->set.quote = va_arg(param, struct curl_slist *); + break; + case CURLOPT_RESOLVE: + /* + * List of NAME:[address] names to populate the DNS cache with + * Prefix the NAME with dash (-) to _remove_ the name from the cache. + * + * Names added with this API will remain in the cache until explicitly + * removed or the handle is cleaned up. + * + * This API can remove any name from the DNS cache, but only entries + * that aren't actually in use right now will be pruned immediately. + */ + data->set.resolve = va_arg(param, struct curl_slist *); + data->change.resolve = data->set.resolve; + break; + case CURLOPT_PROGRESSFUNCTION: + /* + * Progress callback function + */ + data->set.fprogress = va_arg(param, curl_progress_callback); + if(data->set.fprogress) + data->progress.callback = TRUE; /* no longer internal */ + else + data->progress.callback = FALSE; /* NULL enforces internal */ + break; + + case CURLOPT_XFERINFOFUNCTION: + /* + * Transfer info callback function + */ + data->set.fxferinfo = va_arg(param, curl_xferinfo_callback); + if(data->set.fxferinfo) + data->progress.callback = TRUE; /* no longer internal */ + else + data->progress.callback = FALSE; /* NULL enforces internal */ + + break; + + case CURLOPT_PROGRESSDATA: + /* + * Custom client data to pass to the progress callback + */ + data->set.progress_client = va_arg(param, void *); + break; + +#ifndef CURL_DISABLE_PROXY + case CURLOPT_PROXYUSERPWD: + /* + * user:password needed to use the proxy + */ + result = setstropt_userpwd(va_arg(param, char *), + &data->set.str[STRING_PROXYUSERNAME], + &data->set.str[STRING_PROXYPASSWORD]); + break; + case CURLOPT_PROXYUSERNAME: + /* + * authentication user name to use in the operation + */ + result = Curl_setstropt(&data->set.str[STRING_PROXYUSERNAME], + va_arg(param, char *)); + break; + case CURLOPT_PROXYPASSWORD: + /* + * authentication password to use in the operation + */ + result = Curl_setstropt(&data->set.str[STRING_PROXYPASSWORD], + va_arg(param, char *)); + break; + case CURLOPT_NOPROXY: + /* + * proxy exception list + */ + result = Curl_setstropt(&data->set.str[STRING_NOPROXY], + va_arg(param, char *)); + break; +#endif + + case CURLOPT_RANGE: + /* + * What range of the file you want to transfer + */ + result = Curl_setstropt(&data->set.str[STRING_SET_RANGE], + va_arg(param, char *)); + break; + case CURLOPT_RESUME_FROM: + /* + * Resume transfer at the given file position + */ + arg = va_arg(param, long); + if(arg < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.set_resume_from = arg; + break; + case CURLOPT_RESUME_FROM_LARGE: + /* + * Resume transfer at the given file position + */ + bigsize = va_arg(param, curl_off_t); + if(bigsize < -1) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.set_resume_from = bigsize; + break; + case CURLOPT_DEBUGFUNCTION: + /* + * stderr write callback. + */ + data->set.fdebug = va_arg(param, curl_debug_callback); + /* + * if the callback provided is NULL, it'll use the default callback + */ + break; + case CURLOPT_DEBUGDATA: + /* + * Set to a void * that should receive all error writes. This + * defaults to CURLOPT_STDERR for normal operations. + */ + data->set.debugdata = va_arg(param, void *); + break; + case CURLOPT_STDERR: + /* + * Set to a FILE * that should receive all error writes. This + * defaults to stderr for normal operations. + */ + data->set.err = va_arg(param, FILE *); + if(!data->set.err) + data->set.err = stderr; + break; + case CURLOPT_HEADERFUNCTION: + /* + * Set header write callback + */ + data->set.fwrite_header = va_arg(param, curl_write_callback); + break; + case CURLOPT_WRITEFUNCTION: + /* + * Set data write callback + */ + data->set.fwrite_func = va_arg(param, curl_write_callback); + if(!data->set.fwrite_func) { + data->set.is_fwrite_set = 0; + /* When set to NULL, reset to our internal default function */ + data->set.fwrite_func = (curl_write_callback)fwrite; + } + else + data->set.is_fwrite_set = 1; + break; + case CURLOPT_READFUNCTION: + /* + * Read data callback + */ + data->set.fread_func_set = va_arg(param, curl_read_callback); + if(!data->set.fread_func_set) { + data->set.is_fread_set = 0; + /* When set to NULL, reset to our internal default function */ + data->set.fread_func_set = (curl_read_callback)fread; + } + else + data->set.is_fread_set = 1; + break; + case CURLOPT_SEEKFUNCTION: + /* + * Seek callback. Might be NULL. + */ + data->set.seek_func = va_arg(param, curl_seek_callback); + break; + case CURLOPT_SEEKDATA: + /* + * Seek control callback. Might be NULL. + */ + data->set.seek_client = va_arg(param, void *); + break; + case CURLOPT_CONV_FROM_NETWORK_FUNCTION: + /* + * "Convert from network encoding" callback + */ + data->set.convfromnetwork = va_arg(param, curl_conv_callback); + break; + case CURLOPT_CONV_TO_NETWORK_FUNCTION: + /* + * "Convert to network encoding" callback + */ + data->set.convtonetwork = va_arg(param, curl_conv_callback); + break; + case CURLOPT_CONV_FROM_UTF8_FUNCTION: + /* + * "Convert from UTF-8 encoding" callback + */ + data->set.convfromutf8 = va_arg(param, curl_conv_callback); + break; + case CURLOPT_IOCTLFUNCTION: + /* + * I/O control callback. Might be NULL. + */ + data->set.ioctl_func = va_arg(param, curl_ioctl_callback); + break; + case CURLOPT_IOCTLDATA: + /* + * I/O control data pointer. Might be NULL. + */ + data->set.ioctl_client = va_arg(param, void *); + break; + case CURLOPT_SSLCERT: + /* + * String that holds file name of the SSL certificate to use + */ + result = Curl_setstropt(&data->set.str[STRING_CERT_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_SSLCERT: + /* + * String that holds file name of the SSL certificate to use for proxy + */ + result = Curl_setstropt(&data->set.str[STRING_CERT_PROXY], + va_arg(param, char *)); + break; + case CURLOPT_SSLCERTTYPE: + /* + * String that holds file type of the SSL certificate to use + */ + result = Curl_setstropt(&data->set.str[STRING_CERT_TYPE_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_SSLCERTTYPE: + /* + * String that holds file type of the SSL certificate to use for proxy + */ + result = Curl_setstropt(&data->set.str[STRING_CERT_TYPE_PROXY], + va_arg(param, char *)); + break; + case CURLOPT_SSLKEY: + /* + * String that holds file name of the SSL key to use + */ + result = Curl_setstropt(&data->set.str[STRING_KEY_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_SSLKEY: + /* + * String that holds file name of the SSL key to use for proxy + */ + result = Curl_setstropt(&data->set.str[STRING_KEY_PROXY], + va_arg(param, char *)); + break; + case CURLOPT_SSLKEYTYPE: + /* + * String that holds file type of the SSL key to use + */ + result = Curl_setstropt(&data->set.str[STRING_KEY_TYPE_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_SSLKEYTYPE: + /* + * String that holds file type of the SSL key to use for proxy + */ + result = Curl_setstropt(&data->set.str[STRING_KEY_TYPE_PROXY], + va_arg(param, char *)); + break; + case CURLOPT_KEYPASSWD: + /* + * String that holds the SSL or SSH private key password. + */ + result = Curl_setstropt(&data->set.str[STRING_KEY_PASSWD_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_KEYPASSWD: + /* + * String that holds the SSL private key password for proxy. + */ + result = Curl_setstropt(&data->set.str[STRING_KEY_PASSWD_PROXY], + va_arg(param, char *)); + break; + case CURLOPT_SSLENGINE: + /* + * String that holds the SSL crypto engine. + */ + argptr = va_arg(param, char *); + if(argptr && argptr[0]) + result = Curl_ssl_set_engine(data, argptr); + break; + + case CURLOPT_SSLENGINE_DEFAULT: + /* + * flag to set engine as default. + */ + result = Curl_ssl_set_engine_default(data); + break; + case CURLOPT_CRLF: + /* + * Kludgy option to enable CRLF conversions. Subject for removal. + */ + data->set.crlf = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_INTERFACE: + /* + * Set what interface or address/hostname to bind the socket to when + * performing an operation and thus what from-IP your connection will use. + */ + result = Curl_setstropt(&data->set.str[STRING_DEVICE], + va_arg(param, char *)); + break; + case CURLOPT_LOCALPORT: + /* + * Set what local port to bind the socket to when performing an operation. + */ + arg = va_arg(param, long); + if((arg < 0) || (arg > 65535)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.localport = curlx_sltous(arg); + break; + case CURLOPT_LOCALPORTRANGE: + /* + * Set number of local ports to try, starting with CURLOPT_LOCALPORT. + */ + arg = va_arg(param, long); + if((arg < 0) || (arg > 65535)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.localportrange = curlx_sltosi(arg); + break; + case CURLOPT_KRBLEVEL: + /* + * A string that defines the kerberos security level. + */ + result = Curl_setstropt(&data->set.str[STRING_KRB_LEVEL], + va_arg(param, char *)); + data->set.krb = (data->set.str[STRING_KRB_LEVEL]) ? TRUE : FALSE; + break; + case CURLOPT_GSSAPI_DELEGATION: + /* + * GSS-API credential delegation bitmask + */ + arg = va_arg(param, long); + if(arg < CURLGSSAPI_DELEGATION_NONE) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.gssapi_delegation = arg; + break; + case CURLOPT_SSL_VERIFYPEER: + /* + * Enable peer SSL verifying. + */ + data->set.ssl.primary.verifypeer = (0 != va_arg(param, long)) ? + TRUE : FALSE; + + /* Update the current connection ssl_config. */ + if(data->easy_conn) { + data->easy_conn->ssl_config.verifypeer = + data->set.ssl.primary.verifypeer; + } + break; + case CURLOPT_PROXY_SSL_VERIFYPEER: + /* + * Enable peer SSL verifying for proxy. + */ + data->set.proxy_ssl.primary.verifypeer = + (0 != va_arg(param, long))?TRUE:FALSE; + + /* Update the current connection proxy_ssl_config. */ + if(data->easy_conn) { + data->easy_conn->proxy_ssl_config.verifypeer = + data->set.proxy_ssl.primary.verifypeer; + } + break; + case CURLOPT_SSL_VERIFYHOST: + /* + * Enable verification of the host name in the peer certificate + */ + arg = va_arg(param, long); + + /* Obviously people are not reading documentation and too many thought + this argument took a boolean when it wasn't and misused it. We thus ban + 1 as a sensible input and we warn about its use. Then we only have the + 2 action internally stored as TRUE. */ + + if(1 == arg) { + failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!"); + return CURLE_BAD_FUNCTION_ARGUMENT; + } + + data->set.ssl.primary.verifyhost = (0 != arg) ? TRUE : FALSE; + + /* Update the current connection ssl_config. */ + if(data->easy_conn) { + data->easy_conn->ssl_config.verifyhost = + data->set.ssl.primary.verifyhost; + } + break; + case CURLOPT_PROXY_SSL_VERIFYHOST: + /* + * Enable verification of the host name in the peer certificate for proxy + */ + arg = va_arg(param, long); + + /* Obviously people are not reading documentation and too many thought + this argument took a boolean when it wasn't and misused it. We thus ban + 1 as a sensible input and we warn about its use. Then we only have the + 2 action internally stored as TRUE. */ + + if(1 == arg) { + failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!"); + return CURLE_BAD_FUNCTION_ARGUMENT; + } + + data->set.proxy_ssl.primary.verifyhost = (0 != arg)?TRUE:FALSE; + + /* Update the current connection proxy_ssl_config. */ + if(data->easy_conn) { + data->easy_conn->proxy_ssl_config.verifyhost = + data->set.proxy_ssl.primary.verifyhost; + } + break; + case CURLOPT_SSL_VERIFYSTATUS: + /* + * Enable certificate status verifying. + */ + if(!Curl_ssl_cert_status_request()) { + result = CURLE_NOT_BUILT_IN; + break; + } + + data->set.ssl.primary.verifystatus = (0 != va_arg(param, long)) ? + TRUE : FALSE; + + /* Update the current connection ssl_config. */ + if(data->easy_conn) { + data->easy_conn->ssl_config.verifystatus = + data->set.ssl.primary.verifystatus; + } + break; + case CURLOPT_SSL_CTX_FUNCTION: + /* + * Set a SSL_CTX callback + */ +#ifdef USE_SSL + if(Curl_ssl->have_ssl_ctx) + data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback); + else +#endif + result = CURLE_NOT_BUILT_IN; + break; + case CURLOPT_SSL_CTX_DATA: + /* + * Set a SSL_CTX callback parameter pointer + */ +#ifdef USE_SSL + if(Curl_ssl->have_ssl_ctx) + data->set.ssl.fsslctxp = va_arg(param, void *); + else +#endif + result = CURLE_NOT_BUILT_IN; + break; + case CURLOPT_SSL_FALSESTART: + /* + * Enable TLS false start. + */ + if(!Curl_ssl_false_start()) { + result = CURLE_NOT_BUILT_IN; + break; + } + + data->set.ssl.falsestart = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_CERTINFO: +#ifdef USE_SSL + if(Curl_ssl->have_certinfo) + data->set.ssl.certinfo = (0 != va_arg(param, long)) ? TRUE : FALSE; + else +#endif + result = CURLE_NOT_BUILT_IN; + break; + case CURLOPT_PINNEDPUBLICKEY: + /* + * Set pinned public key for SSL connection. + * Specify file name of the public key in DER format. + */ +#ifdef USE_SSL + if(Curl_ssl->have_pinnedpubkey) + result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG], + va_arg(param, char *)); + else +#endif + result = CURLE_NOT_BUILT_IN; + break; + case CURLOPT_PROXY_PINNEDPUBLICKEY: + /* + * Set pinned public key for SSL connection. + * Specify file name of the public key in DER format. + */ +#ifdef USE_SSL + if(Curl_ssl->have_pinnedpubkey) + result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY], + va_arg(param, char *)); + else +#endif + result = CURLE_NOT_BUILT_IN; + break; + case CURLOPT_CAINFO: + /* + * Set CA info for SSL connection. Specify file name of the CA certificate + */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CAFILE_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_CAINFO: + /* + * Set CA info SSL connection for proxy. Specify file name of the + * CA certificate + */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CAFILE_PROXY], + va_arg(param, char *)); + break; + case CURLOPT_CAPATH: + /* + * Set CA path info for SSL connection. Specify directory name of the CA + * certificates which have been prepared using openssl c_rehash utility. + */ +#ifdef USE_SSL + if(Curl_ssl->have_ca_path) + /* This does not work on windows. */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG], + va_arg(param, char *)); + else +#endif + result = CURLE_NOT_BUILT_IN; + break; + case CURLOPT_PROXY_CAPATH: + /* + * Set CA path info for SSL connection proxy. Specify directory name of the + * CA certificates which have been prepared using openssl c_rehash utility. + */ +#ifdef USE_SSL + if(Curl_ssl->have_ca_path) + /* This does not work on windows. */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY], + va_arg(param, char *)); + else +#endif + result = CURLE_NOT_BUILT_IN; + break; + case CURLOPT_CRLFILE: + /* + * Set CRL file info for SSL connection. Specify file name of the CRL + * to check certificates revocation + */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CRLFILE_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_PROXY_CRLFILE: + /* + * Set CRL file info for SSL connection for proxy. Specify file name of the + * CRL to check certificates revocation + */ + result = Curl_setstropt(&data->set.str[STRING_SSL_CRLFILE_PROXY], + va_arg(param, char *)); + break; + case CURLOPT_ISSUERCERT: + /* + * Set Issuer certificate file + * to check certificates issuer + */ + result = Curl_setstropt(&data->set.str[STRING_SSL_ISSUERCERT_ORIG], + va_arg(param, char *)); + break; + case CURLOPT_TELNETOPTIONS: + /* + * Set a linked list of telnet options + */ + data->set.telnet_options = va_arg(param, struct curl_slist *); + break; + + case CURLOPT_BUFFERSIZE: + /* + * The application kindly asks for a differently sized receive buffer. + * If it seems reasonable, we'll use it. + */ + arg = va_arg(param, long); + + if(arg > READBUFFER_MAX) + arg = READBUFFER_MAX; + else if(arg < 1) + arg = READBUFFER_SIZE; + else if(arg < READBUFFER_MIN) + arg = READBUFFER_MIN; + + /* Resize if new size */ + if(arg != data->set.buffer_size) { + char *newbuff = realloc(data->state.buffer, arg + 1); + if(!newbuff) { + DEBUGF(fprintf(stderr, "Error: realloc of buffer failed\n")); + result = CURLE_OUT_OF_MEMORY; + } + else + data->state.buffer = newbuff; + } + data->set.buffer_size = arg; + + break; + + case CURLOPT_NOSIGNAL: + /* + * The application asks not to set any signal() or alarm() handlers, + * even when using a timeout. + */ + data->set.no_signal = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_SHARE: + { + struct Curl_share *set; + set = va_arg(param, struct Curl_share *); + + /* disconnect from old share, if any */ + if(data->share) { + Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); + + if(data->dns.hostcachetype == HCACHE_SHARED) { + data->dns.hostcache = NULL; + data->dns.hostcachetype = HCACHE_NONE; + } + +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) + if(data->share->cookies == data->cookies) + data->cookies = NULL; +#endif + + if(data->share->sslsession == data->state.session) + data->state.session = NULL; + + data->share->dirty--; + + Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); + data->share = NULL; + } + + /* use new share if it set */ + data->share = set; + if(data->share) { + + Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); + + data->share->dirty++; + + if(data->share->specifier & (1<< CURL_LOCK_DATA_DNS)) { + /* use shared host cache */ + data->dns.hostcache = &data->share->hostcache; + data->dns.hostcachetype = HCACHE_SHARED; + } +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) + if(data->share->cookies) { + /* use shared cookie list, first free own one if any */ + Curl_cookie_cleanup(data->cookies); + /* enable cookies since we now use a share that uses cookies! */ + data->cookies = data->share->cookies; + } +#endif /* CURL_DISABLE_HTTP */ + if(data->share->sslsession) { + data->set.general_ssl.max_ssl_sessions = data->share->max_ssl_sessions; + data->state.session = data->share->sslsession; + } + Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); + + } + /* check for host cache not needed, + * it will be done by curl_easy_perform */ + } + break; + + case CURLOPT_PRIVATE: + /* + * Set private data pointer. + */ + data->set.private_data = va_arg(param, void *); + break; + + case CURLOPT_MAXFILESIZE: + /* + * Set the maximum size of a file to download. + */ + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.max_filesize = arg; + break; + +#ifdef USE_SSL + case CURLOPT_USE_SSL: + /* + * Make transfers attempt to use SSL/TLS. + */ + arg = va_arg(param, long); + if((arg < CURLUSESSL_NONE) || (arg > CURLUSESSL_ALL)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.use_ssl = (curl_usessl)arg; + break; + + case CURLOPT_SSL_OPTIONS: + arg = va_arg(param, long); + data->set.ssl.enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE; + data->set.ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); + break; + + case CURLOPT_PROXY_SSL_OPTIONS: + arg = va_arg(param, long); + data->set.proxy_ssl.enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE; + data->set.proxy_ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); + break; + +#endif + case CURLOPT_FTPSSLAUTH: + /* + * Set a specific auth for FTP-SSL transfers. + */ + arg = va_arg(param, long); + if((arg < CURLFTPAUTH_DEFAULT) || (arg > CURLFTPAUTH_TLS)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.ftpsslauth = (curl_ftpauth)arg; + break; + + case CURLOPT_IPRESOLVE: + arg = va_arg(param, long); + if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.ipver = arg; + break; + + case CURLOPT_MAXFILESIZE_LARGE: + /* + * Set the maximum size of a file to download. + */ + bigsize = va_arg(param, curl_off_t); + if(bigsize < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.max_filesize = bigsize; + break; + + case CURLOPT_TCP_NODELAY: + /* + * Enable or disable TCP_NODELAY, which will disable/enable the Nagle + * algorithm + */ + data->set.tcp_nodelay = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_FTP_ACCOUNT: + result = Curl_setstropt(&data->set.str[STRING_FTP_ACCOUNT], + va_arg(param, char *)); + break; + + case CURLOPT_IGNORE_CONTENT_LENGTH: + data->set.ignorecl = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_CONNECT_ONLY: + /* + * No data transfer, set up connection and let application use the socket + */ + data->set.connect_only = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_FTP_ALTERNATIVE_TO_USER: + result = Curl_setstropt(&data->set.str[STRING_FTP_ALTERNATIVE_TO_USER], + va_arg(param, char *)); + break; + + case CURLOPT_SOCKOPTFUNCTION: + /* + * socket callback function: called after socket() but before connect() + */ + data->set.fsockopt = va_arg(param, curl_sockopt_callback); + break; + + case CURLOPT_SOCKOPTDATA: + /* + * socket callback data pointer. Might be NULL. + */ + data->set.sockopt_client = va_arg(param, void *); + break; + + case CURLOPT_OPENSOCKETFUNCTION: + /* + * open/create socket callback function: called instead of socket(), + * before connect() + */ + data->set.fopensocket = va_arg(param, curl_opensocket_callback); + break; + + case CURLOPT_OPENSOCKETDATA: + /* + * socket callback data pointer. Might be NULL. + */ + data->set.opensocket_client = va_arg(param, void *); + break; + + case CURLOPT_CLOSESOCKETFUNCTION: + /* + * close socket callback function: called instead of close() + * when shutting down a connection + */ + data->set.fclosesocket = va_arg(param, curl_closesocket_callback); + break; + + case CURLOPT_RESOLVER_START_FUNCTION: + /* + * resolver start callback function: called before a new resolver request + * is started + */ + data->set.resolver_start = va_arg(param, curl_resolver_start_callback); + break; + + case CURLOPT_RESOLVER_START_DATA: + /* + * resolver start callback data pointer. Might be NULL. + */ + data->set.resolver_start_client = va_arg(param, void *); + break; + + case CURLOPT_CLOSESOCKETDATA: + /* + * socket callback data pointer. Might be NULL. + */ + data->set.closesocket_client = va_arg(param, void *); + break; + + case CURLOPT_SSL_SESSIONID_CACHE: + data->set.ssl.primary.sessionid = (0 != va_arg(param, long)) ? + TRUE : FALSE; + data->set.proxy_ssl.primary.sessionid = data->set.ssl.primary.sessionid; + break; + +#if defined(USE_LIBSSH2) || defined(USE_LIBSSH) + /* we only include SSH options if explicitly built to support SSH */ + case CURLOPT_SSH_AUTH_TYPES: + data->set.ssh_auth_types = va_arg(param, long); + break; + + case CURLOPT_SSH_PUBLIC_KEYFILE: + /* + * Use this file instead of the $HOME/.ssh/id_dsa.pub file + */ + result = Curl_setstropt(&data->set.str[STRING_SSH_PUBLIC_KEY], + va_arg(param, char *)); + break; + + case CURLOPT_SSH_PRIVATE_KEYFILE: + /* + * Use this file instead of the $HOME/.ssh/id_dsa file + */ + result = Curl_setstropt(&data->set.str[STRING_SSH_PRIVATE_KEY], + va_arg(param, char *)); + break; + case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: + /* + * Option to allow for the MD5 of the host public key to be checked + * for validation purposes. + */ + result = Curl_setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5], + va_arg(param, char *)); + break; +#ifdef HAVE_LIBSSH2_KNOWNHOST_API + case CURLOPT_SSH_KNOWNHOSTS: + /* + * Store the file name to read known hosts from. + */ + result = Curl_setstropt(&data->set.str[STRING_SSH_KNOWNHOSTS], + va_arg(param, char *)); + break; + + case CURLOPT_SSH_KEYFUNCTION: + /* setting to NULL is fine since the ssh.c functions themselves will + then rever to use the internal default */ + data->set.ssh_keyfunc = va_arg(param, curl_sshkeycallback); + break; + + case CURLOPT_SSH_KEYDATA: + /* + * Custom client data to pass to the SSH keyfunc callback + */ + data->set.ssh_keyfunc_userp = va_arg(param, void *); + break; +#endif /* HAVE_LIBSSH2_KNOWNHOST_API */ +#endif /* USE_LIBSSH2 */ + + case CURLOPT_HTTP_TRANSFER_DECODING: + /* + * disable libcurl transfer encoding is used + */ + data->set.http_te_skip = (0 == va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_HTTP_CONTENT_DECODING: + /* + * raw data passed to the application when content encoding is used + */ + data->set.http_ce_skip = (0 == va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_NEW_FILE_PERMS: + /* + * Uses these permissions instead of 0644 + */ + arg = va_arg(param, long); + if((arg < 0) || (arg > 0777)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.new_file_perms = arg; + break; + + case CURLOPT_NEW_DIRECTORY_PERMS: + /* + * Uses these permissions instead of 0755 + */ + arg = va_arg(param, long); + if((arg < 0) || (arg > 0777)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.new_directory_perms = arg; + break; + + case CURLOPT_ADDRESS_SCOPE: + /* + * We always get longs when passed plain numericals, but for this value we + * know that an unsigned int will always hold the value so we blindly + * typecast to this type + */ + arg = va_arg(param, long); + if((arg < 0) || (arg > 0xf)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.scope_id = curlx_sltoui(arg); + break; + + case CURLOPT_PROTOCOLS: + /* set the bitmask for the protocols that are allowed to be used for the + transfer, which thus helps the app which takes URLs from users or other + external inputs and want to restrict what protocol(s) to deal + with. Defaults to CURLPROTO_ALL. */ + data->set.allowed_protocols = va_arg(param, long); + break; + + case CURLOPT_REDIR_PROTOCOLS: + /* set the bitmask for the protocols that libcurl is allowed to follow to, + as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs + to be set in both bitmasks to be allowed to get redirected to. Defaults + to all protocols except FILE and SCP. */ + data->set.redir_protocols = va_arg(param, long); + break; + + case CURLOPT_DEFAULT_PROTOCOL: + /* Set the protocol to use when the URL doesn't include any protocol */ + result = Curl_setstropt(&data->set.str[STRING_DEFAULT_PROTOCOL], + va_arg(param, char *)); + break; + + case CURLOPT_MAIL_FROM: + /* Set the SMTP mail originator */ + result = Curl_setstropt(&data->set.str[STRING_MAIL_FROM], + va_arg(param, char *)); + break; + + case CURLOPT_MAIL_AUTH: + /* Set the SMTP auth originator */ + result = Curl_setstropt(&data->set.str[STRING_MAIL_AUTH], + va_arg(param, char *)); + break; + + case CURLOPT_MAIL_RCPT: + /* Set the list of mail recipients */ + data->set.mail_rcpt = va_arg(param, struct curl_slist *); + break; + + case CURLOPT_SASL_IR: + /* Enable/disable SASL initial response */ + data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + + case CURLOPT_RTSP_REQUEST: + { + /* + * Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...) + * Would this be better if the RTSPREQ_* were just moved into here? + */ + long curl_rtspreq = va_arg(param, long); + Curl_RtspReq rtspreq = RTSPREQ_NONE; + switch(curl_rtspreq) { + case CURL_RTSPREQ_OPTIONS: + rtspreq = RTSPREQ_OPTIONS; + break; + + case CURL_RTSPREQ_DESCRIBE: + rtspreq = RTSPREQ_DESCRIBE; + break; + + case CURL_RTSPREQ_ANNOUNCE: + rtspreq = RTSPREQ_ANNOUNCE; + break; + + case CURL_RTSPREQ_SETUP: + rtspreq = RTSPREQ_SETUP; + break; + + case CURL_RTSPREQ_PLAY: + rtspreq = RTSPREQ_PLAY; + break; + + case CURL_RTSPREQ_PAUSE: + rtspreq = RTSPREQ_PAUSE; + break; + + case CURL_RTSPREQ_TEARDOWN: + rtspreq = RTSPREQ_TEARDOWN; + break; + + case CURL_RTSPREQ_GET_PARAMETER: + rtspreq = RTSPREQ_GET_PARAMETER; + break; + + case CURL_RTSPREQ_SET_PARAMETER: + rtspreq = RTSPREQ_SET_PARAMETER; + break; + + case CURL_RTSPREQ_RECORD: + rtspreq = RTSPREQ_RECORD; + break; + + case CURL_RTSPREQ_RECEIVE: + rtspreq = RTSPREQ_RECEIVE; + break; + default: + rtspreq = RTSPREQ_NONE; + } + + data->set.rtspreq = rtspreq; + break; + } + + + case CURLOPT_RTSP_SESSION_ID: + /* + * Set the RTSP Session ID manually. Useful if the application is + * resuming a previously established RTSP session + */ + result = Curl_setstropt(&data->set.str[STRING_RTSP_SESSION_ID], + va_arg(param, char *)); + break; + + case CURLOPT_RTSP_STREAM_URI: + /* + * Set the Stream URI for the RTSP request. Unless the request is + * for generic server options, the application will need to set this. + */ + result = Curl_setstropt(&data->set.str[STRING_RTSP_STREAM_URI], + va_arg(param, char *)); + break; + + case CURLOPT_RTSP_TRANSPORT: + /* + * The content of the Transport: header for the RTSP request + */ + result = Curl_setstropt(&data->set.str[STRING_RTSP_TRANSPORT], + va_arg(param, char *)); + break; + + case CURLOPT_RTSP_CLIENT_CSEQ: + /* + * Set the CSEQ number to issue for the next RTSP request. Useful if the + * application is resuming a previously broken connection. The CSEQ + * will increment from this new number henceforth. + */ + data->state.rtsp_next_client_CSeq = va_arg(param, long); + break; + + case CURLOPT_RTSP_SERVER_CSEQ: + /* Same as the above, but for server-initiated requests */ + data->state.rtsp_next_client_CSeq = va_arg(param, long); + break; + + case CURLOPT_INTERLEAVEDATA: + data->set.rtp_out = va_arg(param, void *); + break; + case CURLOPT_INTERLEAVEFUNCTION: + /* Set the user defined RTP write function */ + data->set.fwrite_rtp = va_arg(param, curl_write_callback); + break; + + case CURLOPT_WILDCARDMATCH: + data->set.wildcard_enabled = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_CHUNK_BGN_FUNCTION: + data->set.chunk_bgn = va_arg(param, curl_chunk_bgn_callback); + break; + case CURLOPT_CHUNK_END_FUNCTION: + data->set.chunk_end = va_arg(param, curl_chunk_end_callback); + break; + case CURLOPT_FNMATCH_FUNCTION: + data->set.fnmatch = va_arg(param, curl_fnmatch_callback); + break; + case CURLOPT_CHUNK_DATA: + data->wildcard.customptr = va_arg(param, void *); + break; + case CURLOPT_FNMATCH_DATA: + data->set.fnmatch_data = va_arg(param, void *); + break; +#ifdef USE_TLS_SRP + case CURLOPT_TLSAUTH_USERNAME: + result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_ORIG], + va_arg(param, char *)); + if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype) + data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ + break; + case CURLOPT_PROXY_TLSAUTH_USERNAME: + result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_PROXY], + va_arg(param, char *)); + if(data->set.str[STRING_TLSAUTH_USERNAME_PROXY] && + !data->set.proxy_ssl.authtype) + data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ + break; + case CURLOPT_TLSAUTH_PASSWORD: + result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_ORIG], + va_arg(param, char *)); + if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype) + data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ + break; + case CURLOPT_PROXY_TLSAUTH_PASSWORD: + result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_PROXY], + va_arg(param, char *)); + if(data->set.str[STRING_TLSAUTH_USERNAME_PROXY] && + !data->set.proxy_ssl.authtype) + data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ + break; + case CURLOPT_TLSAUTH_TYPE: + argptr = va_arg(param, char *); + if(!argptr || + strncasecompare(argptr, "SRP", strlen("SRP"))) + data->set.ssl.authtype = CURL_TLSAUTH_SRP; + else + data->set.ssl.authtype = CURL_TLSAUTH_NONE; + break; + case CURLOPT_PROXY_TLSAUTH_TYPE: + argptr = va_arg(param, char *); + if(!argptr || + strncasecompare(argptr, "SRP", strlen("SRP"))) + data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; + else + data->set.proxy_ssl.authtype = CURL_TLSAUTH_NONE; + break; +#endif + case CURLOPT_DNS_SERVERS: + result = Curl_set_dns_servers(data, va_arg(param, char *)); + break; + case CURLOPT_DNS_INTERFACE: + result = Curl_set_dns_interface(data, va_arg(param, char *)); + break; + case CURLOPT_DNS_LOCAL_IP4: + result = Curl_set_dns_local_ip4(data, va_arg(param, char *)); + break; + case CURLOPT_DNS_LOCAL_IP6: + result = Curl_set_dns_local_ip6(data, va_arg(param, char *)); + break; + + case CURLOPT_TCP_KEEPALIVE: + data->set.tcp_keepalive = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_TCP_KEEPIDLE: + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.tcp_keepidle = arg; + break; + case CURLOPT_TCP_KEEPINTVL: + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.tcp_keepintvl = arg; + break; + case CURLOPT_TCP_FASTOPEN: +#if defined(CONNECT_DATA_IDEMPOTENT) || defined(MSG_FASTOPEN) || \ + defined(TCP_FASTOPEN_CONNECT) + data->set.tcp_fastopen = (0 != va_arg(param, long))?TRUE:FALSE; +#else + result = CURLE_NOT_BUILT_IN; +#endif + break; + case CURLOPT_SSL_ENABLE_NPN: + data->set.ssl_enable_npn = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_SSL_ENABLE_ALPN: + data->set.ssl_enable_alpn = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + +#ifdef USE_UNIX_SOCKETS + case CURLOPT_UNIX_SOCKET_PATH: + data->set.abstract_unix_socket = FALSE; + result = Curl_setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], + va_arg(param, char *)); + break; + case CURLOPT_ABSTRACT_UNIX_SOCKET: + data->set.abstract_unix_socket = TRUE; + result = Curl_setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], + va_arg(param, char *)); + break; +#endif + + case CURLOPT_PATH_AS_IS: + data->set.path_as_is = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_PIPEWAIT: + data->set.pipewait = (0 != va_arg(param, long)) ? TRUE : FALSE; + break; + case CURLOPT_STREAM_WEIGHT: +#ifndef USE_NGHTTP2 + return CURLE_NOT_BUILT_IN; +#else + arg = va_arg(param, long); + if((arg >= 1) && (arg <= 256)) + data->set.stream_weight = (int)arg; + break; +#endif + case CURLOPT_STREAM_DEPENDS: + case CURLOPT_STREAM_DEPENDS_E: + { +#ifndef USE_NGHTTP2 + return CURLE_NOT_BUILT_IN; +#else + struct Curl_easy *dep = va_arg(param, struct Curl_easy *); + if(!dep || GOOD_EASY_HANDLE(dep)) { + if(data->set.stream_depends_on) { + Curl_http2_remove_child(data->set.stream_depends_on, data); + } + Curl_http2_add_child(dep, data, (option == CURLOPT_STREAM_DEPENDS_E)); + } + break; +#endif + } + case CURLOPT_CONNECT_TO: + data->set.connect_to = va_arg(param, struct curl_slist *); + break; + case CURLOPT_SUPPRESS_CONNECT_HEADERS: + data->set.suppress_connect_headers = (0 != va_arg(param, long))?TRUE:FALSE; + break; + case CURLOPT_SSH_COMPRESSION: + data->set.ssh_compression = (0 != va_arg(param, long))?TRUE:FALSE; + break; + case CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS: + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.happy_eyeballs_timeout = arg; + break; + default: + /* unknown tag and its companion, just ignore: */ + result = CURLE_UNKNOWN_OPTION; + break; + } + + return result; +} + +/* + * curl_easy_setopt() is the external interface for setting options on an + * easy handle. + * + * NOTE: This is one of few API functions that are allowed to be called from + * within a callback. + */ + +#undef curl_easy_setopt +CURLcode curl_easy_setopt(struct Curl_easy *data, CURLoption tag, ...) +{ + va_list arg; + CURLcode result; + + if(!data) + return CURLE_BAD_FUNCTION_ARGUMENT; + + va_start(arg, tag); + + result = Curl_vsetopt(data, tag, arg); + + va_end(arg); + return result; +} diff --git a/lib/setopt.h b/lib/setopt.h new file mode 100644 index 0000000..c658e04 --- /dev/null +++ b/lib/setopt.h @@ -0,0 +1,29 @@ +#ifndef HEADER_CURL_SETOPT_H +#define HEADER_CURL_SETOPT_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +CURLcode Curl_setstropt(char **charp, const char *s); +CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, + va_list arg); + +#endif /* HEADER_CURL_SETOPT_H */ diff --git a/lib/sha256.c b/lib/sha256.c new file mode 100644 index 0000000..55716c6 --- /dev/null +++ b/lib/sha256.c @@ -0,0 +1,270 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Florin Petriuc, + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" + +#ifndef CURL_DISABLE_CRYPTO_AUTH + +#include "warnless.h" +#include "curl_sha256.h" + +#if defined(USE_OPENSSL) + +#include + +#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) +#define USE_OPENSSL_SHA256 +#endif + +#endif + +#ifdef USE_OPENSSL_SHA256 +/* When OpenSSL is available we use the SHA256-function from OpenSSL */ +#include +#else + +/* When no other crypto library is available we use this code segment */ + +/* ===== start - public domain SHA256 implementation ===== */ +/* This is based on SHA256 implementation in LibTomCrypt that was released into + * public domain by Tom St Denis. */ + +#define WPA_GET_BE32(a) ((((unsigned long)(a)[0]) << 24) | \ + (((unsigned long)(a)[1]) << 16) | \ + (((unsigned long)(a)[2]) << 8) | \ + ((unsigned long)(a)[3])) +#define WPA_PUT_BE32(a, val) \ +do { \ + (a)[0] = (unsigned char)((((unsigned long) (val)) >> 24) & 0xff); \ + (a)[1] = (unsigned char)((((unsigned long) (val)) >> 16) & 0xff); \ + (a)[2] = (unsigned char)((((unsigned long) (val)) >> 8) & 0xff); \ + (a)[3] = (unsigned char)(((unsigned long) (val)) & 0xff); \ +} while(0) + +#ifdef HAVE_LONGLONG +#define WPA_PUT_BE64(a, val) \ +do { \ + (a)[0] = (unsigned char)(((unsigned long long)(val)) >> 56); \ + (a)[1] = (unsigned char)(((unsigned long long)(val)) >> 48); \ + (a)[2] = (unsigned char)(((unsigned long long)(val)) >> 40); \ + (a)[3] = (unsigned char)(((unsigned long long)(val)) >> 32); \ + (a)[4] = (unsigned char)(((unsigned long long)(val)) >> 24); \ + (a)[5] = (unsigned char)(((unsigned long long)(val)) >> 16); \ + (a)[6] = (unsigned char)(((unsigned long long)(val)) >> 8); \ + (a)[7] = (unsigned char)(((unsigned long long)(val)) & 0xff); \ +} while(0) +#else +#define WPA_PUT_BE64(a, val) \ +do { \ + (a)[0] = (unsigned char)(((unsigned __int64)(val)) >> 56); \ + (a)[1] = (unsigned char)(((unsigned __int64)(val)) >> 48); \ + (a)[2] = (unsigned char)(((unsigned __int64)(val)) >> 40); \ + (a)[3] = (unsigned char)(((unsigned __int64)(val)) >> 32); \ + (a)[4] = (unsigned char)(((unsigned __int64)(val)) >> 24); \ + (a)[5] = (unsigned char)(((unsigned __int64)(val)) >> 16); \ + (a)[6] = (unsigned char)(((unsigned __int64)(val)) >> 8); \ + (a)[7] = (unsigned char)(((unsigned __int64)(val)) & 0xff); \ +} while(0) +#endif + +typedef struct sha256_state { +#ifdef HAVE_LONGLONG + unsigned long long length; +#else + unsigned __int64 length; +#endif + unsigned long state[8], curlen; + unsigned char buf[64]; +} SHA256_CTX; +/* the K array */ +static const unsigned long K[64] = { + 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL, + 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL, + 0x243185beUL, 0x550c7dc3UL, 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, + 0xc19bf174UL, 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, + 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, 0x983e5152UL, + 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, 0xc6e00bf3UL, 0xd5a79147UL, + 0x06ca6351UL, 0x14292967UL, 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, + 0x53380d13UL, 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, + 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, 0xd192e819UL, + 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, 0x19a4c116UL, 0x1e376c08UL, + 0x2748774cUL, 0x34b0bcb5UL, 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, + 0x682e6ff3UL, 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, + 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL +}; +/* Various logical functions */ +#define RORc(x, y) \ +(((((unsigned long)(x) & 0xFFFFFFFFUL) >> (unsigned long)((y) & 31)) | \ + ((unsigned long)(x) << (unsigned long)(32 - ((y) & 31)))) & 0xFFFFFFFFUL) +#define Ch(x,y,z) (z ^ (x & (y ^ z))) +#define Maj(x,y,z) (((x | y) & z) | (x & y)) +#define S(x, n) RORc((x), (n)) +#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n)) +#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22)) +#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25)) +#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3)) +#define Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10)) +#ifndef MIN +#define MIN(x, y) (((x) < (y)) ? (x) : (y)) +#endif +/* compress 512-bits */ +static int sha256_compress(struct sha256_state *md, + unsigned char *buf) +{ + unsigned long S[8], W[64], t0, t1; + unsigned long t; + int i; + /* copy state into S */ + for(i = 0; i < 8; i++) { + S[i] = md->state[i]; + } + /* copy the state into 512-bits into W[0..15] */ + for(i = 0; i < 16; i++) + W[i] = WPA_GET_BE32(buf + (4 * i)); + /* fill W[16..63] */ + for(i = 16; i < 64; i++) { + W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + + W[i - 16]; + } + /* Compress */ +#define RND(a,b,c,d,e,f,g,h,i) \ + t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \ + t1 = Sigma0(a) + Maj(a, b, c); \ + d += t0; \ + h = t0 + t1; + for(i = 0; i < 64; ++i) { + RND(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], i); + t = S[7]; S[7] = S[6]; S[6] = S[5]; S[5] = S[4]; + S[4] = S[3]; S[3] = S[2]; S[2] = S[1]; S[1] = S[0]; S[0] = t; + } + /* feedback */ + for(i = 0; i < 8; i++) { + md->state[i] = md->state[i] + S[i]; + } + return 0; +} +/* Initialize the hash state */ +static void SHA256_Init(struct sha256_state *md) +{ + md->curlen = 0; + md->length = 0; + md->state[0] = 0x6A09E667UL; + md->state[1] = 0xBB67AE85UL; + md->state[2] = 0x3C6EF372UL; + md->state[3] = 0xA54FF53AUL; + md->state[4] = 0x510E527FUL; + md->state[5] = 0x9B05688CUL; + md->state[6] = 0x1F83D9ABUL; + md->state[7] = 0x5BE0CD19UL; +} +/** + Process a block of memory though the hash + @param md The hash state + @param in The data to hash + @param inlen The length of the data (octets) + @return CRYPT_OK if successful +*/ +static int SHA256_Update(struct sha256_state *md, + const unsigned char *in, + unsigned long inlen) +{ + unsigned long n; +#define block_size 64 + if(md->curlen > sizeof(md->buf)) + return -1; + while(inlen > 0) { + if(md->curlen == 0 && inlen >= block_size) { + if(sha256_compress(md, (unsigned char *)in) < 0) + return -1; + md->length += block_size * 8; + in += block_size; + inlen -= block_size; + } + else { + n = MIN(inlen, (block_size - md->curlen)); + memcpy(md->buf + md->curlen, in, n); + md->curlen += n; + in += n; + inlen -= n; + if(md->curlen == block_size) { + if(sha256_compress(md, md->buf) < 0) + return -1; + md->length += 8 * block_size; + md->curlen = 0; + } + } + } + return 0; +} +/** + Terminate the hash to get the digest + @param md The hash state + @param out [out] The destination of the hash (32 bytes) + @return CRYPT_OK if successful +*/ +static int SHA256_Final(unsigned char *out, + struct sha256_state *md) +{ + int i; + if(md->curlen >= sizeof(md->buf)) + return -1; + /* increase the length of the message */ + md->length += md->curlen * 8; + /* append the '1' bit */ + md->buf[md->curlen++] = (unsigned char)0x80; + /* if the length is currently above 56 bytes we append zeros + * then compress. Then we can fall back to padding zeros and length + * encoding like normal. + */ + if(md->curlen > 56) { + while(md->curlen < 64) { + md->buf[md->curlen++] = (unsigned char)0; + } + sha256_compress(md, md->buf); + md->curlen = 0; + } + /* pad up to 56 bytes of zeroes */ + while(md->curlen < 56) { + md->buf[md->curlen++] = (unsigned char)0; + } + /* store length */ + WPA_PUT_BE64(md->buf + 56, md->length); + sha256_compress(md, md->buf); + /* copy output */ + for(i = 0; i < 8; i++) + WPA_PUT_BE32(out + (4 * i), md->state[i]); + return 0; +} +/* ===== end - public domain SHA256 implementation ===== */ + +#endif + +void Curl_sha256it(unsigned char *outbuffer, /* 32 unsigned chars */ + const unsigned char *input) +{ + SHA256_CTX ctx; + SHA256_Init(&ctx); + SHA256_Update(&ctx, input, curlx_uztoui(strlen((char *)input))); + SHA256_Final(outbuffer, &ctx); +} + +#endif /* CURL_DISABLE_CRYPTO_AUTH */ diff --git a/lib/share.c b/lib/share.c index 5b3957f..870b191 100644 --- a/lib/share.c +++ b/lib/share.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -102,6 +102,8 @@ curl_share_setopt(struct Curl_share *share, CURLSHoption option, ...) break; case CURL_LOCK_DATA_CONNECT: /* not supported (yet) */ + if(Curl_conncache_init(&share->conn_cache, 103)) + res = CURLSHE_NOMEM; break; default: @@ -186,6 +188,8 @@ curl_share_cleanup(struct Curl_share *share) return CURLSHE_IN_USE; } + Curl_conncache_close_all_connections(&share->conn_cache); + Curl_conncache_destroy(&share->conn_cache); Curl_hash_destroy(&share->hostcache); #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) diff --git a/lib/share.h b/lib/share.h index c039a16..4b13406 100644 --- a/lib/share.h +++ b/lib/share.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,6 +26,7 @@ #include #include "cookie.h" #include "urldata.h" +#include "conncache.h" /* SalfordC says "A structure member may not be volatile". Hence: */ @@ -43,7 +44,7 @@ struct Curl_share { curl_lock_function lockfunc; curl_unlock_function unlockfunc; void *clientdata; - + struct conncache conn_cache; struct curl_hash hostcache; #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) struct CookieInfo *cookies; diff --git a/lib/smb.c b/lib/smb.c index acf31bc..b432634 100644 --- a/lib/smb.c +++ b/lib/smb.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2014, Bill Nagel , Exacq Technologies - * Copyright (C) 2016-2017, Daniel Stenberg, , et al. + * Copyright (C) 2016-2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -34,7 +34,7 @@ #include #ifdef CURL_WINDOWS_APP #define getpid GetCurrentProcessId -#else +#elif !defined(MSDOS) #define getpid _getpid #endif #endif @@ -85,6 +85,7 @@ const struct Curl_handler Curl_handler_smb = { ZERO_NULL, /* perform_getsock */ smb_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_SMB, /* defport */ CURLPROTO_SMB, /* protocol */ PROTOPT_NONE /* flags */ @@ -109,6 +110,7 @@ const struct Curl_handler Curl_handler_smbs = { ZERO_NULL, /* perform_getsock */ smb_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_SMBS, /* defport */ CURLPROTO_SMBS, /* protocol */ PROTOPT_SSL /* flags */ @@ -144,19 +146,12 @@ static unsigned int smb_swap32(unsigned int x) ((x >> 24) & 0xff); } -#ifdef HAVE_LONGLONG -static unsigned long long smb_swap64(unsigned long long x) +static curl_off_t smb_swap64(curl_off_t x) { - return ((unsigned long long) smb_swap32((unsigned int) x) << 32) | + return ((curl_off_t) smb_swap32((unsigned int) x) << 32) | smb_swap32((unsigned int) (x >> 32)); } -#else -static unsigned __int64 smb_swap64(unsigned __int64 x) -{ - return ((unsigned __int64) smb_swap32((unsigned int) x) << 32) | - smb_swap32((unsigned int) (x >> 32)); -} -#endif + #else # define smb_swap16(x) (x) # define smb_swap32(x) (x) @@ -446,7 +441,7 @@ static CURLcode smb_send_setup(struct connectdata *conn) Curl_ntlm_core_mk_lm_hash(conn->data, conn->passwd, lm_hash); Curl_ntlm_core_lm_resp(lm_hash, smbc->challenge, lm); -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES Curl_ntlm_core_mk_nt_hash(conn->data, conn->passwd, nt_hash); Curl_ntlm_core_lm_resp(nt_hash, smbc->challenge, nt); #else @@ -607,7 +602,7 @@ static CURLcode smb_send_and_recv(struct connectdata *conn, void **msg) /* Check if there is data in the transfer buffer */ if(!smbc->send_size && smbc->upload_size) { - int nread = smbc->upload_size > BUFSIZE ? BUFSIZE : + int nread = smbc->upload_size > UPLOAD_BUFSIZE ? UPLOAD_BUFSIZE : (int) smbc->upload_size; conn->data->req.upload_fromhere = conn->data->state.uploadbuffer; result = Curl_fillreadbuffer(conn, nread, &nread); @@ -646,7 +641,7 @@ static CURLcode smb_connection_state(struct connectdata *conn, bool *done) if(smbc->state == SMB_CONNECTING) { #ifdef USE_SSL if((conn->handler->flags & PROTOPT_SSL)) { - bool ssl_done; + bool ssl_done = FALSE; result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &ssl_done); if(result && result != CURLE_AGAIN) return result; @@ -713,6 +708,24 @@ static CURLcode smb_connection_state(struct connectdata *conn, bool *done) return CURLE_OK; } +/* + * Convert a timestamp from the Windows world (100 nsec units from 1 Jan 1601) + * to Posix time. Cap the output to fit within a time_t. + */ +static void get_posix_time(time_t *out, curl_off_t timestamp) +{ + timestamp -= 116444736000000000; + timestamp /= 10000000; +#if SIZEOF_TIME_T < SIZEOF_CURL_OFF_T + if(timestamp > TIME_T_MAX) + *out = TIME_T_MAX; + else if(timestamp < TIME_T_MIN) + *out = TIME_T_MIN; + else +#endif + *out = (time_t) timestamp; +} + static CURLcode smb_request_state(struct connectdata *conn, bool *done) { struct smb_request *req = conn->data->req.protop; @@ -723,6 +736,7 @@ static CURLcode smb_request_state(struct connectdata *conn, bool *done) unsigned short off; CURLcode result; void *msg = NULL; + const struct smb_nt_create_response *smb_m; /* Start the request */ if(req->state == SMB_REQUESTING) { @@ -765,7 +779,8 @@ static CURLcode smb_request_state(struct connectdata *conn, bool *done) next_state = SMB_TREE_DISCONNECT; break; } - req->fid = smb_swap16(((struct smb_nt_create_response *)msg)->fid); + smb_m = (const struct smb_nt_create_response*) msg; + req->fid = smb_swap16(smb_m->fid); conn->data->req.offset = 0; if(conn->data->set.upload) { conn->data->req.size = conn->data->state.infilesize; @@ -773,9 +788,11 @@ static CURLcode smb_request_state(struct connectdata *conn, bool *done) next_state = SMB_UPLOAD; } else { - conn->data->req.size = - smb_swap64(((struct smb_nt_create_response *)msg)->end_of_file); + smb_m = (const struct smb_nt_create_response*) msg; + conn->data->req.size = smb_swap64(smb_m->end_of_file); Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size); + if(conn->data->set.get_filetime) + get_posix_time(&conn->data->info.filetime, smb_m->last_change_time); next_state = SMB_DOWNLOAD; } break; diff --git a/lib/smb.h b/lib/smb.h index 1a4f66e..c3ee7ae 100644 --- a/lib/smb.h +++ b/lib/smb.h @@ -8,6 +8,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2014, Bill Nagel , Exacq Technologies + * Copyright (C) 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -165,11 +166,7 @@ struct smb_nt_create { unsigned int flags; unsigned int root_fid; unsigned int access; -#ifdef HAVE_LONGLONG - unsigned long long allocation_size; -#else - unsigned __int64 allocation_size; -#endif + curl_off_t allocation_size; unsigned int ext_file_attributes; unsigned int share_access; unsigned int create_disposition; @@ -187,25 +184,15 @@ struct smb_nt_create_response { unsigned char op_lock_level; unsigned short fid; unsigned int create_disposition; -#ifdef HAVE_LONGLONG - unsigned long long create_time; - unsigned long long last_access_time; - unsigned long long last_write_time; - unsigned long long last_change_time; -#else - unsigned __int64 create_time; - unsigned __int64 last_access_time; - unsigned __int64 last_write_time; - unsigned __int64 last_change_time; -#endif + + curl_off_t create_time; + curl_off_t last_access_time; + curl_off_t last_write_time; + curl_off_t last_change_time; unsigned int ext_file_attributes; -#ifdef HAVE_LONGLONG - unsigned long long allocation_size; - unsigned long long end_of_file; -#else - unsigned __int64 allocation_size; - unsigned __int64 end_of_file; -#endif + curl_off_t allocation_size; + curl_off_t end_of_file; + } PACK; struct smb_read { diff --git a/lib/smtp.c b/lib/smtp.c index adc346a..3f3b45a 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -67,6 +67,7 @@ #include "transfer.h" #include "escape.h" #include "http.h" /* for HTTP proxy tunnel stuff */ +#include "mime.h" #include "socks.h" #include "smtp.h" #include "strtoofft.h" @@ -124,6 +125,7 @@ const struct Curl_handler Curl_handler_smtp = { ZERO_NULL, /* perform_getsock */ smtp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_SMTP, /* defport */ CURLPROTO_SMTP, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY | /* flags */ @@ -150,6 +152,7 @@ const struct Curl_handler Curl_handler_smtps = { ZERO_NULL, /* perform_getsock */ smtp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_SMTPS, /* defport */ CURLPROTO_SMTPS, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_SSL @@ -157,58 +160,6 @@ const struct Curl_handler Curl_handler_smtps = { }; #endif -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed SMTP protocol handler. - */ - -static const struct Curl_handler Curl_handler_smtp_proxy = { - "SMTP", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMTP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * HTTP-proxyed SMTPS protocol handler. - */ - -static const struct Curl_handler Curl_handler_smtps_proxy = { - "SMTPS", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMTPS, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif - /* SASL parameters for the smtp protocol */ static const struct SASLproto saslsmtp = { "smtp", /* The service name */ @@ -281,23 +232,30 @@ static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len, */ static void smtp_get_message(char *buffer, char **outptr) { - size_t len = 0; + size_t len = strlen(buffer); char *message = NULL; - /* Find the start of the message */ - for(message = buffer + 4; *message == ' ' || *message == '\t'; message++) - ; - - /* Find the end of the message */ - for(len = strlen(message); len--;) - if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && - message[len] != '\t') - break; - - /* Terminate the message */ - if(++len) { - message[len] = '\0'; + if(len > 4) { + /* Find the start of the message */ + len -= 4; + for(message = buffer + 4; *message == ' ' || *message == '\t'; + message++, len--) + ; + + /* Find the end of the message */ + for(; len--;) + if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && + message[len] != '\t') + break; + + /* Terminate the message */ + if(++len) { + message[len] = '\0'; + } } + else + /* junk input => zero length output */ + message = &buffer[len]; *outptr = message; } @@ -580,8 +538,40 @@ static CURLcode smtp_perform_mail(struct connectdata *conn) } } + /* Prepare the mime data if some. */ + if(data->set.mimepost.kind != MIMEKIND_NONE) { + /* Use the whole structure as data. */ + data->set.mimepost.flags &= ~MIME_BODY_ONLY; + + /* Add external headers and mime version. */ + curl_mime_headers(&data->set.mimepost, data->set.headers, 0); + result = Curl_mime_prepare_headers(&data->set.mimepost, NULL, + NULL, MIMESTRATEGY_MAIL); + + if(!result) + if(!Curl_checkheaders(conn, "Mime-Version")) + result = Curl_mime_add_header(&data->set.mimepost.curlheaders, + "Mime-Version: 1.0"); + + /* Make sure we will read the entire mime structure. */ + if(!result) + result = Curl_mime_rewind(&data->set.mimepost); + + if(result) { + free(from); + free(auth); + return result; + } + + data->state.infilesize = Curl_mime_size(&data->set.mimepost); + + /* Read from mime structure. */ + data->state.fread_func = (curl_read_callback) Curl_mime_read; + data->state.in = (void *) &data->set.mimepost; + } + /* Calculate the optional SIZE parameter */ - if(conn->proto.smtpc.size_supported && conn->data->state.infilesize > 0) { + if(conn->proto.smtpc.size_supported && data->state.infilesize > 0) { size = aprintf("%" CURL_FORMAT_CURL_OFF_T, data->state.infilesize); if(!size) { @@ -1205,11 +1195,15 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status, if(!smtp || !pp->conn) return CURLE_OK; + /* Cleanup our per-request based variables */ + Curl_safefree(smtp->custom); + if(status) { connclose(conn, "SMTP done with bad status"); /* marked for closure */ result = status; /* use the already set error code */ } - else if(!data->set.connect_only && data->set.upload && data->set.mail_rcpt) { + else if(!data->set.connect_only && data->set.mail_rcpt && + (data->set.upload || data->set.mimepost.kind)) { /* Calculate the EOB taking into account any terminating CRLF from the previous line of the email or the CRLF of the DATA command when there is "no mail data". RFC-5321, sect. 4.1.1.4. @@ -1246,7 +1240,7 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status, } else { /* Successfully sent so adjust the response timeout relative to now */ - pp->response = Curl_tvnow(); + pp->response = Curl_now(); free(eob); } @@ -1262,9 +1256,6 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status, result = smtp_block_statemach(conn); } - /* Cleanup our per-request based variables */ - Curl_safefree(smtp->custom); - /* Clear the transfer mode for the next request */ smtp->transfer = FTPTRANSFER_BODY; @@ -1298,8 +1289,13 @@ static CURLcode smtp_perform(struct connectdata *conn, bool *connected, /* Store the first recipient (or NULL if not specified) */ smtp->rcpt = data->set.mail_rcpt; + /* Initial data character is the first character in line: it is implicitly + preceded by a virtual CRLF. */ + smtp->trailing_crlf = TRUE; + smtp->eob = 2; + /* Start the first command in the DO phase */ - if(data->set.upload && data->set.mail_rcpt) + if((data->set.upload || data->set.mimepost.kind) && data->set.mail_rcpt) /* MAIL transfer */ result = smtp_perform_mail(conn); else @@ -1451,30 +1447,6 @@ static CURLcode smtp_setup_connection(struct connectdata *conn) /* Clear the TLS upgraded flag */ conn->tls_upgraded = FALSE; - /* Set up the proxy if necessary */ - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel SMTP operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_smtp) - conn->handler = &Curl_handler_smtp_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_smtps_proxy; -#else - failf(data, "SMTPS not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - /* set it up as a HTTP connection instead */ - return conn->handler->setup_connection(conn); - -#else - failf(data, "SMTP over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - /* Initialise the SMTP layer */ result = smtp_init(conn); if(result) @@ -1591,7 +1563,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) if(!scratch || data->set.crlf) { oldscratch = scratch; - scratch = newscratch = malloc(2 * BUFSIZE); + scratch = newscratch = malloc(2 * data->set.buffer_size); if(!newscratch) { failf(data, "Failed to alloc scratch buffer!"); diff --git a/lib/socks.c b/lib/socks.c index 774fb20..ac4270e 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -57,7 +57,7 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */ ssize_t nread; ssize_t allread = 0; int result; - time_t timeleft; + timediff_t timeleft; *n = 0; for(;;) { timeleft = Curl_timeleft(conn->data, NULL, TRUE); @@ -73,7 +73,7 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */ result = Curl_read_plain(sockfd, buf, buffersize, &nread); if(CURLE_AGAIN == result) continue; - else if(result) + if(result) break; if(buffersize == nread) { @@ -105,7 +105,7 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */ * Set protocol4a=true for "SOCKS 4A (Simple Extension to SOCKS 4 Protocol)" * Nonsupport "Identification Protocol (RFC1413)" */ -CURLcode Curl_SOCKS4(const char *proxy_name, +CURLcode Curl_SOCKS4(const char *proxy_user, const char *hostname, int remote_port, int sockindex, @@ -154,7 +154,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, /* DNS resolve only for SOCKS4, not SOCKS4a */ if(!protocol4a) { struct Curl_dns_entry *dns; - Curl_addrinfo *hp=NULL; + Curl_addrinfo *hp = NULL; int rc; rc = Curl_resolv(conn, hostname, remote_port, &dns); @@ -171,7 +171,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, * returns a Curl_addrinfo pointer that may not always look the same. */ if(dns) - hp=dns->addr; + hp = dns->addr; if(hp) { char buf[64]; Curl_printable_address(hp, buf, sizeof(buf)); @@ -206,14 +206,14 @@ CURLcode Curl_SOCKS4(const char *proxy_name, * This is currently not supporting "Identification Protocol (RFC1413)". */ socksreq[8] = 0; /* ensure empty userid is NUL-terminated */ - if(proxy_name) { - size_t plen = strlen(proxy_name); + if(proxy_user) { + size_t plen = strlen(proxy_user); if(plen >= sizeof(socksreq) - 8) { failf(data, "Too long SOCKS proxy name, can't use!\n"); return CURLE_COULDNT_CONNECT; } /* copy the proxy name WITH trailing zero */ - memcpy(socksreq + 8, proxy_name, plen+1); + memcpy(socksreq + 8, proxy_user, plen + 1); } /* @@ -306,7 +306,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, ", request rejected or failed.", (unsigned char)socksreq[4], (unsigned char)socksreq[5], (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), + (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]), (unsigned char)socksreq[1]); return CURLE_COULDNT_CONNECT; case 92: @@ -316,7 +316,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, "identd on the client.", (unsigned char)socksreq[4], (unsigned char)socksreq[5], (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), + (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]), (unsigned char)socksreq[1]); return CURLE_COULDNT_CONNECT; case 93: @@ -326,7 +326,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, "report different user-ids.", (unsigned char)socksreq[4], (unsigned char)socksreq[5], (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), + (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]), (unsigned char)socksreq[1]); return CURLE_COULDNT_CONNECT; default: @@ -335,7 +335,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, ", Unknown.", (unsigned char)socksreq[4], (unsigned char)socksreq[5], (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), + (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]), (unsigned char)socksreq[1]); return CURLE_COULDNT_CONNECT; } @@ -350,7 +350,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name, * This function logs in to a SOCKS5 proxy and sends the specifics to the final * destination server. */ -CURLcode Curl_SOCKS5(const char *proxy_name, +CURLcode Curl_SOCKS5(const char *proxy_user, const char *proxy_password, const char *hostname, int remote_port, @@ -375,17 +375,20 @@ CURLcode Curl_SOCKS5(const char *proxy_name, */ unsigned char socksreq[600]; /* room for large user/pw (255 max each) */ + int idx; ssize_t actualread; ssize_t written; int result; CURLcode code; curl_socket_t sock = conn->sock[sockindex]; struct Curl_easy *data = conn->data; - time_t timeout; + timediff_t timeout; bool socks5_resolve_local = (conn->socks_proxy.proxytype == CURLPROXY_SOCKS5) ? TRUE : FALSE; const size_t hostname_len = strlen(hostname); ssize_t len = 0; + const unsigned long auth = data->set.socks5auth; + bool allow_gssapi = FALSE; if(conn->bits.httpproxy) infof(conn->data, "SOCKS5: connecting to HTTP proxy %s port %d\n", @@ -416,7 +419,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, failf(conn->data, "SOCKS5: no connection here"); return CURLE_COULDNT_CONNECT; } - else if(0 == result) { + if(0 == result) { failf(conn->data, "SOCKS5: connection timeout"); return CURLE_OPERATION_TIMEDOUT; } @@ -426,18 +429,29 @@ CURLcode Curl_SOCKS5(const char *proxy_name, return CURLE_COULDNT_CONNECT; } - socksreq[0] = 5; /* version */ + if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI)) + infof(conn->data, + "warning: unsupported value passed to CURLOPT_SOCKS5_AUTH: %lu\n", + auth); + if(!(auth & CURLAUTH_BASIC)) + /* disable username/password auth */ + proxy_user = NULL; #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - socksreq[1] = (char)(proxy_name ? 3 : 2); /* number of methods (below) */ - socksreq[2] = 0; /* no authentication */ - socksreq[3] = 1; /* GSS-API */ - socksreq[4] = 2; /* username/password */ -#else - socksreq[1] = (char)(proxy_name ? 2 : 1); /* number of methods (below) */ - socksreq[2] = 0; /* no authentication */ - socksreq[3] = 2; /* username/password */ + if(auth & CURLAUTH_GSSAPI) + allow_gssapi = TRUE; #endif + idx = 0; + socksreq[idx++] = 5; /* version */ + idx++; /* reserve for the number of authentication methods */ + socksreq[idx++] = 0; /* no authentication */ + if(allow_gssapi) + socksreq[idx++] = 1; /* GSS-API */ + if(proxy_user) + socksreq[idx++] = 2; /* username/password */ + /* write the number of authentication methods */ + socksreq[1] = (unsigned char) (idx - 2); + (void)curlx_nonblock(sock, FALSE); infof(data, "SOCKS5 communication to %s:%d\n", hostname, remote_port); @@ -457,7 +471,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, failf(conn->data, "SOCKS5 nothing to read"); return CURLE_COULDNT_CONNECT; } - else if(0 == result) { + if(0 == result) { failf(conn->data, "SOCKS5 read timeout"); return CURLE_OPERATION_TIMEDOUT; } @@ -469,7 +483,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, (void)curlx_nonblock(sock, FALSE); - result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); + result = Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); if(result || (actualread != 2)) { failf(data, "Unable to receive initial SOCKS5 response."); return CURLE_COULDNT_CONNECT; @@ -484,7 +498,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, ; } #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - else if(socksreq[1] == 1) { + else if(allow_gssapi && (socksreq[1] == 1)) { code = Curl_SOCKS5_gssapi_negotiate(sockindex, conn); if(code) { failf(data, "Unable to negotiate SOCKS5 GSS-API context."); @@ -494,13 +508,13 @@ CURLcode Curl_SOCKS5(const char *proxy_name, #endif else if(socksreq[1] == 2) { /* Needs user name and password */ - size_t proxy_name_len, proxy_password_len; - if(proxy_name && proxy_password) { - proxy_name_len = strlen(proxy_name); + size_t proxy_user_len, proxy_password_len; + if(proxy_user && proxy_password) { + proxy_user_len = strlen(proxy_user); proxy_password_len = strlen(proxy_password); } else { - proxy_name_len = 0; + proxy_user_len = 0; proxy_password_len = 0; } @@ -513,10 +527,10 @@ CURLcode Curl_SOCKS5(const char *proxy_name, */ len = 0; socksreq[len++] = 1; /* username/pw subnegotiation version */ - socksreq[len++] = (unsigned char) proxy_name_len; - if(proxy_name && proxy_name_len) - memcpy(socksreq + len, proxy_name, proxy_name_len); - len += proxy_name_len; + socksreq[len++] = (unsigned char) proxy_user_len; + if(proxy_user && proxy_user_len) + memcpy(socksreq + len, proxy_user, proxy_user_len); + len += proxy_user_len; socksreq[len++] = (unsigned char) proxy_password_len; if(proxy_password && proxy_password_len) memcpy(socksreq + len, proxy_password, proxy_password_len); @@ -528,7 +542,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, return CURLE_COULDNT_CONNECT; } - result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); + result = Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); if(result || (actualread != 2)) { failf(data, "Unable to receive SOCKS5 sub-negotiation response."); return CURLE_COULDNT_CONNECT; @@ -545,17 +559,13 @@ CURLcode Curl_SOCKS5(const char *proxy_name, } else { /* error */ -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - if(socksreq[1] == 255) { -#else - if(socksreq[1] == 1) { + if(!allow_gssapi && (socksreq[1] == 1)) { failf(data, "SOCKS5 GSSAPI per-message authentication is not supported."); return CURLE_COULDNT_CONNECT; } - else if(socksreq[1] == 255) { -#endif - if(!proxy_name || !*proxy_name) { + if(socksreq[1] == 255) { + if(!proxy_user || !*proxy_user) { failf(data, "No authentication method was acceptable. (It is quite likely" " that the SOCKS5 server wanted a username/password, since none" @@ -605,7 +615,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, * returns a Curl_addrinfo pointer that may not always look the same. */ if(dns) - hp=dns->addr; + hp = dns->addr; if(hp) { int i; char buf[64]; @@ -772,9 +782,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name, } return CURLE_COULDNT_CONNECT; } - else { - infof(data, "SOCKS5 request granted.\n"); - } + infof(data, "SOCKS5 request granted.\n"); (void)curlx_nonblock(sock, TRUE); return CURLE_OK; /* Proxy was successful! */ diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c index 54d0635..96948ac 100644 --- a/lib/socks_gssapi.c +++ b/lib/socks_gssapi.c @@ -5,8 +5,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2009, 2011, Markus Moeller, - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2009, Markus Moeller, + * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -65,7 +65,7 @@ static int check_gss_err(struct Curl_easy *data, &msg_ctx, &status_string); if(maj_stat == GSS_S_COMPLETE) { if(sizeof(buf) > len + status_string.length + 1) { - strcpy(buf+len, (char *) status_string.value); + strcpy(buf + len, (char *) status_string.value); len += status_string.length; } gss_release_buffer(&min_stat, &status_string); @@ -74,7 +74,7 @@ static int check_gss_err(struct Curl_easy *data, gss_release_buffer(&min_stat, &status_string); } if(sizeof(buf) > len + 3) { - strcpy(buf+len, ".\n"); + strcpy(buf + len, ".\n"); len += 2; } msg_ctx = 0; @@ -86,7 +86,7 @@ static int check_gss_err(struct Curl_easy *data, &msg_ctx, &status_string); if(maj_stat == GSS_S_COMPLETE) { if(sizeof(buf) > len + status_string.length) - strcpy(buf+len, (char *) status_string.value); + strcpy(buf + len, (char *) status_string.value); gss_release_buffer(&min_stat, &status_string); break; } @@ -119,7 +119,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_name_t server = GSS_C_NO_NAME; gss_name_t gss_client_name = GSS_C_NO_NAME; unsigned short us_length; - char *user=NULL; + char *user = NULL; unsigned char socksreq[4]; /* room for GSS-API exchange header only */ const char *serviceptr = data->set.str[STRING_PROXY_SERVICE_NAME] ? data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd"; @@ -146,11 +146,12 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } else { service.value = malloc(serviceptr_length + - strlen(conn->socks_proxy.host.name)+2); + strlen(conn->socks_proxy.host.name) + 2); if(!service.value) return CURLE_OUT_OF_MEMORY; - service.length = serviceptr_length + strlen(conn->socks_proxy.host.name)+1; - snprintf(service.value, service.length+1, "%s@%s", + service.length = serviceptr_length + + strlen(conn->socks_proxy.host.name) + 1; + snprintf(service.value, service.length + 1, "%s@%s", serviceptr, conn->socks_proxy.host.name); gss_major_status = gss_import_name(&gss_minor_status, &service, @@ -196,7 +197,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, socksreq[0] = 1; /* GSS-API subnegotiation version */ socksreq[1] = 1; /* authentication message type */ us_length = htons((short)gss_send_token.length); - memcpy(socksreq+2, &us_length, sizeof(short)); + memcpy(socksreq + 2, &us_length, sizeof(short)); code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); if(code || (4 != written)) { @@ -236,7 +237,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, * +----+------+-----+----------------+ */ - result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); + result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); if(result || (actualread != 4)) { failf(data, "Failed to receive GSS-API authentication response."); gss_release_name(&gss_status, &server); @@ -261,11 +262,11 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_COULDNT_CONNECT; } - memcpy(&us_length, socksreq+2, sizeof(short)); + memcpy(&us_length, socksreq + 2, sizeof(short)); us_length = ntohs(us_length); - gss_recv_token.length=us_length; - gss_recv_token.value=malloc(us_length); + gss_recv_token.length = us_length; + gss_recv_token.value = malloc(us_length); if(!gss_recv_token.value) { failf(data, "Could not allocate memory for GSS-API authentication " @@ -275,8 +276,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_OUT_OF_MEMORY; } - result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, - gss_recv_token.length, &actualread); + result = Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, + gss_recv_token.length, &actualread); if(result || (actualread != us_length)) { failf(data, "Failed to receive GSS-API authentication token."); @@ -312,7 +313,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, failf(data, "Failed to determine user name."); return CURLE_COULDNT_CONNECT; } - user=malloc(gss_send_token.length+1); + user = malloc(gss_send_token.length + 1); if(!user) { gss_delete_sec_context(&gss_status, &gss_context, NULL); gss_release_name(&gss_status, &gss_client_name); @@ -326,7 +327,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_release_buffer(&gss_status, &gss_send_token); infof(data, "SOCKS5 server authencticated user %s with GSS-API.\n",user); free(user); - user=NULL; + user = NULL; /* Do encryption */ socksreq[0] = 1; /* GSS-API subnegotiation version */ @@ -341,7 +342,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_enc = 1; infof(data, "SOCKS5 server supports GSS-API %s data protection.\n", - (gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality")); + (gss_enc == 0)?"no":((gss_enc==1)?"integrity":"confidentiality")); /* force for the moment to no data protection */ gss_enc = 0; /* @@ -376,7 +377,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, */ if(data->set.socks5_gssapi_nec) { us_length = htons((short)1); - memcpy(socksreq+2, &us_length, sizeof(short)); + memcpy(socksreq + 2, &us_length, sizeof(short)); } else { gss_send_token.length = 1; @@ -401,7 +402,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_release_buffer(&gss_status, &gss_send_token); us_length = htons((short)gss_w_token.length); - memcpy(socksreq+2, &us_length, sizeof(short)); + memcpy(socksreq + 2, &us_length, sizeof(short)); } code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); @@ -433,7 +434,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_release_buffer(&gss_status, &gss_w_token); } - result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); + result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); if(result || (actualread != 4)) { failf(data, "Failed to receive GSS-API encryption response."); gss_delete_sec_context(&gss_status, &gss_context, NULL); @@ -455,17 +456,17 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_COULDNT_CONNECT; } - memcpy(&us_length, socksreq+2, sizeof(short)); + memcpy(&us_length, socksreq + 2, sizeof(short)); us_length = ntohs(us_length); - gss_recv_token.length= us_length; - gss_recv_token.value=malloc(gss_recv_token.length); + gss_recv_token.length = us_length; + gss_recv_token.value = malloc(gss_recv_token.length); if(!gss_recv_token.value) { gss_delete_sec_context(&gss_status, &gss_context, NULL); return CURLE_OUT_OF_MEMORY; } - result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, - gss_recv_token.length, &actualread); + result = Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, + gss_recv_token.length, &actualread); if(result || (actualread != us_length)) { failf(data, "Failed to receive GSS-API encryptrion type."); @@ -513,8 +514,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } infof(data, "SOCKS5 access with%s protection granted.\n", - (socksreq[0]==0)?"out GSS-API data": - ((socksreq[0]==1)?" GSS-API integrity":" GSS-API confidentiality")); + (socksreq[0] == 0)?"out GSS-API data": + ((socksreq[0] == 1)?" GSS-API integrity":" GSS-API confidentiality")); conn->socks5_gssapi_enctype = socksreq[0]; if(socksreq[0] == 0) diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index edc73ad..34699d3 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. * Copyright (C) 2009, 2011, Markus Moeller, * * This software is licensed as described in the file COPYING, which @@ -108,7 +108,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, if(!service_name) return CURLE_OUT_OF_MEMORY; snprintf(service_name, service_length + - strlen(conn->socks_proxy.host.name)+2, "%s/%s", + strlen(conn->socks_proxy.host.name) + 2, "%s/%s", service, conn->socks_proxy.host.name); } @@ -199,7 +199,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, socksreq[0] = 1; /* GSS-API subnegotiation version */ socksreq[1] = 1; /* authentication message type */ us_length = htons((short)sspi_send_token.cbBuffer); - memcpy(socksreq+2, &us_length, sizeof(short)); + memcpy(socksreq + 2, &us_length, sizeof(short)); code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); if(code || (4 != written)) { @@ -283,7 +283,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_COULDNT_CONNECT; } - memcpy(&us_length, socksreq+2, sizeof(short)); + memcpy(&us_length, socksreq + 2, sizeof(short)); us_length = ntohs(us_length); sspi_recv_token.cbBuffer = us_length; @@ -341,7 +341,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, gss_enc = 1; infof(data, "SOCKS5 server supports GSS-API %s data protection.\n", - (gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality") ); + (gss_enc == 0)?"no":((gss_enc == 1)?"integrity":"confidentiality") ); /* force to no data protection, avoid encryption/decryption for now */ gss_enc = 0; /* @@ -377,7 +377,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, if(data->set.socks5_gssapi_nec) { us_length = htons((short)1); - memcpy(socksreq+2, &us_length, sizeof(short)); + memcpy(socksreq + 2, &us_length, sizeof(short)); } else { status = s_pSecFn->QueryContextAttributes(&sspi_context, @@ -445,8 +445,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, memcpy((PUCHAR) sspi_send_token.pvBuffer +(int)sspi_w_token[0].cbBuffer, sspi_w_token[1].pvBuffer, sspi_w_token[1].cbBuffer); memcpy((PUCHAR) sspi_send_token.pvBuffer - +sspi_w_token[0].cbBuffer - +sspi_w_token[1].cbBuffer, + + sspi_w_token[0].cbBuffer + + sspi_w_token[1].cbBuffer, sspi_w_token[2].pvBuffer, sspi_w_token[2].cbBuffer); s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); @@ -460,7 +460,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, sspi_w_token[2].cbBuffer = 0; us_length = htons((short)sspi_send_token.cbBuffer); - memcpy(socksreq+2, &us_length, sizeof(short)); + memcpy(socksreq + 2, &us_length, sizeof(short)); } code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); @@ -517,7 +517,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, return CURLE_COULDNT_CONNECT; } - memcpy(&us_length, socksreq+2, sizeof(short)); + memcpy(&us_length, socksreq + 2, sizeof(short)); us_length = ntohs(us_length); sspi_w_token[0].cbBuffer = us_length; @@ -588,8 +588,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, } infof(data, "SOCKS5 access with%s protection granted.\n", - (socksreq[0]==0)?"out GSS-API data": - ((socksreq[0]==1)?" GSS-API integrity":" GSS-API confidentiality")); + (socksreq[0] == 0)?"out GSS-API data": + ((socksreq[0] == 1)?" GSS-API integrity":" GSS-API confidentiality")); /* For later use if encryption is required conn->socks5_gssapi_enctype = socksreq[0]; diff --git a/lib/speedcheck.c b/lib/speedcheck.c index bc15d97..3aeea91 100644 --- a/lib/speedcheck.c +++ b/lib/speedcheck.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -30,45 +30,44 @@ void Curl_speedinit(struct Curl_easy *data) { - memset(&data->state.keeps_speed, 0, sizeof(struct timeval)); + memset(&data->state.keeps_speed, 0, sizeof(struct curltime)); } +/* + * @unittest: 1606 + */ CURLcode Curl_speedcheck(struct Curl_easy *data, - struct timeval now) + struct curltime now) { - if((data->progress.current_speed >= 0) && - data->set.low_speed_time && - (Curl_tvlong(data->state.keeps_speed) != 0) && - (data->progress.current_speed < data->set.low_speed_limit)) { - time_t howlong = Curl_tvdiff(now, data->state.keeps_speed); - time_t nextcheck = (data->set.low_speed_time * 1000) - howlong; + if((data->progress.current_speed >= 0) && data->set.low_speed_time) { + if(data->progress.current_speed < data->set.low_speed_limit) { + if(!data->state.keeps_speed.tv_sec) + /* under the limit at this very moment */ + data->state.keeps_speed = now; + else { + /* how long has it been under the limit */ + timediff_t howlong = Curl_timediff(now, data->state.keeps_speed); - /* We are now below the "low speed limit". If we are below it - for "low speed time" seconds we consider that enough reason - to abort the download. */ - if(nextcheck <= 0) { - /* we have been this slow for long enough, now die */ - failf(data, - "Operation too slow. " - "Less than %ld bytes/sec transferred the last %ld seconds", - data->set.low_speed_limit, - data->set.low_speed_time); - return CURLE_OPERATION_TIMEDOUT; - } - else { - /* wait complete low_speed_time */ - Curl_expire_latest(data, nextcheck); + if(howlong >= data->set.low_speed_time * 1000) { + /* too long */ + failf(data, + "Operation too slow. " + "Less than %ld bytes/sec transferred the last %ld seconds", + data->set.low_speed_limit, + data->set.low_speed_time); + return CURLE_OPERATION_TIMEDOUT; + } + } } + else + /* faster right now */ + data->state.keeps_speed.tv_sec = 0; } - else { - /* we keep up the required speed all right */ - data->state.keeps_speed = now; - if(data->set.low_speed_limit) - /* if there is a low speed limit enabled, we set the expire timer to - make this connection's speed get checked again no later than when - this time is up */ - Curl_expire_latest(data, data->set.low_speed_time*1000); - } + if(data->set.low_speed_limit) + /* if low speed limit is enabled, set the expire timer to make this + connection's speed get checked again in a second */ + Curl_expire(data, 1000, EXPIRE_SPEEDCHECK); + return CURLE_OK; } diff --git a/lib/speedcheck.h b/lib/speedcheck.h index 7dbe3d6..5c2dc9a 100644 --- a/lib/speedcheck.h +++ b/lib/speedcheck.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,6 +28,6 @@ void Curl_speedinit(struct Curl_easy *data); CURLcode Curl_speedcheck(struct Curl_easy *data, - struct timeval now); + struct curltime now); #endif /* HEADER_CURL_SPEEDCHECK_H */ diff --git a/lib/splay.c b/lib/splay.c index 7aa2e4b..69af446 100644 --- a/lib/splay.c +++ b/lib/splay.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1997 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1997 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -37,7 +37,7 @@ * Splay using the key i (which may or may not be in the tree.) The starting * root is t. */ -struct Curl_tree *Curl_splay(struct timeval i, +struct Curl_tree *Curl_splay(struct curltime i, struct Curl_tree *t) { struct Curl_tree N, *l, *r, *y; @@ -97,35 +97,32 @@ struct Curl_tree *Curl_splay(struct timeval i, * * @unittest: 1309 */ -struct Curl_tree *Curl_splayinsert(struct timeval i, +struct Curl_tree *Curl_splayinsert(struct curltime i, struct Curl_tree *t, struct Curl_tree *node) { - static const struct timeval KEY_NOTUSED = {-1, -1}; /* will *NEVER* appear */ + static const struct curltime KEY_NOTUSED = { + (time_t)-1, (unsigned int)-1 + }; /* will *NEVER* appear */ if(node == NULL) return t; if(t != NULL) { t = Curl_splay(i, t); - if(compare(i, t->key)==0) { + if(compare(i, t->key) == 0) { /* There already exists a node in the tree with the very same key. Build - a linked list of nodes. We make the new 'node' struct the new master - node and make the previous node the first one in the 'same' list. */ + a doubly-linked circular list of nodes. We add the new 'node' struct + to the end of this list. */ - node->same = t; - node->key = i; - node->smaller = t->smaller; - node->larger = t->larger; + node->key = KEY_NOTUSED; /* we set the key in the sub node to NOTUSED + to quickly identify this node as a subnode */ + node->samen = t; + node->samep = t->samep; + t->samep->samen = node; + t->samep = node; - t->smaller = node; /* in the sub node for this same key, we use the - smaller pointer to point back to the master - node */ - - t->key = KEY_NOTUSED; /* and we set the key in the sub node to NOTUSED - to quickly identify this node as a subnode */ - - return node; /* new root node */ + return t; /* the root node always stays the same */ } } @@ -145,16 +142,20 @@ struct Curl_tree *Curl_splayinsert(struct timeval i, } node->key = i; - node->same = NULL; /* no identical node (yet) */ + /* no identical nodes (yet), we are the only one in the list of nodes */ + node->samen = node; + node->samep = node; return node; } /* Finds and deletes the best-fit node from the tree. Return a pointer to the - resulting tree. best-fit means the node with the given or lower key */ -struct Curl_tree *Curl_splaygetbest(struct timeval i, + resulting tree. best-fit means the smallest node if it is not larger than + the key */ +struct Curl_tree *Curl_splaygetbest(struct curltime i, struct Curl_tree *t, struct Curl_tree **removed) { + static struct curltime tv_zero = {0, 0}; struct Curl_tree *x; if(!t) { @@ -162,49 +163,36 @@ struct Curl_tree *Curl_splaygetbest(struct timeval i, return NULL; } - t = Curl_splay(i, t); + /* find smallest */ + t = Curl_splay(tv_zero, t); if(compare(i, t->key) < 0) { - /* too big node, try the smaller chain */ - if(t->smaller) - t=Curl_splay(t->smaller->key, t); - else { - /* fail */ - *removed = NULL; - return t; - } + /* even the smallest is too big */ + *removed = NULL; + return t; } - if(compare(i, t->key) >= 0) { /* found it */ - /* FIRST! Check if there is a list with identical keys */ - x = t->same; - if(x) { - /* there is, pick one from the list */ + /* FIRST! Check if there is a list with identical keys */ + x = t->samen; + if(x != t) { + /* there is, pick one from the list */ - /* 'x' is the new root node */ + /* 'x' is the new root node */ - x->key = t->key; - x->larger = t->larger; - x->smaller = t->smaller; - - *removed = t; - return x; /* new root */ - } + x->key = t->key; + x->larger = t->larger; + x->smaller = t->smaller; + x->samep = t->samep; + t->samep->samen = x; - if(t->smaller == NULL) { - x = t->larger; - } - else { - x = Curl_splay(i, t->smaller); - x->larger = t->larger; - } *removed = t; - - return x; - } - else { - *removed = NULL; /* no match */ - return t; /* It wasn't there */ + return x; /* new root */ } + + /* we splayed the tree to the smallest element, there is no smaller */ + x = t->larger; + *removed = t; + + return x; } @@ -223,7 +211,9 @@ int Curl_splayremovebyaddr(struct Curl_tree *t, struct Curl_tree *removenode, struct Curl_tree **newroot) { - static const struct timeval KEY_NOTUSED = {-1, -1}; /* will *NEVER* appear */ + static const struct curltime KEY_NOTUSED = { + (time_t)-1, (unsigned int)-1 + }; /* will *NEVER* appear */ struct Curl_tree *x; if(!t || !removenode) @@ -231,19 +221,17 @@ int Curl_splayremovebyaddr(struct Curl_tree *t, if(compare(KEY_NOTUSED, removenode->key) == 0) { /* Key set to NOTUSED means it is a subnode within a 'same' linked list - and thus we can unlink it easily. The 'smaller' link of a subnode - links to the parent node. */ - if(removenode->smaller == NULL) + and thus we can unlink it easily. */ + if(removenode->samen == removenode) + /* A non-subnode should never be set to KEY_NOTUSED */ return 3; - removenode->smaller->same = removenode->same; - if(removenode->same) - removenode->same->smaller = removenode->smaller; + removenode->samep->samen = removenode->samen; + removenode->samen->samep = removenode->samep; /* Ensures that double-remove gets caught. */ - removenode->smaller = NULL; + removenode->samen = removenode; - /* voila, we're done! */ *newroot = t; /* return the same root */ return 0; } @@ -262,14 +250,16 @@ int Curl_splayremovebyaddr(struct Curl_tree *t, /* Check if there is a list with identical sizes, as then we're trying to remove the root node of a list of nodes with identical keys. */ - x = t->same; - if(x) { + x = t->samen; + if(x != t) { /* 'x' is the new root node, we just make it use the root node's smaller/larger links */ x->key = t->key; x->larger = t->larger; x->smaller = t->smaller; + x->samep = t->samep; + t->samep->samen = x; } else { /* Remove the root node */ diff --git a/lib/splay.h b/lib/splay.h index 427bfc8..4612ec2 100644 --- a/lib/splay.h +++ b/lib/splay.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1997 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1997 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,29 +22,31 @@ * ***************************************************************************/ #include "curl_setup.h" +#include "timeval.h" struct Curl_tree { struct Curl_tree *smaller; /* smaller node */ struct Curl_tree *larger; /* larger node */ - struct Curl_tree *same; /* points to a node with identical key */ - struct timeval key; /* this node's "sort" key */ + struct Curl_tree *samen; /* points to the next node with identical key */ + struct Curl_tree *samep; /* points to the prev node with identical key */ + struct curltime key; /* this node's "sort" key */ void *payload; /* data the splay code doesn't care about */ }; -struct Curl_tree *Curl_splay(struct timeval i, +struct Curl_tree *Curl_splay(struct curltime i, struct Curl_tree *t); -struct Curl_tree *Curl_splayinsert(struct timeval key, +struct Curl_tree *Curl_splayinsert(struct curltime key, struct Curl_tree *t, struct Curl_tree *newnode); #if 0 -struct Curl_tree *Curl_splayremove(struct timeval key, +struct Curl_tree *Curl_splayremove(struct curltime key, struct Curl_tree *t, struct Curl_tree **removed); #endif -struct Curl_tree *Curl_splaygetbest(struct timeval key, +struct Curl_tree *Curl_splaygetbest(struct curltime key, struct Curl_tree *t, struct Curl_tree **removed); @@ -52,8 +54,8 @@ int Curl_splayremovebyaddr(struct Curl_tree *t, struct Curl_tree *removenode, struct Curl_tree **newroot); -#define Curl_splaycomparekeys(i,j) ( ((i.tv_sec) < (j.tv_sec)) ? -1 : \ - ( ((i.tv_sec) > (j.tv_sec)) ? 1 : \ +#define Curl_splaycomparekeys(i,j) ( ((i.tv_sec) < (j.tv_sec)) ? -1 : \ + ( ((i.tv_sec) > (j.tv_sec)) ? 1 : \ ( ((i.tv_usec) < (j.tv_usec)) ? -1 : \ ( ((i.tv_usec) > (j.tv_usec)) ? 1 : 0)))) diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c new file mode 100644 index 0000000..9e66672 --- /dev/null +++ b/lib/ssh-libssh.c @@ -0,0 +1,2737 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 2017 - 2018 Red Hat, Inc. + * + * Authors: Nikos Mavrogiannopoulos, Tomas Mraz, Stanislav Zidek, + * Robert Kolcun, Andreas Schneider + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" + +#ifdef USE_LIBSSH + +#include + +#include +#include + +#ifdef HAVE_FCNTL_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_UTSNAME_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef __VMS +#include +#include +#endif + +#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) +#undef in_addr_t +#define in_addr_t unsigned long +#endif + +#include +#include "urldata.h" +#include "sendf.h" +#include "hostip.h" +#include "progress.h" +#include "transfer.h" +#include "escape.h" +#include "http.h" /* for HTTP proxy tunnel stuff */ +#include "ssh.h" +#include "url.h" +#include "speedcheck.h" +#include "getinfo.h" +#include "strdup.h" +#include "strcase.h" +#include "vtls/vtls.h" +#include "connect.h" +#include "strerror.h" +#include "inet_ntop.h" +#include "parsedate.h" /* for the week day and month names */ +#include "sockaddr.h" /* required for Curl_sockaddr_storage */ +#include "strtoofft.h" +#include "multiif.h" +#include "select.h" +#include "warnless.h" + +/* for permission and open flags */ +#include +#include +#include +#include + +/* The last 3 #include files should be in this order */ +#include "curl_printf.h" +#include "curl_memory.h" +#include "memdebug.h" +#include "curl_path.h" + +/* Local functions: */ +static CURLcode myssh_connect(struct connectdata *conn, bool *done); +static CURLcode myssh_multi_statemach(struct connectdata *conn, + bool *done); +static CURLcode myssh_do_it(struct connectdata *conn, bool *done); + +static CURLcode scp_done(struct connectdata *conn, + CURLcode, bool premature); +static CURLcode scp_doing(struct connectdata *conn, bool *dophase_done); +static CURLcode scp_disconnect(struct connectdata *conn, + bool dead_connection); + +static CURLcode sftp_done(struct connectdata *conn, + CURLcode, bool premature); +static CURLcode sftp_doing(struct connectdata *conn, + bool *dophase_done); +static CURLcode sftp_disconnect(struct connectdata *conn, bool dead); +static +CURLcode sftp_perform(struct connectdata *conn, + bool *connected, + bool *dophase_done); + +static void sftp_quote(struct connectdata *conn); +static void sftp_quote_stat(struct connectdata *conn); + +static int myssh_getsock(struct connectdata *conn, curl_socket_t *sock, + int numsocks); + +static int myssh_perform_getsock(const struct connectdata *conn, + curl_socket_t *sock, + int numsocks); + +static CURLcode myssh_setup_connection(struct connectdata *conn); + +/* + * SCP protocol handler. + */ + +const struct Curl_handler Curl_handler_scp = { + "SCP", /* scheme */ + myssh_setup_connection, /* setup_connection */ + myssh_do_it, /* do_it */ + scp_done, /* done */ + ZERO_NULL, /* do_more */ + myssh_connect, /* connect_it */ + myssh_multi_statemach, /* connecting */ + scp_doing, /* doing */ + myssh_getsock, /* proto_getsock */ + myssh_getsock, /* doing_getsock */ + ZERO_NULL, /* domore_getsock */ + myssh_perform_getsock, /* perform_getsock */ + scp_disconnect, /* disconnect */ + ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ + PORT_SSH, /* defport */ + CURLPROTO_SCP, /* protocol */ + PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY /* flags */ +}; + +/* + * SFTP protocol handler. + */ + +const struct Curl_handler Curl_handler_sftp = { + "SFTP", /* scheme */ + myssh_setup_connection, /* setup_connection */ + myssh_do_it, /* do_it */ + sftp_done, /* done */ + ZERO_NULL, /* do_more */ + myssh_connect, /* connect_it */ + myssh_multi_statemach, /* connecting */ + sftp_doing, /* doing */ + myssh_getsock, /* proto_getsock */ + myssh_getsock, /* doing_getsock */ + ZERO_NULL, /* domore_getsock */ + myssh_perform_getsock, /* perform_getsock */ + sftp_disconnect, /* disconnect */ + ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ + PORT_SSH, /* defport */ + CURLPROTO_SFTP, /* protocol */ + PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION + | PROTOPT_NOURLQUERY /* flags */ +}; + +static CURLcode sftp_error_to_CURLE(int err) +{ + switch(err) { + case SSH_FX_OK: + return CURLE_OK; + + case SSH_FX_NO_SUCH_FILE: + case SSH_FX_NO_SUCH_PATH: + return CURLE_REMOTE_FILE_NOT_FOUND; + + case SSH_FX_PERMISSION_DENIED: + case SSH_FX_WRITE_PROTECT: + return CURLE_REMOTE_ACCESS_DENIED; + + case SSH_FX_FILE_ALREADY_EXISTS: + return CURLE_REMOTE_FILE_EXISTS; + + default: + break; + } + + return CURLE_SSH; +} + +/* + * SSH State machine related code + */ +/* This is the ONLY way to change SSH state! */ +static void state(struct connectdata *conn, sshstate nowstate) +{ + struct ssh_conn *sshc = &conn->proto.sshc; +#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) + /* for debug purposes */ + static const char *const names[] = { + "SSH_STOP", + "SSH_INIT", + "SSH_S_STARTUP", + "SSH_HOSTKEY", + "SSH_AUTHLIST", + "SSH_AUTH_PKEY_INIT", + "SSH_AUTH_PKEY", + "SSH_AUTH_PASS_INIT", + "SSH_AUTH_PASS", + "SSH_AUTH_AGENT_INIT", + "SSH_AUTH_AGENT_LIST", + "SSH_AUTH_AGENT", + "SSH_AUTH_HOST_INIT", + "SSH_AUTH_HOST", + "SSH_AUTH_KEY_INIT", + "SSH_AUTH_KEY", + "SSH_AUTH_GSSAPI", + "SSH_AUTH_DONE", + "SSH_SFTP_INIT", + "SSH_SFTP_REALPATH", + "SSH_SFTP_QUOTE_INIT", + "SSH_SFTP_POSTQUOTE_INIT", + "SSH_SFTP_QUOTE", + "SSH_SFTP_NEXT_QUOTE", + "SSH_SFTP_QUOTE_STAT", + "SSH_SFTP_QUOTE_SETSTAT", + "SSH_SFTP_QUOTE_SYMLINK", + "SSH_SFTP_QUOTE_MKDIR", + "SSH_SFTP_QUOTE_RENAME", + "SSH_SFTP_QUOTE_RMDIR", + "SSH_SFTP_QUOTE_UNLINK", + "SSH_SFTP_QUOTE_STATVFS", + "SSH_SFTP_GETINFO", + "SSH_SFTP_FILETIME", + "SSH_SFTP_TRANS_INIT", + "SSH_SFTP_UPLOAD_INIT", + "SSH_SFTP_CREATE_DIRS_INIT", + "SSH_SFTP_CREATE_DIRS", + "SSH_SFTP_CREATE_DIRS_MKDIR", + "SSH_SFTP_READDIR_INIT", + "SSH_SFTP_READDIR", + "SSH_SFTP_READDIR_LINK", + "SSH_SFTP_READDIR_BOTTOM", + "SSH_SFTP_READDIR_DONE", + "SSH_SFTP_DOWNLOAD_INIT", + "SSH_SFTP_DOWNLOAD_STAT", + "SSH_SFTP_CLOSE", + "SSH_SFTP_SHUTDOWN", + "SSH_SCP_TRANS_INIT", + "SSH_SCP_UPLOAD_INIT", + "SSH_SCP_DOWNLOAD_INIT", + "SSH_SCP_DOWNLOAD", + "SSH_SCP_DONE", + "SSH_SCP_SEND_EOF", + "SSH_SCP_WAIT_EOF", + "SSH_SCP_WAIT_CLOSE", + "SSH_SCP_CHANNEL_FREE", + "SSH_SESSION_DISCONNECT", + "SSH_SESSION_FREE", + "QUIT" + }; + + + if(sshc->state != nowstate) { + infof(conn->data, "SSH %p state change from %s to %s\n", + (void *) sshc, names[sshc->state], names[nowstate]); + } +#endif + + sshc->state = nowstate; +} + +/* Multiple options: + * 1. data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5] is set with an MD5 + * hash (90s style auth, not sure we should have it here) + * 2. data->set.ssh_keyfunc callback is set. Then we do trust on first + * use. We even save on knownhosts if CURLKHSTAT_FINE_ADD_TO_FILE + * is returned by it. + * 3. none of the above. We only accept if it is present on known hosts. + * + * Returns SSH_OK or SSH_ERROR. + */ +static int myssh_is_known(struct connectdata *conn) +{ + int rc; + struct Curl_easy *data = conn->data; + struct ssh_conn *sshc = &conn->proto.sshc; + ssh_key pubkey; + size_t hlen; + unsigned char *hash = NULL; + char *base64 = NULL; + int vstate; + enum curl_khmatch keymatch; + struct curl_khkey foundkey; + curl_sshkeycallback func = + data->set.ssh_keyfunc; + + rc = ssh_get_publickey(sshc->ssh_session, &pubkey); + if(rc != SSH_OK) + return rc; + + if(data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]) { + rc = ssh_get_publickey_hash(pubkey, SSH_PUBLICKEY_HASH_MD5, + &hash, &hlen); + if(rc != SSH_OK) + goto cleanup; + + if(hlen != strlen(data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]) || + memcmp(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5], hash, hlen)) { + rc = SSH_ERROR; + goto cleanup; + } + + rc = SSH_OK; + goto cleanup; + } + + if(data->set.ssl.primary.verifyhost != TRUE) { + rc = SSH_OK; + goto cleanup; + } + + vstate = ssh_is_server_known(sshc->ssh_session); + switch(vstate) { + case SSH_SERVER_KNOWN_OK: + keymatch = CURLKHMATCH_OK; + break; + case SSH_SERVER_FILE_NOT_FOUND: + /* fallthrough */ + case SSH_SERVER_NOT_KNOWN: + keymatch = CURLKHMATCH_MISSING; + break; + default: + keymatch = CURLKHMATCH_MISMATCH; + break; + } + + if(func) { /* use callback to determine action */ + rc = ssh_pki_export_pubkey_base64(pubkey, &base64); + if(rc != SSH_OK) + goto cleanup; + + foundkey.key = base64; + foundkey.len = strlen(base64); + + switch(ssh_key_type(pubkey)) { + case SSH_KEYTYPE_RSA: + foundkey.keytype = CURLKHTYPE_RSA; + break; + case SSH_KEYTYPE_RSA1: + foundkey.keytype = CURLKHTYPE_RSA1; + break; + case SSH_KEYTYPE_ECDSA: + foundkey.keytype = CURLKHTYPE_ECDSA; + break; +#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0,7,0) + case SSH_KEYTYPE_ED25519: + foundkey.keytype = CURLKHTYPE_ED25519; + break; +#endif + case SSH_KEYTYPE_DSS: + foundkey.keytype = CURLKHTYPE_DSS; + break; + default: + rc = SSH_ERROR; + goto cleanup; + } + + /* we don't have anything equivalent to knownkey. Always NULL */ + Curl_set_in_callback(data, true); + rc = func(data, NULL, &foundkey, /* from the remote host */ + keymatch, data->set.ssh_keyfunc_userp); + Curl_set_in_callback(data, false); + + switch(rc) { + case CURLKHSTAT_FINE_ADD_TO_FILE: + rc = ssh_write_knownhost(sshc->ssh_session); + if(rc != SSH_OK) { + goto cleanup; + } + break; + case CURLKHSTAT_FINE: + break; + default: /* REJECT/DEFER */ + rc = SSH_ERROR; + goto cleanup; + } + } + else { + if(keymatch != CURLKHMATCH_OK) { + rc = SSH_ERROR; + goto cleanup; + } + } + rc = SSH_OK; + +cleanup: + if(hash) + ssh_clean_pubkey_hash(&hash); + ssh_key_free(pubkey); + return rc; +} + +#define MOVE_TO_ERROR_STATE(_r) { \ + state(conn, SSH_SESSION_FREE); \ + sshc->actualcode = _r; \ + rc = SSH_ERROR; \ + break; \ +} + +#define MOVE_TO_SFTP_CLOSE_STATE() { \ + state(conn, SSH_SFTP_CLOSE); \ + sshc->actualcode = sftp_error_to_CURLE(sftp_get_error(sshc->sftp_session)); \ + rc = SSH_ERROR; \ + break; \ +} + +#define MOVE_TO_LAST_AUTH \ + if(sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD) { \ + rc = SSH_OK; \ + state(conn, SSH_AUTH_PASS_INIT); \ + break; \ + } \ + else { \ + MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED); \ + } + +#define MOVE_TO_TERTIARY_AUTH \ + if(sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE) { \ + rc = SSH_OK; \ + state(conn, SSH_AUTH_KEY_INIT); \ + break; \ + } \ + else { \ + MOVE_TO_LAST_AUTH; \ + } + +#define MOVE_TO_SECONDARY_AUTH \ + if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) { \ + rc = SSH_OK; \ + state(conn, SSH_AUTH_GSSAPI); \ + break; \ + } \ + else { \ + MOVE_TO_TERTIARY_AUTH; \ + } + +static +int myssh_auth_interactive(struct connectdata *conn) +{ + int rc; + struct ssh_conn *sshc = &conn->proto.sshc; + int nprompts; + +restart: + switch(sshc->kbd_state) { + case 0: + rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL); + if(rc == SSH_AUTH_AGAIN) + return SSH_AGAIN; + + if(rc != SSH_AUTH_INFO) + return SSH_ERROR; + + nprompts = ssh_userauth_kbdint_getnprompts(sshc->ssh_session); + if(nprompts == SSH_ERROR || nprompts != 1) + return SSH_ERROR; + + rc = ssh_userauth_kbdint_setanswer(sshc->ssh_session, 0, conn->passwd); + if(rc < 0) + return SSH_ERROR; + + /* fallthrough */ + case 1: + sshc->kbd_state = 1; + + rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL); + if(rc == SSH_AUTH_AGAIN) + return SSH_AGAIN; + else if(rc == SSH_AUTH_SUCCESS) + rc = SSH_OK; + else if(rc == SSH_AUTH_INFO) { + nprompts = ssh_userauth_kbdint_getnprompts(sshc->ssh_session); + if(nprompts != 0) + return SSH_ERROR; + + sshc->kbd_state = 2; + goto restart; + } + else + rc = SSH_ERROR; + break; + case 2: + sshc->kbd_state = 2; + + rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL); + if(rc == SSH_AUTH_AGAIN) + return SSH_AGAIN; + else if(rc == SSH_AUTH_SUCCESS) + rc = SSH_OK; + else + rc = SSH_ERROR; + + break; + default: + return SSH_ERROR; + } + + sshc->kbd_state = 0; + return rc; +} + +/* + * ssh_statemach_act() runs the SSH state machine as far as it can without + * blocking and without reaching the end. The data the pointer 'block' points + * to will be set to TRUE if the libssh function returns SSH_AGAIN + * meaning it wants to be called again when the socket is ready + */ +static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + struct SSHPROTO *protop = data->req.protop; + struct ssh_conn *sshc = &conn->proto.sshc; + int rc = SSH_NO_ERROR, err; + char *new_readdir_line; + int seekerr = CURL_SEEKFUNC_OK; + const char *err_msg; + *block = 0; /* we're not blocking by default */ + + do { + + switch(sshc->state) { + case SSH_INIT: + sshc->secondCreateDirs = 0; + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_OK; + +#if 0 + ssh_set_log_level(SSH_LOG_PROTOCOL); +#endif + + /* Set libssh to non-blocking, since everything internally is + non-blocking */ + ssh_set_blocking(sshc->ssh_session, 0); + + state(conn, SSH_S_STARTUP); + /* fall-through */ + + case SSH_S_STARTUP: + rc = ssh_connect(sshc->ssh_session); + if(rc == SSH_AGAIN) + break; + + if(rc != SSH_OK) { + failf(data, "Failure establishing ssh session"); + MOVE_TO_ERROR_STATE(CURLE_FAILED_INIT); + } + + state(conn, SSH_HOSTKEY); + + /* fall-through */ + case SSH_HOSTKEY: + + rc = myssh_is_known(conn); + if(rc != SSH_OK) { + MOVE_TO_ERROR_STATE(CURLE_PEER_FAILED_VERIFICATION); + } + + state(conn, SSH_AUTHLIST); + /* fall through */ + case SSH_AUTHLIST:{ + sshc->authed = FALSE; + + rc = ssh_userauth_none(sshc->ssh_session, NULL); + if(rc == SSH_AUTH_AGAIN) { + rc = SSH_AGAIN; + break; + } + + if(rc == SSH_AUTH_SUCCESS) { + sshc->authed = TRUE; + infof(data, "Authenticated with none\n"); + state(conn, SSH_AUTH_DONE); + break; + } + else if(rc == SSH_AUTH_ERROR) { + MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED); + } + + sshc->auth_methods = ssh_userauth_list(sshc->ssh_session, NULL); + if(sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY) { + state(conn, SSH_AUTH_PKEY_INIT); + } + else if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) { + state(conn, SSH_AUTH_GSSAPI); + } + else if(sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE) { + state(conn, SSH_AUTH_KEY_INIT); + } + else if(sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD) { + state(conn, SSH_AUTH_PASS_INIT); + } + else { /* unsupported authentication method */ + MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED); + } + + break; + } + case SSH_AUTH_PKEY_INIT: + if(!(data->set.ssh_auth_types & CURLSSH_AUTH_PUBLICKEY)) { + MOVE_TO_SECONDARY_AUTH; + } + + /* Two choices, (1) private key was given on CMD, + * (2) use the "default" keys. */ + if(data->set.str[STRING_SSH_PRIVATE_KEY]) { + if(sshc->pubkey && !data->set.ssl.key_passwd) { + rc = ssh_userauth_try_publickey(sshc->ssh_session, NULL, + sshc->pubkey); + if(rc == SSH_AUTH_AGAIN) { + rc = SSH_AGAIN; + break; + } + + if(rc != SSH_OK) { + MOVE_TO_SECONDARY_AUTH; + } + } + + rc = ssh_pki_import_privkey_file(data-> + set.str[STRING_SSH_PRIVATE_KEY], + data->set.ssl.key_passwd, NULL, + NULL, &sshc->privkey); + if(rc != SSH_OK) { + failf(data, "Could not load private key file %s", + data->set.str[STRING_SSH_PRIVATE_KEY]); + break; + } + + state(conn, SSH_AUTH_PKEY); + break; + + } + else { + infof(data, "Authentication using SSH public key file\n"); + + rc = ssh_userauth_publickey_auto(sshc->ssh_session, NULL, + data->set.ssl.key_passwd); + if(rc == SSH_AUTH_AGAIN) { + rc = SSH_AGAIN; + break; + } + if(rc == SSH_AUTH_SUCCESS) { + rc = SSH_OK; + sshc->authed = TRUE; + infof(data, "Completed public key authentication\n"); + state(conn, SSH_AUTH_DONE); + break; + } + + MOVE_TO_SECONDARY_AUTH; + } + break; + case SSH_AUTH_PKEY: + rc = ssh_userauth_publickey(sshc->ssh_session, NULL, sshc->privkey); + if(rc == SSH_AUTH_AGAIN) { + rc = SSH_AGAIN; + break; + } + + if(rc == SSH_AUTH_SUCCESS) { + sshc->authed = TRUE; + infof(data, "Completed public key authentication\n"); + state(conn, SSH_AUTH_DONE); + break; + } + else { + infof(data, "Failed public key authentication (rc: %d)\n", rc); + MOVE_TO_SECONDARY_AUTH; + } + break; + + case SSH_AUTH_GSSAPI: + if(!(data->set.ssh_auth_types & CURLSSH_AUTH_GSSAPI)) { + MOVE_TO_TERTIARY_AUTH; + } + + rc = ssh_userauth_gssapi(sshc->ssh_session); + if(rc == SSH_AUTH_AGAIN) { + rc = SSH_AGAIN; + break; + } + + if(rc == SSH_AUTH_SUCCESS) { + rc = SSH_OK; + sshc->authed = TRUE; + infof(data, "Completed gssapi authentication\n"); + state(conn, SSH_AUTH_DONE); + break; + } + + MOVE_TO_TERTIARY_AUTH; + break; + + case SSH_AUTH_KEY_INIT: + if(data->set.ssh_auth_types & CURLSSH_AUTH_KEYBOARD) { + state(conn, SSH_AUTH_KEY); + } + else { + MOVE_TO_LAST_AUTH; + } + break; + + case SSH_AUTH_KEY: + + /* Authentication failed. Continue with keyboard-interactive now. */ + rc = myssh_auth_interactive(conn); + if(rc == SSH_AGAIN) { + break; + } + if(rc == SSH_OK) { + sshc->authed = TRUE; + infof(data, "completed keyboard interactive authentication\n"); + } + state(conn, SSH_AUTH_DONE); + break; + + case SSH_AUTH_PASS_INIT: + if(!(data->set.ssh_auth_types & CURLSSH_AUTH_PASSWORD)) { + /* Host key authentication is intentionally not implemented */ + MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED); + } + state(conn, SSH_AUTH_PASS); + /* fall through */ + + case SSH_AUTH_PASS: + rc = ssh_userauth_password(sshc->ssh_session, NULL, conn->passwd); + if(rc == SSH_AUTH_AGAIN) { + rc = SSH_AGAIN; + break; + } + + if(rc == SSH_AUTH_SUCCESS) { + sshc->authed = TRUE; + infof(data, "Completed password authentication\n"); + state(conn, SSH_AUTH_DONE); + } + else { + MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED); + } + break; + + case SSH_AUTH_DONE: + if(!sshc->authed) { + failf(data, "Authentication failure"); + MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED); + break; + } + + /* + * At this point we have an authenticated ssh session. + */ + infof(data, "Authentication complete\n"); + + Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSH is connected */ + + conn->sockfd = ssh_get_fd(sshc->ssh_session); + conn->writesockfd = CURL_SOCKET_BAD; + + if(conn->handler->protocol == CURLPROTO_SFTP) { + state(conn, SSH_SFTP_INIT); + break; + } + infof(data, "SSH CONNECT phase done\n"); + state(conn, SSH_STOP); + break; + + case SSH_SFTP_INIT: + ssh_set_blocking(sshc->ssh_session, 1); + + sshc->sftp_session = sftp_new(sshc->ssh_session); + if(!sshc->sftp_session) { + failf(data, "Failure initializing sftp session: %s", + ssh_get_error(sshc->ssh_session)); + MOVE_TO_ERROR_STATE(CURLE_COULDNT_CONNECT); + break; + } + + rc = sftp_init(sshc->sftp_session); + if(rc != SSH_OK) { + rc = sftp_get_error(sshc->sftp_session); + failf(data, "Failure initializing sftp session: %s", + ssh_get_error(sshc->ssh_session)); + MOVE_TO_ERROR_STATE(sftp_error_to_CURLE(rc)); + break; + } + state(conn, SSH_SFTP_REALPATH); + /* fall through */ + case SSH_SFTP_REALPATH: + /* + * Get the "home" directory + */ + sshc->homedir = sftp_canonicalize_path(sshc->sftp_session, "."); + if(sshc->homedir == NULL) { + MOVE_TO_ERROR_STATE(CURLE_COULDNT_CONNECT); + } + conn->data->state.most_recent_ftp_entrypath = sshc->homedir; + + /* This is the last step in the SFTP connect phase. Do note that while + we get the homedir here, we get the "workingpath" in the DO action + since the homedir will remain the same between request but the + working path will not. */ + DEBUGF(infof(data, "SSH CONNECT phase done\n")); + state(conn, SSH_STOP); + break; + + case SSH_SFTP_QUOTE_INIT: + + result = Curl_getworkingpath(conn, sshc->homedir, &protop->path); + if(result) { + sshc->actualcode = result; + state(conn, SSH_STOP); + break; + } + + if(data->set.quote) { + infof(data, "Sending quote commands\n"); + sshc->quote_item = data->set.quote; + state(conn, SSH_SFTP_QUOTE); + } + else { + state(conn, SSH_SFTP_GETINFO); + } + break; + + case SSH_SFTP_POSTQUOTE_INIT: + if(data->set.postquote) { + infof(data, "Sending quote commands\n"); + sshc->quote_item = data->set.postquote; + state(conn, SSH_SFTP_QUOTE); + } + else { + state(conn, SSH_STOP); + } + break; + + case SSH_SFTP_QUOTE: + /* Send any quote commands */ + sftp_quote(conn); + break; + + case SSH_SFTP_NEXT_QUOTE: + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + + sshc->quote_item = sshc->quote_item->next; + + if(sshc->quote_item) { + state(conn, SSH_SFTP_QUOTE); + } + else { + if(sshc->nextstate != SSH_NO_STATE) { + state(conn, sshc->nextstate); + sshc->nextstate = SSH_NO_STATE; + } + else { + state(conn, SSH_SFTP_GETINFO); + } + } + break; + + case SSH_SFTP_QUOTE_STAT: + sftp_quote_stat(conn); + break; + + case SSH_SFTP_QUOTE_SETSTAT: + rc = sftp_setstat(sshc->sftp_session, sshc->quote_path2, + sshc->quote_attrs); + if(rc != 0 && !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + failf(data, "Attempt to set SFTP stats failed: %s", + ssh_get_error(sshc->ssh_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + /* sshc->actualcode = sftp_error_to_CURLE(err); + * we do not send the actual error; we return + * the error the libssh2 backend is returning */ + break; + } + state(conn, SSH_SFTP_NEXT_QUOTE); + break; + + case SSH_SFTP_QUOTE_SYMLINK: + rc = sftp_symlink(sshc->sftp_session, sshc->quote_path2, + sshc->quote_path1); + if(rc != 0 && !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + failf(data, "symlink command failed: %s", + ssh_get_error(sshc->ssh_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + break; + } + state(conn, SSH_SFTP_NEXT_QUOTE); + break; + + case SSH_SFTP_QUOTE_MKDIR: + rc = sftp_mkdir(sshc->sftp_session, sshc->quote_path1, + (mode_t)data->set.new_directory_perms); + if(rc != 0 && !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + failf(data, "mkdir command failed: %s", + ssh_get_error(sshc->ssh_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + break; + } + state(conn, SSH_SFTP_NEXT_QUOTE); + break; + + case SSH_SFTP_QUOTE_RENAME: + rc = sftp_rename(sshc->sftp_session, sshc->quote_path1, + sshc->quote_path2); + if(rc != 0 && !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + failf(data, "rename command failed: %s", + ssh_get_error(sshc->ssh_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + break; + } + state(conn, SSH_SFTP_NEXT_QUOTE); + break; + + case SSH_SFTP_QUOTE_RMDIR: + rc = sftp_rmdir(sshc->sftp_session, sshc->quote_path1); + if(rc != 0 && !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + failf(data, "rmdir command failed: %s", + ssh_get_error(sshc->ssh_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + break; + } + state(conn, SSH_SFTP_NEXT_QUOTE); + break; + + case SSH_SFTP_QUOTE_UNLINK: + rc = sftp_unlink(sshc->sftp_session, sshc->quote_path1); + if(rc != 0 && !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + failf(data, "rm command failed: %s", + ssh_get_error(sshc->ssh_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + break; + } + state(conn, SSH_SFTP_NEXT_QUOTE); + break; + + case SSH_SFTP_QUOTE_STATVFS: + { + sftp_statvfs_t statvfs; + + statvfs = sftp_statvfs(sshc->sftp_session, sshc->quote_path1); + if(!statvfs && !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + failf(data, "statvfs command failed: %s", + ssh_get_error(sshc->ssh_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + break; + } + else if(statvfs) { + char *tmp = aprintf("statvfs:\n" + "f_bsize: %llu\n" "f_frsize: %llu\n" + "f_blocks: %llu\n" "f_bfree: %llu\n" + "f_bavail: %llu\n" "f_files: %llu\n" + "f_ffree: %llu\n" "f_favail: %llu\n" + "f_fsid: %llu\n" "f_flag: %llu\n" + "f_namemax: %llu\n", + statvfs->f_bsize, statvfs->f_frsize, + statvfs->f_blocks, statvfs->f_bfree, + statvfs->f_bavail, statvfs->f_files, + statvfs->f_ffree, statvfs->f_favail, + statvfs->f_fsid, statvfs->f_flag, + statvfs->f_namemax); + sftp_statvfs_free(statvfs); + + if(!tmp) { + result = CURLE_OUT_OF_MEMORY; + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + break; + } + + result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp)); + free(tmp); + if(result) { + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = result; + } + } + state(conn, SSH_SFTP_NEXT_QUOTE); + break; + } + + case SSH_SFTP_GETINFO: + if(data->set.get_filetime) { + state(conn, SSH_SFTP_FILETIME); + } + else { + state(conn, SSH_SFTP_TRANS_INIT); + } + break; + + case SSH_SFTP_FILETIME: + { + sftp_attributes attrs; + + attrs = sftp_stat(sshc->sftp_session, protop->path); + if(attrs != 0) { + data->info.filetime = attrs->mtime; + sftp_attributes_free(attrs); + } + + state(conn, SSH_SFTP_TRANS_INIT); + break; + } + + case SSH_SFTP_TRANS_INIT: + if(data->set.upload) + state(conn, SSH_SFTP_UPLOAD_INIT); + else { + if(protop->path[strlen(protop->path)-1] == '/') + state(conn, SSH_SFTP_READDIR_INIT); + else + state(conn, SSH_SFTP_DOWNLOAD_INIT); + } + break; + + case SSH_SFTP_UPLOAD_INIT: + { + int flags; + + if(data->state.resume_from != 0) { + sftp_attributes attrs; + + if(data->state.resume_from < 0) { + attrs = sftp_stat(sshc->sftp_session, protop->path); + if(attrs != 0) { + curl_off_t size = attrs->size; + if(size < 0) { + failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size); + MOVE_TO_ERROR_STATE(CURLE_BAD_DOWNLOAD_RESUME); + } + data->state.resume_from = attrs->size; + + sftp_attributes_free(attrs); + } + else { + data->state.resume_from = 0; + } + } + } + + if(data->set.ftp_append) + /* Try to open for append, but create if nonexisting */ + flags = O_WRONLY|O_CREAT|O_APPEND; + else if(data->state.resume_from > 0) + /* If we have restart position then open for append */ + flags = O_WRONLY|O_APPEND; + else + /* Clear file before writing (normal behaviour) */ + flags = O_WRONLY|O_APPEND|O_CREAT|O_TRUNC; + + if(sshc->sftp_file) + sftp_close(sshc->sftp_file); + sshc->sftp_file = + sftp_open(sshc->sftp_session, protop->path, + flags, (mode_t)data->set.new_file_perms); + if(!sshc->sftp_file) { + err = sftp_get_error(sshc->sftp_session); + + if(((err == SSH_FX_NO_SUCH_FILE || err == SSH_FX_FAILURE || + err == SSH_FX_NO_SUCH_PATH)) && + (data->set.ftp_create_missing_dirs && + (strlen(protop->path) > 1))) { + /* try to create the path remotely */ + rc = 0; + sshc->secondCreateDirs = 1; + state(conn, SSH_SFTP_CREATE_DIRS_INIT); + break; + } + else { + MOVE_TO_SFTP_CLOSE_STATE(); + } + } + + /* If we have a restart point then we need to seek to the correct + position. */ + if(data->state.resume_from > 0) { + /* Let's read off the proper amount of bytes from the input. */ + if(conn->seek_func) { + Curl_set_in_callback(data, true); + seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, + SEEK_SET); + Curl_set_in_callback(data, false); + } + + if(seekerr != CURL_SEEKFUNC_OK) { + curl_off_t passed = 0; + + if(seekerr != CURL_SEEKFUNC_CANTSEEK) { + failf(data, "Could not seek stream"); + return CURLE_FTP_COULDNT_USE_REST; + } + /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ + do { + size_t readthisamountnow = + (data->state.resume_from - passed > data->set.buffer_size) ? + (size_t)data->set.buffer_size : + curlx_sotouz(data->state.resume_from - passed); + + size_t actuallyread = + data->state.fread_func(data->state.buffer, 1, + readthisamountnow, data->state.in); + + passed += actuallyread; + if((actuallyread == 0) || (actuallyread > readthisamountnow)) { + /* this checks for greater-than only to make sure that the + CURL_READFUNC_ABORT return code still aborts */ + failf(data, "Failed to read data"); + MOVE_TO_ERROR_STATE(CURLE_FTP_COULDNT_USE_REST); + } + } while(passed < data->state.resume_from); + } + + /* now, decrease the size of the read */ + if(data->state.infilesize > 0) { + data->state.infilesize -= data->state.resume_from; + data->req.size = data->state.infilesize; + Curl_pgrsSetUploadSize(data, data->state.infilesize); + } + + rc = sftp_seek64(sshc->sftp_file, data->state.resume_from); + if(rc != 0) { + MOVE_TO_SFTP_CLOSE_STATE(); + } + } + if(data->state.infilesize > 0) { + data->req.size = data->state.infilesize; + Curl_pgrsSetUploadSize(data, data->state.infilesize); + } + /* upload data */ + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL); + + /* not set by Curl_setup_transfer to preserve keepon bits */ + conn->sockfd = conn->writesockfd; + + /* store this original bitmask setup to use later on if we can't + figure out a "real" bitmask */ + sshc->orig_waitfor = data->req.keepon; + + /* we want to use the _sending_ function even when the socket turns + out readable as the underlying libssh sftp send function will deal + with both accordingly */ + conn->cselect_bits = CURL_CSELECT_OUT; + + /* since we don't really wait for anything at this point, we want the + state machine to move on as soon as possible so we set a very short + timeout here */ + Curl_expire(data, 0, EXPIRE_RUN_NOW); + + state(conn, SSH_STOP); + break; + } + + case SSH_SFTP_CREATE_DIRS_INIT: + if(strlen(protop->path) > 1) { + sshc->slash_pos = protop->path + 1; /* ignore the leading '/' */ + state(conn, SSH_SFTP_CREATE_DIRS); + } + else { + state(conn, SSH_SFTP_UPLOAD_INIT); + } + break; + + case SSH_SFTP_CREATE_DIRS: + sshc->slash_pos = strchr(sshc->slash_pos, '/'); + if(sshc->slash_pos) { + *sshc->slash_pos = 0; + + infof(data, "Creating directory '%s'\n", protop->path); + state(conn, SSH_SFTP_CREATE_DIRS_MKDIR); + break; + } + state(conn, SSH_SFTP_UPLOAD_INIT); + break; + + case SSH_SFTP_CREATE_DIRS_MKDIR: + /* 'mode' - parameter is preliminary - default to 0644 */ + rc = sftp_mkdir(sshc->sftp_session, protop->path, + (mode_t)data->set.new_directory_perms); + *sshc->slash_pos = '/'; + ++sshc->slash_pos; + if(rc < 0) { + /* + * Abort if failure wasn't that the dir already exists or the + * permission was denied (creation might succeed further down the + * path) - retry on unspecific FAILURE also + */ + err = sftp_get_error(sshc->sftp_session); + if((err != SSH_FX_FILE_ALREADY_EXISTS) && + (err != SSH_FX_FAILURE) && + (err != SSH_FX_PERMISSION_DENIED)) { + MOVE_TO_SFTP_CLOSE_STATE(); + } + rc = 0; /* clear rc and continue */ + } + state(conn, SSH_SFTP_CREATE_DIRS); + break; + + case SSH_SFTP_READDIR_INIT: + Curl_pgrsSetDownloadSize(data, -1); + if(data->set.opt_no_body) { + state(conn, SSH_STOP); + break; + } + + /* + * This is a directory that we are trying to get, so produce a directory + * listing + */ + sshc->sftp_dir = sftp_opendir(sshc->sftp_session, + protop->path); + if(!sshc->sftp_dir) { + failf(data, "Could not open directory for reading: %s", + ssh_get_error(sshc->ssh_session)); + MOVE_TO_SFTP_CLOSE_STATE(); + } + state(conn, SSH_SFTP_READDIR); + break; + + case SSH_SFTP_READDIR: + + if(sshc->readdir_attrs) + sftp_attributes_free(sshc->readdir_attrs); + + sshc->readdir_attrs = sftp_readdir(sshc->sftp_session, sshc->sftp_dir); + if(sshc->readdir_attrs) { + sshc->readdir_filename = sshc->readdir_attrs->name; + sshc->readdir_longentry = sshc->readdir_attrs->longname; + sshc->readdir_len = (int)strlen(sshc->readdir_filename); + + if(data->set.ftp_list_only) { + char *tmpLine; + + tmpLine = aprintf("%s\n", sshc->readdir_filename); + if(tmpLine == NULL) { + state(conn, SSH_SFTP_CLOSE); + sshc->actualcode = CURLE_OUT_OF_MEMORY; + break; + } + result = Curl_client_write(conn, CLIENTWRITE_BODY, + tmpLine, sshc->readdir_len + 1); + free(tmpLine); + + if(result) { + state(conn, SSH_STOP); + break; + } + /* since this counts what we send to the client, we include the + newline in this counter */ + data->req.bytecount += sshc->readdir_len + 1; + + /* output debug output if that is requested */ + if(data->set.verbose) { + Curl_debug(data, CURLINFO_DATA_OUT, + (char *)sshc->readdir_filename, + sshc->readdir_len, conn); + } + } + else { + sshc->readdir_currLen = (int)strlen(sshc->readdir_longentry); + sshc->readdir_totalLen = 80 + sshc->readdir_currLen; + sshc->readdir_line = calloc(sshc->readdir_totalLen, 1); + if(!sshc->readdir_line) { + state(conn, SSH_SFTP_CLOSE); + sshc->actualcode = CURLE_OUT_OF_MEMORY; + break; + } + + memcpy(sshc->readdir_line, sshc->readdir_longentry, + sshc->readdir_currLen); + if((sshc->readdir_attrs->flags & SSH_FILEXFER_ATTR_PERMISSIONS) && + ((sshc->readdir_attrs->permissions & S_IFMT) == + S_IFLNK)) { + sshc->readdir_linkPath = malloc(PATH_MAX + 1); + if(sshc->readdir_linkPath == NULL) { + state(conn, SSH_SFTP_CLOSE); + sshc->actualcode = CURLE_OUT_OF_MEMORY; + break; + } + + snprintf(sshc->readdir_linkPath, PATH_MAX, "%s%s", protop->path, + sshc->readdir_filename); + + state(conn, SSH_SFTP_READDIR_LINK); + break; + } + state(conn, SSH_SFTP_READDIR_BOTTOM); + break; + } + } + else if(sshc->readdir_attrs == NULL && sftp_dir_eof(sshc->sftp_dir)) { + state(conn, SSH_SFTP_READDIR_DONE); + break; + } + else { + failf(data, "Could not open remote file for reading: %s", + ssh_get_error(sshc->ssh_session)); + MOVE_TO_SFTP_CLOSE_STATE(); + break; + } + break; + + case SSH_SFTP_READDIR_LINK: + if(sshc->readdir_link_attrs) + sftp_attributes_free(sshc->readdir_link_attrs); + + sshc->readdir_link_attrs = sftp_lstat(sshc->sftp_session, + sshc->readdir_linkPath); + if(sshc->readdir_link_attrs == 0) { + failf(data, "Could not read symlink for reading: %s", + ssh_get_error(sshc->ssh_session)); + MOVE_TO_SFTP_CLOSE_STATE(); + } + + if(sshc->readdir_link_attrs->name == NULL) { + sshc->readdir_tmp = sftp_readlink(sshc->sftp_session, + sshc->readdir_linkPath); + if(sshc->readdir_filename == NULL) + sshc->readdir_len = 0; + else + sshc->readdir_len = (int)strlen(sshc->readdir_tmp); + sshc->readdir_longentry = NULL; + sshc->readdir_filename = sshc->readdir_tmp; + } + else { + sshc->readdir_len = (int)strlen(sshc->readdir_link_attrs->name); + sshc->readdir_filename = sshc->readdir_link_attrs->name; + sshc->readdir_longentry = sshc->readdir_link_attrs->longname; + } + + Curl_safefree(sshc->readdir_linkPath); + + /* get room for the filename and extra output */ + sshc->readdir_totalLen += 4 + sshc->readdir_len; + new_readdir_line = Curl_saferealloc(sshc->readdir_line, + sshc->readdir_totalLen); + if(!new_readdir_line) { + sshc->readdir_line = NULL; + state(conn, SSH_SFTP_CLOSE); + sshc->actualcode = CURLE_OUT_OF_MEMORY; + break; + } + sshc->readdir_line = new_readdir_line; + + sshc->readdir_currLen += snprintf(sshc->readdir_line + + sshc->readdir_currLen, + sshc->readdir_totalLen - + sshc->readdir_currLen, + " -> %s", + sshc->readdir_filename); + + sftp_attributes_free(sshc->readdir_link_attrs); + sshc->readdir_link_attrs = NULL; + sshc->readdir_filename = NULL; + sshc->readdir_longentry = NULL; + + state(conn, SSH_SFTP_READDIR_BOTTOM); + /* fall through */ + case SSH_SFTP_READDIR_BOTTOM: + sshc->readdir_currLen += snprintf(sshc->readdir_line + + sshc->readdir_currLen, + sshc->readdir_totalLen - + sshc->readdir_currLen, "\n"); + result = Curl_client_write(conn, CLIENTWRITE_BODY, + sshc->readdir_line, + sshc->readdir_currLen); + + if(!result) { + + /* output debug output if that is requested */ + if(data->set.verbose) { + Curl_debug(data, CURLINFO_DATA_OUT, sshc->readdir_line, + sshc->readdir_currLen, conn); + } + data->req.bytecount += sshc->readdir_currLen; + } + Curl_safefree(sshc->readdir_line); + ssh_string_free_char(sshc->readdir_tmp); + sshc->readdir_tmp = NULL; + + if(result) { + state(conn, SSH_STOP); + } + else + state(conn, SSH_SFTP_READDIR); + break; + + case SSH_SFTP_READDIR_DONE: + sftp_closedir(sshc->sftp_dir); + sshc->sftp_dir = NULL; + + /* no data to transfer */ + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); + state(conn, SSH_STOP); + break; + + case SSH_SFTP_DOWNLOAD_INIT: + /* + * Work on getting the specified file + */ + if(sshc->sftp_file) + sftp_close(sshc->sftp_file); + + sshc->sftp_file = sftp_open(sshc->sftp_session, protop->path, + O_RDONLY, (mode_t)data->set.new_file_perms); + if(!sshc->sftp_file) { + failf(data, "Could not open remote file for reading: %s", + ssh_get_error(sshc->ssh_session)); + + MOVE_TO_SFTP_CLOSE_STATE(); + } + + state(conn, SSH_SFTP_DOWNLOAD_STAT); + break; + + case SSH_SFTP_DOWNLOAD_STAT: + { + sftp_attributes attrs; + curl_off_t size; + + attrs = sftp_fstat(sshc->sftp_file); + if(!attrs || + !(attrs->flags & SSH_FILEXFER_ATTR_SIZE) || + (attrs->size == 0)) { + /* + * sftp_fstat didn't return an error, so maybe the server + * just doesn't support stat() + * OR the server doesn't return a file size with a stat() + * OR file size is 0 + */ + data->req.size = -1; + data->req.maxdownload = -1; + Curl_pgrsSetDownloadSize(data, -1); + size = 0; + } + else { + size = attrs->size; + + sftp_attributes_free(attrs); + + if(size < 0) { + failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size); + return CURLE_BAD_DOWNLOAD_RESUME; + } + if(conn->data->state.use_range) { + curl_off_t from, to; + char *ptr; + char *ptr2; + CURLofft to_t; + CURLofft from_t; + + from_t = curlx_strtoofft(conn->data->state.range, &ptr, 0, &from); + if(from_t == CURL_OFFT_FLOW) { + return CURLE_RANGE_ERROR; + } + while(*ptr && (ISSPACE(*ptr) || (*ptr == '-'))) + ptr++; + to_t = curlx_strtoofft(ptr, &ptr2, 0, &to); + if(to_t == CURL_OFFT_FLOW) { + return CURLE_RANGE_ERROR; + } + if((to_t == CURL_OFFT_INVAL) /* no "to" value given */ + || (to >= size)) { + to = size - 1; + } + if(from_t) { + /* from is relative to end of file */ + from = size - to; + to = size - 1; + } + if(from > size) { + failf(data, "Offset (%" + CURL_FORMAT_CURL_OFF_T ") was beyond file size (%" + CURL_FORMAT_CURL_OFF_T ")", from, size); + return CURLE_BAD_DOWNLOAD_RESUME; + } + if(from > to) { + from = to; + size = 0; + } + else { + size = to - from + 1; + } + + rc = sftp_seek64(sshc->sftp_file, from); + if(rc != 0) { + MOVE_TO_SFTP_CLOSE_STATE(); + } + } + data->req.size = size; + data->req.maxdownload = size; + Curl_pgrsSetDownloadSize(data, size); + } + + /* We can resume if we can seek to the resume position */ + if(data->state.resume_from) { + if(data->state.resume_from < 0) { + /* We're supposed to download the last abs(from) bytes */ + if((curl_off_t)size < -data->state.resume_from) { + failf(data, "Offset (%" + CURL_FORMAT_CURL_OFF_T ") was beyond file size (%" + CURL_FORMAT_CURL_OFF_T ")", + data->state.resume_from, size); + return CURLE_BAD_DOWNLOAD_RESUME; + } + /* download from where? */ + data->state.resume_from += size; + } + else { + if((curl_off_t)size < data->state.resume_from) { + failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T + ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")", + data->state.resume_from, size); + return CURLE_BAD_DOWNLOAD_RESUME; + } + } + /* Does a completed file need to be seeked and started or closed ? */ + /* Now store the number of bytes we are expected to download */ + data->req.size = size - data->state.resume_from; + data->req.maxdownload = size - data->state.resume_from; + Curl_pgrsSetDownloadSize(data, + size - data->state.resume_from); + + rc = sftp_seek64(sshc->sftp_file, data->state.resume_from); + if(rc != 0) { + MOVE_TO_SFTP_CLOSE_STATE(); + } + } + } + + /* Setup the actual download */ + if(data->req.size == 0) { + /* no data to transfer */ + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); + infof(data, "File already completely downloaded\n"); + state(conn, SSH_STOP); + break; + } + Curl_setup_transfer(conn, FIRSTSOCKET, data->req.size, + FALSE, NULL, -1, NULL); + + /* not set by Curl_setup_transfer to preserve keepon bits */ + conn->writesockfd = conn->sockfd; + + /* we want to use the _receiving_ function even when the socket turns + out writableable as the underlying libssh recv function will deal + with both accordingly */ + conn->cselect_bits = CURL_CSELECT_IN; + + if(result) { + /* this should never occur; the close state should be entered + at the time the error occurs */ + state(conn, SSH_SFTP_CLOSE); + sshc->actualcode = result; + } + else { + sshc->sftp_recv_state = 0; + state(conn, SSH_STOP); + } + break; + + case SSH_SFTP_CLOSE: + if(sshc->sftp_file) { + sftp_close(sshc->sftp_file); + sshc->sftp_file = NULL; + } + Curl_safefree(protop->path); + + DEBUGF(infof(data, "SFTP DONE done\n")); + + /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT + After nextstate is executed, the control should come back to + SSH_SFTP_CLOSE to pass the correct result back */ + if(sshc->nextstate != SSH_NO_STATE && + sshc->nextstate != SSH_SFTP_CLOSE) { + state(conn, sshc->nextstate); + sshc->nextstate = SSH_SFTP_CLOSE; + } + else { + state(conn, SSH_STOP); + result = sshc->actualcode; + } + break; + + case SSH_SFTP_SHUTDOWN: + /* during times we get here due to a broken transfer and then the + sftp_handle might not have been taken down so make sure that is done + before we proceed */ + + if(sshc->sftp_file) { + sftp_close(sshc->sftp_file); + sshc->sftp_file = NULL; + } + + if(sshc->sftp_session) { + sftp_free(sshc->sftp_session); + sshc->sftp_session = NULL; + } + + Curl_safefree(sshc->homedir); + conn->data->state.most_recent_ftp_entrypath = NULL; + + state(conn, SSH_SESSION_DISCONNECT); + break; + + + case SSH_SCP_TRANS_INIT: + result = Curl_getworkingpath(conn, sshc->homedir, &protop->path); + if(result) { + sshc->actualcode = result; + state(conn, SSH_STOP); + break; + } + + /* Functions from the SCP subsystem cannot handle/return SSH_AGAIN */ + ssh_set_blocking(sshc->ssh_session, 1); + + if(data->set.upload) { + if(data->state.infilesize < 0) { + failf(data, "SCP requires a known file size for upload"); + sshc->actualcode = CURLE_UPLOAD_FAILED; + MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED); + } + + sshc->scp_session = + ssh_scp_new(sshc->ssh_session, SSH_SCP_WRITE, protop->path); + state(conn, SSH_SCP_UPLOAD_INIT); + } + else { + sshc->scp_session = + ssh_scp_new(sshc->ssh_session, SSH_SCP_READ, protop->path); + state(conn, SSH_SCP_DOWNLOAD_INIT); + } + + if(!sshc->scp_session) { + err_msg = ssh_get_error(sshc->ssh_session); + failf(conn->data, "%s", err_msg); + MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED); + } + + break; + + case SSH_SCP_UPLOAD_INIT: + + rc = ssh_scp_init(sshc->scp_session); + if(rc != SSH_OK) { + err_msg = ssh_get_error(sshc->ssh_session); + failf(conn->data, "%s", err_msg); + MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED); + } + + rc = ssh_scp_push_file(sshc->scp_session, protop->path, + data->state.infilesize, + (int)data->set.new_file_perms); + if(rc != SSH_OK) { + err_msg = ssh_get_error(sshc->ssh_session); + failf(conn->data, "%s", err_msg); + MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED); + } + + /* upload data */ + Curl_setup_transfer(conn, -1, data->req.size, FALSE, NULL, + FIRSTSOCKET, NULL); + + /* not set by Curl_setup_transfer to preserve keepon bits */ + conn->sockfd = conn->writesockfd; + + /* store this original bitmask setup to use later on if we can't + figure out a "real" bitmask */ + sshc->orig_waitfor = data->req.keepon; + + /* we want to use the _sending_ function even when the socket turns + out readable as the underlying libssh scp send function will deal + with both accordingly */ + conn->cselect_bits = CURL_CSELECT_OUT; + + state(conn, SSH_STOP); + + break; + + case SSH_SCP_DOWNLOAD_INIT: + + rc = ssh_scp_init(sshc->scp_session); + if(rc != SSH_OK) { + err_msg = ssh_get_error(sshc->ssh_session); + failf(conn->data, "%s", err_msg); + MOVE_TO_ERROR_STATE(CURLE_COULDNT_CONNECT); + } + state(conn, SSH_SCP_DOWNLOAD); + /* fall through */ + + case SSH_SCP_DOWNLOAD:{ + curl_off_t bytecount; + + rc = ssh_scp_pull_request(sshc->scp_session); + if(rc != SSH_SCP_REQUEST_NEWFILE) { + err_msg = ssh_get_error(sshc->ssh_session); + failf(conn->data, "%s", err_msg); + MOVE_TO_ERROR_STATE(CURLE_REMOTE_FILE_NOT_FOUND); + break; + } + + /* download data */ + bytecount = ssh_scp_request_get_size(sshc->scp_session); + data->req.maxdownload = (curl_off_t) bytecount; + Curl_setup_transfer(conn, FIRSTSOCKET, bytecount, FALSE, NULL, -1, + NULL); + + /* not set by Curl_setup_transfer to preserve keepon bits */ + conn->writesockfd = conn->sockfd; + + /* we want to use the _receiving_ function even when the socket turns + out writableable as the underlying libssh recv function will deal + with both accordingly */ + conn->cselect_bits = CURL_CSELECT_IN; + + state(conn, SSH_STOP); + break; + } + case SSH_SCP_DONE: + if(data->set.upload) + state(conn, SSH_SCP_SEND_EOF); + else + state(conn, SSH_SCP_CHANNEL_FREE); + break; + + case SSH_SCP_SEND_EOF: + if(sshc->scp_session) { + rc = ssh_scp_close(sshc->scp_session); + if(rc == SSH_AGAIN) { + /* Currently the ssh_scp_close handles waiting for EOF in + * blocking way. + */ + break; + } + if(rc != SSH_OK) { + infof(data, "Failed to close libssh scp channel: %s\n", + ssh_get_error(sshc->ssh_session)); + } + } + + state(conn, SSH_SCP_CHANNEL_FREE); + break; + + case SSH_SCP_CHANNEL_FREE: + if(sshc->scp_session) { + ssh_scp_free(sshc->scp_session); + sshc->scp_session = NULL; + } + DEBUGF(infof(data, "SCP DONE phase complete\n")); + + ssh_set_blocking(sshc->ssh_session, 0); + + state(conn, SSH_SESSION_DISCONNECT); + /* fall through */ + + case SSH_SESSION_DISCONNECT: + /* during weird times when we've been prematurely aborted, the channel + is still alive when we reach this state and we MUST kill the channel + properly first */ + if(sshc->scp_session) { + ssh_scp_free(sshc->scp_session); + sshc->scp_session = NULL; + } + + ssh_disconnect(sshc->ssh_session); + + Curl_safefree(sshc->homedir); + conn->data->state.most_recent_ftp_entrypath = NULL; + + state(conn, SSH_SESSION_FREE); + /* fall through */ + case SSH_SESSION_FREE: + if(sshc->ssh_session) { + ssh_free(sshc->ssh_session); + sshc->ssh_session = NULL; + } + + /* worst-case scenario cleanup */ + + DEBUGASSERT(sshc->ssh_session == NULL); + DEBUGASSERT(sshc->scp_session == NULL); + + if(sshc->readdir_tmp) { + ssh_string_free_char(sshc->readdir_tmp); + sshc->readdir_tmp = NULL; + } + + if(sshc->quote_attrs) + sftp_attributes_free(sshc->quote_attrs); + + if(sshc->readdir_attrs) + sftp_attributes_free(sshc->readdir_attrs); + + if(sshc->readdir_link_attrs) + sftp_attributes_free(sshc->readdir_link_attrs); + + if(sshc->privkey) + ssh_key_free(sshc->privkey); + if(sshc->pubkey) + ssh_key_free(sshc->pubkey); + + Curl_safefree(sshc->rsa_pub); + Curl_safefree(sshc->rsa); + + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + + Curl_safefree(sshc->homedir); + + Curl_safefree(sshc->readdir_line); + Curl_safefree(sshc->readdir_linkPath); + + /* the code we are about to return */ + result = sshc->actualcode; + + memset(sshc, 0, sizeof(struct ssh_conn)); + + connclose(conn, "SSH session free"); + sshc->state = SSH_SESSION_FREE; /* current */ + sshc->nextstate = SSH_NO_STATE; + state(conn, SSH_STOP); + break; + + case SSH_QUIT: + /* fallthrough, just stop! */ + default: + /* internal error */ + sshc->nextstate = SSH_NO_STATE; + state(conn, SSH_STOP); + break; + + } + } while(!rc && (sshc->state != SSH_STOP)); + + + if(rc == SSH_AGAIN) { + /* we would block, we need to wait for the socket to be ready (in the + right direction too)! */ + *block = TRUE; + } + + return result; +} + + +/* called by the multi interface to figure out what socket(s) to wait for and + for what actions in the DO_DONE, PERFORM and WAITPERFORM states */ +static int myssh_perform_getsock(const struct connectdata *conn, + curl_socket_t *sock, /* points to numsocks + number of sockets */ + int numsocks) +{ + int bitmap = GETSOCK_BLANK; + (void) numsocks; + + sock[0] = conn->sock[FIRSTSOCKET]; + + if(conn->waitfor & KEEP_RECV) + bitmap |= GETSOCK_READSOCK(FIRSTSOCKET); + + if(conn->waitfor & KEEP_SEND) + bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET); + + return bitmap; +} + +/* Generic function called by the multi interface to figure out what socket(s) + to wait for and for what actions during the DOING and PROTOCONNECT states*/ +static int myssh_getsock(struct connectdata *conn, + curl_socket_t *sock, /* points to numsocks + number of sockets */ + int numsocks) +{ + /* if we know the direction we can use the generic *_getsock() function even + for the protocol_connect and doing states */ + return myssh_perform_getsock(conn, sock, numsocks); +} + +static void myssh_block2waitfor(struct connectdata *conn, bool block) +{ + struct ssh_conn *sshc = &conn->proto.sshc; + int dir; + + /* If it didn't block, or nothing was returned by ssh_get_poll_flags + * have the original set */ + conn->waitfor = sshc->orig_waitfor; + + if(block) { + dir = ssh_get_poll_flags(sshc->ssh_session); + if(dir & SSH_READ_PENDING) { + /* translate the libssh define bits into our own bit defines */ + conn->waitfor = KEEP_RECV; + } + else if(dir & SSH_WRITE_PENDING) { + conn->waitfor = KEEP_SEND; + } + } +} + +/* called repeatedly until done from multi.c */ +static CURLcode myssh_multi_statemach(struct connectdata *conn, + bool *done) +{ + struct ssh_conn *sshc = &conn->proto.sshc; + CURLcode result = CURLE_OK; + bool block; /* we store the status and use that to provide a ssh_getsock() + implementation */ + + result = myssh_statemach_act(conn, &block); + *done = (sshc->state == SSH_STOP) ? TRUE : FALSE; + myssh_block2waitfor(conn, block); + + return result; +} + +static CURLcode myssh_block_statemach(struct connectdata *conn, + bool disconnect) +{ + struct ssh_conn *sshc = &conn->proto.sshc; + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + + while((sshc->state != SSH_STOP) && !result) { + bool block; + timediff_t left = 1000; + struct curltime now = Curl_now(); + + result = myssh_statemach_act(conn, &block); + if(result) + break; + + if(!disconnect) { + if(Curl_pgrsUpdate(conn)) + return CURLE_ABORTED_BY_CALLBACK; + + result = Curl_speedcheck(data, now); + if(result) + break; + + left = Curl_timeleft(data, NULL, FALSE); + if(left < 0) { + failf(data, "Operation timed out"); + return CURLE_OPERATION_TIMEDOUT; + } + } + + if(!result && block) { + curl_socket_t sock = conn->sock[FIRSTSOCKET]; + curl_socket_t fd_read = CURL_SOCKET_BAD; + fd_read = sock; + /* wait for the socket to become ready */ + (void) Curl_socket_check(fd_read, CURL_SOCKET_BAD, + CURL_SOCKET_BAD, left > 1000 ? 1000 : left); + } + + } + + return result; +} + +/* + * SSH setup connection + */ +static CURLcode myssh_setup_connection(struct connectdata *conn) +{ + struct SSHPROTO *ssh; + + conn->data->req.protop = ssh = calloc(1, sizeof(struct SSHPROTO)); + if(!ssh) + return CURLE_OUT_OF_MEMORY; + + return CURLE_OK; +} + +static Curl_recv scp_recv, sftp_recv; +static Curl_send scp_send, sftp_send; + +/* + * Curl_ssh_connect() gets called from Curl_protocol_connect() to allow us to + * do protocol-specific actions at connect-time. + */ +static CURLcode myssh_connect(struct connectdata *conn, bool *done) +{ + struct ssh_conn *ssh; + CURLcode result; + struct Curl_easy *data = conn->data; + int rc; + + /* initialize per-handle data if not already */ + if(!data->req.protop) + myssh_setup_connection(conn); + + /* We default to persistent connections. We set this already in this connect + function to make the re-use checks properly be able to check this bit. */ + connkeep(conn, "SSH default"); + + if(conn->handler->protocol & CURLPROTO_SCP) { + conn->recv[FIRSTSOCKET] = scp_recv; + conn->send[FIRSTSOCKET] = scp_send; + } + else { + conn->recv[FIRSTSOCKET] = sftp_recv; + conn->send[FIRSTSOCKET] = sftp_send; + } + + ssh = &conn->proto.sshc; + + ssh->ssh_session = ssh_new(); + if(ssh->ssh_session == NULL) { + failf(data, "Failure initialising ssh session"); + return CURLE_FAILED_INIT; + } + + if(conn->user) { + infof(data, "User: %s\n", conn->user); + ssh_options_set(ssh->ssh_session, SSH_OPTIONS_USER, conn->user); + } + + if(data->set.str[STRING_SSH_KNOWNHOSTS]) { + infof(data, "Known hosts: %s\n", data->set.str[STRING_SSH_KNOWNHOSTS]); + ssh_options_set(ssh->ssh_session, SSH_OPTIONS_KNOWNHOSTS, + data->set.str[STRING_SSH_KNOWNHOSTS]); + } + + ssh_options_set(ssh->ssh_session, SSH_OPTIONS_HOST, conn->host.name); + if(conn->remote_port) + ssh_options_set(ssh->ssh_session, SSH_OPTIONS_PORT, + &conn->remote_port); + + if(data->set.ssh_compression) { + ssh_options_set(ssh->ssh_session, SSH_OPTIONS_COMPRESSION, + "zlib,zlib@openssh.com,none"); + } + + ssh->privkey = NULL; + ssh->pubkey = NULL; + + if(data->set.str[STRING_SSH_PUBLIC_KEY]) { + rc = ssh_pki_import_pubkey_file(data->set.str[STRING_SSH_PUBLIC_KEY], + &ssh->pubkey); + if(rc != SSH_OK) { + failf(data, "Could not load public key file"); + /* ignore */ + } + } + + /* we do not verify here, we do it at the state machine, + * after connection */ + + state(conn, SSH_INIT); + + result = myssh_multi_statemach(conn, done); + + return result; +} + +/* called from multi.c while DOing */ +static CURLcode scp_doing(struct connectdata *conn, bool *dophase_done) +{ + CURLcode result; + + result = myssh_multi_statemach(conn, dophase_done); + + if(*dophase_done) { + DEBUGF(infof(conn->data, "DO phase is complete\n")); + } + return result; +} + +/* + *********************************************************************** + * + * scp_perform() + * + * This is the actual DO function for SCP. Get a file according to + * the options previously setup. + */ + +static +CURLcode scp_perform(struct connectdata *conn, + bool *connected, bool *dophase_done) +{ + CURLcode result = CURLE_OK; + + DEBUGF(infof(conn->data, "DO phase starts\n")); + + *dophase_done = FALSE; /* not done yet */ + + /* start the first command in the DO phase */ + state(conn, SSH_SCP_TRANS_INIT); + + result = myssh_multi_statemach(conn, dophase_done); + + *connected = conn->bits.tcpconnect[FIRSTSOCKET]; + + if(*dophase_done) { + DEBUGF(infof(conn->data, "DO phase is complete\n")); + } + + return result; +} + +static CURLcode myssh_do_it(struct connectdata *conn, bool *done) +{ + CURLcode result; + bool connected = 0; + struct Curl_easy *data = conn->data; + struct ssh_conn *sshc = &conn->proto.sshc; + + *done = FALSE; /* default to false */ + + data->req.size = -1; /* make sure this is unknown at this point */ + + sshc->actualcode = CURLE_OK; /* reset error code */ + sshc->secondCreateDirs = 0; /* reset the create dir attempt state + variable */ + + Curl_pgrsSetUploadCounter(data, 0); + Curl_pgrsSetDownloadCounter(data, 0); + Curl_pgrsSetUploadSize(data, -1); + Curl_pgrsSetDownloadSize(data, -1); + + if(conn->handler->protocol & CURLPROTO_SCP) + result = scp_perform(conn, &connected, done); + else + result = sftp_perform(conn, &connected, done); + + return result; +} + +/* BLOCKING, but the function is using the state machine so the only reason + this is still blocking is that the multi interface code has no support for + disconnecting operations that takes a while */ +static CURLcode scp_disconnect(struct connectdata *conn, + bool dead_connection) +{ + CURLcode result = CURLE_OK; + struct ssh_conn *ssh = &conn->proto.sshc; + (void) dead_connection; + + if(ssh->ssh_session) { + /* only if there's a session still around to use! */ + + state(conn, SSH_SESSION_DISCONNECT); + + result = myssh_block_statemach(conn, TRUE); + } + + return result; +} + +/* generic done function for both SCP and SFTP called from their specific + done functions */ +static CURLcode myssh_done(struct connectdata *conn, CURLcode status) +{ + CURLcode result = CURLE_OK; + struct SSHPROTO *protop = conn->data->req.protop; + + if(!status) { + /* run the state-machine + + TODO: when the multi interface is used, this _really_ should be using + the ssh_multi_statemach function but we have no general support for + non-blocking DONE operations! + */ + result = myssh_block_statemach(conn, FALSE); + } + else + result = status; + + if(protop) + Curl_safefree(protop->path); + if(Curl_pgrsDone(conn)) + return CURLE_ABORTED_BY_CALLBACK; + + conn->data->req.keepon = 0; /* clear all bits */ + return result; +} + + +static CURLcode scp_done(struct connectdata *conn, CURLcode status, + bool premature) +{ + (void) premature; /* not used */ + + if(!status) + state(conn, SSH_SCP_DONE); + + return myssh_done(conn, status); + +} + +static ssize_t scp_send(struct connectdata *conn, int sockindex, + const void *mem, size_t len, CURLcode *err) +{ + int rc; + (void) sockindex; /* we only support SCP on the fixed known primary socket */ + (void) err; + + rc = ssh_scp_write(conn->proto.sshc.scp_session, mem, len); + +#if 0 + /* The following code is misleading, mostly added as wishful thinking + * that libssh at some point will implement non-blocking ssh_scp_write/read. + * Currently rc can only be number of bytes read or SSH_ERROR. */ + myssh_block2waitfor(conn, (rc == SSH_AGAIN) ? TRUE : FALSE); + + if(rc == SSH_AGAIN) { + *err = CURLE_AGAIN; + return 0; + } + else +#endif + if(rc != SSH_OK) { + *err = CURLE_SSH; + return -1; + } + + return len; +} + +static ssize_t scp_recv(struct connectdata *conn, int sockindex, + char *mem, size_t len, CURLcode *err) +{ + ssize_t nread; + (void) err; + (void) sockindex; /* we only support SCP on the fixed known primary socket */ + + /* libssh returns int */ + nread = ssh_scp_read(conn->proto.sshc.scp_session, mem, len); + +#if 0 + /* The following code is misleading, mostly added as wishful thinking + * that libssh at some point will implement non-blocking ssh_scp_write/read. + * Currently rc can only be SSH_OK or SSH_ERROR. */ + + myssh_block2waitfor(conn, (nread == SSH_AGAIN) ? TRUE : FALSE); + if(nread == SSH_AGAIN) { + *err = CURLE_AGAIN; + nread = -1; + } +#endif + + return nread; +} + +/* + * =============== SFTP =============== + */ + +/* + *********************************************************************** + * + * sftp_perform() + * + * This is the actual DO function for SFTP. Get a file/directory according to + * the options previously setup. + */ + +static +CURLcode sftp_perform(struct connectdata *conn, + bool *connected, + bool *dophase_done) +{ + CURLcode result = CURLE_OK; + + DEBUGF(infof(conn->data, "DO phase starts\n")); + + *dophase_done = FALSE; /* not done yet */ + + /* start the first command in the DO phase */ + state(conn, SSH_SFTP_QUOTE_INIT); + + /* run the state-machine */ + result = myssh_multi_statemach(conn, dophase_done); + + *connected = conn->bits.tcpconnect[FIRSTSOCKET]; + + if(*dophase_done) { + DEBUGF(infof(conn->data, "DO phase is complete\n")); + } + + return result; +} + +/* called from multi.c while DOing */ +static CURLcode sftp_doing(struct connectdata *conn, + bool *dophase_done) +{ + CURLcode result = myssh_multi_statemach(conn, dophase_done); + if(*dophase_done) { + DEBUGF(infof(conn->data, "DO phase is complete\n")); + } + return result; +} + +/* BLOCKING, but the function is using the state machine so the only reason + this is still blocking is that the multi interface code has no support for + disconnecting operations that takes a while */ +static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection) +{ + CURLcode result = CURLE_OK; + (void) dead_connection; + + DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n")); + + if(conn->proto.sshc.ssh_session) { + /* only if there's a session still around to use! */ + state(conn, SSH_SFTP_SHUTDOWN); + result = myssh_block_statemach(conn, TRUE); + } + + DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n")); + + return result; + +} + +static CURLcode sftp_done(struct connectdata *conn, CURLcode status, + bool premature) +{ + struct ssh_conn *sshc = &conn->proto.sshc; + + if(!status) { + /* Post quote commands are executed after the SFTP_CLOSE state to avoid + errors that could happen due to open file handles during POSTQUOTE + operation */ + if(!status && !premature && conn->data->set.postquote) { + sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT; + state(conn, SSH_SFTP_CLOSE); + } + else + state(conn, SSH_SFTP_CLOSE); + } + return myssh_done(conn, status); +} + +/* return number of sent bytes */ +static ssize_t sftp_send(struct connectdata *conn, int sockindex, + const void *mem, size_t len, CURLcode *err) +{ + ssize_t nwrite; + (void)sockindex; + + nwrite = sftp_write(conn->proto.sshc.sftp_file, mem, len); + + myssh_block2waitfor(conn, FALSE); + +#if 0 /* not returned by libssh on write */ + if(nwrite == SSH_AGAIN) { + *err = CURLE_AGAIN; + nwrite = 0; + } + else +#endif + if(nwrite < 0) { + *err = CURLE_SSH; + nwrite = -1; + } + + return nwrite; +} + +/* + * Return number of received (decrypted) bytes + * or <0 on error + */ +static ssize_t sftp_recv(struct connectdata *conn, int sockindex, + char *mem, size_t len, CURLcode *err) +{ + ssize_t nread; + (void)sockindex; + + if(len >= (size_t)1<<32) + len = (size_t)(1<<31)-1; + + switch(conn->proto.sshc.sftp_recv_state) { + case 0: + conn->proto.sshc.sftp_file_index = + sftp_async_read_begin(conn->proto.sshc.sftp_file, + (uint32_t)len); + if(conn->proto.sshc.sftp_file_index < 0) { + *err = CURLE_RECV_ERROR; + return -1; + } + + /* fall-through */ + case 1: + conn->proto.sshc.sftp_recv_state = 1; + + nread = sftp_async_read(conn->proto.sshc.sftp_file, + mem, (uint32_t)len, + conn->proto.sshc.sftp_file_index); + + myssh_block2waitfor(conn, (nread == SSH_AGAIN)?TRUE:FALSE); + + if(nread == SSH_AGAIN) { + *err = CURLE_AGAIN; + return -1; + } + else if(nread < 0) { + *err = CURLE_RECV_ERROR; + return -1; + } + + conn->proto.sshc.sftp_recv_state = 0; + return nread; + + default: + /* we never reach here */ + return -1; + } +} + +static void sftp_quote(struct connectdata *conn) +{ + const char *cp; + struct Curl_easy *data = conn->data; + struct SSHPROTO *protop = data->req.protop; + struct ssh_conn *sshc = &conn->proto.sshc; + CURLcode result; + + /* + * Support some of the "FTP" commands + */ + char *cmd = sshc->quote_item->data; + sshc->acceptfail = FALSE; + + /* if a command starts with an asterisk, which a legal SFTP command never + can, the command will be allowed to fail without it causing any + aborts or cancels etc. It will cause libcurl to act as if the command + is successful, whatever the server reponds. */ + + if(cmd[0] == '*') { + cmd++; + sshc->acceptfail = TRUE; + } + + if(strcasecompare("pwd", cmd)) { + /* output debug output if that is requested */ + char *tmp = aprintf("257 \"%s\" is current directory.\n", + protop->path); + if(!tmp) { + sshc->actualcode = CURLE_OUT_OF_MEMORY; + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + return; + } + if(data->set.verbose) { + Curl_debug(data, CURLINFO_HEADER_OUT, (char *) "PWD\n", 4, conn); + Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp), conn); + } + /* this sends an FTP-like "header" to the header callback so that the + current directory can be read very similar to how it is read when + using ordinary FTP. */ + result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp)); + free(tmp); + if(result) { + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = result; + } + else + state(conn, SSH_SFTP_NEXT_QUOTE); + return; + } + + /* + * the arguments following the command must be separated from the + * command with a space so we can check for it unconditionally + */ + cp = strchr(cmd, ' '); + if(cp == NULL) { + failf(data, "Syntax error in SFTP command. Supply parameter(s)!"); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + return; + } + + /* + * also, every command takes at least one argument so we get that + * first argument right now + */ + result = Curl_get_pathname(&cp, &sshc->quote_path1, sshc->homedir); + if(result) { + if(result == CURLE_OUT_OF_MEMORY) + failf(data, "Out of memory"); + else + failf(data, "Syntax error: Bad first parameter"); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = result; + return; + } + + /* + * SFTP is a binary protocol, so we don't send text commands + * to the server. Instead, we scan for commands used by + * OpenSSH's sftp program and call the appropriate libssh + * functions. + */ + if(strncasecompare(cmd, "chgrp ", 6) || + strncasecompare(cmd, "chmod ", 6) || + strncasecompare(cmd, "chown ", 6)) { + /* attribute change */ + + /* sshc->quote_path1 contains the mode to set */ + /* get the destination */ + result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir); + if(result) { + if(result == CURLE_OUT_OF_MEMORY) + failf(data, "Out of memory"); + else + failf(data, "Syntax error in chgrp/chmod/chown: " + "Bad second parameter"); + Curl_safefree(sshc->quote_path1); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = result; + return; + } + sshc->quote_attrs = NULL; + state(conn, SSH_SFTP_QUOTE_STAT); + return; + } + if(strncasecompare(cmd, "ln ", 3) || + strncasecompare(cmd, "symlink ", 8)) { + /* symbolic linking */ + /* sshc->quote_path1 is the source */ + /* get the destination */ + result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir); + if(result) { + if(result == CURLE_OUT_OF_MEMORY) + failf(data, "Out of memory"); + else + failf(data, "Syntax error in ln/symlink: Bad second parameter"); + Curl_safefree(sshc->quote_path1); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = result; + return; + } + state(conn, SSH_SFTP_QUOTE_SYMLINK); + return; + } + else if(strncasecompare(cmd, "mkdir ", 6)) { + /* create dir */ + state(conn, SSH_SFTP_QUOTE_MKDIR); + return; + } + else if(strncasecompare(cmd, "rename ", 7)) { + /* rename file */ + /* first param is the source path */ + /* second param is the dest. path */ + result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir); + if(result) { + if(result == CURLE_OUT_OF_MEMORY) + failf(data, "Out of memory"); + else + failf(data, "Syntax error in rename: Bad second parameter"); + Curl_safefree(sshc->quote_path1); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = result; + return; + } + state(conn, SSH_SFTP_QUOTE_RENAME); + return; + } + else if(strncasecompare(cmd, "rmdir ", 6)) { + /* delete dir */ + state(conn, SSH_SFTP_QUOTE_RMDIR); + return; + } + else if(strncasecompare(cmd, "rm ", 3)) { + state(conn, SSH_SFTP_QUOTE_UNLINK); + return; + } +#ifdef HAS_STATVFS_SUPPORT + else if(strncasecompare(cmd, "statvfs ", 8)) { + state(conn, SSH_SFTP_QUOTE_STATVFS); + return; + } +#endif + + failf(data, "Unknown SFTP command"); + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; +} + +static void sftp_quote_stat(struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + struct ssh_conn *sshc = &conn->proto.sshc; + char *cmd = sshc->quote_item->data; + sshc->acceptfail = FALSE; + + /* if a command starts with an asterisk, which a legal SFTP command never + can, the command will be allowed to fail without it causing any + aborts or cancels etc. It will cause libcurl to act as if the command + is successful, whatever the server reponds. */ + + if(cmd[0] == '*') { + cmd++; + sshc->acceptfail = TRUE; + } + + /* We read the file attributes, store them in sshc->quote_attrs + * and modify them accordingly to command. Then we switch to + * QUOTE_SETSTAT state to write new ones. + */ + + if(sshc->quote_attrs) + sftp_attributes_free(sshc->quote_attrs); + sshc->quote_attrs = sftp_stat(sshc->sftp_session, sshc->quote_path2); + if(sshc->quote_attrs == NULL) { + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + failf(data, "Attempt to get SFTP stats failed: %d", + sftp_get_error(sshc->sftp_session)); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + return; + } + + /* Now set the new attributes... */ + if(strncasecompare(cmd, "chgrp", 5)) { + sshc->quote_attrs->gid = (uint32_t)strtoul(sshc->quote_path1, NULL, 10); + if(sshc->quote_attrs->gid == 0 && !ISDIGIT(sshc->quote_path1[0]) && + !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + failf(data, "Syntax error: chgrp gid not a number"); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + return; + } + sshc->quote_attrs->flags |= SSH_FILEXFER_ATTR_UIDGID; + } + else if(strncasecompare(cmd, "chmod", 5)) { + mode_t perms; + perms = (mode_t)strtoul(sshc->quote_path1, NULL, 8); + /* permissions are octal */ + if(perms == 0 && !ISDIGIT(sshc->quote_path1[0])) { + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + failf(data, "Syntax error: chmod permissions not a number"); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + return; + } + sshc->quote_attrs->permissions = perms; + sshc->quote_attrs->flags |= SSH_FILEXFER_ATTR_PERMISSIONS; + } + else if(strncasecompare(cmd, "chown", 5)) { + sshc->quote_attrs->uid = (uint32_t)strtoul(sshc->quote_path1, NULL, 10); + if(sshc->quote_attrs->uid == 0 && !ISDIGIT(sshc->quote_path1[0]) && + !sshc->acceptfail) { + Curl_safefree(sshc->quote_path1); + Curl_safefree(sshc->quote_path2); + failf(data, "Syntax error: chown uid not a number"); + state(conn, SSH_SFTP_CLOSE); + sshc->nextstate = SSH_NO_STATE; + sshc->actualcode = CURLE_QUOTE_ERROR; + return; + } + sshc->quote_attrs->flags |= SSH_FILEXFER_ATTR_UIDGID; + } + + /* Now send the completed structure... */ + state(conn, SSH_SFTP_QUOTE_SETSTAT); + return; +} + + +#endif /* USE_LIBSSH */ diff --git a/lib/ssh.c b/lib/ssh.c index 086d40e..d3b5cac 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,9 +26,7 @@ #ifdef USE_LIBSSH2 -#ifdef HAVE_LIMITS_H -# include -#endif +#include #include #include @@ -87,21 +85,9 @@ /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" +#include "curl_path.h" #include "memdebug.h" -#ifdef WIN32 -# undef PATH_MAX -# define PATH_MAX MAX_PATH -# ifndef R_OK -# define R_OK 4 -# endif -#endif - -#ifndef PATH_MAX -#define PATH_MAX 1024 /* just an extra precaution since there are systems that - have their definition hidden well */ -#endif - #if LIBSSH2_VERSION_NUM >= 0x010206 /* libssh2_sftp_statvfs and friends were added in 1.2.6 */ #define HAS_STATVFS_SUPPORT 1 @@ -113,22 +99,17 @@ libssh2_sftp_symlink_ex((s), (p), curlx_uztoui(strlen(p)), \ (t), (m), LIBSSH2_SFTP_REALPATH) + /* Local functions: */ static const char *sftp_libssh2_strerror(int err); static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc); static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc); static LIBSSH2_FREE_FUNC(my_libssh2_free); -static CURLcode get_pathname(const char **cpp, char **path); - static CURLcode ssh_connect(struct connectdata *conn, bool *done); static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done); static CURLcode ssh_do(struct connectdata *conn, bool *done); -static CURLcode ssh_getworkingpath(struct connectdata *conn, - char *homedir, /* when SFTP is used */ - char **path); - static CURLcode scp_done(struct connectdata *conn, CURLcode, bool premature); static CURLcode scp_doing(struct connectdata *conn, @@ -176,6 +157,7 @@ const struct Curl_handler Curl_handler_scp = { ssh_perform_getsock, /* perform_getsock */ scp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_SSH, /* defport */ CURLPROTO_SCP, /* protocol */ PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION @@ -202,6 +184,7 @@ const struct Curl_handler Curl_handler_sftp = { ssh_perform_getsock, /* perform_getsock */ sftp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_SSH, /* defport */ CURLPROTO_SFTP, /* protocol */ PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION @@ -276,6 +259,11 @@ static CURLcode libssh2_session_error_to_CURLE(int err) case LIBSSH2_ERROR_NONE: return CURLE_OK; + /* This is the error returned by libssh2_scp_recv2 + * on unknown file */ + case LIBSSH2_ERROR_SCP_PROTOCOL: + return CURLE_REMOTE_FILE_NOT_FOUND; + case LIBSSH2_ERROR_SOCKET_NONE: return CURLE_COULDNT_CONNECT; @@ -354,6 +342,7 @@ static void state(struct connectdata *conn, sshstate nowstate) "SSH_AUTH_HOST", "SSH_AUTH_KEY_INIT", "SSH_AUTH_KEY", + "SSH_AUTH_GSSAPI", "SSH_AUTH_DONE", "SSH_SFTP_INIT", "SSH_SFTP_REALPATH", @@ -388,6 +377,7 @@ static void state(struct connectdata *conn, sshstate nowstate) "SSH_SCP_TRANS_INIT", "SSH_SCP_UPLOAD_INIT", "SSH_SCP_DOWNLOAD_INIT", + "SSH_SCP_DOWNLOAD", "SSH_SCP_DONE", "SSH_SCP_SEND_EOF", "SSH_SCP_WAIT_EOF", @@ -398,6 +388,9 @@ static void state(struct connectdata *conn, sshstate nowstate) "QUIT" }; + /* a precaution to make sure the lists are in sync */ + DEBUGASSERT(sizeof(names)/sizeof(names[0]) == SSH_LAST); + if(sshc->state != nowstate) { infof(conn->data, "SFTP %p state change from %s to %s\n", (void *)sshc, names[sshc->state], names[nowstate]); @@ -407,70 +400,6 @@ static void state(struct connectdata *conn, sshstate nowstate) sshc->state = nowstate; } -/* figure out the path to work with in this particular request */ -static CURLcode ssh_getworkingpath(struct connectdata *conn, - char *homedir, /* when SFTP is used */ - char **path) /* returns the allocated - real path to work with */ -{ - struct Curl_easy *data = conn->data; - char *real_path = NULL; - char *working_path; - size_t working_path_len; - CURLcode result = - Curl_urldecode(data, data->state.path, 0, &working_path, - &working_path_len, FALSE); - if(result) - return result; - - /* Check for /~/, indicating relative to the user's home directory */ - if(conn->handler->protocol & CURLPROTO_SCP) { - real_path = malloc(working_path_len+1); - if(real_path == NULL) { - free(working_path); - return CURLE_OUT_OF_MEMORY; - } - if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3))) - /* It is referenced to the home directory, so strip the leading '/~/' */ - memcpy(real_path, working_path+3, 4 + working_path_len-3); - else - memcpy(real_path, working_path, 1 + working_path_len); - } - else if(conn->handler->protocol & CURLPROTO_SFTP) { - if((working_path_len > 1) && (working_path[1] == '~')) { - size_t homelen = strlen(homedir); - real_path = malloc(homelen + working_path_len + 1); - if(real_path == NULL) { - free(working_path); - return CURLE_OUT_OF_MEMORY; - } - /* It is referenced to the home directory, so strip the - leading '/' */ - memcpy(real_path, homedir, homelen); - real_path[homelen] = '/'; - real_path[homelen+1] = '\0'; - if(working_path_len > 3) { - memcpy(real_path+homelen+1, working_path + 3, - 1 + working_path_len -3); - } - } - else { - real_path = malloc(working_path_len+1); - if(real_path == NULL) { - free(working_path); - return CURLE_OUT_OF_MEMORY; - } - memcpy(real_path, working_path, 1+working_path_len); - } - } - - free(working_path); - - /* store the pointer for the caller to receive */ - *path = real_path; - - return CURLE_OK; -} #ifdef HAVE_LIBSSH2_KNOWNHOST_API static int sshkeycallback(struct Curl_easy *easy, @@ -599,9 +528,11 @@ static CURLcode ssh_knownhost(struct connectdata *conn) keymatch = (enum curl_khmatch)keycheck; /* Ask the callback how to behave */ + Curl_set_in_callback(data, true); rc = func(data, knownkeyp, /* from the knownhosts file */ &foundkey, /* from the remote host */ keymatch, data->set.ssh_keyfunc_userp); + Curl_set_in_callback(data, false); } else /* no remotekey means failure! */ @@ -688,14 +619,11 @@ static CURLcode ssh_check_fingerprint(struct connectdata *conn) sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION; return sshc->actualcode; } - else { - infof(data, "MD5 checksum match!\n"); - /* as we already matched, we skip the check for known hosts */ - return CURLE_OK; - } + infof(data, "MD5 checksum match!\n"); + /* as we already matched, we skip the check for known hosts */ + return CURLE_OK; } - else - return ssh_knownhost(conn); + return ssh_knownhost(conn); } /* @@ -738,7 +666,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc) { + if(rc) { failf(data, "Failure establishing ssh session"); state(conn, SSH_SESSION_FREE); sshc->actualcode = CURLE_FAILED_INIT; @@ -782,16 +710,14 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) state(conn, SSH_AUTH_DONE); break; } + err = libssh2_session_last_errno(sshc->ssh_session); + if(err == LIBSSH2_ERROR_EAGAIN) + rc = LIBSSH2_ERROR_EAGAIN; else { - err = libssh2_session_last_errno(sshc->ssh_session); - if(err == LIBSSH2_ERROR_EAGAIN) - rc = LIBSSH2_ERROR_EAGAIN; - else { - state(conn, SSH_SESSION_FREE); - sshc->actualcode = libssh2_session_error_to_CURLE(err); - } - break; + state(conn, SSH_SESSION_FREE); + sshc->actualcode = libssh2_session_error_to_CURLE(err); } + break; } infof(data, "SSH authentication methods available: %s\n", sshc->authlist); @@ -942,7 +868,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc == 0) { + if(rc == 0) { sshc->authed = TRUE; infof(data, "Initialized password authentication\n"); state(conn, SSH_AUTH_DONE); @@ -1036,11 +962,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) sshc->sshagent_identity); if(rc < 0) { - if(rc != LIBSSH2_ERROR_EAGAIN) + if(rc != LIBSSH2_ERROR_EAGAIN) { /* tried and failed? go to next identity */ sshc->sshagent_prev_identity = sshc->sshagent_identity; - else - break; + } + break; } } @@ -1081,7 +1007,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc == 0) { + if(rc == 0) { sshc->authed = TRUE; infof(data, "Initialized keyboard interactive authentication\n"); } @@ -1120,21 +1046,19 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) */ sshc->sftp_session = libssh2_sftp_init(sshc->ssh_session); if(!sshc->sftp_session) { + char *err_msg; if(libssh2_session_last_errno(sshc->ssh_session) == LIBSSH2_ERROR_EAGAIN) { rc = LIBSSH2_ERROR_EAGAIN; break; } - else { - char *err_msg; - (void)libssh2_session_last_error(sshc->ssh_session, - &err_msg, NULL, 0); - failf(data, "Failure initializing sftp session: %s", err_msg); - state(conn, SSH_SESSION_FREE); - sshc->actualcode = CURLE_FAILED_INIT; - break; - } + (void)libssh2_session_last_error(sshc->ssh_session, + &err_msg, NULL, 0); + failf(data, "Failure initializing sftp session: %s", err_msg); + state(conn, SSH_SESSION_FREE); + sshc->actualcode = CURLE_FAILED_INIT; + break; } state(conn, SSH_SFTP_REALPATH); break; @@ -1151,7 +1075,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc > 0) { + if(rc > 0) { /* It seems that this string is not always NULL terminated */ tempHome[rc] = '\0'; sshc->homedir = strdup(tempHome); @@ -1188,7 +1112,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) case SSH_SFTP_QUOTE_INIT: - result = ssh_getworkingpath(conn, sshc->homedir, &sftp_scp->path); + result = Curl_getworkingpath(conn, sshc->homedir, &sftp_scp->path); if(result) { sshc->actualcode = result; state(conn, SSH_STOP); @@ -1223,6 +1147,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) /* * Support some of the "FTP" commands + * + * 'sshc->quote_item' is already verified to be non-NULL before it + * switched to this state. */ char *cmd = sshc->quote_item->data; sshc->acceptfail = FALSE; @@ -1265,7 +1192,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) state(conn, SSH_SFTP_NEXT_QUOTE); break; } - else if(cmd) { + { /* * the arguments following the command must be separated from the * command with a space so we can check for it unconditionally @@ -1283,7 +1210,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) * also, every command takes at least one argument so we get that * first argument right now */ - result = get_pathname(&cp, &sshc->quote_path1); + result = Curl_get_pathname(&cp, &sshc->quote_path1, sshc->homedir); if(result) { if(result == CURLE_OUT_OF_MEMORY) failf(data, "Out of memory"); @@ -1308,7 +1235,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) /* sshc->quote_path1 contains the mode to set */ /* get the destination */ - result = get_pathname(&cp, &sshc->quote_path2); + result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir); if(result) { if(result == CURLE_OUT_OF_MEMORY) failf(data, "Out of memory"); @@ -1325,12 +1252,12 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) state(conn, SSH_SFTP_QUOTE_STAT); break; } - else if(strncasecompare(cmd, "ln ", 3) || + if(strncasecompare(cmd, "ln ", 3) || strncasecompare(cmd, "symlink ", 8)) { /* symbolic linking */ /* sshc->quote_path1 is the source */ /* get the destination */ - result = get_pathname(&cp, &sshc->quote_path2); + result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir); if(result) { if(result == CURLE_OUT_OF_MEMORY) failf(data, "Out of memory"); @@ -1355,7 +1282,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) /* rename file */ /* first param is the source path */ /* second param is the dest. path */ - result = get_pathname(&cp, &sshc->quote_path2); + result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir); if(result) { if(result == CURLE_OUT_OF_MEMORY) failf(data, "Out of memory"); @@ -1395,9 +1322,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) break; } } - if(!sshc->quote_item) { - state(conn, SSH_SFTP_GETINFO); - } break; case SSH_SFTP_NEXT_QUOTE: @@ -1447,7 +1371,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { /* get those attributes */ + if(rc != 0 && !sshc->acceptfail) { /* get those attributes */ err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); Curl_safefree(sshc->quote_path2); @@ -1518,7 +1442,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { + if(rc != 0 && !sshc->acceptfail) { err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); Curl_safefree(sshc->quote_path2); @@ -1541,7 +1465,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { + if(rc != 0 && !sshc->acceptfail) { err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); Curl_safefree(sshc->quote_path2); @@ -1562,7 +1486,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { + if(rc != 0 && !sshc->acceptfail) { err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); failf(data, "mkdir command failed: %s", sftp_libssh2_strerror(err)); @@ -1586,7 +1510,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { + if(rc != 0 && !sshc->acceptfail) { err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); Curl_safefree(sshc->quote_path2); @@ -1605,7 +1529,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { + if(rc != 0 && !sshc->acceptfail) { err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); failf(data, "rmdir command failed: %s", sftp_libssh2_strerror(err)); @@ -1623,7 +1547,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { + if(rc != 0 && !sshc->acceptfail) { err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); failf(data, "rm command failed: %s", sftp_libssh2_strerror(err)); @@ -1646,7 +1570,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc != 0 && !sshc->acceptfail) { + if(rc != 0 && !sshc->acceptfail) { err = sftp_libssh2_last_error(sshc->sftp_session); Curl_safefree(sshc->quote_path1); failf(data, "statvfs command failed: %s", sftp_libssh2_strerror(err)); @@ -1709,8 +1633,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc == 0) { - data->info.filetime = (long)attrs.mtime; + if(rc == 0) { + data->info.filetime = attrs.mtime; } state(conn, SSH_SFTP_TRANS_INIT); @@ -1747,7 +1671,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc) { + if(rc) { data->state.resume_from = 0; } else { @@ -1782,48 +1706,47 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(LIBSSH2_ERROR_EAGAIN == rc) break; - else { - if(LIBSSH2_ERROR_SFTP_PROTOCOL == rc) - /* only when there was an SFTP protocol error can we extract - the sftp error! */ - err = sftp_libssh2_last_error(sshc->sftp_session); - else - err = -1; /* not an sftp error at all */ - if(sshc->secondCreateDirs) { - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = err>= LIBSSH2_FX_OK? - sftp_libssh2_error_to_CURLE(err):CURLE_SSH; - failf(data, "Creating the dir/file failed: %s", - sftp_libssh2_strerror(err)); - break; - } - else if(((err == LIBSSH2_FX_NO_SUCH_FILE) || - (err == LIBSSH2_FX_FAILURE) || - (err == LIBSSH2_FX_NO_SUCH_PATH)) && - (data->set.ftp_create_missing_dirs && - (strlen(sftp_scp->path) > 1))) { - /* try to create the path remotely */ - rc = 0; /* clear rc and continue */ - sshc->secondCreateDirs = 1; - state(conn, SSH_SFTP_CREATE_DIRS_INIT); - break; - } + if(LIBSSH2_ERROR_SFTP_PROTOCOL == rc) + /* only when there was an SFTP protocol error can we extract + the sftp error! */ + err = sftp_libssh2_last_error(sshc->sftp_session); + else + err = -1; /* not an sftp error at all */ + + if(sshc->secondCreateDirs) { state(conn, SSH_SFTP_CLOSE); sshc->actualcode = err>= LIBSSH2_FX_OK? sftp_libssh2_error_to_CURLE(err):CURLE_SSH; - if(!sshc->actualcode) { - /* Sometimes, for some reason libssh2_sftp_last_error() returns - zero even though libssh2_sftp_open() failed previously! We need - to work around that! */ - sshc->actualcode = CURLE_SSH; - err=-1; - } - failf(data, "Upload failed: %s (%d/%d)", - err>= LIBSSH2_FX_OK?sftp_libssh2_strerror(err):"ssh error", - err, rc); + failf(data, "Creating the dir/file failed: %s", + sftp_libssh2_strerror(err)); break; } + if(((err == LIBSSH2_FX_NO_SUCH_FILE) || + (err == LIBSSH2_FX_FAILURE) || + (err == LIBSSH2_FX_NO_SUCH_PATH)) && + (data->set.ftp_create_missing_dirs && + (strlen(sftp_scp->path) > 1))) { + /* try to create the path remotely */ + rc = 0; /* clear rc and continue */ + sshc->secondCreateDirs = 1; + state(conn, SSH_SFTP_CREATE_DIRS_INIT); + break; + } + state(conn, SSH_SFTP_CLOSE); + sshc->actualcode = err>= LIBSSH2_FX_OK? + sftp_libssh2_error_to_CURLE(err):CURLE_SSH; + if(!sshc->actualcode) { + /* Sometimes, for some reason libssh2_sftp_last_error() returns + zero even though libssh2_sftp_open() failed previously! We need + to work around that! */ + sshc->actualcode = CURLE_SSH; + err = -1; + } + failf(data, "Upload failed: %s (%d/%d)", + err>= LIBSSH2_FX_OK?sftp_libssh2_strerror(err):"ssh error", + err, rc); + break; } /* If we have a restart point then we need to seek to the correct @@ -1831,37 +1754,41 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(data->state.resume_from > 0) { /* Let's read off the proper amount of bytes from the input. */ if(conn->seek_func) { + Curl_set_in_callback(data, true); seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, SEEK_SET); + Curl_set_in_callback(data, false); } if(seekerr != CURL_SEEKFUNC_OK) { + curl_off_t passed = 0; if(seekerr != CURL_SEEKFUNC_CANTSEEK) { failf(data, "Could not seek stream"); return CURLE_FTP_COULDNT_USE_REST; } /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ - else { - curl_off_t passed=0; - do { - size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); - - size_t actuallyread = - data->state.fread_func(data->state.buffer, 1, - readthisamountnow, data->state.in); - - passed += actuallyread; - if((actuallyread == 0) || (actuallyread > readthisamountnow)) { - /* this checks for greater-than only to make sure that the - CURL_READFUNC_ABORT return code still aborts */ - failf(data, "Failed to read data"); - return CURLE_FTP_COULDNT_USE_REST; - } - } while(passed < data->state.resume_from); - } + do { + size_t readthisamountnow = + (data->state.resume_from - passed > data->set.buffer_size) ? + (size_t)data->set.buffer_size : + curlx_sotouz(data->state.resume_from - passed); + + size_t actuallyread; + Curl_set_in_callback(data, true); + actuallyread = data->state.fread_func(data->state.buffer, 1, + readthisamountnow, + data->state.in); + Curl_set_in_callback(data, false); + + passed += actuallyread; + if((actuallyread == 0) || (actuallyread > readthisamountnow)) { + /* this checks for greater-than only to make sure that the + CURL_READFUNC_ABORT return code still aborts */ + failf(data, "Failed to read data"); + return CURLE_FTP_COULDNT_USE_REST; + } + } while(passed < data->state.resume_from); } /* now, decrease the size of the read */ @@ -1900,7 +1827,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) /* since we don't really wait for anything at this point, we want the state machine to move on as soon as possible so we set a very short timeout here */ - Curl_expire(data, 0); + Curl_expire(data, 0, EXPIRE_RUN_NOW); state(conn, SSH_STOP); } @@ -1926,9 +1853,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) state(conn, SSH_SFTP_CREATE_DIRS_MKDIR); break; } - else { - state(conn, SSH_SFTP_UPLOAD_INIT); - } + state(conn, SSH_SFTP_UPLOAD_INIT); break; case SSH_SFTP_CREATE_DIRS_MKDIR: @@ -1956,9 +1881,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) sshc->actualcode = result?result:CURLE_SSH; break; } - else { - rc = 0; /* clear rc and continue */ - } + rc = 0; /* clear rc and continue */ } state(conn, SSH_SFTP_CREATE_DIRS); break; @@ -1985,23 +1908,21 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) rc = LIBSSH2_ERROR_EAGAIN; break; } - else { - err = sftp_libssh2_last_error(sshc->sftp_session); - failf(data, "Could not open directory for reading: %s", - sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - result = sftp_libssh2_error_to_CURLE(err); - sshc->actualcode = result?result:CURLE_SSH; - break; - } + err = sftp_libssh2_last_error(sshc->sftp_session); + failf(data, "Could not open directory for reading: %s", + sftp_libssh2_strerror(err)); + state(conn, SSH_SFTP_CLOSE); + result = sftp_libssh2_error_to_CURLE(err); + sshc->actualcode = result?result:CURLE_SSH; + break; } - sshc->readdir_filename = malloc(PATH_MAX+1); + sshc->readdir_filename = malloc(PATH_MAX + 1); if(!sshc->readdir_filename) { state(conn, SSH_SFTP_CLOSE); sshc->actualcode = CURLE_OUT_OF_MEMORY; break; } - sshc->readdir_longentry = malloc(PATH_MAX+1); + sshc->readdir_longentry = malloc(PATH_MAX + 1); if(!sshc->readdir_longentry) { Curl_safefree(sshc->readdir_filename); state(conn, SSH_SFTP_CLOSE); @@ -2035,7 +1956,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) break; } result = Curl_client_write(conn, CLIENTWRITE_BODY, - tmpLine, sshc->readdir_len+1); + tmpLine, sshc->readdir_len + 1); free(tmpLine); if(result) { @@ -2044,7 +1965,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) } /* since this counts what we send to the client, we include the newline in this counter */ - data->req.bytecount += sshc->readdir_len+1; + data->req.bytecount += sshc->readdir_len + 1; /* output debug output if that is requested */ if(data->set.verbose) { @@ -2200,15 +2121,13 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) rc = LIBSSH2_ERROR_EAGAIN; break; } - else { - err = sftp_libssh2_last_error(sshc->sftp_session); - failf(data, "Could not open remote file for reading: %s", - sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - result = sftp_libssh2_error_to_CURLE(err); - sshc->actualcode = result?result:CURLE_SSH; - break; - } + err = sftp_libssh2_last_error(sshc->sftp_session); + failf(data, "Could not open remote file for reading: %s", + sftp_libssh2_strerror(err)); + state(conn, SSH_SFTP_CLOSE); + result = sftp_libssh2_error_to_CURLE(err); + sshc->actualcode = result?result:CURLE_SSH; + break; } state(conn, SSH_SFTP_DOWNLOAD_STAT); break; @@ -2223,7 +2142,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc || + if(rc || !(attrs.flags & LIBSSH2_SFTP_ATTR_SIZE) || (attrs.filesize == 0)) { /* @@ -2247,18 +2166,25 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) curl_off_t from, to; char *ptr; char *ptr2; + CURLofft to_t; + CURLofft from_t; - from=curlx_strtoofft(conn->data->state.range, &ptr, 0); - while(*ptr && (ISSPACE(*ptr) || (*ptr=='-'))) + from_t = curlx_strtoofft(conn->data->state.range, &ptr, 0, &from); + if(from_t == CURL_OFFT_FLOW) + return CURLE_RANGE_ERROR; + while(*ptr && (ISSPACE(*ptr) || (*ptr == '-'))) ptr++; - to=curlx_strtoofft(ptr, &ptr2, 0); - if((ptr == ptr2) /* no "to" value given */ + to_t = curlx_strtoofft(ptr, &ptr2, 0, &to); + if(to_t == CURL_OFFT_FLOW) + return CURLE_RANGE_ERROR; + if((to_t == CURL_OFFT_INVAL) /* no "to" value given */ || (to >= size)) { to = size - 1; } - if(from < 0) { + if(from_t) { /* from is relative to end of file */ - from += size; + from = size - to; + to = size - 1; } if(from > size) { failf(data, "Offset (%" @@ -2321,18 +2247,17 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) state(conn, SSH_STOP); break; } - else { - Curl_setup_transfer(conn, FIRSTSOCKET, data->req.size, - FALSE, NULL, -1, NULL); + Curl_setup_transfer(conn, FIRSTSOCKET, data->req.size, + FALSE, NULL, -1, NULL); - /* not set by Curl_setup_transfer to preserve keepon bits */ - conn->writesockfd = conn->sockfd; + /* not set by Curl_setup_transfer to preserve keepon bits */ + conn->writesockfd = conn->sockfd; + + /* we want to use the _receiving_ function even when the socket turns + out writableable as the underlying libssh2 recv function will deal + with both accordingly */ + conn->cselect_bits = CURL_CSELECT_IN; - /* we want to use the _receiving_ function even when the socket turns - out writableable as the underlying libssh2 recv function will deal - with both accordingly */ - conn->cselect_bits = CURL_CSELECT_IN; - } if(result) { /* this should never occur; the close state should be entered at the time the error occurs */ @@ -2350,13 +2275,13 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to close libssh2 file\n"); } sshc->sftp_handle = NULL; } - if(sftp_scp) - Curl_safefree(sftp_scp->path); + + Curl_safefree(sftp_scp->path); DEBUGF(infof(data, "SFTP DONE done\n")); @@ -2384,7 +2309,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to close libssh2 file\n"); } sshc->sftp_handle = NULL; @@ -2394,7 +2319,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to stop libssh2 sftp subsystem\n"); } sshc->sftp_session = NULL; @@ -2407,7 +2332,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) break; case SSH_SCP_TRANS_INIT: - result = ssh_getworkingpath(conn, sshc->homedir, &sftp_scp->path); + result = Curl_getworkingpath(conn, sshc->homedir, &sftp_scp->path); if(result) { sshc->actualcode = result; state(conn, SSH_STOP); @@ -2439,22 +2364,25 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) SCP_SEND(sshc->ssh_session, sftp_scp->path, data->set.new_file_perms, data->state.infilesize); if(!sshc->ssh_channel) { + int ssh_err; + char *err_msg; + if(libssh2_session_last_errno(sshc->ssh_session) == LIBSSH2_ERROR_EAGAIN) { rc = LIBSSH2_ERROR_EAGAIN; break; } - else { - int ssh_err; - char *err_msg; - ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session, - &err_msg, NULL, 0)); - failf(conn->data, "%s", err_msg); - state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); - break; - } + ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session, + &err_msg, NULL, 0)); + failf(conn->data, "%s", err_msg); + state(conn, SSH_SCP_CHANNEL_FREE); + sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); + /* Map generic errors to upload failed */ + if(sshc->actualcode == CURLE_SSH || + sshc->actualcode == CURLE_REMOTE_FILE_NOT_FOUND) + sshc->actualcode = CURLE_UPLOAD_FAILED; + break; } /* upload data */ @@ -2509,22 +2437,22 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) #endif if(!sshc->ssh_channel) { + int ssh_err; + char *err_msg; + if(libssh2_session_last_errno(sshc->ssh_session) == LIBSSH2_ERROR_EAGAIN) { rc = LIBSSH2_ERROR_EAGAIN; break; } - else { - int ssh_err; - char *err_msg; - ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session, - &err_msg, NULL, 0)); - failf(conn->data, "%s", err_msg); - state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); - break; - } + + ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session, + &err_msg, NULL, 0)); + failf(conn->data, "%s", err_msg); + state(conn, SSH_SCP_CHANNEL_FREE); + sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); + break; } /* download data */ @@ -2562,7 +2490,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc) { + if(rc) { infof(data, "Failed to send libssh2 channel EOF\n"); } } @@ -2575,7 +2503,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc) { + if(rc) { infof(data, "Failed to get channel EOF: %d\n", rc); } } @@ -2588,7 +2516,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc) { + if(rc) { infof(data, "Channel failed to close: %d\n", rc); } } @@ -2601,7 +2529,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to free libssh2 scp subsystem\n"); } sshc->ssh_channel = NULL; @@ -2623,7 +2551,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to free libssh2 scp subsystem\n"); } sshc->ssh_channel = NULL; @@ -2634,7 +2562,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to disconnect libssh2 session\n"); } } @@ -2659,7 +2587,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to disconnect from libssh2 agent\n"); } libssh2_agent_free(sshc->ssh_agent); @@ -2677,7 +2605,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(rc == LIBSSH2_ERROR_EAGAIN) { break; } - else if(rc < 0) { + if(rc < 0) { infof(data, "Failed to free libssh2 session\n"); } sshc->ssh_session = NULL; @@ -2834,7 +2762,7 @@ static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done) } static CURLcode ssh_block_statemach(struct connectdata *conn, - bool duringconnect) + bool disconnect) { struct ssh_conn *sshc = &conn->proto.sshc; CURLcode result = CURLE_OK; @@ -2842,25 +2770,26 @@ static CURLcode ssh_block_statemach(struct connectdata *conn, while((sshc->state != SSH_STOP) && !result) { bool block; - long left; + timediff_t left = 1000; + struct curltime now = Curl_now(); result = ssh_statemach_act(conn, &block); if(result) break; - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; - else { - struct timeval now = Curl_tvnow(); + if(!disconnect) { + if(Curl_pgrsUpdate(conn)) + return CURLE_ABORTED_BY_CALLBACK; + result = Curl_speedcheck(data, now); if(result) break; - } - left = Curl_timeleft(data, NULL, duringconnect); - if(left < 0) { - failf(data, "Operation timed out"); - return CURLE_OPERATION_TIMEDOUT; + left = Curl_timeleft(data, NULL, FALSE); + if(left < 0) { + failf(data, "Operation timed out"); + return CURLE_OPERATION_TIMEDOUT; + } } #ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION @@ -2950,6 +2879,13 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done) return CURLE_FAILED_INIT; } + if(data->set.ssh_compression) { +#if LIBSSH2_VERSION_NUM >= 0x010208 + if(libssh2_session_flag(ssh->ssh_session, LIBSSH2_FLAG_COMPRESS, 1) < 0) +#endif + infof(data, "Failed to enable compression for ssh session\n"); + } + #ifdef HAVE_LIBSSH2_KNOWNHOST_API if(data->set.str[STRING_SSH_KNOWNHOSTS]) { int rc; @@ -3046,8 +2982,8 @@ static CURLcode ssh_do(struct connectdata *conn, bool *done) data->req.size = -1; /* make sure this is unknown at this point */ sshc->actualcode = CURLE_OK; /* reset error code */ - sshc->secondCreateDirs =0; /* reset the create dir attempt state - variable */ + sshc->secondCreateDirs = 0; /* reset the create dir attempt state + variable */ Curl_pgrsSetUploadCounter(data, 0); Curl_pgrsSetDownloadCounter(data, 0); @@ -3076,7 +3012,7 @@ static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection) state(conn, SSH_SESSION_DISCONNECT); - result = ssh_block_statemach(conn, FALSE); + result = ssh_block_statemach(conn, TRUE); } return result; @@ -3230,7 +3166,7 @@ static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection) if(conn->proto.sshc.ssh_session) { /* only if there's a session still around to use! */ state(conn, SSH_SFTP_SHUTDOWN); - result = ssh_block_statemach(conn, FALSE); + result = ssh_block_statemach(conn, TRUE); } DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n")); @@ -3308,93 +3244,6 @@ static ssize_t sftp_recv(struct connectdata *conn, int sockindex, return nread; } -/* The get_pathname() function is being borrowed from OpenSSH sftp.c - version 4.6p1. */ -/* - * Copyright (c) 2001-2004 Damien Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -static CURLcode -get_pathname(const char **cpp, char **path) -{ - const char *cp = *cpp, *end; - char quot; - unsigned int i, j; - static const char WHITESPACE[] = " \t\r\n"; - - cp += strspn(cp, WHITESPACE); - if(!*cp) { - *cpp = cp; - *path = NULL; - return CURLE_QUOTE_ERROR; - } - - *path = malloc(strlen(cp) + 1); - if(*path == NULL) - return CURLE_OUT_OF_MEMORY; - - /* Check for quoted filenames */ - if(*cp == '\"' || *cp == '\'') { - quot = *cp++; - - /* Search for terminating quote, unescape some chars */ - for(i = j = 0; i <= strlen(cp); i++) { - if(cp[i] == quot) { /* Found quote */ - i++; - (*path)[j] = '\0'; - break; - } - if(cp[i] == '\0') { /* End of string */ - /*error("Unterminated quote");*/ - goto fail; - } - if(cp[i] == '\\') { /* Escaped characters */ - i++; - if(cp[i] != '\'' && cp[i] != '\"' && - cp[i] != '\\') { - /*error("Bad escaped character '\\%c'", - cp[i]);*/ - goto fail; - } - } - (*path)[j++] = cp[i]; - } - - if(j == 0) { - /*error("Empty quotes");*/ - goto fail; - } - *cpp = cp + i + strspn(cp + i, WHITESPACE); - } - else { - /* Read to end of filename */ - end = strpbrk(cp, WHITESPACE); - if(end == NULL) - end = strchr(cp, '\0'); - *cpp = end + strspn(end, WHITESPACE); - - memcpy(*path, cp, end - cp); - (*path)[end - cp] = '\0'; - } - return CURLE_OK; - - fail: - Curl_safefree(*path); - return CURLE_QUOTE_ERROR; -} - - static const char *sftp_libssh2_strerror(int err) { switch(err) { diff --git a/lib/ssh.h b/lib/ssh.h index b350dcf..1c13550 100644 --- a/lib/ssh.h +++ b/lib/ssh.h @@ -24,9 +24,12 @@ #include "curl_setup.h" -#ifdef HAVE_LIBSSH2_H +#if defined(HAVE_LIBSSH2_H) #include #include +#elif defined(HAVE_LIBSSH_LIBSSH_H) +#include +#include #endif /* HAVE_LIBSSH2_H */ /**************************************************************************** @@ -51,6 +54,7 @@ typedef enum { SSH_AUTH_HOST, SSH_AUTH_KEY_INIT, SSH_AUTH_KEY, + SSH_AUTH_GSSAPI, SSH_AUTH_DONE, SSH_SFTP_INIT, SSH_SFTP_REALPATH, /* Last state in SSH-CONNECT */ @@ -86,6 +90,7 @@ typedef enum { SSH_SCP_TRANS_INIT, /* First state in SCP-DO */ SSH_SCP_UPLOAD_INIT, SSH_SCP_DOWNLOAD_INIT, + SSH_SCP_DOWNLOAD, SSH_SCP_DONE, SSH_SCP_SEND_EOF, SSH_SCP_WAIT_EOF, @@ -109,7 +114,8 @@ struct SSHPROTO { struct */ struct ssh_conn { const char *authlist; /* List of auth. methods, managed by libssh2 */ -#ifdef USE_LIBSSH2 + + /* common */ const char *passphrase; /* pass-phrase to use */ char *rsa_pub; /* path name */ char *rsa; /* path name */ @@ -120,16 +126,11 @@ struct ssh_conn { struct curl_slist *quote_item; /* for the quote option */ char *quote_path1; /* two generic pointers for the QUOTE stuff */ char *quote_path2; - LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */ + bool acceptfail; /* used by the SFTP_QUOTE (continue if quote command fails) */ char *homedir; /* when doing SFTP we figure out home dir in the connect phase */ - - /* Here's a set of struct members used by the SFTP_READDIR state */ - LIBSSH2_SFTP_ATTRIBUTES readdir_attrs; - char *readdir_filename; - char *readdir_longentry; int readdir_len, readdir_totalLen, readdir_currLen; char *readdir_line; char *readdir_linkPath; @@ -139,11 +140,42 @@ struct ssh_conn { second attempt has been made to change to/create a directory */ char *slash_pos; /* used by the SFTP_CREATE_DIRS state */ + + int orig_waitfor; /* default READ/WRITE bits wait for */ + +#if defined(USE_LIBSSH) +/* our variables */ + unsigned kbd_state; /* 0 or 1 */ + ssh_key privkey; + ssh_key pubkey; + int auth_methods; + ssh_session ssh_session; + ssh_scp scp_session; + sftp_session sftp_session; + sftp_file sftp_file; + sftp_dir sftp_dir; + + unsigned sftp_recv_state; /* 0 or 1 */ + int sftp_file_index; /* for async read */ + sftp_attributes readdir_attrs; /* used by the SFTP readdir actions */ + sftp_attributes readdir_link_attrs; /* used by the SFTP readdir actions */ + sftp_attributes quote_attrs; /* used by the SFTP_QUOTE state */ + + const char *readdir_filename; /* points within readdir_attrs */ + const char *readdir_longentry; + char *readdir_tmp; +#elif defined(USE_LIBSSH2) + char *readdir_filename; + char *readdir_longentry; + + LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */ + + /* Here's a set of struct members used by the SFTP_READDIR state */ + LIBSSH2_SFTP_ATTRIBUTES readdir_attrs; LIBSSH2_SESSION *ssh_session; /* Secure Shell session */ LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */ LIBSSH2_SFTP *sftp_session; /* SFTP handle */ LIBSSH2_SFTP_HANDLE *sftp_handle; - int orig_waitfor; /* default READ/WRITE bits wait for */ #ifdef HAVE_LIBSSH2_AGENT_API LIBSSH2_AGENT *ssh_agent; /* proxy to ssh-agent/pageant */ @@ -156,10 +188,17 @@ struct ssh_conn { #ifdef HAVE_LIBSSH2_KNOWNHOST_API LIBSSH2_KNOWNHOSTS *kh; #endif -#endif /* USE_LIBSSH2 */ +#endif /* USE_LIBSSH */ }; -#ifdef USE_LIBSSH2 +#if defined(USE_LIBSSH) + +#define CURL_LIBSSH_VERSION ssh_version(0) + +extern const struct Curl_handler Curl_handler_scp; +extern const struct Curl_handler Curl_handler_sftp; + +#elif defined(USE_LIBSSH2) /* Feature detection based on version numbers to better work with non-configure platforms */ @@ -190,6 +229,14 @@ struct ssh_conn { #define HAVE_LIBSSH2_SESSION_HANDSHAKE 1 #endif +#ifdef HAVE_LIBSSH2_VERSION +/* get it run-time if possible */ +#define CURL_LIBSSH2_VERSION libssh2_version(0) +#else +/* use build-time if run-time not possible */ +#define CURL_LIBSSH2_VERSION LIBSSH2_VERSION +#endif + extern const struct Curl_handler Curl_handler_scp; extern const struct Curl_handler Curl_handler_sftp; diff --git a/lib/strcase.c b/lib/strcase.c index a750f7b..24bcca9 100644 --- a/lib/strcase.c +++ b/lib/strcase.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -94,10 +94,11 @@ char Curl_raw_toupper(char in) } /* - * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant - * to be locale independent and only compare strings we know are safe for - * this. See https://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for - * some further explanation to why this function is necessary. + * Curl_strcasecompare() is for doing "raw" case insensitive strings. This is + * meant to be locale independent and only compare strings we know are safe + * for this. See + * https://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for some + * further explanation to why this function is necessary. * * The function is capable of comparing a-z case insensitively even for * non-ascii. @@ -125,9 +126,9 @@ int Curl_safe_strcasecompare(const char *first, const char *second) if(first && second) /* both pointers point to something then compare them */ return Curl_strcasecompare(first, second); - else - /* if both pointers are NULL then treat them as equal */ - return (NULL == first && NULL == second); + + /* if both pointers are NULL then treat them as equal */ + return (NULL == first && NULL == second); } /* diff --git a/lib/strdup.c b/lib/strdup.c index 136b693..19cb044 100644 --- a/lib/strdup.c +++ b/lib/strdup.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -44,11 +44,11 @@ char *curlx_strdup(const char *str) if(len >= ((size_t)-1) / sizeof(char)) return (char *)NULL; - newstr = malloc((len+1)*sizeof(char)); + newstr = malloc((len + 1)*sizeof(char)); if(!newstr) return (char *)NULL; - memcpy(newstr, str, (len+1)*sizeof(char)); + memcpy(newstr, str, (len + 1)*sizeof(char)); return newstr; diff --git a/lib/strerror.c b/lib/strerror.c index 7e5cde4..0295d6c 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2004 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2004 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -49,6 +49,10 @@ #include "curl_memory.h" #include "memdebug.h" +#if defined(WIN32) || defined(_WIN32_WCE) +#define PRESERVE_WINDOWS_ERROR_CODE +#endif + const char * curl_easy_strerror(CURLcode error) { @@ -308,6 +312,9 @@ curl_easy_strerror(CURLcode error) case CURLE_HTTP2_STREAM: return "Stream error in the HTTP/2 framing layer"; + case CURLE_RECURSIVE_API_CALL: + return "API function called from within callback"; + /* error codes not used by current libcurl */ case CURLE_OBSOLETE20: case CURLE_OBSOLETE24: @@ -376,6 +383,9 @@ curl_multi_strerror(CURLMcode error) case CURLM_ADDED_ALREADY: return "The easy handle is already added to a multi handle"; + case CURLM_RECURSIVE_API_CALL: + return "API function called from within callback"; + case CURLM_LAST: break; } @@ -432,6 +442,10 @@ curl_share_strerror(CURLSHcode error) static const char * get_winsock_error (int err, char *buf, size_t len) { +#ifdef PRESERVE_WINDOWS_ERROR_CODE + DWORD old_win_err = GetLastError(); +#endif + int old_errno = errno; const char *p; #ifndef CURL_DISABLE_VERBOSE_STRINGS @@ -611,6 +625,15 @@ get_winsock_error (int err, char *buf, size_t len) #endif strncpy(buf, p, len); buf [len-1] = '\0'; + + if(errno != old_errno) + errno = old_errno; + +#ifdef PRESERVE_WINDOWS_ERROR_CODE + if(old_win_err != GetLastError()) + SetLastError(old_win_err); +#endif + return buf; } #endif /* USE_WINSOCK */ @@ -628,9 +651,12 @@ get_winsock_error (int err, char *buf, size_t len) */ const char *Curl_strerror(struct connectdata *conn, int err) { +#ifdef PRESERVE_WINDOWS_ERROR_CODE + DWORD old_win_err = GetLastError(); +#endif + int old_errno = errno; char *buf, *p; size_t max; - int old_errno = ERRNO; DEBUGASSERT(conn); DEBUGASSERT(err >= 0); @@ -722,8 +748,13 @@ const char *Curl_strerror(struct connectdata *conn, int err) if(p && (p - buf) >= 1) *p = '\0'; - if(old_errno != ERRNO) - SET_ERRNO(old_errno); + if(errno != old_errno) + errno = old_errno; + +#ifdef PRESERVE_WINDOWS_ERROR_CODE + if(old_win_err != GetLastError()) + SetLastError(old_win_err); +#endif return buf; } @@ -731,16 +762,19 @@ const char *Curl_strerror(struct connectdata *conn, int err) #ifdef USE_WINDOWS_SSPI const char *Curl_sspi_strerror (struct connectdata *conn, int err) { +#ifdef PRESERVE_WINDOWS_ERROR_CODE + DWORD old_win_err = GetLastError(); +#endif + int old_errno = errno; + const char *txt; + char *outbuf; + size_t outmax; #ifndef CURL_DISABLE_VERBOSE_STRINGS char txtbuf[80]; char msgbuf[sizeof(conn->syserr_buf)]; char *p, *str, *msg = NULL; bool msg_formatted = FALSE; - int old_errno; #endif - const char *txt; - char *outbuf; - size_t outmax; DEBUGASSERT(conn); @@ -750,8 +784,6 @@ const char *Curl_sspi_strerror (struct connectdata *conn, int err) #ifndef CURL_DISABLE_VERBOSE_STRINGS - old_errno = ERRNO; - switch(err) { case SEC_E_OK: txt = "No error"; @@ -1051,9 +1083,6 @@ const char *Curl_sspi_strerror (struct connectdata *conn, int err) strncpy(outbuf, str, outmax); } - if(old_errno != ERRNO) - SET_ERRNO(old_errno); - #else if(err == SEC_E_OK) @@ -1067,6 +1096,14 @@ const char *Curl_sspi_strerror (struct connectdata *conn, int err) outbuf[outmax] = '\0'; + if(errno != old_errno) + errno = old_errno; + +#ifdef PRESERVE_WINDOWS_ERROR_CODE + if(old_win_err != GetLastError()) + SetLastError(old_win_err); +#endif + return outbuf; } #endif /* USE_WINDOWS_SSPI */ diff --git a/lib/strtoofft.c b/lib/strtoofft.c index b854bf4..3636477 100644 --- a/lib/strtoofft.c +++ b/lib/strtoofft.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,6 +20,7 @@ * ***************************************************************************/ +#include #include "curl_setup.h" #include "strtoofft.h" @@ -29,10 +30,32 @@ * * In the ISO C standard (IEEE Std 1003.1), there is a strtoimax() function we * could use in case strtoll() doesn't exist... See - * http://www.opengroup.org/onlinepubs/009695399/functions/strtoimax.html + * https://www.opengroup.org/onlinepubs/009695399/functions/strtoimax.html */ -#ifdef NEED_CURL_STRTOLL +#if (SIZEOF_CURL_OFF_T > SIZEOF_LONG) +# ifdef HAVE_STRTOLL +# define strtooff strtoll +# else +# if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_INTEGRAL_MAX_BITS >= 64) +# if defined(_SAL_VERSION) + _Check_return_ _CRTIMP __int64 __cdecl _strtoi64( + _In_z_ const char *_String, + _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix); +# else + _CRTIMP __int64 __cdecl _strtoi64(const char *_String, + char **_EndPtr, int _Radix); +# endif +# define strtooff _strtoi64 +# else +# define PRIVATE_STRTOOFF 1 +# endif +# endif +#else +# define strtooff strtol +#endif + +#ifdef PRIVATE_STRTOOFF /* Range tests can be used for alphanum decoding if characters are consecutive, like in ASCII. Else an array is scanned. Determine this condition now. */ @@ -48,11 +71,10 @@ static const char valchars[] = static int get_char(char c, int base); /** - * Emulated version of the strtoll function. This extracts a long long + * Custom version of the strtooff function. This extracts a curl_off_t * value from the given input string and returns it. */ -curl_off_t -curlx_strtoll(const char *nptr, char **endptr, int base) +static curl_off_t strtooff(const char *nptr, char **endptr, int base) { char *end; int is_negative = 0; @@ -132,7 +154,7 @@ curlx_strtoll(const char *nptr, char **endptr, int base) else value = CURL_OFF_T_MAX; - SET_ERRNO(ERANGE); + errno = ERANGE; } if(endptr) @@ -186,3 +208,37 @@ static int get_char(char c, int base) return value; } #endif /* Only present if we need strtoll, but don't have it. */ + +/* + * Parse a *positive* up to 64 bit number written in ascii. + */ +CURLofft curlx_strtoofft(const char *str, char **endp, int base, + curl_off_t *num) +{ + char *end; + curl_off_t number; + errno = 0; + *num = 0; /* clear by default */ + + DEBUGASSERT(str); + + while(*str && ISSPACE(*str)) + str++; + if('-' == *str) { + if(endp) + *endp = (char *)str; /* didn't actually move */ + return CURL_OFFT_INVAL; /* nothing parsed */ + } + number = strtooff(str, &end, base); + if(endp) + *endp = end; + if(errno == ERANGE) + /* overflow/underflow */ + return CURL_OFFT_FLOW; + else if(str == end) + /* nothing parsed */ + return CURL_OFFT_INVAL; + + *num = number; + return CURL_OFFT_OK; +} diff --git a/lib/strtoofft.h b/lib/strtoofft.h index f4039f3..be19cd7 100644 --- a/lib/strtoofft.h +++ b/lib/strtoofft.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -40,36 +40,13 @@ * of 'long' the conversion function to use is strtol(). */ -#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG) -# ifdef HAVE_STRTOLL -# define curlx_strtoofft strtoll -# else -# if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_INTEGRAL_MAX_BITS >= 64) -# if defined(_SAL_VERSION) - _Check_return_ _CRTIMP __int64 __cdecl _strtoi64( - _In_z_ const char *_String, - _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix); -# else - _CRTIMP __int64 __cdecl _strtoi64(const char *_String, - char **_EndPtr, int _Radix); -# endif -# define curlx_strtoofft _strtoi64 -# else - curl_off_t curlx_strtoll(const char *nptr, char **endptr, int base); -# define curlx_strtoofft curlx_strtoll -# define NEED_CURL_STRTOLL 1 -# endif -# endif -#else -# define curlx_strtoofft strtol -#endif +typedef enum { + CURL_OFFT_OK, /* parsed fine */ + CURL_OFFT_FLOW, /* over or underflow */ + CURL_OFFT_INVAL /* nothing was parsed */ +} CURLofft; -#if (CURL_SIZEOF_CURL_OFF_T == 4) -# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF) -#else - /* assume CURL_SIZEOF_CURL_OFF_T == 8 */ -# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) -#endif -#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1)) +CURLofft curlx_strtoofft(const char *str, char **endp, int base, + curl_off_t *num); #endif /* HEADER_CURL_STRTOOFFT_H */ diff --git a/lib/system_win32.c b/lib/system_win32.c index 7873759..cfbbf32 100644 --- a/lib/system_win32.c +++ b/lib/system_win32.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2016, Steve Holme, . + * Copyright (C) 2016 - 2017, Steve Holme, . * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -68,7 +68,7 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD); * * majorVersion [in] - The major version number. * minorVersion [in] - The minor version number. - * platform [in] - The optional platform identifer. + * platform [in] - The optional platform identifier. * condition [in] - The test condition used to specifier whether we are * checking a version less then, equal to or greater than * what is specified in the major and minor version diff --git a/lib/telnet.c b/lib/telnet.c index 162cab7..78d3a85 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -76,15 +76,17 @@ } WHILE_FALSE #define CURL_SB_ACCUM(x,c) \ do { \ - if(x->subpointer < (x->subbuffer+sizeof x->subbuffer)) \ + if(x->subpointer < (x->subbuffer + sizeof x->subbuffer)) \ *x->subpointer++ = (c); \ } WHILE_FALSE #define CURL_SB_GET(x) ((*x->subpointer++)&0xff) -#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff) -#define CURL_SB_EOF(x) (x->subpointer >= x->subend) #define CURL_SB_LEN(x) (x->subend - x->subpointer) +/* For posterity: +#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff) +#define CURL_SB_EOF(x) (x->subpointer >= x->subend) */ + #ifdef CURL_DISABLE_VERBOSE_STRINGS #define printoption(a,b,c,d) Curl_nop_stmt #endif @@ -190,6 +192,7 @@ const struct Curl_handler Curl_handler_telnet = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_TELNET, /* defport */ CURLPROTO_TELNET, /* protocol */ PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */ @@ -292,8 +295,8 @@ static void negotiate(struct connectdata *conn) int i; struct TELNET *tn = (struct TELNET *) conn->data->req.protop; - for(i = 0;i < CURL_NTELOPTS;i++) { - if(i==CURL_TELOPT_ECHO) + for(i = 0; i < CURL_NTELOPTS; i++) { + if(i == CURL_TELOPT_ECHO) continue; if(tn->us_preferred[i] == CURL_YES) @@ -789,7 +792,7 @@ static void printsub(struct Curl_easy *data, case CURL_TELOPT_NEW_ENVIRON: if(pointer[1] == CURL_TELQUAL_IS) { infof(data, " "); - for(i = 3;i < length;i++) { + for(i = 3; i < length; i++) { switch(pointer[i]) { case CURL_NEW_ENV_VAR: infof(data, ", "); @@ -840,7 +843,7 @@ static CURLcode check_telnet_options(struct connectdata *conn) tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES; } - for(head = data->set.telnet_options; head; head=head->next) { + for(head = data->set.telnet_options; head; head = head->next) { if(sscanf(head->data, "%127[^= ]%*[ =]%255s", option_keyword, option_arg) == 2) { @@ -872,7 +875,7 @@ static CURLcode check_telnet_options(struct connectdata *conn) continue; } - /* Window Size */ + /* Window Size */ if(strcasecompare(option_keyword, "WS")) { if(sscanf(option_arg, "%hu%*[xX]%hu", &tn->subopt_wsx, &tn->subopt_wsy) == 2) @@ -887,8 +890,8 @@ static CURLcode check_telnet_options(struct connectdata *conn) /* To take care or not of the 8th bit in data exchange */ if(strcasecompare(option_keyword, "BINARY")) { - binary_option=atoi(option_arg); - if(binary_option!=1) { + binary_option = atoi(option_arg); + if(binary_option != 1) { tn->us_preferred[CURL_TELOPT_BINARY] = CURL_NO; tn->him_preferred[CURL_TELOPT_BINARY] = CURL_NO; } @@ -896,14 +899,12 @@ static CURLcode check_telnet_options(struct connectdata *conn) } failf(data, "Unknown telnet option %s", head->data); - result = CURLE_UNKNOWN_TELNET_OPTION; - break; - } - else { - failf(data, "Syntax error in telnet option: %s", head->data); - result = CURLE_TELNET_OPTION_SYNTAX; + result = CURLE_UNKNOWN_OPTION; break; } + failf(data, "Syntax error in telnet option: %s", head->data); + result = CURLE_TELNET_OPTION_SYNTAX; + break; } if(result) { @@ -934,7 +935,7 @@ static void suboption(struct connectdata *conn) struct Curl_easy *data = conn->data; struct TELNET *tn = (struct TELNET *)data->req.protop; - printsub(data, '<', (unsigned char *)tn->subbuffer, CURL_SB_LEN(tn)+2); + printsub(data, '<', (unsigned char *)tn->subbuffer, CURL_SB_LEN(tn) + 2); switch(CURL_SB_GET(tn)) { case CURL_TELOPT_TTYPE: len = strlen(tn->subopt_ttype) + 4 + 2; @@ -966,7 +967,7 @@ static void suboption(struct connectdata *conn) CURL_TELQUAL_IS); len = 4; - for(v = tn->telnet_vars;v;v = v->next) { + for(v = tn->telnet_vars; v; v = v->next) { tmplen = (strlen(v->data) + 1); /* Add the variable only if it fits */ if(len + tmplen < (int)sizeof(temp)-6) { @@ -1016,10 +1017,10 @@ static void sendsuboption(struct connectdata *conn, int option) CURL_SB_ACCUM(tn, CURL_IAC); CURL_SB_ACCUM(tn, CURL_SB); CURL_SB_ACCUM(tn, CURL_TELOPT_NAWS); - /* We must deal either with litte or big endien processors */ + /* We must deal either with litte or big endian processors */ /* Window size must be sent according to the 'network order' */ - x=htons(tn->subopt_wsx); - y=htons(tn->subopt_wsy); + x = htons(tn->subopt_wsx); + y = htons(tn->subopt_wsy); uc1 = (unsigned char *)&x; uc2 = (unsigned char *)&y; CURL_SB_ACCUM(tn, uc1[0]); @@ -1032,7 +1033,7 @@ static void sendsuboption(struct connectdata *conn, int option) CURL_SB_TERM(tn); /* data suboption is now ready */ - printsub(data, '>', (unsigned char *)tn->subbuffer+2, + printsub(data, '>', (unsigned char *)tn->subbuffer + 2, CURL_SB_LEN(tn)-2); /* we send the header of the suboption... */ @@ -1043,9 +1044,9 @@ static void sendsuboption(struct connectdata *conn, int option) } /* ... then the window size with the send_telnet_data() function to deal with 0xFF cases ... */ - send_telnet_data(conn, (char *)tn->subbuffer+3, 4); + send_telnet_data(conn, (char *)tn->subbuffer + 3, 4); /* ... and the footer */ - bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer+7, 2); + bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer + 7, 2); if(bytes_written < 0) { err = SOCKERRNO; failf(data, "Sending data failed (%d)", err); @@ -1063,7 +1064,7 @@ CURLcode telrcv(struct connectdata *conn, unsigned char c; CURLcode result; int in = 0; - int startwrite=-1; + int startwrite = -1; struct Curl_easy *data = conn->data; struct TELNET *tn = (struct TELNET *)data->req.protop; @@ -1220,43 +1221,63 @@ CURLcode telrcv(struct connectdata *conn, } /* Escape and send a telnet data block */ -/* TODO: write large chunks of data instead of one byte at a time */ static CURLcode send_telnet_data(struct connectdata *conn, char *buffer, ssize_t nread) { - unsigned char outbuf[2]; - ssize_t bytes_written, total_written; - int out_count; + ssize_t escapes, i, j, outlen; + unsigned char *outbuf = NULL; CURLcode result = CURLE_OK; + ssize_t bytes_written, total_written; - while(!result && nread--) { - outbuf[0] = *buffer++; - out_count = 1; - if(outbuf[0] == CURL_IAC) - outbuf[out_count++] = CURL_IAC; - - total_written = 0; - do { - /* Make sure socket is writable to avoid EWOULDBLOCK condition */ - struct pollfd pfd[1]; - pfd[0].fd = conn->sock[FIRSTSOCKET]; - pfd[0].events = POLLOUT; - switch(Curl_poll(pfd, 1, -1)) { - case -1: /* error, abort writing */ - case 0: /* timeout (will never happen) */ - result = CURLE_SEND_ERROR; - break; - default: /* write! */ - bytes_written = 0; - result = Curl_write(conn, conn->sock[FIRSTSOCKET], - outbuf+total_written, out_count-total_written, - &bytes_written); - total_written += bytes_written; - break; - } - /* handle partial write */ - } while(!result && total_written < out_count); + /* Determine size of new buffer after escaping */ + escapes = 0; + for(i = 0; i < nread; i++) + if((unsigned char)buffer[i] == CURL_IAC) + escapes++; + outlen = nread + escapes; + + if(outlen == nread) + outbuf = (unsigned char *)buffer; + else { + outbuf = malloc(nread + escapes + 1); + if(!outbuf) + return CURLE_OUT_OF_MEMORY; + + j = 0; + for(i = 0; i < nread; i++) { + outbuf[j++] = buffer[i]; + if((unsigned char)buffer[i] == CURL_IAC) + outbuf[j++] = CURL_IAC; + } + outbuf[j] = '\0'; + } + + total_written = 0; + while(!result && total_written < outlen) { + /* Make sure socket is writable to avoid EWOULDBLOCK condition */ + struct pollfd pfd[1]; + pfd[0].fd = conn->sock[FIRSTSOCKET]; + pfd[0].events = POLLOUT; + switch(Curl_poll(pfd, 1, -1)) { + case -1: /* error, abort writing */ + case 0: /* timeout (will never happen) */ + result = CURLE_SEND_ERROR; + break; + default: /* write! */ + bytes_written = 0; + result = Curl_write(conn, conn->sock[FIRSTSOCKET], + outbuf + total_written, + outlen - total_written, + &bytes_written); + total_written += bytes_written; + break; + } } + + /* Free malloc copy if escaped */ + if(outbuf != (unsigned char *)buffer) + free(outbuf); + return result; } @@ -1306,7 +1327,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) curl_off_t total_ul = 0; #endif ssize_t nread; - struct timeval now; + struct curltime now; bool keepon = TRUE; char *buf = data->state.buffer; struct TELNET *tn; @@ -1336,14 +1357,14 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) /* load ws2_32.dll and get the function pointers we need. */ wsock2 = Curl_load_library(TEXT("WS2_32.DLL")); if(wsock2 == NULL) { - failf(data, "failed to load WS2_32.DLL (%d)", ERRNO); + failf(data, "failed to load WS2_32.DLL (%u)", GetLastError()); return CURLE_FAILED_INIT; } /* Grab a pointer to WSACreateEvent */ create_event_func = GetProcAddress(wsock2, "WSACreateEvent"); if(create_event_func == NULL) { - failf(data, "failed to find WSACreateEvent function (%d)", ERRNO); + failf(data, "failed to find WSACreateEvent function (%u)", GetLastError()); FreeLibrary(wsock2); return CURLE_FAILED_INIT; } @@ -1351,7 +1372,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) /* And WSACloseEvent */ close_event_func = GetProcAddress(wsock2, "WSACloseEvent"); if(close_event_func == NULL) { - failf(data, "failed to find WSACloseEvent function (%d)", ERRNO); + failf(data, "failed to find WSACloseEvent function (%u)", GetLastError()); FreeLibrary(wsock2); return CURLE_FAILED_INIT; } @@ -1359,7 +1380,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) /* And WSAEventSelect */ event_select_func = GetProcAddress(wsock2, "WSAEventSelect"); if(event_select_func == NULL) { - failf(data, "failed to find WSAEventSelect function (%d)", ERRNO); + failf(data, "failed to find WSAEventSelect function (%u)", GetLastError()); FreeLibrary(wsock2); return CURLE_FAILED_INIT; } @@ -1367,7 +1388,8 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) /* And WSAEnumNetworkEvents */ enum_netevents_func = GetProcAddress(wsock2, "WSAEnumNetworkEvents"); if(enum_netevents_func == NULL) { - failf(data, "failed to find WSAEnumNetworkEvents function (%d)", ERRNO); + failf(data, "failed to find WSAEnumNetworkEvents function (%u)", + GetLastError()); FreeLibrary(wsock2); return CURLE_FAILED_INIT; } @@ -1416,29 +1438,30 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) /* Keep on listening and act on events */ while(keepon) { - const DWORD buf_size = (DWORD)CURL_BUFSIZE(data->set.buffer_size); + const DWORD buf_size = (DWORD)data->set.buffer_size; waitret = WaitForMultipleObjects(obj_count, objs, FALSE, wait_timeout); switch(waitret) { case WAIT_TIMEOUT: { for(;;) { if(data->set.is_fread_set) { + size_t n; /* read from user-supplied method */ - result = (int)data->state.fread_func(buf, 1, BUFSIZE - 1, - data->state.in); - if(result == CURL_READFUNC_ABORT) { + n = data->state.fread_func(buf, 1, buf_size, data->state.in); + if(n == CURL_READFUNC_ABORT) { keepon = FALSE; result = CURLE_READ_ERROR; break; } - if(result == CURL_READFUNC_PAUSE) + if(n == CURL_READFUNC_PAUSE) break; - if(result == 0) /* no bytes */ + if(n == 0) /* no bytes */ break; - readfile_read = result; /* fall thru with number of bytes read */ + /* fall through with number of bytes read */ + readfile_read = (DWORD)n; } else { /* read from stdin */ @@ -1500,7 +1523,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) } if(events.lNetworkEvents & FD_READ) { /* read data from network */ - result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread); + result = Curl_read(conn, sockfd, buf, data->set.buffer_size, &nread); /* read would've blocked. Loop again */ if(result == CURLE_AGAIN) break; @@ -1538,8 +1561,8 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) } if(data->set.timeout) { - now = Curl_tvnow(); - if(Curl_tvdiff(now, conn->created) >= data->set.timeout) { + now = Curl_now(); + if(Curl_timediff(now, conn->created) >= data->set.timeout) { failf(data, "Time-out"); result = CURLE_OPERATION_TIMEDOUT; keepon = FALSE; @@ -1560,7 +1583,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) /* We called LoadLibrary, so call FreeLibrary */ if(!FreeLibrary(wsock2)) - infof(data, "FreeLibrary(wsock2) failed (%d)", ERRNO); + infof(data, "FreeLibrary(wsock2) failed (%u)", GetLastError()); #else pfd[0].fd = sockfd; pfd[0].events = POLLIN; @@ -1589,12 +1612,12 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) default: /* read! */ if(pfd[0].revents & POLLIN) { /* read data from network */ - result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread); + result = Curl_read(conn, sockfd, buf, data->set.buffer_size, &nread); /* read would've blocked. Loop again */ if(result == CURLE_AGAIN) break; /* returned not-zero, this an error */ - else if(result) { + if(result) { keepon = FALSE; break; } @@ -1625,12 +1648,12 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) nread = 0; if(poll_cnt == 2) { if(pfd[1].revents & POLLIN) { /* read from in file */ - nread = read(pfd[1].fd, buf, BUFSIZE - 1); + nread = read(pfd[1].fd, buf, data->set.buffer_size); } } else { /* read from user-supplied method */ - nread = (int)data->state.fread_func(buf, 1, BUFSIZE - 1, + nread = (int)data->state.fread_func(buf, 1, data->set.buffer_size, data->state.in); if(nread == CURL_READFUNC_ABORT) { keepon = FALSE; @@ -1656,8 +1679,8 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) } /* poll switch statement */ if(data->set.timeout) { - now = Curl_tvnow(); - if(Curl_tvdiff(now, conn->created) >= data->set.timeout) { + now = Curl_now(); + if(Curl_timediff(now, conn->created) >= data->set.timeout) { failf(data, "Time-out"); result = CURLE_OPERATION_TIMEDOUT; keepon = FALSE; diff --git a/lib/tftp.c b/lib/tftp.c index f2f8347..20dc600 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -76,12 +76,12 @@ #define TFTP_OPTION_INTERVAL "timeout" typedef enum { - TFTP_MODE_NETASCII=0, + TFTP_MODE_NETASCII = 0, TFTP_MODE_OCTET } tftp_mode_t; typedef enum { - TFTP_STATE_START=0, + TFTP_STATE_START = 0, TFTP_STATE_RX, TFTP_STATE_TX, TFTP_STATE_FIN @@ -100,7 +100,7 @@ typedef enum { } tftp_event_t; typedef enum { - TFTP_ERR_UNDEF=0, + TFTP_ERR_UNDEF = 0, TFTP_ERR_NOTFOUND, TFTP_ERR_PERM, TFTP_ERR_DISKFULL, @@ -181,6 +181,7 @@ const struct Curl_handler Curl_handler_tftp = { ZERO_NULL, /* perform_getsock */ tftp_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ PORT_TFTP, /* defport */ CURLPROTO_TFTP, /* protocol */ PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */ @@ -199,7 +200,7 @@ const struct Curl_handler Curl_handler_tftp = { static CURLcode tftp_set_timeouts(tftp_state_data_t *state) { time_t maxtime, timeout; - time_t timeout_ms; + timediff_t timeout_ms; bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE; time(&state->start_time); @@ -216,7 +217,7 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state) if(start) { maxtime = (time_t)(timeout_ms + 500) / 1000; - state->max_time = state->start_time+maxtime; + state->max_time = state->start_time + maxtime; /* Set per-block timeout to total */ timeout = maxtime; @@ -231,7 +232,7 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state) /* Compute the re-start interval to suit the timeout */ state->retry_time = (int)timeout/state->retry_max; if(state->retry_time<1) - state->retry_time=1; + state->retry_time = 1; } else { @@ -240,7 +241,7 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state) else maxtime = 3600; - state->max_time = state->start_time+maxtime; + state->max_time = state->start_time + maxtime; /* Set per-block timeout to total */ timeout = maxtime; @@ -250,15 +251,15 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state) } /* But bound the total number */ if(state->retry_max<3) - state->retry_max=3; + state->retry_max = 3; if(state->retry_max>50) - state->retry_max=50; + state->retry_max = 50; /* Compute the re-ACK interval to suit the timeout */ state->retry_time = (int)(timeout/state->retry_max); if(state->retry_time<1) - state->retry_time=1; + state->retry_time = 1; infof(state->conn->data, "set timeouts for state %d; Total %ld, retry %d maxtry %d\n", @@ -320,7 +321,7 @@ static const char *tftp_option_get(const char *buf, size_t len, return NULL; *option = buf; - loc += Curl_strnlen(buf+loc, len-loc); + loc += Curl_strnlen(buf + loc, len-loc); loc++; /* NULL term */ if(loc > len) @@ -359,7 +360,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state, failf(data, "invalid blocksize value in OACK packet"); return CURLE_TFTP_ILLEGAL; } - else if(blksize > TFTP_BLKSIZE_MAX) { + if(blksize > TFTP_BLKSIZE_MAX) { failf(data, "%s (%d)", "blksize is larger than max supported", TFTP_BLKSIZE_MAX); return CURLE_TFTP_ILLEGAL; @@ -474,7 +475,7 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event) /* If we are uploading, send an WRQ */ setpacketevent(&state->spacket, TFTP_EVENT_WRQ); state->conn->data->req.upload_fromhere = - (char *)state->spacket.data+4; + (char *)state->spacket.data + 4; if(data->state.infilesize != -1) Curl_pgrsSetUploadSize(data, data->state.infilesize); } @@ -490,7 +491,13 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event) if(result) return result; - snprintf((char *)state->spacket.data+2, + if(strlen(filename) > (state->blksize - strlen(mode) - 4)) { + failf(data, "TFTP file name too long\n"); + free(filename); + return CURLE_TFTP_ILLEGAL; /* too long file name field */ + } + + snprintf((char *)state->spacket.data + 2, state->blksize, "%s%c%s%c", filename, '\0', mode, '\0'); sbytes = 4 + strlen(filename) + strlen(mode); @@ -505,25 +512,25 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event) strcpy(buf, "0"); /* the destination is large enough */ sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, + (char *)state->spacket.data + sbytes, TFTP_OPTION_TSIZE); sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, buf); + (char *)state->spacket.data + sbytes, buf); /* add blksize option */ snprintf(buf, sizeof(buf), "%d", state->requested_blksize); sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, + (char *)state->spacket.data + sbytes, TFTP_OPTION_BLKSIZE); sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, buf); + (char *)state->spacket.data + sbytes, buf); /* add timeout option */ snprintf(buf, sizeof(buf), "%d", state->retry_time); sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, + (char *)state->spacket.data + sbytes, TFTP_OPTION_INTERVAL); sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, buf); + (char *)state->spacket.data + sbytes, buf); } /* the typecase for the 3rd argument is mostly for systems that do @@ -569,7 +576,7 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event) /* the next blocknum is x + 1 but it needs to wrap at an unsigned 16bit boundary */ -#define NEXT_BLOCKNUM(x) (((x)+1)&0xffff) +#define NEXT_BLOCKNUM(x) (((x) + 1)&0xffff) /********************************************************** * @@ -620,7 +627,7 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) } /* Check if completed (That is, a less than full packet is received) */ - if(state->rbytes < (ssize_t)state->blksize+4) { + if(state->rbytes < (ssize_t)state->blksize + 4) { state->state = TFTP_STATE_FIN; } else { @@ -736,7 +743,7 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) else { /* Re-send the data packet */ sbytes = sendto(state->sockfd, (void *)state->spacket.data, - 4+state->sbytes, SEND_4TH_ARG, + 4 + state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ @@ -769,7 +776,7 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) * data block. * */ state->sbytes = 0; - state->conn->data->req.upload_fromhere = (char *)state->spacket.data+4; + state->conn->data->req.upload_fromhere = (char *)state->spacket.data + 4; do { result = Curl_fillreadbuffer(state->conn, state->blksize - state->sbytes, &cb); @@ -806,7 +813,7 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) else { /* Re-send the data packet */ sbytes = sendto(state->sockfd, (void *)state->spacket.data, - 4+state->sbytes, SEND_4TH_ARG, + 4 + state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ @@ -1102,11 +1109,11 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) fromlen = sizeof(fromaddr); state->rbytes = (int)recvfrom(state->sockfd, (void *)state->rpacket.data, - state->blksize+4, + state->blksize + 4, 0, (struct sockaddr *)&fromaddr, &fromlen); - if(state->remote_addrlen==0) { + if(state->remote_addrlen == 0) { memcpy(&state->remote_addr, &fromaddr, fromlen); state->remote_addrlen = fromlen; } @@ -1119,7 +1126,8 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) } else { /* The event is given by the TFTP packet time */ - state->event = (tftp_event_t)getrpacketevent(&state->rpacket); + unsigned short event = getrpacketevent(&state->rpacket); + state->event = (tftp_event_t)event; switch(state->event) { case TFTP_EVENT_DATA: @@ -1127,7 +1135,7 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) if(state->rbytes > 4 && (NEXT_BLOCKNUM(state->block) == getrpacketblock(&state->rpacket))) { result = Curl_client_write(conn, CLIENTWRITE_BODY, - (char *)state->rpacket.data+4, + (char *)state->rpacket.data + 4, state->rbytes-4); if(result) { tftp_state_machine(state, TFTP_EVENT_ERROR); @@ -1138,14 +1146,17 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) } break; case TFTP_EVENT_ERROR: - state->error = (tftp_error_t)getrpacketblock(&state->rpacket); - infof(data, "%s\n", (const char *)state->rpacket.data+4); + { + unsigned short error = getrpacketblock(&state->rpacket); + state->error = (tftp_error_t)error; + infof(data, "%s\n", (const char *)state->rpacket.data + 4); break; + } case TFTP_EVENT_ACK: break; case TFTP_EVENT_OACK: result = tftp_parse_option_ack(state, - (const char *)state->rpacket.data+2, + (const char *)state->rpacket.data + 2, state->rbytes-2); if(result) return result; @@ -1189,7 +1200,7 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event) state->state = TFTP_STATE_FIN; return 0; } - else if(current > state->rx_time+state->retry_time) { + if(current > state->rx_time + state->retry_time) { if(event) *event = TFTP_EVENT_TIMEOUT; time(&state->rx_time); /* update even though we received nothing */ @@ -1223,7 +1234,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) failf(data, "TFTP response timeout"); return CURLE_OPERATION_TIMEDOUT; } - else if(event != TFTP_EVENT_NONE) { + if(event != TFTP_EVENT_NONE) { result = tftp_state_machine(state, event); if(result) return result; @@ -1282,7 +1293,7 @@ static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done) if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(conn->data, Curl_tvnow()); + result = Curl_speedcheck(conn->data, Curl_now()); } return result; } @@ -1340,7 +1351,7 @@ static CURLcode tftp_do(struct connectdata *conn, bool *done) state = (tftp_state_data_t *)conn->proto.tftpc; if(!state) - return CURLE_BAD_CALLING_ORDER; + return CURLE_TFTP_ILLEGAL; result = tftp_perform(conn, done); diff --git a/lib/timeval.c b/lib/timeval.c index f3b207a..66f923a 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -24,14 +24,14 @@ #if defined(WIN32) && !defined(MSDOS) -struct timeval curlx_tvnow(void) +struct curltime Curl_now(void) { /* ** GetTickCount() is available on _all_ Windows versions from W95 up ** to nowadays. Returns milliseconds elapsed since last system boot, ** increases monotonically and wraps once 49.7 days have elapsed. */ - struct timeval now; + struct curltime now; #if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ (_WIN32_WINNT < _WIN32_WINNT_VISTA) DWORD milliseconds = GetTickCount(); @@ -39,8 +39,8 @@ struct timeval curlx_tvnow(void) now.tv_usec = (milliseconds % 1000) * 1000; #else ULONGLONG milliseconds = GetTickCount64(); - now.tv_sec = (long) (milliseconds / 1000); - now.tv_usec = (long) (milliseconds % 1000) * 1000; + now.tv_sec = (time_t) (milliseconds / 1000); + now.tv_usec = (unsigned int) (milliseconds % 1000) * 1000; #endif return now; @@ -48,7 +48,7 @@ struct timeval curlx_tvnow(void) #elif defined(HAVE_CLOCK_GETTIME_MONOTONIC) -struct timeval curlx_tvnow(void) +struct curltime Curl_now(void) { /* ** clock_gettime() is granted to be increased monotonically when the @@ -58,10 +58,11 @@ struct timeval curlx_tvnow(void) ** system has started up. */ struct timeval now; + struct curltime cnow; struct timespec tsnow; if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) { - now.tv_sec = tsnow.tv_sec; - now.tv_usec = tsnow.tv_nsec / 1000; + cnow.tv_sec = tsnow.tv_sec; + cnow.tv_usec = (unsigned int)(tsnow.tv_nsec / 1000); } /* ** Even when the configure process has truly detected monotonic clock @@ -69,20 +70,54 @@ struct timeval curlx_tvnow(void) ** run-time. When this occurs simply fallback to other time source. */ #ifdef HAVE_GETTIMEOFDAY - else + else { (void)gettimeofday(&now, NULL); + cnow.tv_sec = now.tv_sec; + cnow.tv_usec = (unsigned int)now.tv_usec; + } #else else { - now.tv_sec = (long)time(NULL); - now.tv_usec = 0; + cnow.tv_sec = time(NULL); + cnow.tv_usec = 0; } #endif - return now; + return cnow; +} + +#elif defined(HAVE_MACH_ABSOLUTE_TIME) + +#include +#include + +struct curltime Curl_now(void) +{ + /* + ** Monotonic timer on Mac OS is provided by mach_absolute_time(), which + ** returns time in Mach "absolute time units," which are platform-dependent. + ** To convert to nanoseconds, one must use conversion factors specified by + ** mach_timebase_info(). + */ + static mach_timebase_info_data_t timebase; + struct curltime cnow; + uint64_t usecs; + + if(0 == timebase.denom) + (void) mach_timebase_info(&timebase); + + usecs = mach_absolute_time(); + usecs *= timebase.numer; + usecs /= timebase.denom; + usecs /= 1000; + + cnow.tv_sec = usecs / 1000000; + cnow.tv_usec = usecs % 1000000; + + return cnow; } #elif defined(HAVE_GETTIMEOFDAY) -struct timeval curlx_tvnow(void) +struct curltime Curl_now(void) { /* ** gettimeofday() is not granted to be increased monotonically, due to @@ -90,61 +125,62 @@ struct timeval curlx_tvnow(void) ** forward or backward in time. */ struct timeval now; + struct curltime ret; (void)gettimeofday(&now, NULL); - return now; + ret.tv_sec = now.tv_sec; + ret.tv_usec = now.tv_usec; + return ret; } #else -struct timeval curlx_tvnow(void) +struct curltime Curl_now(void) { /* ** time() returns the value of time in seconds since the Epoch. */ - struct timeval now; - now.tv_sec = (long)time(NULL); + struct curltime now; + now.tv_sec = time(NULL); now.tv_usec = 0; return now; } #endif -/* - * Make sure that the first argument is the more recent time, as otherwise - * we'll get a weird negative time-diff back... - * - * Returns: the time difference in number of milliseconds. For large diffs it - * returns 0x7fffffff on 32bit time_t systems. - */ -time_t curlx_tvdiff(struct timeval newer, struct timeval older) -{ #if SIZEOF_TIME_T < 8 - /* for 32bit time_t systems, add a precaution to avoid overflow for really - big time differences */ - time_t diff = newer.tv_sec-older.tv_sec; - if(diff >= (0x7fffffff/1000)) - return 0x7fffffff; +#define TIME_MAX INT_MAX +#define TIME_MIN INT_MIN +#else +#define TIME_MAX 9223372036854775807LL +#define TIME_MIN -9223372036854775807LL #endif - return (newer.tv_sec-older.tv_sec)*1000+ - (time_t)(newer.tv_usec-older.tv_usec)/1000; -} /* - * Same as curlx_tvdiff but with full usec resolution. + * Returns: time difference in number of milliseconds. For too large diffs it + * returns max value. * - * Returns: the time difference in seconds with subsecond resolution. + * @unittest: 1323 */ -double curlx_tvdiff_secs(struct timeval newer, struct timeval older) +timediff_t Curl_timediff(struct curltime newer, struct curltime older) { - if(newer.tv_sec != older.tv_sec) - return (double)(newer.tv_sec-older.tv_sec)+ - (double)(newer.tv_usec-older.tv_usec)/1000000.0; - else - return (double)(newer.tv_usec-older.tv_usec)/1000000.0; + timediff_t diff = newer.tv_sec-older.tv_sec; + if(diff >= (TIME_MAX/1000)) + return TIME_MAX; + else if(diff <= (TIME_MIN/1000)) + return TIME_MIN; + return diff * 1000 + (newer.tv_usec-older.tv_usec)/1000; } -/* return the number of seconds in the given input timeval struct */ -time_t Curl_tvlong(struct timeval t1) +/* + * Returns: time difference in number of microseconds. For too large diffs it + * returns max value. + */ +timediff_t Curl_timediff_us(struct curltime newer, struct curltime older) { - return t1.tv_sec; + timediff_t diff = newer.tv_sec-older.tv_sec; + if(diff >= (TIME_MAX/1000000)) + return TIME_MAX; + else if(diff <= (TIME_MIN/1000000)) + return TIME_MIN; + return diff * 1000000 + newer.tv_usec-older.tv_usec; } diff --git a/lib/timeval.h b/lib/timeval.h index 09f8b3a..fb3f680 100644 --- a/lib/timeval.h +++ b/lib/timeval.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,14 +22,20 @@ * ***************************************************************************/ -/* - * CAUTION: this header is designed to work when included by the app-side - * as well as the library. Do not mix with library internals! - */ - #include "curl_setup.h" -struct timeval curlx_tvnow(void); +#if SIZEOF_TIME_T < 8 +typedef int timediff_t; +#else +typedef curl_off_t timediff_t; +#endif + +struct curltime { + time_t tv_sec; /* seconds */ + int tv_usec; /* microseconds */ +}; + +struct curltime Curl_now(void); /* * Make sure that the first argument (t1) is the more recent time and t2 is @@ -37,22 +43,14 @@ struct timeval curlx_tvnow(void); * * Returns: the time difference in number of milliseconds. */ -time_t curlx_tvdiff(struct timeval t1, struct timeval t2); +timediff_t Curl_timediff(struct curltime t1, struct curltime t2); /* - * Same as curlx_tvdiff but with full usec resolution. + * Make sure that the first argument (t1) is the more recent time and t2 is + * the older time, as otherwise you get a weird negative time-diff back... * - * Returns: the time difference in seconds with subsecond resolution. + * Returns: the time difference in number of microseconds. */ -double curlx_tvdiff_secs(struct timeval t1, struct timeval t2); - -time_t Curl_tvlong(struct timeval t1); - -/* These two defines below exist to provide the older API for library - internals only. */ -#define Curl_tvnow() curlx_tvnow() -#define Curl_tvdiff(x,y) curlx_tvdiff(x,y) -#define Curl_tvdiff_secs(x,y) curlx_tvdiff_secs(x,y) +timediff_t Curl_timediff_us(struct curltime newer, struct curltime older); #endif /* HEADER_CURL_TIMEVAL_H */ - diff --git a/lib/transfer.c b/lib/transfer.c index a577bf7..fd9af31 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -73,12 +73,39 @@ #include "connect.h" #include "non-ascii.h" #include "http2.h" +#include "mime.h" +#include "strcase.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" #include "memdebug.h" +#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) || \ + !defined(CURL_DISABLE_IMAP) +/* + * checkheaders() checks the linked list of custom headers for a + * particular header (prefix). Provide the prefix without colon! + * + * Returns a pointer to the first matching header or NULL if none matched. + */ +char *Curl_checkheaders(const struct connectdata *conn, + const char *thisheader) +{ + struct curl_slist *head; + size_t thislen = strlen(thisheader); + struct Curl_easy *data = conn->data; + + for(head = data->set.headers; head; head = head->next) { + if(strncasecompare(head->data, thisheader, thislen) && + Curl_headersep(head->data[thislen]) ) + return head->data; + } + + return NULL; +} +#endif + /* * This function will call the read callback to fill our buffer with data * to upload. @@ -109,15 +136,18 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) /* this function returns a size_t, so we typecast to int to prevent warnings with picky compilers */ + Curl_set_in_callback(data, true); nread = (int)data->state.fread_func(data->req.upload_fromhere, 1, buffersize, data->state.in); + Curl_set_in_callback(data, false); if(nread == CURL_READFUNC_ABORT) { failf(data, "operation aborted by callback"); *nreadp = 0; return CURLE_ABORTED_BY_CALLBACK; } - else if(nread == CURL_READFUNC_PAUSE) { + if(nread == CURL_READFUNC_PAUSE) { + struct SingleRequest *k = &data->req; if(conn->handler->flags & PROTOPT_NONETWORK) { /* protocols that work without network cannot be paused. This is @@ -126,16 +156,15 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) failf(data, "Read callback asked for PAUSE when not supported!"); return CURLE_READ_ERROR; } - else { - struct SingleRequest *k = &data->req; - /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */ - k->keepon |= KEEP_SEND_PAUSE; /* mark socket send as paused */ - if(data->req.upload_chunky) { + + /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */ + k->keepon |= KEEP_SEND_PAUSE; /* mark socket send as paused */ + if(data->req.upload_chunky) { /* Back out the preallocation done above */ - data->req.upload_fromhere -= (8 + 2); - } - *nreadp = 0; + data->req.upload_fromhere -= (8 + 2); } + *nreadp = 0; + return CURLE_OK; /* nothing was read */ } else if((size_t)nread > buffersize) { @@ -195,27 +224,30 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) strlen(endofline_network)); #ifdef CURL_DOES_CONVERSIONS - CURLcode result; - int length; - if(data->set.prefer_ascii) { - /* translate the protocol and data */ - length = nread; - } - else { - /* just translate the protocol portion */ - length = strlen(hexbuffer); + { + CURLcode result; + int length; + if(data->set.prefer_ascii) + /* translate the protocol and data */ + length = nread; + else + /* just translate the protocol portion */ + length = (int)strlen(hexbuffer); + result = Curl_convert_to_network(data, data->req.upload_fromhere, + length); + /* Curl_convert_to_network calls failf if unsuccessful */ + if(result) + return result; } - result = Curl_convert_to_network(data, data->req.upload_fromhere, length); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; #endif /* CURL_DOES_CONVERSIONS */ - if((nread - hexlen) == 0) + if((nread - hexlen) == 0) { /* mark this as done once this chunk is transferred */ data->req.upload_done = TRUE; + infof(data, "Signaling end of chunked upload via terminating chunk.\n"); + } - nread+=(int)strlen(endofline_native); /* for the added end of line */ + nread += (int)strlen(endofline_native); /* for the added end of line */ } #ifdef CURL_DOES_CONVERSIONS else if((data->set.prefer_ascii) && (!sending_http_headers)) { @@ -241,6 +273,7 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) CURLcode Curl_readrewind(struct connectdata *conn) { struct Curl_easy *data = conn->data; + curl_mimepart *mimepart = &data->set.mimepost; conn->bits.rewindaftersend = FALSE; /* we rewind now */ @@ -253,14 +286,28 @@ CURLcode Curl_readrewind(struct connectdata *conn) /* We have sent away data. If not using CURLOPT_POSTFIELDS or CURLOPT_HTTPPOST, call app to rewind */ - if(data->set.postfields || - (data->set.httpreq == HTTPREQ_POST_FORM)) + if(conn->handler->protocol & PROTO_FAMILY_HTTP) { + struct HTTP *http = data->req.protop; + + if(http->sendit) + mimepart = http->sendit; + } + if(data->set.postfields) ; /* do nothing */ + else if(data->set.httpreq == HTTPREQ_POST_MIME || + data->set.httpreq == HTTPREQ_POST_FORM) { + if(Curl_mime_rewind(mimepart)) { + failf(data, "Cannot rewind mime/post data"); + return CURLE_SEND_FAIL_REWIND; + } + } else { if(data->set.seek_func) { int err; + Curl_set_in_callback(data, true); err = (data->set.seek_func)(data->set.seek_client, 0, SEEK_SET); + Curl_set_in_callback(data, false); if(err) { failf(data, "seek callback returned error %d", (int)err); return CURLE_SEND_FAIL_REWIND; @@ -269,8 +316,10 @@ CURLcode Curl_readrewind(struct connectdata *conn) else if(data->set.ioctl_func) { curlioerr err; + Curl_set_in_callback(data, true); err = (data->set.ioctl_func)(data, CURLIOCMD_RESTARTREAD, data->set.ioctl_client); + Curl_set_in_callback(data, false); infof(data, "the ioctl callback returned %d\n", (int)err); if(err) { @@ -405,8 +454,7 @@ static CURLcode readwrite_data(struct Curl_easy *data, /* This is where we loop until we have read everything there is to read or we get a CURLE_AGAIN */ do { - size_t buffersize = data->set.buffer_size? - data->set.buffer_size : BUFSIZE; + size_t buffersize = data->set.buffer_size; size_t bytestoread = buffersize; if( @@ -451,7 +499,7 @@ static CURLcode readwrite_data(struct Curl_easy *data, Curl_pgrsTime(data, TIMER_STARTTRANSFER); if(k->exp100 > EXP100_SEND_DATA) /* set time stamp to compare with when waiting for the 100 */ - k->start100 = Curl_tvnow(); + k->start100 = Curl_now(); } *didwhat |= KEEP_RECV; @@ -561,7 +609,7 @@ static CURLcode readwrite_data(struct Curl_easy *data, infof(data, "Ignoring the response-body\n"); } if(data->state.resume_from && !k->content_range && - (data->set.httpreq==HTTPREQ_GET) && + (data->set.httpreq == HTTPREQ_GET) && !k->ignorebody) { if(k->size == data->state.resume_from) { @@ -642,7 +690,7 @@ static CURLcode readwrite_data(struct Curl_easy *data, failf(data, "%s in chunked-encoding", Curl_chunked_strerror(res)); return CURLE_RECV_ERROR; } - else if(CHUNKE_STOP == res) { + if(CHUNKE_STOP == res) { size_t dataleft; /* we're done reading chunks! */ k->keepon &= ~KEEP_RECV; /* read no more */ @@ -681,8 +729,6 @@ static CURLcode readwrite_data(struct Curl_easy *data, excess = (size_t)(k->bytecount + nread - k->maxdownload); if(excess > 0 && !k->ignorebody) { if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) { - /* The 'excess' amount below can't be more than BUFSIZE which - always will fit in a size_t */ infof(data, "Rewinding stream by : %zu" " bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T @@ -740,48 +786,19 @@ static CURLcode readwrite_data(struct Curl_easy *data, in http_chunks.c. Make sure that ALL_CONTENT_ENCODINGS contains all the encodings handled here. */ -#ifdef HAVE_LIBZ - switch(conn->data->set.http_ce_skip ? - IDENTITY : k->auto_decoding) { - case IDENTITY: -#endif - /* This is the default when the server sends no - Content-Encoding header. See Curl_readwrite_init; the - memset() call initializes k->auto_decoding to zero. */ + if(conn->data->set.http_ce_skip || !k->writer_stack) { if(!k->ignorebody) { - #ifndef CURL_DISABLE_POP3 - if(conn->handler->protocol&PROTO_FAMILY_POP3) + if(conn->handler->protocol & PROTO_FAMILY_POP3) result = Curl_pop3_write(conn, k->str, nread); else #endif /* CURL_DISABLE_POP3 */ - result = Curl_client_write(conn, CLIENTWRITE_BODY, k->str, nread); } -#ifdef HAVE_LIBZ - break; - - case DEFLATE: - /* Assume CLIENTWRITE_BODY; headers are not encoded. */ - if(!k->ignorebody) - result = Curl_unencode_deflate_write(conn, k, nread); - break; - - case GZIP: - /* Assume CLIENTWRITE_BODY; headers are not encoded. */ - if(!k->ignorebody) - result = Curl_unencode_gzip_write(conn, k, nread); - break; - - default: - failf(data, "Unrecognized content encoding type. " - "libcurl understands `identity', `deflate' and `gzip' " - "content encodings."); - result = CURLE_BAD_CONTENT_ENCODING; - break; } -#endif + else + result = Curl_unencode_write(conn, k->writer_stack, k->str, nread); } k->badheader = HEADER_NORMAL; /* taken care of now */ @@ -791,10 +808,15 @@ static CURLcode readwrite_data(struct Curl_easy *data, } /* if(!header and data to read) */ - if(conn->handler->readwrite && - (excess > 0 && !conn->bits.stream_was_rewound)) { + if(conn->handler->readwrite && excess && !conn->bits.stream_was_rewound) { /* Parse the excess data */ k->str += nread; + + if(&k->str[excess] > &k->buf[data->set.buffer_size]) { + /* the excess amount was too excessive(!), make sure + it doesn't read out of buffer */ + excess = &k->buf[data->set.buffer_size] - k->str; + } nread = (ssize_t)excess; result = conn->handler->readwrite(data, conn, &nread, &readmore); @@ -853,7 +875,6 @@ static CURLcode done_sending(struct connectdata *conn, */ static CURLcode readwrite_upload(struct Curl_easy *data, struct connectdata *conn, - struct SingleRequest *k, int *didwhat) { ssize_t i, si; @@ -861,6 +882,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, CURLcode result; ssize_t nread; /* number of bytes read */ bool sending_http_headers = FALSE; + struct SingleRequest *k = &data->req; if((k->bytecount == 0) && (k->writebytecount == 0)) Curl_pgrsTime(data, TIMER_STARTTRANSFER); @@ -871,15 +893,15 @@ static CURLcode readwrite_upload(struct Curl_easy *data, /* only read more data if there's no upload data already present in the upload buffer */ - if(0 == data->req.upload_present) { + if(0 == k->upload_present) { /* init the "upload from here" pointer */ - data->req.upload_fromhere = k->uploadbuf; + k->upload_fromhere = data->state.uploadbuffer; if(!k->upload_done) { /* HTTP pollution, this should be written nicer to become more protocol agnostic. */ int fillcount; - struct HTTP *http = data->req.protop; + struct HTTP *http = k->protop; if((k->exp100 == EXP100_SENDING_REQUEST) && (http->sending == HTTPSEND_BODY)) { @@ -888,11 +910,11 @@ static CURLcode readwrite_upload(struct Curl_easy *data, go into the Expect: 100 state and await such a header */ k->exp100 = EXP100_AWAITING_CONTINUE; /* wait for the header */ k->keepon &= ~KEEP_SEND; /* disable writing */ - k->start100 = Curl_tvnow(); /* timeout count starts now */ + k->start100 = Curl_now(); /* timeout count starts now */ *didwhat &= ~KEEP_SEND; /* we didn't write anything actually */ /* set a timeout for the multi interface */ - Curl_expire(data, data->set.expect_100_timeout); + Curl_expire(data, data->set.expect_100_timeout, EXPIRE_100_TIMEOUT); break; } @@ -905,7 +927,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, sending_http_headers = FALSE; } - result = Curl_fillreadbuffer(conn, BUFSIZE, &fillcount); + result = Curl_fillreadbuffer(conn, UPLOAD_BUFSIZE, &fillcount); if(result) return result; @@ -918,7 +940,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, /* this is a paused transfer */ break; } - else if(nread<=0) { + if(nread <= 0) { result = done_sending(conn, k); if(result) return result; @@ -926,7 +948,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, } /* store number of bytes available for upload */ - data->req.upload_present = nread; + k->upload_present = nread; /* convert LF to CRLF if so asked */ if((!sending_http_headers) && ( @@ -937,7 +959,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, (data->set.crlf))) { /* Do we need to allocate a scratch buffer? */ if(!data->state.scratch) { - data->state.scratch = malloc(2 * BUFSIZE); + data->state.scratch = malloc(2 * data->set.buffer_size); if(!data->state.scratch) { failf(data, "Failed to alloc scratch buffer!"); @@ -952,7 +974,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, * must be used instead of the escape sequences \r & \n. */ for(i = 0, si = 0; i < nread; i++, si++) { - if(data->req.upload_fromhere[i] == 0x0a) { + if(k->upload_fromhere[i] == 0x0a) { data->state.scratch[si++] = 0x0d; data->state.scratch[si] = 0x0a; if(!data->set.crlf) { @@ -963,7 +985,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, } } else - data->state.scratch[si] = data->req.upload_fromhere[i]; + data->state.scratch[si] = k->upload_fromhere[i]; } if(si != nread) { @@ -972,10 +994,10 @@ static CURLcode readwrite_upload(struct Curl_easy *data, nread = si; /* upload from the new (replaced) buffer instead */ - data->req.upload_fromhere = data->state.scratch; + k->upload_fromhere = data->state.scratch; /* set the new amount too */ - data->req.upload_present = nread; + k->upload_present = nread; } } @@ -986,7 +1008,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, return result; } #endif /* CURL_DISABLE_SMTP */ - } /* if 0 == data->req.upload_present */ + } /* if 0 == k->upload_present */ else { /* We have a partial buffer left from a previous "round". Use that instead of reading more data */ @@ -994,41 +1016,42 @@ static CURLcode readwrite_upload(struct Curl_easy *data, /* write to socket (send away data) */ result = Curl_write(conn, - conn->writesockfd, /* socket to send to */ - data->req.upload_fromhere, /* buffer pointer */ - data->req.upload_present, /* buffer size */ - &bytes_written); /* actually sent */ + conn->writesockfd, /* socket to send to */ + k->upload_fromhere, /* buffer pointer */ + k->upload_present, /* buffer size */ + &bytes_written); /* actually sent */ if(result) return result; if(data->set.verbose) /* show the data before we change the pointer upload_fromhere */ - Curl_debug(data, CURLINFO_DATA_OUT, data->req.upload_fromhere, + Curl_debug(data, CURLINFO_DATA_OUT, k->upload_fromhere, (size_t)bytes_written, conn); k->writebytecount += bytes_written; - if(k->writebytecount == data->state.infilesize) { + if((!k->upload_chunky || k->forbidchunk) && + (k->writebytecount == data->state.infilesize)) { /* we have sent all data we were supposed to */ k->upload_done = TRUE; infof(data, "We are completely uploaded and fine\n"); } - if(data->req.upload_present != bytes_written) { + if(k->upload_present != bytes_written) { /* we only wrote a part of the buffer (if anything), deal with it! */ /* store the amount of bytes left in the buffer to write */ - data->req.upload_present -= bytes_written; + k->upload_present -= bytes_written; /* advance the pointer where to find the buffer when the next send is to happen */ - data->req.upload_fromhere += bytes_written; + k->upload_fromhere += bytes_written; } else { /* we've uploaded that buffer now */ - data->req.upload_fromhere = k->uploadbuf; - data->req.upload_present = 0; /* no more bytes left */ + k->upload_fromhere = data->state.uploadbuffer; + k->upload_present = 0; /* no more bytes left */ if(k->upload_done) { result = done_sending(conn, k); @@ -1058,7 +1081,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, { struct SingleRequest *k = &data->req; CURLcode result; - int didwhat=0; + int didwhat = 0; curl_socket_t fd_read; curl_socket_t fd_write; @@ -1108,12 +1131,12 @@ CURLcode Curl_readwrite(struct connectdata *conn, if((k->keepon & KEEP_SEND) && (select_res & CURL_CSELECT_OUT)) { /* write */ - result = readwrite_upload(data, conn, k, &didwhat); + result = readwrite_upload(data, conn, &didwhat); if(result) return result; } - k->now = Curl_tvnow(); + k->now = Curl_now(); if(didwhat) { /* Update read/write counters */ if(k->bytecountp) @@ -1137,11 +1160,12 @@ CURLcode Curl_readwrite(struct connectdata *conn, */ - time_t ms = Curl_tvdiff(k->now, k->start100); + timediff_t ms = Curl_timediff(k->now, k->start100); if(ms >= data->set.expect_100_timeout) { /* we've waited long enough, continue anyway */ k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; + Curl_expire_done(data, EXPIRE_100_TIMEOUT); infof(data, "Done waiting for 100-continue\n"); } } @@ -1160,13 +1184,14 @@ CURLcode Curl_readwrite(struct connectdata *conn, failf(data, "Operation timed out after %ld milliseconds with %" CURL_FORMAT_CURL_OFF_T " out of %" CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(k->now, data->progress.t_startsingle), k->bytecount, - k->size); + Curl_timediff(k->now, data->progress.t_startsingle), + k->bytecount, k->size); } else { failf(data, "Operation timed out after %ld milliseconds with %" CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(k->now, data->progress.t_startsingle), k->bytecount); + Curl_timediff(k->now, data->progress.t_startsingle), + k->bytecount); } return CURLE_OPERATION_TIMEDOUT; } @@ -1186,15 +1211,13 @@ CURLcode Curl_readwrite(struct connectdata *conn, */ (k->bytecount != (k->size + data->state.crlf_conversions)) && #endif /* CURL_DO_LINEEND_CONV */ - !data->req.newurl) { + !k->newurl) { failf(data, "transfer closed with %" CURL_FORMAT_CURL_OFF_T - " bytes remaining to read", - k->size - k->bytecount); + " bytes remaining to read", k->size - k->bytecount); return CURLE_PARTIAL_FILE; } - else if(!(data->set.opt_no_body) && - k->chunk && - (conn->chunk.state != CHUNK_STOP)) { + if(!(data->set.opt_no_body) && k->chunk && + (conn->chunk.state != CHUNK_STOP)) { /* * In chunked mode, return an error if the connection is closed prior to * the empty (terminating) chunk is read. @@ -1292,6 +1315,13 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) failf(data, "No URL set!"); return CURLE_URL_MALFORMAT; } + /* since the URL may have been redirected in a previous use of this handle */ + if(data->change.url_alloc) { + /* the already set URL is allocated, free it first! */ + Curl_safefree(data->change.url); + data->change.url_alloc = FALSE; + } + data->change.url = data->set.str[STRING_SET_URL]; /* Init the SSL session ID cache here. We do it here since we want to do it after the *_setopt() calls (that could specify the size of the cache) but @@ -1300,7 +1330,8 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) if(result) return result; - data->set.followlocation=0; /* reset the location-follow counter */ + data->state.wildcardmatch = data->set.wildcard_enabled; + data->set.followlocation = 0; /* reset the location-follow counter */ data->state.this_is_a_follow = FALSE; /* reset this */ data->state.errorbuf = FALSE; /* no error has occurred */ data->state.httpversion = 0; /* don't assume any particular server version */ @@ -1313,8 +1344,11 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) if(data->set.httpreq == HTTPREQ_PUT) data->state.infilesize = data->set.filesize; - else + else { data->state.infilesize = data->set.postfieldsize; + if(data->set.postfields && (data->state.infilesize == -1)) + data->state.infilesize = (curl_off_t)strlen(data->set.postfields); + } /* If there is a list of cookie files to read, do it now! */ if(data->change.cookielist) @@ -1339,14 +1373,14 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) #endif Curl_initinfo(data); /* reset session-specific information "variables" */ - Curl_pgrsResetTimesSizes(data); + Curl_pgrsResetTransferSizes(data); Curl_pgrsStartNow(data); if(data->set.timeout) - Curl_expire(data, data->set.timeout); + Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT); if(data->set.connecttimeout) - Curl_expire(data, data->set.connecttimeout); + Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT); /* In case the handle is re-used and an authentication method was picked in the session we need to make sure we only use the one(s) we now @@ -1354,15 +1388,14 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) data->state.authhost.picked &= data->state.authhost.want; data->state.authproxy.picked &= data->state.authproxy.want; - if(data->set.wildcardmatch) { + if(data->state.wildcardmatch) { struct WildcardData *wc = &data->wildcard; - if(!wc->filelist) { + if(wc->state < CURLWC_INIT) { result = Curl_wildcard_init(wc); /* init wildcard structures */ if(result) return CURLE_OUT_OF_MEMORY; } } - } return result; @@ -1386,19 +1419,59 @@ CURLcode Curl_posttransfer(struct Curl_easy *data) #ifndef CURL_DISABLE_HTTP /* + * Find the separator at the end of the host name, or the '?' in cases like + * http://www.url.com?id=2380 + */ +static const char *find_host_sep(const char *url) +{ + const char *sep; + const char *query; + + /* Find the start of the hostname */ + sep = strstr(url, "//"); + if(!sep) + sep = url; + else + sep += 2; + + query = strchr(sep, '?'); + sep = strchr(sep, '/'); + + if(!sep) + sep = url + strlen(url); + + if(!query) + query = url + strlen(url); + + return sep < query ? sep : query; +} + +/* * strlen_url() returns the length of the given URL if the spaces within the * URL were properly URL encoded. + * URL encoding should be skipped for host names, otherwise IDN resolution + * will fail. */ -static size_t strlen_url(const char *url) +static size_t strlen_url(const char *url, bool relative) { const unsigned char *ptr; - size_t newlen=0; - bool left=TRUE; /* left side of the ? */ + size_t newlen = 0; + bool left = TRUE; /* left side of the ? */ + const unsigned char *host_sep = (const unsigned char *) url; + + if(!relative) + host_sep = (const unsigned char *) find_host_sep(url); + + for(ptr = (unsigned char *)url; *ptr; ptr++) { + + if(ptr < host_sep) { + ++newlen; + continue; + } - for(ptr=(unsigned char *)url; *ptr; ptr++) { switch(*ptr) { case '?': - left=FALSE; + left = FALSE; /* fall through */ default: if(*ptr >= 0x80) @@ -1407,7 +1480,7 @@ static size_t strlen_url(const char *url) break; case ' ': if(left) - newlen+=3; + newlen += 3; else newlen++; break; @@ -1418,19 +1491,32 @@ static size_t strlen_url(const char *url) /* strcpy_url() copies a url to a output buffer and URL-encodes the spaces in * the source URL accordingly. + * URL encoding should be skipped for host names, otherwise IDN resolution + * will fail. */ -static void strcpy_url(char *output, const char *url) +static void strcpy_url(char *output, const char *url, bool relative) { /* we must add this with whitespace-replacing */ - bool left=TRUE; + bool left = TRUE; const unsigned char *iptr; char *optr = output; + const unsigned char *host_sep = (const unsigned char *) url; + + if(!relative) + host_sep = (const unsigned char *) find_host_sep(url); + for(iptr = (unsigned char *)url; /* read from here */ *iptr; /* until zero byte */ iptr++) { + + if(iptr < host_sep) { + *optr++ = *iptr; + continue; + } + switch(*iptr) { case '?': - left=FALSE; + left = FALSE; /* fall through */ default: if(*iptr >= 0x80) { @@ -1451,7 +1537,7 @@ static void strcpy_url(char *output, const char *url) break; } } - *optr=0; /* zero terminate output buffer */ + *optr = 0; /* zero terminate output buffer */ } @@ -1483,32 +1569,33 @@ static char *concat_url(const char *base, const char *relurl) char *protsep; char *pathsep; size_t newlen; + bool host_changed = FALSE; const char *useurl = relurl; size_t urllen; /* we must make our own copy of the URL to play with, as it may point to read-only data */ - char *url_clone=strdup(base); + char *url_clone = strdup(base); if(!url_clone) return NULL; /* skip out of this NOW */ /* protsep points to the start of the host name */ - protsep=strstr(url_clone, "//"); + protsep = strstr(url_clone, "//"); if(!protsep) - protsep=url_clone; + protsep = url_clone; else - protsep+=2; /* pass the slashes */ + protsep += 2; /* pass the slashes */ if('/' != relurl[0]) { - int level=0; + int level = 0; /* First we need to find out if there's a ?-letter in the URL, and cut it and the right-side of that off */ pathsep = strchr(protsep, '?'); if(pathsep) - *pathsep=0; + *pathsep = 0; /* we have a relative path to append to the last slash if there's one available, or if the new URL is just a query string (starts with a @@ -1517,14 +1604,14 @@ static char *concat_url(const char *base, const char *relurl) if(useurl[0] != '?') { pathsep = strrchr(protsep, '/'); if(pathsep) - *pathsep=0; + *pathsep = 0; } /* Check if there's any slash after the host name, and if so, remember that position instead */ pathsep = strchr(protsep, '/'); if(pathsep) - protsep = pathsep+1; + protsep = pathsep + 1; else protsep = NULL; @@ -1532,13 +1619,13 @@ static char *concat_url(const char *base, const char *relurl) and act accordingly */ if((useurl[0] == '.') && (useurl[1] == '/')) - useurl+=2; /* just skip the "./" */ + useurl += 2; /* just skip the "./" */ while((useurl[0] == '.') && (useurl[1] == '.') && (useurl[2] == '/')) { level++; - useurl+=3; /* pass the "../" */ + useurl += 3; /* pass the "../" */ } if(protsep) { @@ -1546,9 +1633,9 @@ static char *concat_url(const char *base, const char *relurl) /* cut off one more level from the right of the original URL */ pathsep = strrchr(protsep, '/'); if(pathsep) - *pathsep=0; + *pathsep = 0; else { - *protsep=0; + *protsep = 0; break; } } @@ -1560,9 +1647,10 @@ static char *concat_url(const char *base, const char *relurl) if((relurl[0] == '/') && (relurl[1] == '/')) { /* the new URL starts with //, just keep the protocol part from the original one */ - *protsep=0; + *protsep = 0; useurl = &relurl[2]; /* we keep the slashes from the original, so we skip the new ones */ + host_changed = TRUE; } else { /* cut off the original URL from the first slash, or deal with URLs @@ -1575,7 +1663,7 @@ static char *concat_url(const char *base, const char *relurl) char *sep = strchr(protsep, '?'); if(sep && (sep < pathsep)) pathsep = sep; - *pathsep=0; + *pathsep = 0; } else { /* There was no slash. Now, since we might be operating on a badly @@ -1584,7 +1672,7 @@ static char *concat_url(const char *base, const char *relurl) ?-letter as well! */ pathsep = strchr(protsep, '?'); if(pathsep) - *pathsep=0; + *pathsep = 0; } } } @@ -1594,7 +1682,7 @@ static char *concat_url(const char *base, const char *relurl) letter we replace each space with %20 while it is replaced with '+' on the right side of the '?' letter. */ - newlen = strlen_url(useurl); + newlen = strlen_url(useurl, !host_changed); urllen = strlen(url_clone); @@ -1616,7 +1704,7 @@ static char *concat_url(const char *base, const char *relurl) newest[urllen++]='/'; /* then append the new piece on the right side */ - strcpy_url(&newest[urllen], useurl); + strcpy_url(&newest[urllen], useurl, !host_changed); free(url_clone); @@ -1629,9 +1717,7 @@ static char *concat_url(const char *base, const char *relurl) * as given by the remote server and set up the new URL to request. */ CURLcode Curl_follow(struct Curl_easy *data, - char *newurl, /* this 'newurl' is the Location: string, - and it must be malloc()ed before passed - here */ + char *newurl, /* the Location: string */ followtype type) /* see transfer.h */ { #ifdef CURL_DISABLE_HTTP @@ -1644,37 +1730,40 @@ CURLcode Curl_follow(struct Curl_easy *data, /* Location: redirect */ bool disallowport = FALSE; + bool reachedmax = FALSE; if(type == FOLLOW_REDIR) { if((data->set.maxredirs != -1) && - (data->set.followlocation >= data->set.maxredirs)) { - failf(data, "Maximum (%ld) redirects followed", data->set.maxredirs); - return CURLE_TOO_MANY_REDIRECTS; + (data->set.followlocation >= data->set.maxredirs)) { + reachedmax = TRUE; + type = FOLLOW_FAKE; /* switch to fake to store the would-be-redirected + to URL */ } + else { + /* mark the next request as a followed location: */ + data->state.this_is_a_follow = TRUE; - /* mark the next request as a followed location: */ - data->state.this_is_a_follow = TRUE; + data->set.followlocation++; /* count location-followers */ - data->set.followlocation++; /* count location-followers */ + if(data->set.http_auto_referer) { + /* We are asked to automatically set the previous URL as the referer + when we get the next URL. We pick the ->url field, which may or may + not be 100% correct */ - if(data->set.http_auto_referer) { - /* We are asked to automatically set the previous URL as the referer - when we get the next URL. We pick the ->url field, which may or may - not be 100% correct */ + if(data->change.referer_alloc) { + Curl_safefree(data->change.referer); + data->change.referer_alloc = FALSE; + } - if(data->change.referer_alloc) { - Curl_safefree(data->change.referer); - data->change.referer_alloc = FALSE; + data->change.referer = strdup(data->change.url); + if(!data->change.referer) + return CURLE_OUT_OF_MEMORY; + data->change.referer_alloc = TRUE; /* yes, free this later */ } - - data->change.referer = strdup(data->change.url); - if(!data->change.referer) - return CURLE_OUT_OF_MEMORY; - data->change.referer_alloc = TRUE; /* yes, free this later */ } } - if(!is_absolute_url(newurl)) { + if(!is_absolute_url(newurl)) { /*** *DANG* this is an RFC 2068 violation. The URL is supposed to be absolute and this doesn't seem to be that! @@ -1682,24 +1771,22 @@ CURLcode Curl_follow(struct Curl_easy *data, char *absolute = concat_url(data->change.url, newurl); if(!absolute) return CURLE_OUT_OF_MEMORY; - free(newurl); newurl = absolute; } else { /* The new URL MAY contain space or high byte values, that means a mighty stupid redirect URL but we still make an effort to do "right". */ char *newest; - size_t newlen = strlen_url(newurl); + size_t newlen = strlen_url(newurl, FALSE); /* This is an absolute URL, don't allow the custom port number */ disallowport = TRUE; - newest = malloc(newlen+1); /* get memory for this */ + newest = malloc(newlen + 1); /* get memory for this */ if(!newest) return CURLE_OUT_OF_MEMORY; - strcpy_url(newest, newurl); /* create a space-free URL */ - free(newurl); /* that was no good */ + strcpy_url(newest, newurl, FALSE); /* create a space-free URL */ newurl = newest; /* use this instead now */ } @@ -1708,6 +1795,11 @@ CURLcode Curl_follow(struct Curl_easy *data, /* we're only figuring out the new url if we would've followed locations but now we're done so we can get out! */ data->info.wouldredirect = newurl; + + if(reachedmax) { + failf(data, "Maximum (%ld) redirects followed", data->set.maxredirs); + return CURLE_TOO_MANY_REDIRECTS; + } return CURLE_OK; } @@ -1721,7 +1813,6 @@ CURLcode Curl_follow(struct Curl_easy *data, data->change.url = newurl; data->change.url_alloc = TRUE; - newurl = NULL; /* don't free! */ infof(data, "Issue another request to this URL: '%s'\n", data->change.url); @@ -1763,7 +1854,8 @@ CURLcode Curl_follow(struct Curl_easy *data, * can be overridden with CURLOPT_POSTREDIR. */ if((data->set.httpreq == HTTPREQ_POST - || data->set.httpreq == HTTPREQ_POST_FORM) + || data->set.httpreq == HTTPREQ_POST_FORM + || data->set.httpreq == HTTPREQ_POST_MIME) && !(data->set.keep_post & CURL_REDIR_POST_301)) { infof(data, "Switch from POST to GET\n"); data->set.httpreq = HTTPREQ_GET; @@ -1787,7 +1879,8 @@ CURLcode Curl_follow(struct Curl_easy *data, * can be overridden with CURLOPT_POSTREDIR. */ if((data->set.httpreq == HTTPREQ_POST - || data->set.httpreq == HTTPREQ_POST_FORM) + || data->set.httpreq == HTTPREQ_POST_FORM + || data->set.httpreq == HTTPREQ_POST_MIME) && !(data->set.keep_post & CURL_REDIR_POST_302)) { infof(data, "Switch from POST to GET\n"); data->set.httpreq = HTTPREQ_GET; @@ -1795,7 +1888,7 @@ CURLcode Curl_follow(struct Curl_easy *data, break; case 303: /* See Other */ - /* Disable both types of POSTs, unless the user explicitely + /* Disable both types of POSTs, unless the user explicitly asks for POST after POST */ if(data->set.httpreq != HTTPREQ_GET && !(data->set.keep_post & CURL_REDIR_POST_303)) { @@ -1820,7 +1913,7 @@ CURLcode Curl_follow(struct Curl_easy *data, break; } Curl_pgrsTime(data, TIMER_REDIRECT); - Curl_pgrsResetTimesSizes(data); + Curl_pgrsResetTransferSizes(data); return CURLE_OK; #endif /* CURL_DISABLE_HTTP */ @@ -1944,11 +2037,11 @@ Curl_setup_transfer( (http->sending == HTTPSEND_BODY)) { /* wait with write until we either got 100-continue or a timeout */ k->exp100 = EXP100_AWAITING_CONTINUE; - k->start100 = Curl_tvnow(); + k->start100 = Curl_now(); /* Set a timeout for the multi interface. Add the inaccuracy margin so that we don't fire slightly too early and get denied to run. */ - Curl_expire(data, data->set.expect_100_timeout); + Curl_expire(data, data->set.expect_100_timeout, EXPIRE_100_TIMEOUT); } else { if(data->state.expect100header) diff --git a/lib/transfer.h b/lib/transfer.h index 5189672..9ba398d 100644 --- a/lib/transfer.h +++ b/lib/transfer.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,10 @@ * ***************************************************************************/ +#define Curl_headersep(x) ((((x)==':') || ((x)==';'))) +char *Curl_checkheaders(const struct connectdata *conn, + const char *thisheader); + void Curl_init_CONNECT(struct Curl_easy *data); CURLcode Curl_pretransfer(struct Curl_easy *data); diff --git a/lib/url.c b/lib/url.c index 38b9552..945d4e3 100644 --- a/lib/url.c +++ b/lib/url.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -55,9 +55,7 @@ #error "We can't compile without socket() support!" #endif -#ifdef HAVE_LIMITS_H #include -#endif #ifdef USE_LIBIDN2 #include @@ -71,6 +69,7 @@ bool curl_win32_idn_to_ascii(const char *in, char **out); #include "netrc.h" #include "formdata.h" +#include "mime.h" #include "vtls/vtls.h" #include "hostip.h" #include "transfer.h" @@ -119,15 +118,13 @@ bool curl_win32_idn_to_ascii(const char *in, char **out); #include "pipeline.h" #include "dotdot.h" #include "strdup.h" +#include "setopt.h" + /* The last 3 #include files should be in this order */ #include "curl_printf.h" #include "curl_memory.h" #include "memdebug.h" -/* Local static prototypes */ -static struct connectdata * -find_oldest_idle_connection_in_bundle(struct Curl_easy *data, - struct connectbundle *bundle); static void conn_free(struct connectdata *conn); static void free_fixed_hostname(struct hostname *host); static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke); @@ -135,11 +132,17 @@ static CURLcode parse_url_login(struct Curl_easy *data, struct connectdata *conn, char **userptr, char **passwdptr, char **optionsptr); -static CURLcode parse_login_details(const char *login, const size_t len, - char **userptr, char **passwdptr, - char **optionsptr); static unsigned int get_protocol_family(unsigned int protocol); +/* Some parts of the code (e.g. chunked encoding) assume this buffer has at + * more than just a few bytes to play with. Don't let it become too small or + * bad things will happen. + */ +#if READBUFFER_SIZE < READBUFFER_MIN +# error READBUFFER_SIZE is too small +#endif + + /* * Protocol table. */ @@ -187,8 +190,11 @@ static const struct Curl_handler * const protocols[] = { &Curl_handler_tftp, #endif -#ifdef USE_LIBSSH2 +#if defined(USE_LIBSSH2) || defined(USE_LIBSSH) &Curl_handler_scp, +#endif + +#if defined(USE_LIBSSH2) || defined(USE_LIBSSH) &Curl_handler_sftp, #endif @@ -261,6 +267,7 @@ static const struct Curl_handler Curl_handler_dummy = { ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* readwrite */ + ZERO_NULL, /* connection_check */ 0, /* defport */ 0, /* protocol */ PROTOPT_NONE /* flags */ @@ -270,7 +277,7 @@ void Curl_freeset(struct Curl_easy *data) { /* Free all dynamic strings stored in the data->set substructure. */ enum dupstring i; - for(i=(enum dupstring)0; i < STRING_LAST; i++) { + for(i = (enum dupstring)0; i < STRING_LAST; i++) { Curl_safefree(data->set.str[i]); } @@ -284,98 +291,8 @@ void Curl_freeset(struct Curl_easy *data) data->change.url_alloc = FALSE; } data->change.url = NULL; -} - -static CURLcode setstropt(char **charp, const char *s) -{ - /* Release the previous storage at `charp' and replace by a dynamic storage - copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */ - - Curl_safefree(*charp); - - if(s) { - char *str = strdup(s); - - if(!str) - return CURLE_OUT_OF_MEMORY; - - *charp = str; - } - - return CURLE_OK; -} - -static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp) -{ - CURLcode result = CURLE_OK; - char *user = NULL; - char *passwd = NULL; - - /* Parse the login details if specified. It not then we treat NULL as a hint - to clear the existing data */ - if(option) { - result = parse_login_details(option, strlen(option), - (userp ? &user : NULL), - (passwdp ? &passwd : NULL), - NULL); - } - - if(!result) { - /* Store the username part of option if required */ - if(userp) { - if(!user && option && option[0] == ':') { - /* Allocate an empty string instead of returning NULL as user name */ - user = strdup(""); - if(!user) - result = CURLE_OUT_OF_MEMORY; - } - - Curl_safefree(*userp); - *userp = user; - } - - /* Store the password part of option if required */ - if(passwdp) { - Curl_safefree(*passwdp); - *passwdp = passwd; - } - } - - return result; -} - -CURLcode Curl_dupset(struct Curl_easy *dst, struct Curl_easy *src) -{ - CURLcode result = CURLE_OK; - enum dupstring i; - - /* Copy src->set into dst->set first, then deal with the strings - afterwards */ - dst->set = src->set; - - /* clear all string pointers first */ - memset(dst->set.str, 0, STRING_LAST * sizeof(char *)); - - /* duplicate all strings */ - for(i=(enum dupstring)0; i< STRING_LASTZEROTERMINATED; i++) { - result = setstropt(&dst->set.str[i], src->set.str[i]); - if(result) - return result; - } - - /* duplicate memory areas pointed to */ - i = STRING_COPYPOSTFIELDS; - if(src->set.postfieldsize && src->set.str[i]) { - /* postfieldsize is curl_off_t, Curl_memdup() takes a size_t ... */ - dst->set.str[i] = Curl_memdup(src->set.str[i], - curlx_sotouz(src->set.postfieldsize)); - if(!dst->set.str[i]) - return CURLE_OUT_OF_MEMORY; - /* point to the new copy */ - dst->set.postfields = dst->set.str[i]; - } - return CURLE_OK; + Curl_mime_cleanpart(&data->set.mimepost); } /* @@ -411,10 +328,7 @@ CURLcode Curl_close(struct Curl_easy *data) /* Destroy the timeout list that is held in the easy handle. It is /normally/ done by curl_multi_remove_handle() but this is "just in case" */ - if(data->state.timeoutlist) { - Curl_llist_destroy(data->state.timeoutlist, NULL); - data->state.timeoutlist = NULL; - } + Curl_llist_destroy(&data->state.timeoutlist, NULL); data->magic = 0; /* force a clear AFTER the possibly enforced removal from the multi handle, since that function uses the magic @@ -475,12 +389,8 @@ CURLcode Curl_close(struct Curl_easy *data) Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); } - if(data->set.wildcardmatch) { - /* destruct wildcard structures if it is needed */ - struct WildcardData *wc = &data->wildcard; - Curl_wildcard_dtor(wc); - } - + /* destruct wildcard structures if it is needed */ + Curl_wildcard_dtor(&data->wildcard); Curl_freeset(data); free(data); return CURLE_OK; @@ -490,8 +400,9 @@ CURLcode Curl_close(struct Curl_easy *data) * Initialize the UserDefined fields within a Curl_easy. * This may be safely called on a new or existing Curl_easy. */ -CURLcode Curl_init_userdefined(struct UserDefined *set) +CURLcode Curl_init_userdefined(struct Curl_easy *data) { + struct UserDefined *set = &data->set; CURLcode result = CURLE_OK; set->out = stdout; /* default output to stdout */ @@ -535,9 +446,14 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) set->httpauth = CURLAUTH_BASIC; /* defaults to basic */ set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */ + /* SOCKS5 proxy auth defaults to username/password + GSS-API */ + set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI; + /* make libcurl quiet by default: */ set->hide_progress = TRUE; /* CURLOPT_NOPROGRESS changes these */ + Curl_mime_initpart(&set->mimepost, data); + /* * libcurl 7.10 introduced SSL verification *by default*! This needs to be * switched off unless wanted. @@ -549,7 +465,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) #endif set->ssh_auth_types = CURLSSH_AUTH_DEFAULT; /* defaults to any auth type */ - set->general_ssl.sessionid = TRUE; /* session ID caching enabled by + set->ssl.primary.sessionid = TRUE; /* session ID caching enabled by default */ set->proxy_ssl = set->ssl; @@ -574,25 +490,25 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) /* This is our preferred CA cert bundle/path since install time */ #if defined(CURL_CA_BUNDLE) - result = setstropt(&set->str[STRING_SSL_CAFILE_ORIG], CURL_CA_BUNDLE); + result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_ORIG], CURL_CA_BUNDLE); if(result) return result; - result = setstropt(&set->str[STRING_SSL_CAFILE_PROXY], CURL_CA_BUNDLE); + result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY], CURL_CA_BUNDLE); if(result) return result; #endif #if defined(CURL_CA_PATH) - result = setstropt(&set->str[STRING_SSL_CAPATH_ORIG], CURL_CA_PATH); + result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_ORIG], CURL_CA_PATH); if(result) return result; - result = setstropt(&set->str[STRING_SSL_CAPATH_PROXY], CURL_CA_PATH); + result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY], CURL_CA_PATH); if(result) return result; #endif - set->wildcardmatch = FALSE; + set->wildcard_enabled = FALSE; set->chunk_bgn = ZERO_NULL; set->chunk_end = ZERO_NULL; @@ -610,6 +526,8 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) set->expect_100_timeout = 1000L; /* Wait for a second by default. */ set->sep_headers = TRUE; /* separated header lists by default */ + set->buffer_size = READBUFFER_SIZE; + set->happy_eyeballs_timeout = CURL_HET_DEFAULT; Curl_http2_init_userset(set); return result; @@ -647,38 +565,34 @@ CURLcode Curl_open(struct Curl_easy **curl) /* We do some initial setup here, all those fields that can't be just 0 */ - data->state.buffer = malloc(BUFSIZE + 1); + data->state.buffer = malloc(READBUFFER_SIZE + 1); if(!data->state.buffer) { DEBUGF(fprintf(stderr, "Error: malloc of buffer failed\n")); result = CURLE_OUT_OF_MEMORY; } - - data->state.headerbuff = malloc(HEADERSIZE); - if(!data->state.headerbuff) { - DEBUGF(fprintf(stderr, "Error: malloc of headerbuff failed\n")); - result = CURLE_OUT_OF_MEMORY; - } else { - result = Curl_init_userdefined(&data->set); - - data->state.headersize=HEADERSIZE; - - Curl_convert_init(data); - - Curl_initinfo(data); + data->state.headerbuff = malloc(HEADERSIZE); + if(!data->state.headerbuff) { + DEBUGF(fprintf(stderr, "Error: malloc of headerbuff failed\n")); + result = CURLE_OUT_OF_MEMORY; + } + else { + result = Curl_init_userdefined(data); - /* most recent connection is not yet defined */ - data->state.lastconnect = NULL; + data->state.headersize = HEADERSIZE; + Curl_convert_init(data); + Curl_initinfo(data); - data->progress.flags |= PGRS_HIDE; - data->state.current_speed = -1; /* init to negative == impossible */ + /* most recent connection is not yet defined */ + data->state.lastconnect = NULL; - data->wildcard.state = CURLWC_INIT; - data->wildcard.filelist = NULL; - data->set.fnmatch = ZERO_NULL; - data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */ + data->progress.flags |= PGRS_HIDE; + data->state.current_speed = -1; /* init to negative == impossible */ + data->set.fnmatch = ZERO_NULL; + data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */ - Curl_http2_init_state(&data->state); + Curl_http2_init_state(&data->state); + } } if(result) { @@ -695,2273 +609,71 @@ CURLcode Curl_open(struct Curl_easy **curl) return result; } -CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, - va_list param) +#ifdef USE_RECV_BEFORE_SEND_WORKAROUND +static void conn_reset_postponed_data(struct connectdata *conn, int num) { - char *argptr; - CURLcode result = CURLE_OK; - long arg; -#ifndef CURL_DISABLE_HTTP - curl_off_t bigsize; -#endif - - switch(option) { - case CURLOPT_DNS_CACHE_TIMEOUT: - data->set.dns_cache_timeout = va_arg(param, long); - break; - case CURLOPT_DNS_USE_GLOBAL_CACHE: - /* remember we want this enabled */ - arg = va_arg(param, long); - data->set.global_dns_cache = (0 != arg) ? TRUE : FALSE; - break; - case CURLOPT_SSL_CIPHER_LIST: - /* set a list of cipher we want to use in the SSL connection */ - result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSL_CIPHER_LIST: - /* set a list of cipher we want to use in the SSL connection for proxy */ - result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_PROXY], - va_arg(param, char *)); - break; - - case CURLOPT_RANDOM_FILE: - /* - * This is the path name to a file that contains random data to seed - * the random SSL stuff with. The file is only used for reading. - */ - result = setstropt(&data->set.str[STRING_SSL_RANDOM_FILE], - va_arg(param, char *)); - break; - case CURLOPT_EGDSOCKET: - /* - * The Entropy Gathering Daemon socket pathname - */ - result = setstropt(&data->set.str[STRING_SSL_EGDSOCKET], - va_arg(param, char *)); - break; - case CURLOPT_MAXCONNECTS: - /* - * Set the absolute number of maximum simultaneous alive connection that - * libcurl is allowed to have. - */ - data->set.maxconnects = va_arg(param, long); - break; - case CURLOPT_FORBID_REUSE: - /* - * When this transfer is done, it must not be left to be reused by a - * subsequent transfer but shall be closed immediately. - */ - data->set.reuse_forbid = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FRESH_CONNECT: - /* - * This transfer shall not use a previously cached connection but - * should be made with a fresh new connect! - */ - data->set.reuse_fresh = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_VERBOSE: - /* - * Verbose means infof() calls that give a lot of information about - * the connection and transfer procedures as well as internal choices. - */ - data->set.verbose = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_HEADER: - /* - * Set to include the header in the general data output stream. - */ - data->set.include_header = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_NOPROGRESS: - /* - * Shut off the internal supported progress meter - */ - data->set.hide_progress = (0 != va_arg(param, long)) ? TRUE : FALSE; - if(data->set.hide_progress) - data->progress.flags |= PGRS_HIDE; - else - data->progress.flags &= ~PGRS_HIDE; - break; - case CURLOPT_NOBODY: - /* - * Do not include the body part in the output data stream. - */ - data->set.opt_no_body = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FAILONERROR: - /* - * Don't output the >=400 error code HTML-page, but instead only - * return error. - */ - data->set.http_fail_on_error = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_KEEP_SENDING_ON_ERROR: - data->set.http_keep_sending_on_error = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - case CURLOPT_UPLOAD: - case CURLOPT_PUT: - /* - * We want to sent data to the remote host. If this is HTTP, that equals - * using the PUT request. - */ - data->set.upload = (0 != va_arg(param, long)) ? TRUE : FALSE; - if(data->set.upload) { - /* If this is HTTP, PUT is what's needed to "upload" */ - data->set.httpreq = HTTPREQ_PUT; - data->set.opt_no_body = FALSE; /* this is implied */ - } - else - /* In HTTP, the opposite of upload is GET (unless NOBODY is true as - then this can be changed to HEAD later on) */ - data->set.httpreq = HTTPREQ_GET; - break; - case CURLOPT_FILETIME: - /* - * Try to get the file time of the remote document. The time will - * later (possibly) become available using curl_easy_getinfo(). - */ - data->set.get_filetime = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FTP_CREATE_MISSING_DIRS: - /* - * An FTP option that modifies an upload to create missing directories on - * the server. - */ - switch(va_arg(param, long)) { - case 0: - data->set.ftp_create_missing_dirs = 0; - break; - case 1: - data->set.ftp_create_missing_dirs = 1; - break; - case 2: - data->set.ftp_create_missing_dirs = 2; - break; - default: - /* reserve other values for future use */ - result = CURLE_UNKNOWN_OPTION; - break; - } - break; - case CURLOPT_SERVER_RESPONSE_TIMEOUT: - /* - * Option that specifies how quickly an server response must be obtained - * before it is considered failure. For pingpong protocols. - */ - data->set.server_response_timeout = va_arg(param, long) * 1000; - break; - case CURLOPT_TFTP_NO_OPTIONS: - /* - * Option that prevents libcurl from sending TFTP option requests to the - * server. - */ - data->set.tftp_no_options = va_arg(param, long) != 0; - break; - case CURLOPT_TFTP_BLKSIZE: - /* - * TFTP option that specifies the block size to use for data transmission. - */ - data->set.tftp_blksize = va_arg(param, long); - break; - case CURLOPT_DIRLISTONLY: - /* - * An option that changes the command to one that asks for a list - * only, no file info details. - */ - data->set.ftp_list_only = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_APPEND: - /* - * We want to upload and append to an existing file. - */ - data->set.ftp_append = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FTP_FILEMETHOD: - /* - * How do access files over FTP. - */ - data->set.ftp_filemethod = (curl_ftpfile)va_arg(param, long); - break; - case CURLOPT_NETRC: - /* - * Parse the $HOME/.netrc file - */ - data->set.use_netrc = (enum CURL_NETRC_OPTION)va_arg(param, long); - break; - case CURLOPT_NETRC_FILE: - /* - * Use this file instead of the $HOME/.netrc file - */ - result = setstropt(&data->set.str[STRING_NETRC_FILE], - va_arg(param, char *)); - break; - case CURLOPT_TRANSFERTEXT: - /* - * This option was previously named 'FTPASCII'. Renamed to work with - * more protocols than merely FTP. - * - * Transfer using ASCII (instead of BINARY). - */ - data->set.prefer_ascii = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_TIMECONDITION: - /* - * Set HTTP time condition. This must be one of the defines in the - * curl/curl.h header file. - */ - data->set.timecondition = (curl_TimeCond)va_arg(param, long); - break; - case CURLOPT_TIMEVALUE: - /* - * This is the value to compare with the remote document with the - * method set with CURLOPT_TIMECONDITION - */ - data->set.timevalue = (time_t)va_arg(param, long); - break; - case CURLOPT_SSLVERSION: - /* - * Set explicit SSL version to try to connect with, as some SSL - * implementations are lame. - */ -#ifdef USE_SSL - data->set.ssl.primary.version = va_arg(param, long); -#else - result = CURLE_UNKNOWN_OPTION; -#endif - break; - case CURLOPT_PROXY_SSLVERSION: - /* - * Set explicit SSL version to try to connect with for proxy, as some SSL - * implementations are lame. - */ -#ifdef USE_SSL - data->set.proxy_ssl.primary.version = va_arg(param, long); -#else - result = CURLE_UNKNOWN_OPTION; -#endif - break; + struct postponed_data * const psnd = &(conn->postponed[num]); + if(psnd->buffer) { + DEBUGASSERT(psnd->allocated_size > 0); + DEBUGASSERT(psnd->recv_size <= psnd->allocated_size); + DEBUGASSERT(psnd->recv_size ? + (psnd->recv_processed < psnd->recv_size) : + (psnd->recv_processed == 0)); + DEBUGASSERT(psnd->bindsock != CURL_SOCKET_BAD); + free(psnd->buffer); + psnd->buffer = NULL; + psnd->allocated_size = 0; + psnd->recv_size = 0; + psnd->recv_processed = 0; +#ifdef DEBUGBUILD + psnd->bindsock = CURL_SOCKET_BAD; /* used only for DEBUGASSERT */ +#endif /* DEBUGBUILD */ + } + else { + DEBUGASSERT(psnd->allocated_size == 0); + DEBUGASSERT(psnd->recv_size == 0); + DEBUGASSERT(psnd->recv_processed == 0); + DEBUGASSERT(psnd->bindsock == CURL_SOCKET_BAD); + } +} -#ifndef CURL_DISABLE_HTTP - case CURLOPT_AUTOREFERER: - /* - * Switch on automatic referer that gets set if curl follows locations. - */ - data->set.http_auto_referer = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; +static void conn_reset_all_postponed_data(struct connectdata *conn) +{ + conn_reset_postponed_data(conn, 0); + conn_reset_postponed_data(conn, 1); +} +#else /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ +/* Use "do-nothing" macro instead of function when workaround not used */ +#define conn_reset_all_postponed_data(c) do {} WHILE_FALSE +#endif /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ - case CURLOPT_ACCEPT_ENCODING: - /* - * String to use at the value of Accept-Encoding header. - * - * If the encoding is set to "" we use an Accept-Encoding header that - * encompasses all the encodings we support. - * If the encoding is set to NULL we don't send an Accept-Encoding header - * and ignore an received Content-Encoding header. - * - */ - argptr = va_arg(param, char *); - result = setstropt(&data->set.str[STRING_ENCODING], - (argptr && !*argptr)? - ALL_CONTENT_ENCODINGS: argptr); - break; +static void conn_free(struct connectdata *conn) +{ + if(!conn) + return; - case CURLOPT_TRANSFER_ENCODING: - data->set.http_transfer_encoding = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; + /* possible left-overs from the async name resolvers */ + Curl_resolver_cancel(conn); - case CURLOPT_FOLLOWLOCATION: - /* - * Follow Location: header hints on a HTTP-server. - */ - data->set.http_follow_location = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; + /* close the SSL stuff before we close any sockets since they will/may + write to the sockets */ + Curl_ssl_close(conn, FIRSTSOCKET); + Curl_ssl_close(conn, SECONDARYSOCKET); - case CURLOPT_UNRESTRICTED_AUTH: - /* - * Send authentication (user+password) when following locations, even when - * hostname changed. - */ - data->set.http_disable_hostname_check_before_authentication = - (0 != va_arg(param, long)) ? TRUE : FALSE; - break; + /* close possibly still open sockets */ + if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) + Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]); + if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET]) + Curl_closesocket(conn, conn->sock[FIRSTSOCKET]); + if(CURL_SOCKET_BAD != conn->tempsock[0]) + Curl_closesocket(conn, conn->tempsock[0]); + if(CURL_SOCKET_BAD != conn->tempsock[1]) + Curl_closesocket(conn, conn->tempsock[1]); - case CURLOPT_MAXREDIRS: - /* - * The maximum amount of hops you allow curl to follow Location: - * headers. This should mostly be used to detect never-ending loops. - */ - data->set.maxredirs = va_arg(param, long); - break; - - case CURLOPT_POSTREDIR: - { - /* - * Set the behaviour of POST when redirecting - * CURL_REDIR_GET_ALL - POST is changed to GET after 301 and 302 - * CURL_REDIR_POST_301 - POST is kept as POST after 301 - * CURL_REDIR_POST_302 - POST is kept as POST after 302 - * CURL_REDIR_POST_303 - POST is kept as POST after 303 - * CURL_REDIR_POST_ALL - POST is kept as POST after 301, 302 and 303 - * other - POST is kept as POST after 301 and 302 - */ - int postRedir = curlx_sltosi(va_arg(param, long)); - data->set.keep_post = postRedir & CURL_REDIR_POST_ALL; - } - break; - - case CURLOPT_POST: - /* Does this option serve a purpose anymore? Yes it does, when - CURLOPT_POSTFIELDS isn't used and the POST data is read off the - callback! */ - if(va_arg(param, long)) { - data->set.httpreq = HTTPREQ_POST; - data->set.opt_no_body = FALSE; /* this is implied */ - } - else - data->set.httpreq = HTTPREQ_GET; - break; - - case CURLOPT_COPYPOSTFIELDS: - /* - * A string with POST data. Makes curl HTTP POST. Even if it is NULL. - * If needed, CURLOPT_POSTFIELDSIZE must have been set prior to - * CURLOPT_COPYPOSTFIELDS and not altered later. - */ - argptr = va_arg(param, char *); - - if(!argptr || data->set.postfieldsize == -1) - result = setstropt(&data->set.str[STRING_COPYPOSTFIELDS], argptr); - else { - /* - * Check that requested length does not overflow the size_t type. - */ - - if((data->set.postfieldsize < 0) || - ((sizeof(curl_off_t) != sizeof(size_t)) && - (data->set.postfieldsize > (curl_off_t)((size_t)-1)))) - result = CURLE_OUT_OF_MEMORY; - else { - char *p; - - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - - /* Allocate even when size == 0. This satisfies the need of possible - later address compare to detect the COPYPOSTFIELDS mode, and - to mark that postfields is used rather than read function or - form data. - */ - p = malloc((size_t)(data->set.postfieldsize? - data->set.postfieldsize:1)); - - if(!p) - result = CURLE_OUT_OF_MEMORY; - else { - if(data->set.postfieldsize) - memcpy(p, argptr, (size_t)data->set.postfieldsize); - - data->set.str[STRING_COPYPOSTFIELDS] = p; - } - } - } - - data->set.postfields = data->set.str[STRING_COPYPOSTFIELDS]; - data->set.httpreq = HTTPREQ_POST; - break; - - case CURLOPT_POSTFIELDS: - /* - * Like above, but use static data instead of copying it. - */ - data->set.postfields = va_arg(param, void *); - /* Release old copied data. */ - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - data->set.httpreq = HTTPREQ_POST; - break; - - case CURLOPT_POSTFIELDSIZE: - /* - * The size of the POSTFIELD data to prevent libcurl to do strlen() to - * figure it out. Enables binary posts. - */ - bigsize = va_arg(param, long); - - if(data->set.postfieldsize < bigsize && - data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { - /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */ - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - data->set.postfields = NULL; - } - - data->set.postfieldsize = bigsize; - break; - - case CURLOPT_POSTFIELDSIZE_LARGE: - /* - * The size of the POSTFIELD data to prevent libcurl to do strlen() to - * figure it out. Enables binary posts. - */ - bigsize = va_arg(param, curl_off_t); - - if(data->set.postfieldsize < bigsize && - data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { - /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */ - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - data->set.postfields = NULL; - } - - data->set.postfieldsize = bigsize; - break; - - case CURLOPT_HTTPPOST: - /* - * Set to make us do HTTP POST - */ - data->set.httppost = va_arg(param, struct curl_httppost *); - data->set.httpreq = HTTPREQ_POST_FORM; - data->set.opt_no_body = FALSE; /* this is implied */ - break; - - case CURLOPT_REFERER: - /* - * String to set in the HTTP Referer: field. - */ - if(data->change.referer_alloc) { - Curl_safefree(data->change.referer); - data->change.referer_alloc = FALSE; - } - result = setstropt(&data->set.str[STRING_SET_REFERER], - va_arg(param, char *)); - data->change.referer = data->set.str[STRING_SET_REFERER]; - break; - - case CURLOPT_USERAGENT: - /* - * String to use in the HTTP User-Agent field - */ - result = setstropt(&data->set.str[STRING_USERAGENT], - va_arg(param, char *)); - break; - - case CURLOPT_HTTPHEADER: - /* - * Set a list with HTTP headers to use (or replace internals with) - */ - data->set.headers = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_PROXYHEADER: - /* - * Set a list with proxy headers to use (or replace internals with) - * - * Since CURLOPT_HTTPHEADER was the only way to set HTTP headers for a - * long time we remain doing it this way until CURLOPT_PROXYHEADER is - * used. As soon as this option has been used, if set to anything but - * NULL, custom headers for proxies are only picked from this list. - * - * Set this option to NULL to restore the previous behavior. - */ - data->set.proxyheaders = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_HEADEROPT: - /* - * Set header option. - */ - arg = va_arg(param, long); - data->set.sep_headers = (arg & CURLHEADER_SEPARATE)? TRUE: FALSE; - break; - - case CURLOPT_HTTP200ALIASES: - /* - * Set a list of aliases for HTTP 200 in response header - */ - data->set.http200aliases = va_arg(param, struct curl_slist *); - break; - -#if !defined(CURL_DISABLE_COOKIES) - case CURLOPT_COOKIE: - /* - * Cookie string to send to the remote server in the request. - */ - result = setstropt(&data->set.str[STRING_COOKIE], - va_arg(param, char *)); - break; - - case CURLOPT_COOKIEFILE: - /* - * Set cookie file to read and parse. Can be used multiple times. - */ - argptr = (char *)va_arg(param, void *); - if(argptr) { - struct curl_slist *cl; - /* append the cookie file name to the list of file names, and deal with - them later */ - cl = curl_slist_append(data->change.cookielist, argptr); - if(!cl) { - curl_slist_free_all(data->change.cookielist); - data->change.cookielist = NULL; - return CURLE_OUT_OF_MEMORY; - } - data->change.cookielist = cl; /* store the list for later use */ - } - break; - - case CURLOPT_COOKIEJAR: - /* - * Set cookie file name to dump all cookies to when we're done. - */ - { - struct CookieInfo *newcookies; - result = setstropt(&data->set.str[STRING_COOKIEJAR], - va_arg(param, char *)); - - /* - * Activate the cookie parser. This may or may not already - * have been made. - */ - newcookies = Curl_cookie_init(data, NULL, data->cookies, - data->set.cookiesession); - if(!newcookies) - result = CURLE_OUT_OF_MEMORY; - data->cookies = newcookies; - } - break; - - case CURLOPT_COOKIESESSION: - /* - * Set this option to TRUE to start a new "cookie session". It will - * prevent the forthcoming read-cookies-from-file actions to accept - * cookies that are marked as being session cookies, as they belong to a - * previous session. - * - * In the original Netscape cookie spec, "session cookies" are cookies - * with no expire date set. RFC2109 describes the same action if no - * 'Max-Age' is set and RFC2965 includes the RFC2109 description and adds - * a 'Discard' action that can enforce the discard even for cookies that - * have a Max-Age. - * - * We run mostly with the original cookie spec, as hardly anyone implements - * anything else. - */ - data->set.cookiesession = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_COOKIELIST: - argptr = va_arg(param, char *); - - if(argptr == NULL) - break; - - if(strcasecompare(argptr, "ALL")) { - /* clear all cookies */ - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - Curl_cookie_clearall(data->cookies); - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - } - else if(strcasecompare(argptr, "SESS")) { - /* clear session cookies */ - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - Curl_cookie_clearsess(data->cookies); - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - } - else if(strcasecompare(argptr, "FLUSH")) { - /* flush cookies to file, takes care of the locking */ - Curl_flush_cookies(data, 0); - } - else if(strcasecompare(argptr, "RELOAD")) { - /* reload cookies from file */ - Curl_cookie_loadfiles(data); - break; - } - else { - if(!data->cookies) - /* if cookie engine was not running, activate it */ - data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE); - - argptr = strdup(argptr); - if(!argptr || !data->cookies) { - result = CURLE_OUT_OF_MEMORY; - free(argptr); - } - else { - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - - if(checkprefix("Set-Cookie:", argptr)) - /* HTTP Header format line */ - Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL); - - else - /* Netscape format line */ - Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL); - - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - free(argptr); - } - } - - break; -#endif /* CURL_DISABLE_COOKIES */ - - case CURLOPT_HTTPGET: - /* - * Set to force us do HTTP GET - */ - if(va_arg(param, long)) { - data->set.httpreq = HTTPREQ_GET; - data->set.upload = FALSE; /* switch off upload */ - data->set.opt_no_body = FALSE; /* this is implied */ - } - break; - - case CURLOPT_HTTP_VERSION: - /* - * This sets a requested HTTP version to be used. The value is one of - * the listed enums in curl/curl.h. - */ - arg = va_arg(param, long); -#ifndef USE_NGHTTP2 - if(arg >= CURL_HTTP_VERSION_2) - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - data->set.httpversion = arg; - break; - - case CURLOPT_HTTPAUTH: - /* - * Set HTTP Authentication type BITMASK. - */ - { - int bitcheck; - bool authbits; - unsigned long auth = va_arg(param, unsigned long); - - if(auth == CURLAUTH_NONE) { - data->set.httpauth = auth; - break; - } - - /* the DIGEST_IE bit is only used to set a special marker, for all the - rest we need to handle it as normal DIGEST */ - data->state.authhost.iestyle = (auth & CURLAUTH_DIGEST_IE) ? TRUE : FALSE; - - if(auth & CURLAUTH_DIGEST_IE) { - auth |= CURLAUTH_DIGEST; /* set standard digest bit */ - auth &= ~CURLAUTH_DIGEST_IE; /* unset ie digest bit */ - } - - /* switch off bits we can't support */ -#ifndef USE_NTLM - auth &= ~CURLAUTH_NTLM; /* no NTLM support */ - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#elif !defined(NTLM_WB_ENABLED) - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#endif -#ifndef USE_SPNEGO - auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without - GSS-API or SSPI */ -#endif - - /* check if any auth bit lower than CURLAUTH_ONLY is still set */ - bitcheck = 0; - authbits = FALSE; - while(bitcheck < 31) { - if(auth & (1UL << bitcheck++)) { - authbits = TRUE; - break; - } - } - if(!authbits) - return CURLE_NOT_BUILT_IN; /* no supported types left! */ - - data->set.httpauth = auth; - } - break; - - case CURLOPT_EXPECT_100_TIMEOUT_MS: - /* - * Time to wait for a response to a HTTP request containing an - * Expect: 100-continue header before sending the data anyway. - */ - data->set.expect_100_timeout = va_arg(param, long); - break; - -#endif /* CURL_DISABLE_HTTP */ - - case CURLOPT_CUSTOMREQUEST: - /* - * Set a custom string to use as request - */ - result = setstropt(&data->set.str[STRING_CUSTOMREQUEST], - va_arg(param, char *)); - - /* we don't set - data->set.httpreq = HTTPREQ_CUSTOM; - here, we continue as if we were using the already set type - and this just changes the actual request keyword */ - break; - -#ifndef CURL_DISABLE_PROXY - case CURLOPT_HTTPPROXYTUNNEL: - /* - * Tunnel operations through the proxy instead of normal proxy use - */ - data->set.tunnel_thru_httpproxy = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - - case CURLOPT_PROXYPORT: - /* - * Explicitly set HTTP proxy port number. - */ - data->set.proxyport = va_arg(param, long); - break; - - case CURLOPT_PROXYAUTH: - /* - * Set HTTP Authentication type BITMASK. - */ - { - int bitcheck; - bool authbits; - unsigned long auth = va_arg(param, unsigned long); - - if(auth == CURLAUTH_NONE) { - data->set.proxyauth = auth; - break; - } - - /* the DIGEST_IE bit is only used to set a special marker, for all the - rest we need to handle it as normal DIGEST */ - data->state.authproxy.iestyle = (auth & CURLAUTH_DIGEST_IE) ? TRUE : FALSE; - - if(auth & CURLAUTH_DIGEST_IE) { - auth |= CURLAUTH_DIGEST; /* set standard digest bit */ - auth &= ~CURLAUTH_DIGEST_IE; /* unset ie digest bit */ - } - /* switch off bits we can't support */ -#ifndef USE_NTLM - auth &= ~CURLAUTH_NTLM; /* no NTLM support */ - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#elif !defined(NTLM_WB_ENABLED) - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#endif -#ifndef USE_SPNEGO - auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without - GSS-API or SSPI */ -#endif - - /* check if any auth bit lower than CURLAUTH_ONLY is still set */ - bitcheck = 0; - authbits = FALSE; - while(bitcheck < 31) { - if(auth & (1UL << bitcheck++)) { - authbits = TRUE; - break; - } - } - if(!authbits) - return CURLE_NOT_BUILT_IN; /* no supported types left! */ - - data->set.proxyauth = auth; - } - break; - - case CURLOPT_PROXY: - /* - * Set proxy server:port to use as proxy. - * - * If the proxy is set to "" (and CURLOPT_SOCKS_PROXY is set to "" or NULL) - * we explicitly say that we don't want to use a proxy - * (even though there might be environment variables saying so). - * - * Setting it to NULL, means no proxy but allows the environment variables - * to decide for us (if CURLOPT_SOCKS_PROXY setting it to NULL). - */ - result = setstropt(&data->set.str[STRING_PROXY], - va_arg(param, char *)); - break; - - case CURLOPT_PRE_PROXY: - /* - * Set proxy server:port to use as SOCKS proxy. - * - * If the proxy is set to "" or NULL we explicitly say that we don't want - * to use the socks proxy. - */ - result = setstropt(&data->set.str[STRING_PRE_PROXY], - va_arg(param, char *)); - break; - - case CURLOPT_PROXYTYPE: - /* - * Set proxy type. HTTP/HTTP_1_0/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME - */ - data->set.proxytype = (curl_proxytype)va_arg(param, long); - break; - - case CURLOPT_PROXY_TRANSFER_MODE: - /* - * set transfer mode (;type=) when doing FTP via an HTTP proxy - */ - switch(va_arg(param, long)) { - case 0: - data->set.proxy_transfer_mode = FALSE; - break; - case 1: - data->set.proxy_transfer_mode = TRUE; - break; - default: - /* reserve other values for future use */ - result = CURLE_UNKNOWN_OPTION; - break; - } - break; -#endif /* CURL_DISABLE_PROXY */ - -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - case CURLOPT_SOCKS5_GSSAPI_NEC: - /* - * Set flag for NEC SOCK5 support - */ - data->set.socks5_gssapi_nec = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_SOCKS5_GSSAPI_SERVICE: - case CURLOPT_PROXY_SERVICE_NAME: - /* - * Set proxy authentication service name for Kerberos 5 and SPNEGO - */ - result = setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME], - va_arg(param, char *)); - break; -#endif - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ - defined(USE_SPNEGO) - case CURLOPT_SERVICE_NAME: - /* - * Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO - */ - result = setstropt(&data->set.str[STRING_SERVICE_NAME], - va_arg(param, char *)); - break; - -#endif - - case CURLOPT_HEADERDATA: - /* - * Custom pointer to pass the header write callback function - */ - data->set.writeheader = (void *)va_arg(param, void *); - break; - case CURLOPT_ERRORBUFFER: - /* - * Error buffer provided by the caller to get the human readable - * error string in. - */ - data->set.errorbuffer = va_arg(param, char *); - break; - case CURLOPT_WRITEDATA: - /* - * FILE pointer to write to. Or possibly - * used as argument to the write callback. - */ - data->set.out = va_arg(param, void *); - break; - case CURLOPT_FTPPORT: - /* - * Use FTP PORT, this also specifies which IP address to use - */ - result = setstropt(&data->set.str[STRING_FTPPORT], - va_arg(param, char *)); - data->set.ftp_use_port = (data->set.str[STRING_FTPPORT]) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_USE_EPRT: - data->set.ftp_use_eprt = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_USE_EPSV: - data->set.ftp_use_epsv = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_USE_PRET: - data->set.ftp_use_pret = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_SSL_CCC: - data->set.ftp_ccc = (curl_ftpccc)va_arg(param, long); - break; - - case CURLOPT_FTP_SKIP_PASV_IP: - /* - * Enable or disable FTP_SKIP_PASV_IP, which will disable/enable the - * bypass of the IP address in PASV responses. - */ - data->set.ftp_skip_ip = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_READDATA: - /* - * FILE pointer to read the file to be uploaded from. Or possibly - * used as argument to the read callback. - */ - data->set.in_set = va_arg(param, void *); - break; - case CURLOPT_INFILESIZE: - /* - * If known, this should inform curl about the file size of the - * to-be-uploaded file. - */ - data->set.filesize = va_arg(param, long); - break; - case CURLOPT_INFILESIZE_LARGE: - /* - * If known, this should inform curl about the file size of the - * to-be-uploaded file. - */ - data->set.filesize = va_arg(param, curl_off_t); - break; - case CURLOPT_LOW_SPEED_LIMIT: - /* - * The low speed limit that if transfers are below this for - * CURLOPT_LOW_SPEED_TIME, the transfer is aborted. - */ - data->set.low_speed_limit=va_arg(param, long); - break; - case CURLOPT_MAX_SEND_SPEED_LARGE: - /* - * When transfer uploads are faster then CURLOPT_MAX_SEND_SPEED_LARGE - * bytes per second the transfer is throttled.. - */ - data->set.max_send_speed=va_arg(param, curl_off_t); - break; - case CURLOPT_MAX_RECV_SPEED_LARGE: - /* - * When receiving data faster than CURLOPT_MAX_RECV_SPEED_LARGE bytes per - * second the transfer is throttled.. - */ - data->set.max_recv_speed=va_arg(param, curl_off_t); - break; - case CURLOPT_LOW_SPEED_TIME: - /* - * The low speed time that if transfers are below the set - * CURLOPT_LOW_SPEED_LIMIT during this time, the transfer is aborted. - */ - data->set.low_speed_time=va_arg(param, long); - break; - case CURLOPT_URL: - /* - * The URL to fetch. - */ - if(data->change.url_alloc) { - /* the already set URL is allocated, free it first! */ - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - result = setstropt(&data->set.str[STRING_SET_URL], - va_arg(param, char *)); - data->change.url = data->set.str[STRING_SET_URL]; - break; - case CURLOPT_PORT: - /* - * The port number to use when getting the URL - */ - data->set.use_port = va_arg(param, long); - break; - case CURLOPT_TIMEOUT: - /* - * The maximum time you allow curl to use for a single transfer - * operation. - */ - data->set.timeout = va_arg(param, long) * 1000L; - break; - - case CURLOPT_TIMEOUT_MS: - data->set.timeout = va_arg(param, long); - break; - - case CURLOPT_CONNECTTIMEOUT: - /* - * The maximum time you allow curl to use to connect. - */ - data->set.connecttimeout = va_arg(param, long) * 1000L; - break; - - case CURLOPT_CONNECTTIMEOUT_MS: - data->set.connecttimeout = va_arg(param, long); - break; - - case CURLOPT_ACCEPTTIMEOUT_MS: - /* - * The maximum time you allow curl to wait for server connect - */ - data->set.accepttimeout = va_arg(param, long); - break; - - case CURLOPT_USERPWD: - /* - * user:password to use in the operation - */ - result = setstropt_userpwd(va_arg(param, char *), - &data->set.str[STRING_USERNAME], - &data->set.str[STRING_PASSWORD]); - break; - - case CURLOPT_USERNAME: - /* - * authentication user name to use in the operation - */ - result = setstropt(&data->set.str[STRING_USERNAME], - va_arg(param, char *)); - break; - - case CURLOPT_PASSWORD: - /* - * authentication password to use in the operation - */ - result = setstropt(&data->set.str[STRING_PASSWORD], - va_arg(param, char *)); - break; - - case CURLOPT_LOGIN_OPTIONS: - /* - * authentication options to use in the operation - */ - result = setstropt(&data->set.str[STRING_OPTIONS], - va_arg(param, char *)); - break; - - case CURLOPT_XOAUTH2_BEARER: - /* - * OAuth 2.0 bearer token to use in the operation - */ - result = setstropt(&data->set.str[STRING_BEARER], - va_arg(param, char *)); - break; - - case CURLOPT_POSTQUOTE: - /* - * List of RAW FTP commands to use after a transfer - */ - data->set.postquote = va_arg(param, struct curl_slist *); - break; - case CURLOPT_PREQUOTE: - /* - * List of RAW FTP commands to use prior to RETR (Wesley Laxton) - */ - data->set.prequote = va_arg(param, struct curl_slist *); - break; - case CURLOPT_QUOTE: - /* - * List of RAW FTP commands to use before a transfer - */ - data->set.quote = va_arg(param, struct curl_slist *); - break; - case CURLOPT_RESOLVE: - /* - * List of NAME:[address] names to populate the DNS cache with - * Prefix the NAME with dash (-) to _remove_ the name from the cache. - * - * Names added with this API will remain in the cache until explicitly - * removed or the handle is cleaned up. - * - * This API can remove any name from the DNS cache, but only entries - * that aren't actually in use right now will be pruned immediately. - */ - data->set.resolve = va_arg(param, struct curl_slist *); - data->change.resolve = data->set.resolve; - break; - case CURLOPT_PROGRESSFUNCTION: - /* - * Progress callback function - */ - data->set.fprogress = va_arg(param, curl_progress_callback); - if(data->set.fprogress) - data->progress.callback = TRUE; /* no longer internal */ - else - data->progress.callback = FALSE; /* NULL enforces internal */ - break; - - case CURLOPT_XFERINFOFUNCTION: - /* - * Transfer info callback function - */ - data->set.fxferinfo = va_arg(param, curl_xferinfo_callback); - if(data->set.fxferinfo) - data->progress.callback = TRUE; /* no longer internal */ - else - data->progress.callback = FALSE; /* NULL enforces internal */ - - break; - - case CURLOPT_PROGRESSDATA: - /* - * Custom client data to pass to the progress callback - */ - data->set.progress_client = va_arg(param, void *); - break; - -#ifndef CURL_DISABLE_PROXY - case CURLOPT_PROXYUSERPWD: - /* - * user:password needed to use the proxy - */ - result = setstropt_userpwd(va_arg(param, char *), - &data->set.str[STRING_PROXYUSERNAME], - &data->set.str[STRING_PROXYPASSWORD]); - break; - case CURLOPT_PROXYUSERNAME: - /* - * authentication user name to use in the operation - */ - result = setstropt(&data->set.str[STRING_PROXYUSERNAME], - va_arg(param, char *)); - break; - case CURLOPT_PROXYPASSWORD: - /* - * authentication password to use in the operation - */ - result = setstropt(&data->set.str[STRING_PROXYPASSWORD], - va_arg(param, char *)); - break; - case CURLOPT_NOPROXY: - /* - * proxy exception list - */ - result = setstropt(&data->set.str[STRING_NOPROXY], - va_arg(param, char *)); - break; -#endif - - case CURLOPT_RANGE: - /* - * What range of the file you want to transfer - */ - result = setstropt(&data->set.str[STRING_SET_RANGE], - va_arg(param, char *)); - break; - case CURLOPT_RESUME_FROM: - /* - * Resume transfer at the give file position - */ - data->set.set_resume_from = va_arg(param, long); - break; - case CURLOPT_RESUME_FROM_LARGE: - /* - * Resume transfer at the give file position - */ - data->set.set_resume_from = va_arg(param, curl_off_t); - break; - case CURLOPT_DEBUGFUNCTION: - /* - * stderr write callback. - */ - data->set.fdebug = va_arg(param, curl_debug_callback); - /* - * if the callback provided is NULL, it'll use the default callback - */ - break; - case CURLOPT_DEBUGDATA: - /* - * Set to a void * that should receive all error writes. This - * defaults to CURLOPT_STDERR for normal operations. - */ - data->set.debugdata = va_arg(param, void *); - break; - case CURLOPT_STDERR: - /* - * Set to a FILE * that should receive all error writes. This - * defaults to stderr for normal operations. - */ - data->set.err = va_arg(param, FILE *); - if(!data->set.err) - data->set.err = stderr; - break; - case CURLOPT_HEADERFUNCTION: - /* - * Set header write callback - */ - data->set.fwrite_header = va_arg(param, curl_write_callback); - break; - case CURLOPT_WRITEFUNCTION: - /* - * Set data write callback - */ - data->set.fwrite_func = va_arg(param, curl_write_callback); - if(!data->set.fwrite_func) { - data->set.is_fwrite_set = 0; - /* When set to NULL, reset to our internal default function */ - data->set.fwrite_func = (curl_write_callback)fwrite; - } - else - data->set.is_fwrite_set = 1; - break; - case CURLOPT_READFUNCTION: - /* - * Read data callback - */ - data->set.fread_func_set = va_arg(param, curl_read_callback); - if(!data->set.fread_func_set) { - data->set.is_fread_set = 0; - /* When set to NULL, reset to our internal default function */ - data->set.fread_func_set = (curl_read_callback)fread; - } - else - data->set.is_fread_set = 1; - break; - case CURLOPT_SEEKFUNCTION: - /* - * Seek callback. Might be NULL. - */ - data->set.seek_func = va_arg(param, curl_seek_callback); - break; - case CURLOPT_SEEKDATA: - /* - * Seek control callback. Might be NULL. - */ - data->set.seek_client = va_arg(param, void *); - break; - case CURLOPT_CONV_FROM_NETWORK_FUNCTION: - /* - * "Convert from network encoding" callback - */ - data->set.convfromnetwork = va_arg(param, curl_conv_callback); - break; - case CURLOPT_CONV_TO_NETWORK_FUNCTION: - /* - * "Convert to network encoding" callback - */ - data->set.convtonetwork = va_arg(param, curl_conv_callback); - break; - case CURLOPT_CONV_FROM_UTF8_FUNCTION: - /* - * "Convert from UTF-8 encoding" callback - */ - data->set.convfromutf8 = va_arg(param, curl_conv_callback); - break; - case CURLOPT_IOCTLFUNCTION: - /* - * I/O control callback. Might be NULL. - */ - data->set.ioctl_func = va_arg(param, curl_ioctl_callback); - break; - case CURLOPT_IOCTLDATA: - /* - * I/O control data pointer. Might be NULL. - */ - data->set.ioctl_client = va_arg(param, void *); - break; - case CURLOPT_SSLCERT: - /* - * String that holds file name of the SSL certificate to use - */ - result = setstropt(&data->set.str[STRING_CERT_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLCERT: - /* - * String that holds file name of the SSL certificate to use for proxy - */ - result = setstropt(&data->set.str[STRING_CERT_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLCERTTYPE: - /* - * String that holds file type of the SSL certificate to use - */ - result = setstropt(&data->set.str[STRING_CERT_TYPE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLCERTTYPE: - /* - * String that holds file type of the SSL certificate to use for proxy - */ - result = setstropt(&data->set.str[STRING_CERT_TYPE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLKEY: - /* - * String that holds file name of the SSL key to use - */ - result = setstropt(&data->set.str[STRING_KEY_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLKEY: - /* - * String that holds file name of the SSL key to use for proxy - */ - result = setstropt(&data->set.str[STRING_KEY_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLKEYTYPE: - /* - * String that holds file type of the SSL key to use - */ - result = setstropt(&data->set.str[STRING_KEY_TYPE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLKEYTYPE: - /* - * String that holds file type of the SSL key to use for proxy - */ - result = setstropt(&data->set.str[STRING_KEY_TYPE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_KEYPASSWD: - /* - * String that holds the SSL or SSH private key password. - */ - result = setstropt(&data->set.str[STRING_KEY_PASSWD_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_KEYPASSWD: - /* - * String that holds the SSL private key password for proxy. - */ - result = setstropt(&data->set.str[STRING_KEY_PASSWD_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLENGINE: - /* - * String that holds the SSL crypto engine. - */ - argptr = va_arg(param, char *); - if(argptr && argptr[0]) - result = Curl_ssl_set_engine(data, argptr); - break; - - case CURLOPT_SSLENGINE_DEFAULT: - /* - * flag to set engine as default. - */ - result = Curl_ssl_set_engine_default(data); - break; - case CURLOPT_CRLF: - /* - * Kludgy option to enable CRLF conversions. Subject for removal. - */ - data->set.crlf = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_INTERFACE: - /* - * Set what interface or address/hostname to bind the socket to when - * performing an operation and thus what from-IP your connection will use. - */ - result = setstropt(&data->set.str[STRING_DEVICE], - va_arg(param, char *)); - break; - case CURLOPT_LOCALPORT: - /* - * Set what local port to bind the socket to when performing an operation. - */ - data->set.localport = curlx_sltous(va_arg(param, long)); - break; - case CURLOPT_LOCALPORTRANGE: - /* - * Set number of local ports to try, starting with CURLOPT_LOCALPORT. - */ - data->set.localportrange = curlx_sltosi(va_arg(param, long)); - break; - case CURLOPT_KRBLEVEL: - /* - * A string that defines the kerberos security level. - */ - result = setstropt(&data->set.str[STRING_KRB_LEVEL], - va_arg(param, char *)); - data->set.krb = (data->set.str[STRING_KRB_LEVEL]) ? TRUE : FALSE; - break; - case CURLOPT_GSSAPI_DELEGATION: - /* - * GSS-API credential delegation - */ - data->set.gssapi_delegation = va_arg(param, long); - break; - case CURLOPT_SSL_VERIFYPEER: - /* - * Enable peer SSL verifying. - */ - data->set.ssl.primary.verifypeer = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - case CURLOPT_PROXY_SSL_VERIFYPEER: - /* - * Enable peer SSL verifying for proxy. - */ - data->set.proxy_ssl.primary.verifypeer = - (0 != va_arg(param, long))?TRUE:FALSE; - break; - case CURLOPT_SSL_VERIFYHOST: - /* - * Enable verification of the host name in the peer certificate - */ - arg = va_arg(param, long); - - /* Obviously people are not reading documentation and too many thought - this argument took a boolean when it wasn't and misused it. We thus ban - 1 as a sensible input and we warn about its use. Then we only have the - 2 action internally stored as TRUE. */ - - if(1 == arg) { - failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!"); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - data->set.ssl.primary.verifyhost = (0 != arg) ? TRUE : FALSE; - break; - case CURLOPT_PROXY_SSL_VERIFYHOST: - /* - * Enable verification of the host name in the peer certificate for proxy - */ - arg = va_arg(param, long); - - /* Obviously people are not reading documentation and too many thought - this argument took a boolean when it wasn't and misused it. We thus ban - 1 as a sensible input and we warn about its use. Then we only have the - 2 action internally stored as TRUE. */ - - if(1 == arg) { - failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!"); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - data->set.proxy_ssl.primary.verifyhost = (0 != arg)?TRUE:FALSE; - break; - case CURLOPT_SSL_VERIFYSTATUS: - /* - * Enable certificate status verifying. - */ - if(!Curl_ssl_cert_status_request()) { - result = CURLE_NOT_BUILT_IN; - break; - } - - data->set.ssl.primary.verifystatus = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - case CURLOPT_SSL_CTX_FUNCTION: -#ifdef have_curlssl_ssl_ctx - /* - * Set a SSL_CTX callback - */ - data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_SSL_CTX_DATA: -#ifdef have_curlssl_ssl_ctx - /* - * Set a SSL_CTX callback parameter pointer - */ - data->set.ssl.fsslctxp = va_arg(param, void *); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_SSL_FALSESTART: - /* - * Enable TLS false start. - */ - if(!Curl_ssl_false_start()) { - result = CURLE_NOT_BUILT_IN; - break; - } - - data->set.ssl.falsestart = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_CERTINFO: -#ifdef have_curlssl_certinfo - data->set.ssl.certinfo = (0 != va_arg(param, long)) ? TRUE : FALSE; -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_PINNEDPUBLICKEY: -#ifdef have_curlssl_pinnedpubkey /* only by supported backends */ - /* - * Set pinned public key for SSL connection. - * Specify file name of the public key in DER format. - */ - result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_PROXY_PINNEDPUBLICKEY: -#ifdef have_curlssl_pinnedpubkey /* only by supported backends */ - /* - * Set pinned public key for SSL connection. - * Specify file name of the public key in DER format. - */ - result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_CAINFO: - /* - * Set CA info for SSL connection. Specify file name of the CA certificate - */ - result = setstropt(&data->set.str[STRING_SSL_CAFILE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_CAINFO: - /* - * Set CA info SSL connection for proxy. Specify file name of the - * CA certificate - */ - result = setstropt(&data->set.str[STRING_SSL_CAFILE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_CAPATH: -#ifdef have_curlssl_ca_path /* not supported by all backends */ - /* - * Set CA path info for SSL connection. Specify directory name of the CA - * certificates which have been prepared using openssl c_rehash utility. - */ - /* This does not work on windows. */ - result = setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_PROXY_CAPATH: -#ifdef have_curlssl_ca_path /* not supported by all backends */ - /* - * Set CA path info for SSL connection proxy. Specify directory name of the - * CA certificates which have been prepared using openssl c_rehash utility. - */ - /* This does not work on windows. */ - result = setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_CRLFILE: - /* - * Set CRL file info for SSL connection. Specify file name of the CRL - * to check certificates revocation - */ - result = setstropt(&data->set.str[STRING_SSL_CRLFILE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_CRLFILE: - /* - * Set CRL file info for SSL connection for proxy. Specify file name of the - * CRL to check certificates revocation - */ - result = setstropt(&data->set.str[STRING_SSL_CRLFILE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_ISSUERCERT: - /* - * Set Issuer certificate file - * to check certificates issuer - */ - result = setstropt(&data->set.str[STRING_SSL_ISSUERCERT_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_TELNETOPTIONS: - /* - * Set a linked list of telnet options - */ - data->set.telnet_options = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_BUFFERSIZE: - /* - * The application kindly asks for a differently sized receive buffer. - * If it seems reasonable, we'll use it. - */ - data->set.buffer_size = va_arg(param, long); - - if(data->set.buffer_size > MAX_BUFSIZE) - data->set.buffer_size = MAX_BUFSIZE; /* huge internal default */ - else if(data->set.buffer_size < 1) - data->set.buffer_size = BUFSIZE; - - /* Resize only if larger than default buffer size. */ - if(data->set.buffer_size > BUFSIZE) { - data->state.buffer = realloc(data->state.buffer, - data->set.buffer_size + 1); - if(!data->state.buffer) { - DEBUGF(fprintf(stderr, "Error: realloc of buffer failed\n")); - result = CURLE_OUT_OF_MEMORY; - } - } - - break; - - case CURLOPT_NOSIGNAL: - /* - * The application asks not to set any signal() or alarm() handlers, - * even when using a timeout. - */ - data->set.no_signal = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_SHARE: - { - struct Curl_share *set; - set = va_arg(param, struct Curl_share *); - - /* disconnect from old share, if any */ - if(data->share) { - Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); - - if(data->dns.hostcachetype == HCACHE_SHARED) { - data->dns.hostcache = NULL; - data->dns.hostcachetype = HCACHE_NONE; - } - -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - if(data->share->cookies == data->cookies) - data->cookies = NULL; -#endif - - if(data->share->sslsession == data->state.session) - data->state.session = NULL; - - data->share->dirty--; - - Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); - data->share = NULL; - } - - /* use new share if it set */ - data->share = set; - if(data->share) { - - Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); - - data->share->dirty++; - - if(data->share->specifier & (1<< CURL_LOCK_DATA_DNS)) { - /* use shared host cache */ - data->dns.hostcache = &data->share->hostcache; - data->dns.hostcachetype = HCACHE_SHARED; - } -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - if(data->share->cookies) { - /* use shared cookie list, first free own one if any */ - Curl_cookie_cleanup(data->cookies); - /* enable cookies since we now use a share that uses cookies! */ - data->cookies = data->share->cookies; - } -#endif /* CURL_DISABLE_HTTP */ - if(data->share->sslsession) { - data->set.general_ssl.max_ssl_sessions = data->share->max_ssl_sessions; - data->state.session = data->share->sslsession; - } - Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); - - } - /* check for host cache not needed, - * it will be done by curl_easy_perform */ - } - break; - - case CURLOPT_PRIVATE: - /* - * Set private data pointer. - */ - data->set.private_data = va_arg(param, void *); - break; - - case CURLOPT_MAXFILESIZE: - /* - * Set the maximum size of a file to download. - */ - data->set.max_filesize = va_arg(param, long); - break; - -#ifdef USE_SSL - case CURLOPT_USE_SSL: - /* - * Make transfers attempt to use SSL/TLS. - */ - data->set.use_ssl = (curl_usessl)va_arg(param, long); - break; - - case CURLOPT_SSL_OPTIONS: - arg = va_arg(param, long); - data->set.ssl.enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE; - data->set.ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); - break; - - case CURLOPT_PROXY_SSL_OPTIONS: - arg = va_arg(param, long); - data->set.proxy_ssl.enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE; - data->set.proxy_ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); - break; - -#endif - case CURLOPT_FTPSSLAUTH: - /* - * Set a specific auth for FTP-SSL transfers. - */ - data->set.ftpsslauth = (curl_ftpauth)va_arg(param, long); - break; - - case CURLOPT_IPRESOLVE: - data->set.ipver = va_arg(param, long); - break; - - case CURLOPT_MAXFILESIZE_LARGE: - /* - * Set the maximum size of a file to download. - */ - data->set.max_filesize = va_arg(param, curl_off_t); - break; - - case CURLOPT_TCP_NODELAY: - /* - * Enable or disable TCP_NODELAY, which will disable/enable the Nagle - * algorithm - */ - data->set.tcp_nodelay = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_ACCOUNT: - result = setstropt(&data->set.str[STRING_FTP_ACCOUNT], - va_arg(param, char *)); - break; - - case CURLOPT_IGNORE_CONTENT_LENGTH: - data->set.ignorecl = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_CONNECT_ONLY: - /* - * No data transfer, set up connection and let application use the socket - */ - data->set.connect_only = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_ALTERNATIVE_TO_USER: - result = setstropt(&data->set.str[STRING_FTP_ALTERNATIVE_TO_USER], - va_arg(param, char *)); - break; - - case CURLOPT_SOCKOPTFUNCTION: - /* - * socket callback function: called after socket() but before connect() - */ - data->set.fsockopt = va_arg(param, curl_sockopt_callback); - break; - - case CURLOPT_SOCKOPTDATA: - /* - * socket callback data pointer. Might be NULL. - */ - data->set.sockopt_client = va_arg(param, void *); - break; - - case CURLOPT_OPENSOCKETFUNCTION: - /* - * open/create socket callback function: called instead of socket(), - * before connect() - */ - data->set.fopensocket = va_arg(param, curl_opensocket_callback); - break; - - case CURLOPT_OPENSOCKETDATA: - /* - * socket callback data pointer. Might be NULL. - */ - data->set.opensocket_client = va_arg(param, void *); - break; - - case CURLOPT_CLOSESOCKETFUNCTION: - /* - * close socket callback function: called instead of close() - * when shutting down a connection - */ - data->set.fclosesocket = va_arg(param, curl_closesocket_callback); - break; - - case CURLOPT_CLOSESOCKETDATA: - /* - * socket callback data pointer. Might be NULL. - */ - data->set.closesocket_client = va_arg(param, void *); - break; - - case CURLOPT_SSL_SESSIONID_CACHE: - data->set.general_ssl.sessionid = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - -#ifdef USE_LIBSSH2 - /* we only include SSH options if explicitly built to support SSH */ - case CURLOPT_SSH_AUTH_TYPES: - data->set.ssh_auth_types = va_arg(param, long); - break; - - case CURLOPT_SSH_PUBLIC_KEYFILE: - /* - * Use this file instead of the $HOME/.ssh/id_dsa.pub file - */ - result = setstropt(&data->set.str[STRING_SSH_PUBLIC_KEY], - va_arg(param, char *)); - break; - - case CURLOPT_SSH_PRIVATE_KEYFILE: - /* - * Use this file instead of the $HOME/.ssh/id_dsa file - */ - result = setstropt(&data->set.str[STRING_SSH_PRIVATE_KEY], - va_arg(param, char *)); - break; - case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: - /* - * Option to allow for the MD5 of the host public key to be checked - * for validation purposes. - */ - result = setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5], - va_arg(param, char *)); - break; -#ifdef HAVE_LIBSSH2_KNOWNHOST_API - case CURLOPT_SSH_KNOWNHOSTS: - /* - * Store the file name to read known hosts from. - */ - result = setstropt(&data->set.str[STRING_SSH_KNOWNHOSTS], - va_arg(param, char *)); - break; - - case CURLOPT_SSH_KEYFUNCTION: - /* setting to NULL is fine since the ssh.c functions themselves will - then rever to use the internal default */ - data->set.ssh_keyfunc = va_arg(param, curl_sshkeycallback); - break; - - case CURLOPT_SSH_KEYDATA: - /* - * Custom client data to pass to the SSH keyfunc callback - */ - data->set.ssh_keyfunc_userp = va_arg(param, void *); - break; -#endif /* HAVE_LIBSSH2_KNOWNHOST_API */ - -#endif /* USE_LIBSSH2 */ - - case CURLOPT_HTTP_TRANSFER_DECODING: - /* - * disable libcurl transfer encoding is used - */ - data->set.http_te_skip = (0 == va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_HTTP_CONTENT_DECODING: - /* - * raw data passed to the application when content encoding is used - */ - data->set.http_ce_skip = (0 == va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_NEW_FILE_PERMS: - /* - * Uses these permissions instead of 0644 - */ - data->set.new_file_perms = va_arg(param, long); - break; - - case CURLOPT_NEW_DIRECTORY_PERMS: - /* - * Uses these permissions instead of 0755 - */ - data->set.new_directory_perms = va_arg(param, long); - break; - - case CURLOPT_ADDRESS_SCOPE: - /* - * We always get longs when passed plain numericals, but for this value we - * know that an unsigned int will always hold the value so we blindly - * typecast to this type - */ - data->set.scope_id = curlx_sltoui(va_arg(param, long)); - break; - - case CURLOPT_PROTOCOLS: - /* set the bitmask for the protocols that are allowed to be used for the - transfer, which thus helps the app which takes URLs from users or other - external inputs and want to restrict what protocol(s) to deal - with. Defaults to CURLPROTO_ALL. */ - data->set.allowed_protocols = va_arg(param, long); - break; - - case CURLOPT_REDIR_PROTOCOLS: - /* set the bitmask for the protocols that libcurl is allowed to follow to, - as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs - to be set in both bitmasks to be allowed to get redirected to. Defaults - to all protocols except FILE and SCP. */ - data->set.redir_protocols = va_arg(param, long); - break; - - case CURLOPT_DEFAULT_PROTOCOL: - /* Set the protocol to use when the URL doesn't include any protocol */ - result = setstropt(&data->set.str[STRING_DEFAULT_PROTOCOL], - va_arg(param, char *)); - break; - - case CURLOPT_MAIL_FROM: - /* Set the SMTP mail originator */ - result = setstropt(&data->set.str[STRING_MAIL_FROM], - va_arg(param, char *)); - break; - - case CURLOPT_MAIL_AUTH: - /* Set the SMTP auth originator */ - result = setstropt(&data->set.str[STRING_MAIL_AUTH], - va_arg(param, char *)); - break; - - case CURLOPT_MAIL_RCPT: - /* Set the list of mail recipients */ - data->set.mail_rcpt = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_SASL_IR: - /* Enable/disable SASL initial response */ - data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_RTSP_REQUEST: - { - /* - * Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...) - * Would this be better if the RTSPREQ_* were just moved into here? - */ - long curl_rtspreq = va_arg(param, long); - Curl_RtspReq rtspreq = RTSPREQ_NONE; - switch(curl_rtspreq) { - case CURL_RTSPREQ_OPTIONS: - rtspreq = RTSPREQ_OPTIONS; - break; - - case CURL_RTSPREQ_DESCRIBE: - rtspreq = RTSPREQ_DESCRIBE; - break; - - case CURL_RTSPREQ_ANNOUNCE: - rtspreq = RTSPREQ_ANNOUNCE; - break; - - case CURL_RTSPREQ_SETUP: - rtspreq = RTSPREQ_SETUP; - break; - - case CURL_RTSPREQ_PLAY: - rtspreq = RTSPREQ_PLAY; - break; - - case CURL_RTSPREQ_PAUSE: - rtspreq = RTSPREQ_PAUSE; - break; - - case CURL_RTSPREQ_TEARDOWN: - rtspreq = RTSPREQ_TEARDOWN; - break; - - case CURL_RTSPREQ_GET_PARAMETER: - rtspreq = RTSPREQ_GET_PARAMETER; - break; - - case CURL_RTSPREQ_SET_PARAMETER: - rtspreq = RTSPREQ_SET_PARAMETER; - break; - - case CURL_RTSPREQ_RECORD: - rtspreq = RTSPREQ_RECORD; - break; - - case CURL_RTSPREQ_RECEIVE: - rtspreq = RTSPREQ_RECEIVE; - break; - default: - rtspreq = RTSPREQ_NONE; - } - - data->set.rtspreq = rtspreq; - break; - } - - - case CURLOPT_RTSP_SESSION_ID: - /* - * Set the RTSP Session ID manually. Useful if the application is - * resuming a previously established RTSP session - */ - result = setstropt(&data->set.str[STRING_RTSP_SESSION_ID], - va_arg(param, char *)); - break; - - case CURLOPT_RTSP_STREAM_URI: - /* - * Set the Stream URI for the RTSP request. Unless the request is - * for generic server options, the application will need to set this. - */ - result = setstropt(&data->set.str[STRING_RTSP_STREAM_URI], - va_arg(param, char *)); - break; - - case CURLOPT_RTSP_TRANSPORT: - /* - * The content of the Transport: header for the RTSP request - */ - result = setstropt(&data->set.str[STRING_RTSP_TRANSPORT], - va_arg(param, char *)); - break; - - case CURLOPT_RTSP_CLIENT_CSEQ: - /* - * Set the CSEQ number to issue for the next RTSP request. Useful if the - * application is resuming a previously broken connection. The CSEQ - * will increment from this new number henceforth. - */ - data->state.rtsp_next_client_CSeq = va_arg(param, long); - break; - - case CURLOPT_RTSP_SERVER_CSEQ: - /* Same as the above, but for server-initiated requests */ - data->state.rtsp_next_client_CSeq = va_arg(param, long); - break; - - case CURLOPT_INTERLEAVEDATA: - data->set.rtp_out = va_arg(param, void *); - break; - case CURLOPT_INTERLEAVEFUNCTION: - /* Set the user defined RTP write function */ - data->set.fwrite_rtp = va_arg(param, curl_write_callback); - break; - - case CURLOPT_WILDCARDMATCH: - data->set.wildcardmatch = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_CHUNK_BGN_FUNCTION: - data->set.chunk_bgn = va_arg(param, curl_chunk_bgn_callback); - break; - case CURLOPT_CHUNK_END_FUNCTION: - data->set.chunk_end = va_arg(param, curl_chunk_end_callback); - break; - case CURLOPT_FNMATCH_FUNCTION: - data->set.fnmatch = va_arg(param, curl_fnmatch_callback); - break; - case CURLOPT_CHUNK_DATA: - data->wildcard.customptr = va_arg(param, void *); - break; - case CURLOPT_FNMATCH_DATA: - data->set.fnmatch_data = va_arg(param, void *); - break; -#ifdef USE_TLS_SRP - case CURLOPT_TLSAUTH_USERNAME: - result = setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_ORIG], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype) - data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_PROXY_TLSAUTH_USERNAME: - result = setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_PROXY], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_PROXY] && - !data->set.proxy_ssl.authtype) - data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_TLSAUTH_PASSWORD: - result = setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_ORIG], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype) - data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_PROXY_TLSAUTH_PASSWORD: - result = setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_PROXY], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_PROXY] && - !data->set.proxy_ssl.authtype) - data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_TLSAUTH_TYPE: - if(strncasecompare((char *)va_arg(param, char *), "SRP", strlen("SRP"))) - data->set.ssl.authtype = CURL_TLSAUTH_SRP; - else - data->set.ssl.authtype = CURL_TLSAUTH_NONE; - break; - case CURLOPT_PROXY_TLSAUTH_TYPE: - if(strncasecompare((char *)va_arg(param, char *), "SRP", strlen("SRP"))) - data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; - else - data->set.proxy_ssl.authtype = CURL_TLSAUTH_NONE; - break; -#endif - case CURLOPT_DNS_SERVERS: - result = Curl_set_dns_servers(data, va_arg(param, char *)); - break; - case CURLOPT_DNS_INTERFACE: - result = Curl_set_dns_interface(data, va_arg(param, char *)); - break; - case CURLOPT_DNS_LOCAL_IP4: - result = Curl_set_dns_local_ip4(data, va_arg(param, char *)); - break; - case CURLOPT_DNS_LOCAL_IP6: - result = Curl_set_dns_local_ip6(data, va_arg(param, char *)); - break; - - case CURLOPT_TCP_KEEPALIVE: - data->set.tcp_keepalive = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_TCP_KEEPIDLE: - data->set.tcp_keepidle = va_arg(param, long); - break; - case CURLOPT_TCP_KEEPINTVL: - data->set.tcp_keepintvl = va_arg(param, long); - break; - case CURLOPT_TCP_FASTOPEN: -#if defined(CONNECT_DATA_IDEMPOTENT) || defined(MSG_FASTOPEN) - data->set.tcp_fastopen = (0 != va_arg(param, long))?TRUE:FALSE; -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_SSL_ENABLE_NPN: - data->set.ssl_enable_npn = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_SSL_ENABLE_ALPN: - data->set.ssl_enable_alpn = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - -#ifdef USE_UNIX_SOCKETS - case CURLOPT_UNIX_SOCKET_PATH: - data->set.abstract_unix_socket = FALSE; - result = setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], - va_arg(param, char *)); - break; - case CURLOPT_ABSTRACT_UNIX_SOCKET: - data->set.abstract_unix_socket = TRUE; - result = setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], - va_arg(param, char *)); - break; -#endif - - case CURLOPT_PATH_AS_IS: - data->set.path_as_is = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_PIPEWAIT: - data->set.pipewait = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_STREAM_WEIGHT: -#ifndef USE_NGHTTP2 - return CURLE_NOT_BUILT_IN; -#else - arg = va_arg(param, long); - if((arg>=1) && (arg <= 256)) - data->set.stream_weight = (int)arg; - break; -#endif - case CURLOPT_STREAM_DEPENDS: - case CURLOPT_STREAM_DEPENDS_E: - { -#ifndef USE_NGHTTP2 - return CURLE_NOT_BUILT_IN; -#else - struct Curl_easy *dep = va_arg(param, struct Curl_easy *); - if(!dep || GOOD_EASY_HANDLE(dep)) { - if(data->set.stream_depends_on) { - Curl_http2_remove_child(data->set.stream_depends_on, data); - } - Curl_http2_add_child(dep, data, (option == CURLOPT_STREAM_DEPENDS_E)); - } - break; -#endif - } - case CURLOPT_CONNECT_TO: - data->set.connect_to = va_arg(param, struct curl_slist *); - break; - default: - /* unknown tag and its companion, just ignore: */ - result = CURLE_UNKNOWN_OPTION; - break; - } - - return result; -} - -#ifdef USE_RECV_BEFORE_SEND_WORKAROUND -static void conn_reset_postponed_data(struct connectdata *conn, int num) -{ - struct postponed_data * const psnd = &(conn->postponed[num]); - if(psnd->buffer) { - DEBUGASSERT(psnd->allocated_size > 0); - DEBUGASSERT(psnd->recv_size <= psnd->allocated_size); - DEBUGASSERT(psnd->recv_size ? - (psnd->recv_processed < psnd->recv_size) : - (psnd->recv_processed == 0)); - DEBUGASSERT(psnd->bindsock != CURL_SOCKET_BAD); - free(psnd->buffer); - psnd->buffer = NULL; - psnd->allocated_size = 0; - psnd->recv_size = 0; - psnd->recv_processed = 0; -#ifdef DEBUGBUILD - psnd->bindsock = CURL_SOCKET_BAD; /* used only for DEBUGASSERT */ -#endif /* DEBUGBUILD */ - } - else { - DEBUGASSERT(psnd->allocated_size == 0); - DEBUGASSERT(psnd->recv_size == 0); - DEBUGASSERT(psnd->recv_processed == 0); - DEBUGASSERT(psnd->bindsock == CURL_SOCKET_BAD); - } -} - -static void conn_reset_all_postponed_data(struct connectdata *conn) -{ - conn_reset_postponed_data(conn, 0); - conn_reset_postponed_data(conn, 1); -} -#else /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ -/* Use "do-nothing" macros instead of functions when workaround not used */ -#define conn_reset_postponed_data(c,n) do {} WHILE_FALSE -#define conn_reset_all_postponed_data(c) do {} WHILE_FALSE -#endif /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ - -static void conn_free(struct connectdata *conn) -{ - if(!conn) - return; - - /* possible left-overs from the async name resolvers */ - Curl_resolver_cancel(conn); - - /* close the SSL stuff before we close any sockets since they will/may - write to the sockets */ - Curl_ssl_close(conn, FIRSTSOCKET); - Curl_ssl_close(conn, SECONDARYSOCKET); - - /* close possibly still open sockets */ - if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) - Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]); - if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET]) - Curl_closesocket(conn, conn->sock[FIRSTSOCKET]); - if(CURL_SOCKET_BAD != conn->tempsock[0]) - Curl_closesocket(conn, conn->tempsock[0]); - if(CURL_SOCKET_BAD != conn->tempsock[1]) - Curl_closesocket(conn, conn->tempsock[1]); - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) - Curl_ntlm_wb_cleanup(conn); -#endif +#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ + defined(NTLM_WB_ENABLED) + Curl_ntlm_wb_cleanup(conn); +#endif Curl_safefree(conn->user); Curl_safefree(conn->passwd); @@ -2988,14 +700,12 @@ static void conn_free(struct connectdata *conn) Curl_safefree(conn->http_proxy.host.rawalloc); /* http proxy name buffer */ Curl_safefree(conn->socks_proxy.host.rawalloc); /* socks proxy name buffer */ Curl_safefree(conn->master_buffer); + Curl_safefree(conn->connect_state); conn_reset_all_postponed_data(conn); - Curl_llist_destroy(conn->send_pipe, NULL); - Curl_llist_destroy(conn->recv_pipe, NULL); - - conn->send_pipe = NULL; - conn->recv_pipe = NULL; + Curl_llist_destroy(&conn->send_pipe, NULL); + Curl_llist_destroy(&conn->recv_pipe, NULL); Curl_safefree(conn->localdev); Curl_free_primary_ssl_config(&conn->ssl_config); @@ -3005,6 +715,9 @@ static void conn_free(struct connectdata *conn) Curl_safefree(conn->unix_domain_socket); #endif +#ifdef USE_SSL + Curl_safefree(conn->ssl_extra); +#endif free(conn); /* free all the connection oriented data */ } @@ -3035,9 +748,9 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) * are other users of it */ if(!conn->bits.close && - (conn->send_pipe->size + conn->recv_pipe->size)) { + (conn->send_pipe.size + conn->recv_pipe.size)) { DEBUGF(infof(data, "Curl_disconnect, usecounter: %d\n", - conn->send_pipe->size + conn->recv_pipe->size)); + conn->send_pipe.size + conn->recv_pipe.size)); return CURLE_OK; } @@ -3059,7 +772,7 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) /* unlink ourselves! */ infof(data, "Closing connection %ld\n", conn->connection_id); - Curl_conncache_remove_conn(data->state.conn_cache, conn); + Curl_conncache_remove_conn(conn, TRUE); free_fixed_hostname(&conn->host); free_fixed_hostname(&conn->conn_to_host); @@ -3070,8 +783,8 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) /* Indicate to all handles on the pipe that we're dead */ if(Curl_pipeline_wanted(data->multi, CURLPIPE_ANY)) { - signalPipeClose(conn->send_pipe, TRUE); - signalPipeClose(conn->recv_pipe, TRUE); + signalPipeClose(&conn->send_pipe, TRUE); + signalPipeClose(&conn->recv_pipe, TRUE); } conn_free(conn); @@ -3098,12 +811,16 @@ static bool SocketIsDead(curl_socket_t sock) } /* - * IsPipeliningPossible() returns TRUE if the options set would allow - * pipelining/multiplexing and the connection is using a HTTP protocol. + * IsPipeliningPossible() + * + * Return a bitmask with the available pipelining and multiplexing options for + * the given requested connection. */ -static bool IsPipeliningPossible(const struct Curl_easy *handle, - const struct connectdata *conn) +static int IsPipeliningPossible(const struct Curl_easy *handle, + const struct connectdata *conn) { + int avail = 0; + /* If a HTTP protocol and pipelining is enabled */ if((conn->handler->protocol & PROTO_FAMILY_HTTP) && (!conn->bits.protoconnstart || !conn->bits.close)) { @@ -3113,14 +830,14 @@ static bool IsPipeliningPossible(const struct Curl_easy *handle, (handle->set.httpreq == HTTPREQ_GET || handle->set.httpreq == HTTPREQ_HEAD)) /* didn't ask for HTTP/1.0 and a GET or HEAD */ - return TRUE; + avail |= CURLPIPE_HTTP1; if(Curl_pipeline_wanted(handle->multi, CURLPIPE_MULTIPLEX) && (handle->set.httpversion >= CURL_HTTP_VERSION_2)) /* allows HTTP/2 */ - return TRUE; + avail |= CURLPIPE_MULTIPLEX; } - return FALSE; + return avail; } int Curl_removeHandleFromPipeline(struct Curl_easy *handle, @@ -3176,9 +893,9 @@ void Curl_getoff_all_pipelines(struct Curl_easy *data, bool send_head = (conn->writechannel_inuse && Curl_sendpipe_head(data, conn)); - if(Curl_removeHandleFromPipeline(data, conn->recv_pipe) && recv_head) + if(Curl_removeHandleFromPipeline(data, &conn->recv_pipe) && recv_head) Curl_pipeline_leave_read(conn); - if(Curl_removeHandleFromPipeline(data, conn->send_pipe) && send_head) + if(Curl_removeHandleFromPipeline(data, &conn->send_pipe) && send_head) Curl_pipeline_leave_write(conn); } @@ -3209,157 +926,77 @@ static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke) } } -/* - * This function finds the connection in the connection - * cache that has been unused for the longest time. - * - * Returns the pointer to the oldest idle connection, or NULL if none was - * found. - */ -struct connectdata * -Curl_oldest_idle_connection(struct Curl_easy *data) -{ - struct conncache *bc = data->state.conn_cache; - struct curl_hash_iterator iter; - struct curl_llist_element *curr; - struct curl_hash_element *he; - time_t highscore=-1; - time_t score; - struct timeval now; - struct connectdata *conn_candidate = NULL; - struct connectbundle *bundle; - - now = Curl_tvnow(); - - Curl_hash_start_iterate(&bc->hash, &iter); - - he = Curl_hash_next_element(&iter); - while(he) { - struct connectdata *conn; - - bundle = he->ptr; - - curr = bundle->conn_list->head; - while(curr) { - conn = curr->ptr; - - if(!conn->inuse) { - /* Set higher score for the age passed since the connection was used */ - score = Curl_tvdiff(now, conn->now); - - if(score > highscore) { - highscore = score; - conn_candidate = conn; - } - } - curr = curr->next; - } - - he = Curl_hash_next_element(&iter); - } - - return conn_candidate; -} - static bool -proxy_info_matches(const struct proxy_info* data, - const struct proxy_info* needle) -{ - if((data->proxytype == needle->proxytype) && - (data->port == needle->port) && - Curl_safe_strcasecompare(data->host.name, needle->host.name) && - Curl_safe_strcasecompare(data->user, needle->user) && - Curl_safe_strcasecompare(data->passwd, needle->passwd)) - return TRUE; - - return FALSE; -} - - -/* - * This function finds the connection in the connection - * bundle that has been unused for the longest time. - * - * Returns the pointer to the oldest idle connection, or NULL if none was - * found. - */ -static struct connectdata * -find_oldest_idle_connection_in_bundle(struct Curl_easy *data, - struct connectbundle *bundle) -{ - struct curl_llist_element *curr; - time_t highscore=-1; - time_t score; - struct timeval now; - struct connectdata *conn_candidate = NULL; - struct connectdata *conn; - - (void)data; - - now = Curl_tvnow(); - - curr = bundle->conn_list->head; - while(curr) { - conn = curr->ptr; - - if(!conn->inuse) { - /* Set higher score for the age passed since the connection was used */ - score = Curl_tvdiff(now, conn->now); - - if(score > highscore) { - highscore = score; - conn_candidate = conn; - } - } - curr = curr->next; - } +proxy_info_matches(const struct proxy_info* data, + const struct proxy_info* needle) +{ + if((data->proxytype == needle->proxytype) && + (data->port == needle->port) && + Curl_safe_strcasecompare(data->host.name, needle->host.name)) + return TRUE; - return conn_candidate; + return FALSE; } /* - * This function checks if given connection is dead and disconnects if so. - * (That also removes it from the connection cache.) + * This function checks if the given connection is dead and extracts it from + * the connection cache if so. + * + * When this is called as a Curl_conncache_foreach() callback, the connection + * cache lock is held! * - * Returns TRUE if the connection actually was dead and disconnected. + * Returns TRUE if the connection was dead and extracted. */ -static bool disconnect_if_dead(struct connectdata *conn, - struct Curl_easy *data) +static bool extract_if_dead(struct connectdata *conn, + struct Curl_easy *data) { - size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size; + size_t pipeLen = conn->send_pipe.size + conn->recv_pipe.size; if(!pipeLen && !conn->inuse) { /* The check for a dead socket makes sense only if there are no handles in pipeline and the connection isn't already marked in use */ bool dead; - if(conn->handler->protocol & CURLPROTO_RTSP) - /* RTSP is a special case due to RTP interleaving */ - dead = Curl_rtsp_connisdead(conn); - else + + if(conn->handler->connection_check) { + /* The protocol has a special method for checking the state of the + connection. Use it to check if the connection is dead. */ + unsigned int state; + + state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD); + dead = (state & CONNRESULT_DEAD); + } + else { + /* Use the general method for determining the death of a connection */ dead = SocketIsDead(conn->sock[FIRSTSOCKET]); + } if(dead) { conn->data = data; infof(data, "Connection %ld seems to be dead!\n", conn->connection_id); - - /* disconnect resources */ - Curl_disconnect(conn, /* dead_connection */TRUE); + Curl_conncache_remove_conn(conn, FALSE); return TRUE; } } return FALSE; } +struct prunedead { + struct Curl_easy *data; + struct connectdata *extracted; +}; + /* - * Wrapper to use disconnect_if_dead() function in Curl_conncache_foreach() + * Wrapper to use extract_if_dead() function in Curl_conncache_foreach() * - * Returns always 0. */ -static int call_disconnect_if_dead(struct connectdata *conn, - void *param) +static int call_extract_if_dead(struct connectdata *conn, void *param) { - struct Curl_easy* data = (struct Curl_easy*)param; - disconnect_if_dead(conn, data); + struct prunedead *p = (struct prunedead *)param; + if(extract_if_dead(conn, p->data)) { + /* stop the iteration here, pass back the connection that was extracted */ + p->extracted = conn; + return 1; + } return 0; /* continue iteration */ } @@ -3370,12 +1007,18 @@ static int call_disconnect_if_dead(struct connectdata *conn, */ static void prune_dead_connections(struct Curl_easy *data) { - struct timeval now = Curl_tvnow(); - time_t elapsed = Curl_tvdiff(now, data->state.conn_cache->last_cleanup); + struct curltime now = Curl_now(); + time_t elapsed = Curl_timediff(now, data->state.conn_cache->last_cleanup); if(elapsed >= 1000L) { - Curl_conncache_foreach(data->state.conn_cache, data, - call_disconnect_if_dead); + struct prunedead prune; + prune.data = data; + prune.extracted = NULL; + while(Curl_conncache_foreach(data, data->state.conn_cache, &prune, + call_extract_if_dead)) { + /* disconnect it */ + (void)Curl_disconnect(prune.extracted, /* dead_connection */TRUE); + } data->state.conn_cache->last_cleanup = now; } } @@ -3409,7 +1052,7 @@ ConnectionExists(struct Curl_easy *data, struct connectdata *check; struct connectdata *chosen = 0; bool foundPendingCandidate = FALSE; - bool canPipeline = IsPipeliningPossible(data, needle); + int canpipe = IsPipeliningPossible(data, needle); struct connectbundle *bundle; #ifdef USE_NTLM @@ -3425,13 +1068,13 @@ ConnectionExists(struct Curl_easy *data, *force_reuse = FALSE; *waitpipe = FALSE; - /* We can't pipe if the site is blacklisted */ - if(canPipeline && Curl_pipeline_site_blacklisted(data, needle)) { - canPipeline = FALSE; - } + /* We can't pipeline if the site is blacklisted */ + if((canpipe & CURLPIPE_HTTP1) && + Curl_pipeline_site_blacklisted(data, needle)) + canpipe &= ~ CURLPIPE_HTTP1; - /* Look up the bundle with all the connections to this - particular host */ + /* Look up the bundle with all the connections to this particular host. + Locks the connection cache, beware of early returns! */ bundle = Curl_conncache_find_bundle(needle, data->state.conn_cache); if(bundle) { /* Max pipe length is zero (unlimited) for multiplexed connections */ @@ -3448,32 +1091,33 @@ ConnectionExists(struct Curl_easy *data, (bundle->multiuse == BUNDLE_MULTIPLEX ? "can multiplex" : "serially"))); - /* We can't pipe if we don't know anything about the server */ - if(canPipeline) { + /* We can't pipeline if we don't know anything about the server */ + if(canpipe) { if(bundle->multiuse <= BUNDLE_UNKNOWN) { if((bundle->multiuse == BUNDLE_UNKNOWN) && data->set.pipewait) { infof(data, "Server doesn't support multi-use yet, wait\n"); *waitpipe = TRUE; + Curl_conncache_unlock(needle); return FALSE; /* no re-use */ } infof(data, "Server doesn't support multi-use (yet)\n"); - canPipeline = FALSE; + canpipe = 0; } if((bundle->multiuse == BUNDLE_PIPELINING) && !Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1)) { /* not asked for, switch off */ infof(data, "Could pipeline, but not asked to!\n"); - canPipeline = FALSE; + canpipe = 0; } else if((bundle->multiuse == BUNDLE_MULTIPLEX) && !Curl_pipeline_wanted(data->multi, CURLPIPE_MULTIPLEX)) { infof(data, "Could multiplex, but not asked to!\n"); - canPipeline = FALSE; + canpipe = 0; } } - curr = bundle->conn_list->head; + curr = bundle->conn_list.head; while(curr) { bool match = FALSE; size_t pipeLen; @@ -3485,25 +1129,29 @@ ConnectionExists(struct Curl_easy *data, check = curr->ptr; curr = curr->next; - if(disconnect_if_dead(check, data)) + if(extract_if_dead(check, data)) { + /* disconnect it */ + (void)Curl_disconnect(check, /* dead_connection */TRUE); continue; + } - pipeLen = check->send_pipe->size + check->recv_pipe->size; + pipeLen = check->send_pipe.size + check->recv_pipe.size; - if(canPipeline) { + if(canpipe) { if(check->bits.protoconnstart && check->bits.close) continue; if(!check->bits.multiplex) { - /* If not multiplexing, make sure the pipe has only GET requests */ - struct Curl_easy* sh = gethandleathead(check->send_pipe); - struct Curl_easy* rh = gethandleathead(check->recv_pipe); + /* If not multiplexing, make sure the connection is fine for HTTP/1 + pipelining */ + struct Curl_easy* sh = gethandleathead(&check->send_pipe); + struct Curl_easy* rh = gethandleathead(&check->recv_pipe); if(sh) { - if(!IsPipeliningPossible(sh, check)) + if(!(IsPipeliningPossible(sh, check) & CURLPIPE_HTTP1)) continue; } else if(rh) { - if(!IsPipeliningPossible(rh, check)) + if(!(IsPipeliningPossible(rh, check) & CURLPIPE_HTTP1)) continue; } } @@ -3535,7 +1183,7 @@ ConnectionExists(struct Curl_easy *data, infof(data, "Connection #%ld isn't open enough, can't reuse\n", check->connection_id); #ifdef DEBUGBUILD - if(check->recv_pipe->size > 0) { + if(check->recv_pipe.size > 0) { infof(data, "BAD! Unconnected #%ld has a non-empty recv pipeline!\n", check->connection_id); @@ -3611,11 +1259,16 @@ ConnectionExists(struct Curl_easy *data, } } - if(!canPipeline && check->inuse) + if(!canpipe && check->inuse) /* this request can't be pipelined but the checked connection is already in use so we skip it */ continue; + if((check->inuse) && (check->data->multi != needle->data->multi)) + /* this could be subject for pipeline/multiplex use, but only + if they belong to the same multi handle */ + continue; + if(needle->localdev || needle->localport) { /* If we are bound to a specific local end (IP+port), we must not re-use a random other one, although if we didn't ask for a @@ -3674,7 +1327,7 @@ ConnectionExists(struct Curl_easy *data, check->connection_id)); continue; } - else if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) { + if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) { foundPendingCandidate = TRUE; DEBUGF(infof(data, "Connection #%ld has not started SSL connect, " @@ -3742,7 +1395,7 @@ ConnectionExists(struct Curl_easy *data, continue; } #endif - if(canPipeline) { + if(canpipe) { /* We can pipeline if we want to. Let's continue looking for the optimal connection to use, i.e the shortest pipe that is not blacklisted. */ @@ -3802,9 +1455,13 @@ ConnectionExists(struct Curl_easy *data, } if(chosen) { + /* mark it as used before releasing the lock */ + chosen->inuse = TRUE; + Curl_conncache_unlock(needle); *usethis = chosen; return TRUE; /* yes, we found one to use! */ } + Curl_conncache_unlock(needle); if(foundPendingCandidate && data->set.pipewait) { infof(data, @@ -3910,7 +1567,7 @@ int Curl_doing_getsock(struct connectdata *conn, CURLcode Curl_protocol_connecting(struct connectdata *conn, bool *done) { - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; if(conn && conn->handler->connecting) { *done = FALSE; @@ -3929,7 +1586,7 @@ CURLcode Curl_protocol_connecting(struct connectdata *conn, CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done) { - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; if(conn && conn->handler->doing) { *done = FALSE; @@ -3949,7 +1606,7 @@ CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done) CURLcode Curl_protocol_connect(struct connectdata *conn, bool *protocol_done) { - CURLcode result=CURLE_OK; + CURLcode result = CURLE_OK; *protocol_done = FALSE; @@ -3977,7 +1634,7 @@ CURLcode Curl_protocol_connect(struct connectdata *conn, return CURLE_OK; if(conn->bits.tunnel_proxy && conn->bits.httpproxy && - (conn->tunnel_state[FIRSTSOCKET] != TUNNEL_COMPLETE)) + Curl_connect_ongoing(conn)) /* when using an HTTP tunnel proxy, await complete tunnel establishment before proceeding further. Return CURLE_OK so we'll be called again */ return CURLE_OK; @@ -4001,7 +1658,7 @@ CURLcode Curl_protocol_connect(struct connectdata *conn, } /* - * Helpers for IDNA convertions. + * Helpers for IDNA conversions. */ static bool is_ASCII_name(const char *hostname) { @@ -4017,7 +1674,7 @@ static bool is_ASCII_name(const char *hostname) /* * Perform any necessary IDN conversion of hostname */ -static void fix_hostname(struct connectdata *conn, struct hostname *host) +static CURLcode fix_hostname(struct connectdata *conn, struct hostname *host) { size_t len; struct Curl_easy *data = conn->data; @@ -4036,7 +1693,7 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host) if(len && (host->name[len-1] == '.')) /* strip off a single trailing dot if present, primarily for SNI but there's no use for it */ - host->name[len-1]=0; + host->name[len-1] = 0; /* Check name for non-ASCII and convert hostname to ACE form if we can */ if(!is_ASCII_name(host->name)) { @@ -4057,9 +1714,11 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host) /* change the name pointer to point to the encoded hostname */ host->name = host->encalloc; } - else - infof(data, "Failed to convert %s to ACE; %s\n", host->name, + else { + failf(data, "Failed to convert %s to ACE; %s\n", host->name, idn2_strerror(rc)); + return CURLE_URL_MALFORMAT; + } } #elif defined(USE_WIN32_IDN) char *ace_hostname = NULL; @@ -4069,12 +1728,24 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host) /* change the name pointer to point to the encoded hostname */ host->name = host->encalloc; } - else - infof(data, "Failed to convert %s to ACE;\n", host->name); + else { + failf(data, "Failed to convert %s to ACE;\n", host->name); + return CURLE_URL_MALFORMAT; + } #else infof(data, "IDN support not present, can't parse Unicode domains\n"); #endif } + { + char *hostp; + for(hostp = host->name; *hostp; hostp++) { + if(*hostp <= 32) { + failf(data, "Host name '%s' contains bad letter", host->name); + return CURLE_URL_MALFORMAT; + } + } + } + return CURLE_OK; } /* @@ -4089,7 +1760,7 @@ static void free_fixed_hostname(struct hostname *host) host->encalloc = NULL; } #elif defined(USE_WIN32_IDN) - free(host->encalloc); /* must be freed withidn_free() since this was + free(host->encalloc); /* must be freed with free() since this was allocated by curl_win32_idn_to_ascii */ host->encalloc = NULL; #else @@ -4113,6 +1784,26 @@ static struct connectdata *allocate_conn(struct Curl_easy *data) if(!conn) return NULL; +#ifdef USE_SSL + /* The SSL backend-specific data (ssl_backend_data) objects are allocated as + a separate array to ensure suitable alignment. + Note that these backend pointers can be swapped by vtls (eg ssl backend + data becomes proxy backend data). */ + { + size_t sslsize = Curl_ssl->sizeof_ssl_backend_data; + char *ssl = calloc(4, sslsize); + if(!ssl) { + free(conn); + return NULL; + } + conn->ssl_extra = ssl; + conn->ssl[0].backend = (void *)ssl; + conn->ssl[1].backend = (void *)(ssl + sslsize); + conn->proxy_ssl[0].backend = (void *)(ssl + 2 * sslsize); + conn->proxy_ssl[1].backend = (void *)(ssl + 3 * sslsize); + } +#endif + conn->handler = &Curl_handler_dummy; /* Be sure we have a handler defined already from start to avoid NULL situations and checks */ @@ -4137,7 +1828,7 @@ static struct connectdata *allocate_conn(struct Curl_easy *data) connclose(conn, "Default to force-close"); /* Store creation time to help future close decision making */ - conn->created = Curl_tvnow(); + conn->created = Curl_now(); conn->data = data; /* Setup the association between this connection and the Curl_easy */ @@ -4203,16 +1894,14 @@ static struct connectdata *allocate_conn(struct Curl_easy *data) if(Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1) && !conn->master_buffer) { /* Allocate master_buffer to be used for HTTP/1 pipelining */ - conn->master_buffer = calloc(BUFSIZE, sizeof(char)); + conn->master_buffer = calloc(MASTERBUF_SIZE, sizeof(char)); if(!conn->master_buffer) goto error; } /* Initialize the pipeline lists */ - conn->send_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor); - conn->recv_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor); - if(!conn->send_pipe || !conn->recv_pipe) - goto error; + Curl_llist_init(&conn->send_pipe, (curl_llist_dtor) llist_dtor); + Curl_llist_init(&conn->recv_pipe, (curl_llist_dtor) llist_dtor); #ifdef HAVE_GSSAPI conn->data_prot = PROT_CLEAR; @@ -4235,14 +1924,14 @@ static struct connectdata *allocate_conn(struct Curl_easy *data) return conn; error: - Curl_llist_destroy(conn->send_pipe, NULL); - Curl_llist_destroy(conn->recv_pipe, NULL); - - conn->send_pipe = NULL; - conn->recv_pipe = NULL; + Curl_llist_destroy(&conn->send_pipe, NULL); + Curl_llist_destroy(&conn->recv_pipe, NULL); free(conn->master_buffer); free(conn->localdev); +#ifdef USE_SSL + free(conn->ssl_extra); +#endif free(conn); return NULL; } @@ -4332,11 +2021,24 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, return CURLE_URL_MALFORMAT; } - /* Make sure we don't mistake a drive letter for a scheme, for example: + /* MSDOS/Windows style drive prefix, eg c: in c:foo */ +#define STARTS_WITH_DRIVE_PREFIX(str) \ + ((('a' <= str[0] && str[0] <= 'z') || \ + ('A' <= str[0] && str[0] <= 'Z')) && \ + (str[1] == ':')) + + /* MSDOS/Windows style drive prefix, optionally with + * a '|' instead of ':', followed by a slash or NUL */ +#define STARTS_WITH_URL_DRIVE_PREFIX(str) \ + ((('a' <= (str)[0] && (str)[0] <= 'z') || \ + ('A' <= (str)[0] && (str)[0] <= 'Z')) && \ + ((str)[1] == ':' || (str)[1] == '|') && \ + ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0)) + + /* Don't mistake a drive letter for a scheme if the default protocol is file. curld --proto-default file c:/foo/bar.txt */ - if((('a' <= data->change.url[0] && data->change.url[0] <= 'z') || - ('A' <= data->change.url[0] && data->change.url[0] <= 'Z')) && - data->change.url[1] == ':' && data->set.str[STRING_DEFAULT_PROTOCOL] && + if(STARTS_WITH_DRIVE_PREFIX(data->change.url) && + data->set.str[STRING_DEFAULT_PROTOCOL] && strcasecompare(data->set.str[STRING_DEFAULT_PROTOCOL], "file")) { ; /* do nothing */ } @@ -4355,8 +2057,6 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, if((url_has_scheme && strncasecompare(data->change.url, "file:", 5)) || (!url_has_scheme && data->set.str[STRING_DEFAULT_PROTOCOL] && strcasecompare(data->set.str[STRING_DEFAULT_PROTOCOL], "file"))) { - bool path_has_drive = FALSE; - if(url_has_scheme) rc = sscanf(data->change.url, "%*15[^\n/:]:%[^\n]", path); else @@ -4367,79 +2067,99 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, return CURLE_URL_MALFORMAT; } - if(url_has_scheme && path[0] == '/' && path[1] == '/') { - /* Allow omitted hostname (e.g. file:/). This is not strictly - * speaking a valid file: URL by RFC 1738, but treating file:/ as - * file://localhost/ is similar to how other schemes treat missing - * hostnames. See RFC 1808. */ - - /* This cannot be done with strcpy() in a portable manner, since the - memory areas overlap! */ - memmove(path, path + 2, strlen(path + 2)+1); + if(url_has_scheme && path[0] == '/' && path[1] == '/' && + path[2] == '/' && path[3] == '/') { + /* This appears to be a UNC string (usually indicating a SMB share). + * We don't do SMB in file: URLs. (TODO?) + */ + failf(data, "SMB shares are not supported in file: URLs."); + return CURLE_URL_MALFORMAT; } - /* the path may start with a drive letter. for backwards compatibility - we skip some processing on those paths. */ - path_has_drive = (('a' <= path[0] && path[0] <= 'z') || - ('A' <= path[0] && path[0] <= 'Z')) && path[1] == ':'; - - /* - * we deal with file:/// differently since it supports no - * hostname other than "localhost" and "127.0.0.1", which is unique among - * the URL protocols specified in RFC 1738 + /* Extra handling URLs with an authority component (i.e. that start with + * "file://") + * + * We allow omitted hostname (e.g. file:/) -- valid according to + * RFC 8089, but not the (current) WHAT-WG URL spec. */ - if(path[0] != '/' && !path_has_drive) { - /* the URL includes a host name, it must match "localhost" or - "127.0.0.1" to be valid */ - char *ptr; - if(!checkprefix("localhost/", path) && - !checkprefix("127.0.0.1/", path)) { - failf(data, "Invalid file://hostname/, " - "expected localhost or 127.0.0.1 or none"); - return CURLE_URL_MALFORMAT; - } - ptr = &path[9]; /* now points to the slash after the host */ - - /* there was a host name and slash present - - RFC1738 (section 3.1, page 5) says: - - The rest of the locator consists of data specific to the scheme, - and is known as the "url-path". It supplies the details of how the - specified resource can be accessed. Note that the "/" between the - host (or port) and the url-path is NOT part of the url-path. + if(url_has_scheme && path[0] == '/' && path[1] == '/') { + /* swallow the two slashes */ + char *ptr = &path[2]; - As most agents use file://localhost/foo to get '/foo' although the - slash preceding foo is a separator and not a slash for the path, - a URL as file://localhost//foo must be valid as well, to refer to - the same file with an absolute path. - */ + /* + * According to RFC 8089, a file: URL can be reliably dereferenced if: + * + * o it has no/blank hostname, or + * + * o the hostname matches "localhost" (case-insensitively), or + * + * o the hostname is a FQDN that resolves to this machine. + * + * For brevity, we only consider URLs with empty, "localhost", or + * "127.0.0.1" hostnames as local. + * + * Additionally, there is an exception for URLs with a Windows drive + * letter in the authority (which was accidentally omitted from RFC 8089 + * Appendix E, but believe me, it was meant to be there. --MK) + */ + if(ptr[0] != '/' && !STARTS_WITH_URL_DRIVE_PREFIX(ptr)) { + /* the URL includes a host name, it must match "localhost" or + "127.0.0.1" to be valid */ + if(!checkprefix("localhost/", ptr) && + !checkprefix("127.0.0.1/", ptr)) { + failf(data, "Invalid file://hostname/, " + "expected localhost or 127.0.0.1 or none"); + return CURLE_URL_MALFORMAT; + } + ptr += 9; /* now points to the slash after the host */ + } - if('/' == ptr[1]) - /* if there was two slashes, we skip the first one as that is then - used truly as a separator */ + /* + * RFC 8089, Appendix D, Section D.1, says: + * + * > In a POSIX file system, the root of the file system is represented + * > as a directory with a zero-length name, usually written as "/"; the + * > presence of this root in a file URI can be taken as given by the + * > initial slash in the "path-absolute" rule. + * + * i.e. the first slash is part of the path. + * + * However in RFC 1738 the "/" between the host (or port) and the + * URL-path was NOT part of the URL-path. Any agent that followed the + * older spec strictly, and wanted to refer to a file with an absolute + * path, would have included a second slash. So if there are two + * slashes, swallow one. + */ + if('/' == ptr[1]) /* note: the only way ptr[0]!='/' is if ptr[1]==':' */ ptr++; - /* This cannot be made with strcpy, as the memory chunks overlap! */ - memmove(path, ptr, strlen(ptr)+1); - - path_has_drive = (('a' <= path[0] && path[0] <= 'z') || - ('A' <= path[0] && path[0] <= 'Z')) && path[1] == ':'; + /* This cannot be done with strcpy, as the memory chunks overlap! */ + memmove(path, ptr, strlen(ptr) + 1); } #if !defined(MSDOS) && !defined(WIN32) && !defined(__CYGWIN__) - if(path_has_drive) { + /* Don't allow Windows drive letters when not in Windows. + * This catches both "file:/c:" and "file:c:" */ + if(('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) || + STARTS_WITH_URL_DRIVE_PREFIX(path)) { failf(data, "File drive letters are only accepted in MSDOS/Windows."); return CURLE_URL_MALFORMAT; } +#else + /* If the path starts with a slash and a drive letter, ditch the slash */ + if('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) { + /* This cannot be done with strcpy, as the memory chunks overlap! */ + memmove(path, &path[1], strlen(&path[1]) + 1); + } #endif protop = "file"; /* protocol string */ + *prot_missing = !url_has_scheme; } else { /* clear path */ char slashbuf[4]; - path[0]=0; + path[0] = 0; rc = sscanf(data->change.url, "%15[^\n/:]:%3[/]%[^\n/?#]%[^\n]", @@ -4524,7 +2244,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, */ at = strchr(conn->host.name, '@'); if(at) - query = strchr(at+1, '?'); + query = strchr(at + 1, '?'); else query = strchr(conn->host.name, '?'); @@ -4542,15 +2262,15 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, /* move the existing path plus the zero byte forward, to make room for the host-name part */ - memmove(path+hostlen+1, path, pathlen+1); + memmove(path + hostlen + 1, path, pathlen + 1); /* now copy the trailing host part in front of the existing path */ - memcpy(path+1, query, hostlen); + memcpy(path + 1, query, hostlen); path[0]='/'; /* prepend the missing slash */ rebuild_url = TRUE; - *query=0; /* now cut off the hostname at the ? */ + *query = 0; /* now cut off the hostname at the ? */ } else if(!path[0]) { /* if there's no path set, use a single slash */ @@ -4566,7 +2286,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, /* We need this function to deal with overlapping memory areas. We know that the memory area 'path' points to is 'urllen' bytes big and that is bigger than the path. Use +1 to move the zero byte too. */ - memmove(&path[1], path, strlen(path)+1); + memmove(&path[1], path, strlen(path) + 1); path[0] = '/'; rebuild_url = TRUE; } @@ -4598,14 +2318,30 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, size_t plen = strlen(path); /* new path, should be 1 byte longer than the original */ - size_t urllen = strlen(data->change.url); /* original URL length */ - size_t prefixlen = strlen(conn->host.name); - if(!*prot_missing) - prefixlen += strlen(protop) + strlen("://"); + if(!*prot_missing) { + size_t protolen = strlen(protop); + + if(curl_strnequal(protop, data->change.url, protolen)) + prefixlen += protolen; + else { + failf(data, " malformed"); + return CURLE_URL_MALFORMAT; + } + + if(curl_strnequal("://", &data->change.url[protolen], 3)) + prefixlen += 3; + /* only file: is allowed to omit one or both slashes */ + else if(curl_strnequal("file:", data->change.url, 5)) + prefixlen += 1 + (data->change.url[5] == '/'); + else { + failf(data, " malformed"); + return CURLE_URL_MALFORMAT; + } + } - reurl = malloc(urllen + 2); /* 2 for zerobyte + slash */ + reurl = malloc(prefixlen + plen + 1); if(!reurl) return CURLE_OUT_OF_MEMORY; @@ -4656,7 +2392,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, if(*endp == ']') { /* The address scope was well formed. Knock it out of the hostname. */ - memmove(percent, endp, strlen(endp)+1); + memmove(percent, endp, strlen(endp) + 1); conn->scope_id = (unsigned int)scope; } else { @@ -4838,7 +2574,15 @@ static bool check_noproxy(const char *name, const char *no_proxy) /* NO_PROXY was specified and it wasn't just an asterisk */ no_proxy_len = strlen(no_proxy); - endptr = strchr(name, ':'); + if(name[0] == '[') { + /* IPv6 numerical address */ + endptr = strchr(name, ']'); + if(!endptr) + return FALSE; + name++; + } + else + endptr = strchr(name, ':'); if(endptr) namelen = endptr - name; else @@ -4886,6 +2630,7 @@ static bool check_noproxy(const char *name, const char *no_proxy) return FALSE; } +#ifndef CURL_DISABLE_HTTP /**************************************************************** * Detect what (if any) proxy to use. Remember that this selects a host * name and is not limited to HTTP proxies only. @@ -4925,7 +2670,7 @@ static char *detect_proxy(struct connectdata *conn) strcpy(envp, "_proxy"); /* read the protocol proxy: */ - prox=curl_getenv(proxy_env); + prox = curl_getenv(proxy_env); /* * We don't try the uppercase version of HTTP_PROXY because of @@ -4942,7 +2687,7 @@ static char *detect_proxy(struct connectdata *conn) if(!prox && !strcasecompare("http_proxy", proxy_env)) { /* There was no lowercase variable, try the uppercase version: */ Curl_strntoupper(proxy_env, proxy_env, sizeof(proxy_env)); - prox=curl_getenv(proxy_env); + prox = curl_getenv(proxy_env); } if(prox) @@ -4950,11 +2695,12 @@ static char *detect_proxy(struct connectdata *conn) else { proxy = curl_getenv("all_proxy"); /* default proxy to use */ if(!proxy) - proxy=curl_getenv("ALL_PROXY"); + proxy = curl_getenv("ALL_PROXY"); } return proxy; } +#endif /* CURL_DISABLE_HTTP */ /* * If this is supposed to use a proxy, we need to figure out the proxy @@ -4984,7 +2730,7 @@ static CURLcode parse_proxy(struct Curl_easy *data, /* Parse the protocol part if present */ endofprot = strstr(proxy, "://"); if(endofprot) { - proxyptr = endofprot+3; + proxyptr = endofprot + 3; if(checkprefix("https", proxy)) proxytype = CURLPROXY_HTTPS; else if(checkprefix("socks5h", proxy)) @@ -5006,13 +2752,14 @@ static CURLcode parse_proxy(struct Curl_easy *data, else proxyptr = proxy; /* No xxx:// head: It's a HTTP proxy */ -#ifndef HTTPS_PROXY_SUPPORT - if(proxytype == CURLPROXY_HTTPS) { - failf(data, "Unsupported proxy \'%s\'" - ", libcurl is built without the HTTPS-proxy support.", proxy); - return CURLE_NOT_BUILT_IN; - } +#ifdef USE_SSL + if(!Curl_ssl->support_https_proxy) #endif + if(proxytype == CURLPROXY_HTTPS) { + failf(data, "Unsupported proxy \'%s\', libcurl is built without the " + "HTTPS-proxy support.", proxy); + return CURLE_NOT_BUILT_IN; + } sockstype = proxytype == CURLPROXY_SOCKS5_HOSTNAME || proxytype == CURLPROXY_SOCKS5 || @@ -5023,8 +2770,8 @@ static CURLcode parse_proxy(struct Curl_easy *data, atsign = strchr(proxyptr, '@'); if(atsign) { CURLcode result = - parse_login_details(proxyptr, atsign - proxyptr, - &proxyuser, &proxypasswd, NULL); + Curl_parse_login_details(proxyptr, atsign - proxyptr, + &proxyuser, &proxypasswd, NULL); if(result) return result; proxyptr = atsign + 1; @@ -5083,11 +2830,14 @@ static CURLcode parse_proxy(struct Curl_easy *data, conn->port = port; } else { - if(proxyptr[0]=='/') + if(proxyptr[0]=='/') { /* If the first character in the proxy string is a slash, fail immediately. The following code will otherwise clear the string which will lead to code running as if no proxy was set! */ + Curl_safefree(proxyuser); + Curl_safefree(proxypasswd); return CURLE_COULDNT_RESOLVE_PROXY; + } /* without a port number after the host name, some people seem to use a slash so we strip everything from the first slash */ @@ -5118,15 +2868,19 @@ static CURLcode parse_proxy(struct Curl_easy *data, with reserved characters like ':' in them. */ Curl_safefree(proxyinfo->user); proxyinfo->user = curl_easy_unescape(data, proxyuser, 0, NULL); + Curl_safefree(proxyuser); - if(!proxyinfo->user) + if(!proxyinfo->user) { + Curl_safefree(proxypasswd); return CURLE_OUT_OF_MEMORY; + } Curl_safefree(proxyinfo->passwd); if(proxypasswd && strlen(proxypasswd) < MAX_CURL_PASSWORD_LENGTH) proxyinfo->passwd = curl_easy_unescape(data, proxypasswd, 0, NULL); else proxyinfo->passwd = strdup(""); + Curl_safefree(proxypasswd); if(!proxyinfo->passwd) return CURLE_OUT_OF_MEMORY; @@ -5139,48 +2893,212 @@ static CURLcode parse_proxy(struct Curl_easy *data, if(conn->port < 0 || sockstype || !conn->socks_proxy.host.rawalloc) conn->port = port; } - - /* now, clone the cleaned proxy host name */ - Curl_safefree(proxyinfo->host.rawalloc); - proxyinfo->host.rawalloc = strdup(proxyptr); - proxyinfo->host.name = proxyinfo->host.rawalloc; - - if(!proxyinfo->host.rawalloc) - return CURLE_OUT_OF_MEMORY; + + /* now, clone the cleaned proxy host name */ + Curl_safefree(proxyinfo->host.rawalloc); + proxyinfo->host.rawalloc = strdup(proxyptr); + proxyinfo->host.name = proxyinfo->host.rawalloc; + + if(!proxyinfo->host.rawalloc) + return CURLE_OUT_OF_MEMORY; + } + + Curl_safefree(proxyuser); + Curl_safefree(proxypasswd); + + return CURLE_OK; +} + +/* + * Extract the user and password from the authentication string + */ +static CURLcode parse_proxy_auth(struct Curl_easy *data, + struct connectdata *conn) +{ + char proxyuser[MAX_CURL_USER_LENGTH]=""; + char proxypasswd[MAX_CURL_PASSWORD_LENGTH]=""; + CURLcode result; + + if(data->set.str[STRING_PROXYUSERNAME] != NULL) { + strncpy(proxyuser, data->set.str[STRING_PROXYUSERNAME], + MAX_CURL_USER_LENGTH); + proxyuser[MAX_CURL_USER_LENGTH-1] = '\0'; /*To be on safe side*/ + } + if(data->set.str[STRING_PROXYPASSWORD] != NULL) { + strncpy(proxypasswd, data->set.str[STRING_PROXYPASSWORD], + MAX_CURL_PASSWORD_LENGTH); + proxypasswd[MAX_CURL_PASSWORD_LENGTH-1] = '\0'; /*To be on safe side*/ + } + + result = Curl_urldecode(data, proxyuser, 0, &conn->http_proxy.user, NULL, + FALSE); + if(!result) + result = Curl_urldecode(data, proxypasswd, 0, &conn->http_proxy.passwd, + NULL, FALSE); + return result; +} + +/* create_conn helper to parse and init proxy values. to be called after unix + socket init but before any proxy vars are evaluated. */ +static CURLcode create_conn_helper_init_proxy(struct connectdata *conn) +{ + char *proxy = NULL; + char *socksproxy = NULL; + char *no_proxy = NULL; + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + + /************************************************************* + * Extract the user and password from the authentication string + *************************************************************/ + if(conn->bits.proxy_user_passwd) { + result = parse_proxy_auth(data, conn); + if(result) + goto out; + } + + /************************************************************* + * Detect what (if any) proxy to use + *************************************************************/ + if(data->set.str[STRING_PROXY]) { + proxy = strdup(data->set.str[STRING_PROXY]); + /* if global proxy is set, this is it */ + if(NULL == proxy) { + failf(data, "memory shortage"); + result = CURLE_OUT_OF_MEMORY; + goto out; + } + } + + if(data->set.str[STRING_PRE_PROXY]) { + socksproxy = strdup(data->set.str[STRING_PRE_PROXY]); + /* if global socks proxy is set, this is it */ + if(NULL == socksproxy) { + failf(data, "memory shortage"); + result = CURLE_OUT_OF_MEMORY; + goto out; + } + } + + if(!data->set.str[STRING_NOPROXY]) { + no_proxy = curl_getenv("no_proxy"); + if(!no_proxy) + no_proxy = curl_getenv("NO_PROXY"); + } + + if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY] ? + data->set.str[STRING_NOPROXY] : no_proxy)) { + Curl_safefree(proxy); + Curl_safefree(socksproxy); + } +#ifndef CURL_DISABLE_HTTP + else if(!proxy && !socksproxy) + /* if the host is not in the noproxy list, detect proxy. */ + proxy = detect_proxy(conn); +#endif /* CURL_DISABLE_HTTP */ + + Curl_safefree(no_proxy); + +#ifdef USE_UNIX_SOCKETS + /* For the time being do not mix proxy and unix domain sockets. See #1274 */ + if(proxy && conn->unix_domain_socket) { + free(proxy); + proxy = NULL; + } +#endif + + if(proxy && (!*proxy || (conn->handler->flags & PROTOPT_NONETWORK))) { + free(proxy); /* Don't bother with an empty proxy string or if the + protocol doesn't work with network */ + proxy = NULL; + } + if(socksproxy && (!*socksproxy || + (conn->handler->flags & PROTOPT_NONETWORK))) { + free(socksproxy); /* Don't bother with an empty socks proxy string or if + the protocol doesn't work with network */ + socksproxy = NULL; + } + + /*********************************************************************** + * If this is supposed to use a proxy, we need to figure out the proxy host + * name, proxy type and port number, so that we can re-use an existing + * connection that may exist registered to the same proxy host. + ***********************************************************************/ + if(proxy || socksproxy) { + if(proxy) { + result = parse_proxy(data, conn, proxy, conn->http_proxy.proxytype); + Curl_safefree(proxy); /* parse_proxy copies the proxy string */ + if(result) + goto out; + } + + if(socksproxy) { + result = parse_proxy(data, conn, socksproxy, + conn->socks_proxy.proxytype); + /* parse_proxy copies the socks proxy string */ + Curl_safefree(socksproxy); + if(result) + goto out; + } + + if(conn->http_proxy.host.rawalloc) { +#ifdef CURL_DISABLE_HTTP + /* asking for a HTTP proxy is a bit funny when HTTP is disabled... */ + result = CURLE_UNSUPPORTED_PROTOCOL; + goto out; +#else + /* force this connection's protocol to become HTTP if compatible */ + if(!(conn->handler->protocol & PROTO_FAMILY_HTTP)) { + if((conn->handler->flags & PROTOPT_PROXY_AS_HTTP) && + !conn->bits.tunnel_proxy) + conn->handler = &Curl_handler_http; + else + /* if not converting to HTTP over the proxy, enforce tunneling */ + conn->bits.tunnel_proxy = TRUE; + } + conn->bits.httpproxy = TRUE; +#endif + } + else { + conn->bits.httpproxy = FALSE; /* not a HTTP proxy */ + conn->bits.tunnel_proxy = FALSE; /* no tunneling if not HTTP */ + } + + if(conn->socks_proxy.host.rawalloc) { + if(!conn->http_proxy.host.rawalloc) { + /* once a socks proxy */ + if(!conn->socks_proxy.user) { + conn->socks_proxy.user = conn->http_proxy.user; + conn->http_proxy.user = NULL; + Curl_safefree(conn->socks_proxy.passwd); + conn->socks_proxy.passwd = conn->http_proxy.passwd; + conn->http_proxy.passwd = NULL; + } + } + conn->bits.socksproxy = TRUE; + } + else + conn->bits.socksproxy = FALSE; /* not a socks proxy */ } - - Curl_safefree(proxyuser); - Curl_safefree(proxypasswd); - - return CURLE_OK; -} - -/* - * Extract the user and password from the authentication string - */ -static CURLcode parse_proxy_auth(struct Curl_easy *data, - struct connectdata *conn) -{ - char proxyuser[MAX_CURL_USER_LENGTH]=""; - char proxypasswd[MAX_CURL_PASSWORD_LENGTH]=""; - CURLcode result; - - if(data->set.str[STRING_PROXYUSERNAME] != NULL) { - strncpy(proxyuser, data->set.str[STRING_PROXYUSERNAME], - MAX_CURL_USER_LENGTH); - proxyuser[MAX_CURL_USER_LENGTH-1] = '\0'; /*To be on safe side*/ + else { + conn->bits.socksproxy = FALSE; + conn->bits.httpproxy = FALSE; } - if(data->set.str[STRING_PROXYPASSWORD] != NULL) { - strncpy(proxypasswd, data->set.str[STRING_PROXYPASSWORD], - MAX_CURL_PASSWORD_LENGTH); - proxypasswd[MAX_CURL_PASSWORD_LENGTH-1] = '\0'; /*To be on safe side*/ + conn->bits.proxy = conn->bits.httpproxy || conn->bits.socksproxy; + + if(!conn->bits.proxy) { + /* we aren't using the proxy after all... */ + conn->bits.proxy = FALSE; + conn->bits.httpproxy = FALSE; + conn->bits.socksproxy = FALSE; + conn->bits.proxy_user_passwd = FALSE; + conn->bits.tunnel_proxy = FALSE; } - result = Curl_urldecode(data, proxyuser, 0, &conn->http_proxy.user, NULL, - FALSE); - if(!result) - result = Curl_urldecode(data, proxypasswd, 0, &conn->http_proxy.passwd, - NULL, FALSE); +out: + + free(socksproxy); + free(proxy); return result; } #endif /* CURL_DISABLE_PROXY */ @@ -5244,10 +3162,11 @@ static CURLcode parse_url_login(struct Curl_easy *data, /* We could use the login information in the URL so extract it. Only parse options if the handler says we should. */ - result = parse_login_details(login, ptr - login - 1, - &userp, &passwdp, - (conn->handler->flags & PROTOPT_URLOPTIONS)? - &optionsp:NULL); + result = + Curl_parse_login_details(login, ptr - login - 1, + &userp, &passwdp, + (conn->handler->flags & PROTOPT_URLOPTIONS)? + &optionsp:NULL); if(result) goto out; @@ -5303,7 +3222,7 @@ static CURLcode parse_url_login(struct Curl_easy *data, } /* - * parse_login_details() + * Curl_parse_login_details() * * This is used to parse a login string for user name, password and options in * the following formats: @@ -5331,9 +3250,9 @@ static CURLcode parse_url_login(struct Curl_easy *data, * * Returns CURLE_OK on success. */ -static CURLcode parse_login_details(const char *login, const size_t len, - char **userp, char **passwdp, - char **optionsp) +CURLcode Curl_parse_login_details(const char *login, const size_t len, + char **userp, char **passwdp, + char **optionsp) { CURLcode result = CURLE_OK; char *ubuf = NULL; @@ -5462,7 +3381,13 @@ static CURLcode parse_remote_port(struct Curl_easy *data, portptr = strchr(conn->host.name, ']'); if(portptr) { *portptr++ = '\0'; /* zero terminate, killing the bracket */ - if(':' != *portptr) + if(*portptr) { + if (*portptr != ':') { + failf(data, "IPv6 closing bracket followed by '%c'", *portptr); + return CURLE_URL_MALFORMAT; + } + } + else portptr = NULL; /* no port number available */ } } @@ -5477,7 +3402,7 @@ static CURLcode parse_remote_port(struct Curl_easy *data, } #endif - portptr = strrchr(conn->host.name, ':'); + portptr = strchr(conn->host.name, ':'); } if(data->set.use_port && data->state.allow_port) { @@ -5524,7 +3449,7 @@ static CURLcode parse_remote_port(struct Curl_easy *data, char *rest; long port; - port=strtol(portptr+1, &rest, 10); /* Port number must be decimal */ + port = strtol(portptr + 1, &rest, 10); /* Port number must be decimal */ if((port < 0) || (port > 0xffff)) { /* Single unix standard says port numbers are 16 bits long */ @@ -5532,15 +3457,16 @@ static CURLcode parse_remote_port(struct Curl_easy *data, return CURLE_URL_MALFORMAT; } - else if(rest != &portptr[1]) { + if(rest[0]) { + failf(data, "Port number ended with '%c'", rest[0]); + return CURLE_URL_MALFORMAT; + } + + if(rest != &portptr[1]) { *portptr = '\0'; /* cut off the name there */ conn->remote_port = curlx_ultous(port); } else { - if(rest[0]) { - failf(data, "Illegal port number"); - return CURLE_URL_MALFORMAT; - } /* Browser behavior adaptation. If there's a colon with no digits after, just cut off the name there which makes us ignore the colon and just use the default port. Firefox and Chrome both do that. */ @@ -5695,6 +3621,7 @@ static CURLcode parse_connect_to_host_port(struct Curl_easy *data, /* detect and extract RFC6874-style IPv6-addresses */ if(*hostptr == '[') { +#ifdef ENABLE_IPV6 char *ptr = ++hostptr; /* advance beyond the initial bracket */ while(*ptr && (ISXDIGIT(*ptr) || (*ptr == ':') || (*ptr == '.'))) ptr++; @@ -5718,6 +3645,11 @@ static CURLcode parse_connect_to_host_port(struct Curl_easy *data, * hostptr first, but I can't see anything wrong with that as no host * name nor a numeric can legally start with a bracket. */ +#else + failf(data, "Use of IPv6 in *_CONNECT_TO without IPv6 support built-in!"); + free(host_dup); + return CURLE_NOT_BUILT_IN; +#endif } /* Get port number off server.com:1080 */ @@ -5879,8 +3811,8 @@ static CURLcode resolve_server(struct Curl_easy *data, struct connectdata *conn, bool *async) { - CURLcode result=CURLE_OK; - time_t timeout_ms = Curl_timeleft(data, NULL, TRUE); + CURLcode result = CURLE_OK; + timediff_t timeout_ms = Curl_timeleft(data, NULL, TRUE); /************************************************************* * Resolve the name of the server or proxy @@ -6042,17 +3974,15 @@ static void reuse_conn(struct connectdata *old_conn, free_fixed_hostname(&conn->conn_to_host); Curl_safefree(conn->host.rawalloc); Curl_safefree(conn->conn_to_host.rawalloc); - conn->host=old_conn->host; - conn->bits.conn_to_host = old_conn->bits.conn_to_host; + conn->host = old_conn->host; conn->conn_to_host = old_conn->conn_to_host; - conn->bits.conn_to_port = old_conn->bits.conn_to_port; conn->conn_to_port = old_conn->conn_to_port; + conn->remote_port = old_conn->remote_port; /* persist connection info in session handle */ Curl_persistconninfo(conn); conn_reset_all_postponed_data(old_conn); /* free buffers */ - conn_reset_all_postponed_data(conn); /* reset unprocessed data */ /* re-use init */ conn->bits.reuse = TRUE; /* yes, we're re-using here */ @@ -6065,11 +3995,8 @@ static void reuse_conn(struct connectdata *old_conn, Curl_safefree(old_conn->socks_proxy.passwd); Curl_safefree(old_conn->localdev); - Curl_llist_destroy(old_conn->send_pipe, NULL); - Curl_llist_destroy(old_conn->recv_pipe, NULL); - - old_conn->send_pipe = NULL; - old_conn->recv_pipe = NULL; + Curl_llist_destroy(&old_conn->send_pipe, NULL); + Curl_llist_destroy(&old_conn->recv_pipe, NULL); Curl_safefree(old_conn->master_buffer); @@ -6106,9 +4033,6 @@ static CURLcode create_conn(struct Curl_easy *data, char *passwd = NULL; char *options = NULL; bool reuse; - char *proxy = NULL; - char *socksproxy = NULL; - char *no_proxy = NULL; bool prot_missing = FALSE; bool connections_available = TRUE; bool force_reuse = FALSE; @@ -6152,9 +4076,9 @@ static CURLcode create_conn(struct Curl_easy *data, * other parts of the code will rely on this fact ***********************************************************/ #define LEAST_PATH_ALLOC 256 - urllen=strlen(data->change.url); + urllen = strlen(data->change.url); if(urllen < LEAST_PATH_ALLOC) - urllen=LEAST_PATH_ALLOC; + urllen = LEAST_PATH_ALLOC; /* * We malloc() the buffers below urllen+2 to make room for 2 possibilities: @@ -6165,14 +4089,14 @@ static CURLcode create_conn(struct Curl_easy *data, Curl_safefree(data->state.pathbuffer); data->state.path = NULL; - data->state.pathbuffer = malloc(urllen+2); + data->state.pathbuffer = malloc(urllen + 2); if(NULL == data->state.pathbuffer) { result = CURLE_OUT_OF_MEMORY; /* really bad error */ goto out; } data->state.path = data->state.pathbuffer; - conn->host.rawalloc = malloc(urllen+2); + conn->host.rawalloc = malloc(urllen + 2); if(NULL == conn->host.rawalloc) { Curl_safefree(data->state.pathbuffer); data->state.path = NULL; @@ -6201,7 +4125,7 @@ static CURLcode create_conn(struct Curl_easy *data, *************************************************************/ if(prot_missing) { /* We're guessing prefixes here and if we're told to use a proxy or if - we're gonna follow a Location: later or... then we need the protocol + we're going to follow a Location: later or... then we need the protocol part added so that we have a valid URL. */ char *reurl; char *ch_lower; @@ -6252,65 +4176,8 @@ static CURLcode create_conn(struct Curl_easy *data, } } -#ifndef CURL_DISABLE_PROXY - /************************************************************* - * Extract the user and password from the authentication string - *************************************************************/ - if(conn->bits.proxy_user_passwd) { - result = parse_proxy_auth(data, conn); - if(result) - goto out; - } - - /************************************************************* - * Detect what (if any) proxy to use - *************************************************************/ - if(data->set.str[STRING_PROXY]) { - proxy = strdup(data->set.str[STRING_PROXY]); - /* if global proxy is set, this is it */ - if(NULL == proxy) { - failf(data, "memory shortage"); - result = CURLE_OUT_OF_MEMORY; - goto out; - } - } - - if(data->set.str[STRING_PRE_PROXY]) { - socksproxy = strdup(data->set.str[STRING_PRE_PROXY]); - /* if global socks proxy is set, this is it */ - if(NULL == socksproxy) { - failf(data, "memory shortage"); - result = CURLE_OUT_OF_MEMORY; - goto out; - } - } - - no_proxy = curl_getenv("no_proxy"); - if(!no_proxy) - no_proxy = curl_getenv("NO_PROXY"); - - if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY]) || - (!data->set.str[STRING_NOPROXY] && - check_noproxy(conn->host.name, no_proxy))) { - Curl_safefree(proxy); - Curl_safefree(socksproxy); - } - else if(!proxy && !socksproxy) -#ifndef CURL_DISABLE_HTTP - /* if the host is not in the noproxy list, detect proxy. */ - proxy = detect_proxy(conn); -#else /* !CURL_DISABLE_HTTP */ - proxy = NULL; -#endif /* CURL_DISABLE_HTTP */ - - Curl_safefree(no_proxy); - #ifdef USE_UNIX_SOCKETS if(data->set.str[STRING_UNIX_SOCKET_PATH]) { - if(proxy) { - free(proxy); /* Unix domain sockets cannot be proxied, so disable it */ - proxy = NULL; - } conn->unix_domain_socket = strdup(data->set.str[STRING_UNIX_SOCKET_PATH]); if(conn->unix_domain_socket == NULL) { result = CURLE_OUT_OF_MEMORY; @@ -6320,92 +4187,13 @@ static CURLcode create_conn(struct Curl_easy *data, } #endif - if(proxy && (!*proxy || (conn->handler->flags & PROTOPT_NONETWORK))) { - free(proxy); /* Don't bother with an empty proxy string or if the - protocol doesn't work with network */ - proxy = NULL; - } - if(socksproxy && (!*socksproxy || - (conn->handler->flags & PROTOPT_NONETWORK))) { - free(socksproxy); /* Don't bother with an empty socks proxy string or if - the protocol doesn't work with network */ - socksproxy = NULL; - } - - /*********************************************************************** - * If this is supposed to use a proxy, we need to figure out the proxy host - * name, proxy type and port number, so that we can re-use an existing - * connection that may exist registered to the same proxy host. - ***********************************************************************/ - if(proxy || socksproxy) { - if(proxy) { - result = parse_proxy(data, conn, proxy, conn->http_proxy.proxytype); - Curl_safefree(proxy); /* parse_proxy copies the proxy string */ - if(result) - goto out; - } - - if(socksproxy) { - result = parse_proxy(data, conn, socksproxy, - conn->socks_proxy.proxytype); - /* parse_proxy copies the socks proxy string */ - Curl_safefree(socksproxy); - if(result) - goto out; - } - - if(conn->http_proxy.host.rawalloc) { -#ifdef CURL_DISABLE_HTTP - /* asking for a HTTP proxy is a bit funny when HTTP is disabled... */ - result = CURLE_UNSUPPORTED_PROTOCOL; - goto out; -#else - /* force this connection's protocol to become HTTP if not already - compatible - if it isn't tunneling through */ - if(!(conn->handler->protocol & PROTO_FAMILY_HTTP) && - !conn->bits.tunnel_proxy) - conn->handler = &Curl_handler_http; - - conn->bits.httpproxy = TRUE; + /* After the unix socket init but before the proxy vars are used, parse and + initialize the proxy vars */ +#ifndef CURL_DISABLE_PROXY + result = create_conn_helper_init_proxy(conn); + if(result) + goto out; #endif - } - else { - conn->bits.httpproxy = FALSE; /* not a HTTP proxy */ - conn->bits.tunnel_proxy = FALSE; /* no tunneling if not HTTP */ - } - - if(conn->socks_proxy.host.rawalloc) { - if(!conn->http_proxy.host.rawalloc) { - /* once a socks proxy */ - if(!conn->socks_proxy.user) { - conn->socks_proxy.user = conn->http_proxy.user; - conn->http_proxy.user = NULL; - Curl_safefree(conn->socks_proxy.passwd); - conn->socks_proxy.passwd = conn->http_proxy.passwd; - conn->http_proxy.passwd = NULL; - } - } - conn->bits.socksproxy = TRUE; - } - else - conn->bits.socksproxy = FALSE; /* not a socks proxy */ - } - else { - conn->bits.socksproxy = FALSE; - conn->bits.httpproxy = FALSE; - } - conn->bits.proxy = conn->bits.httpproxy || conn->bits.socksproxy; - - if(!conn->bits.proxy) { - /* we aren't using the proxy after all... */ - conn->bits.proxy = FALSE; - conn->bits.httpproxy = FALSE; - conn->bits.socksproxy = FALSE; - conn->bits.proxy_user_passwd = FALSE; - conn->bits.tunnel_proxy = FALSE; - } - -#endif /* CURL_DISABLE_PROXY */ /************************************************************* * If the protocol is using SSL and HTTP proxy is used, we set @@ -6441,13 +4229,24 @@ static CURLcode create_conn(struct Curl_easy *data, /************************************************************* * IDN-fix the hostnames *************************************************************/ - fix_hostname(conn, &conn->host); - if(conn->bits.conn_to_host) - fix_hostname(conn, &conn->conn_to_host); - if(conn->bits.httpproxy) - fix_hostname(conn, &conn->http_proxy.host); - if(conn->bits.socksproxy) - fix_hostname(conn, &conn->socks_proxy.host); + result = fix_hostname(conn, &conn->host); + if(result) + goto out; + if(conn->bits.conn_to_host) { + result = fix_hostname(conn, &conn->conn_to_host); + if(result) + goto out; + } + if(conn->bits.httpproxy) { + result = fix_hostname(conn, &conn->http_proxy.host); + if(result) + goto out; + } + if(conn->bits.socksproxy) { + result = fix_hostname(conn, &conn->socks_proxy.host); + if(result) + goto out; + } /************************************************************* * Check whether the host and the "connect to host" are equal. @@ -6604,20 +4403,21 @@ static CURLcode create_conn(struct Curl_easy *data, else reuse = ConnectionExists(data, conn, &conn_temp, &force_reuse, &waitpipe); - /* If we found a reusable connection, we may still want to - open a new connection if we are pipelining. */ + /* If we found a reusable connection that is now marked as in use, we may + still want to open a new connection if we are pipelining. */ if(reuse && !force_reuse && IsPipeliningPossible(data, conn_temp)) { - size_t pipelen = conn_temp->send_pipe->size + conn_temp->recv_pipe->size; + size_t pipelen = conn_temp->send_pipe.size + conn_temp->recv_pipe.size; if(pipelen > 0) { infof(data, "Found connection %ld, with requests in the pipe (%zu)\n", conn_temp->connection_id, pipelen); - if(conn_temp->bundle->num_connections < max_host_connections && - data->state.conn_cache->num_connections < max_total_connections) { + if(Curl_conncache_bundle_size(conn_temp) < max_host_connections && + Curl_conncache_size(data) < max_total_connections) { /* We want a new connection anyway */ reuse = FALSE; infof(data, "We can reuse, but we want a new connection anyway\n"); + Curl_conncache_return_conn(conn_temp); } } } @@ -6629,9 +4429,10 @@ static CURLcode create_conn(struct Curl_easy *data, * just allocated before we can move along and use the previously * existing one. */ - conn_temp->inuse = TRUE; /* mark this as being in use so that no other - handle in a multi stack may nick it */ reuse_conn(conn, conn_temp); +#ifdef USE_SSL + free(conn->ssl_extra); +#endif free(conn); /* we don't need this anymore */ conn = conn_temp; *in_connect = conn; @@ -6647,7 +4448,6 @@ static CURLcode create_conn(struct Curl_easy *data, /* We have decided that we want a new connection. However, we may not be able to do that if we have reached the limit of how many connections we are allowed to open. */ - struct connectbundle *bundle = NULL; if(conn->handler->flags & PROTOPT_ALPN_NPN) { /* The protocol wants it, so set the bits if enabled in the easy handle @@ -6662,35 +4462,42 @@ static CURLcode create_conn(struct Curl_easy *data, /* There is a connection that *might* become usable for pipelining "soon", and we wait for that */ connections_available = FALSE; - else - bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache); - - if(max_host_connections > 0 && bundle && - (bundle->num_connections >= max_host_connections)) { - struct connectdata *conn_candidate; - - /* The bundle is full. Let's see if we can kill a connection. */ - conn_candidate = find_oldest_idle_connection_in_bundle(data, bundle); - - if(conn_candidate) { - /* Set the connection's owner correctly, then kill it */ - conn_candidate->data = data; - (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE); - } - else { - infof(data, "No more connections allowed to host: %d\n", - max_host_connections); - connections_available = FALSE; + else { + /* this gets a lock on the conncache */ + struct connectbundle *bundle = + Curl_conncache_find_bundle(conn, data->state.conn_cache); + + if(max_host_connections > 0 && bundle && + (bundle->num_connections >= max_host_connections)) { + struct connectdata *conn_candidate; + + /* The bundle is full. Extract the oldest connection. */ + conn_candidate = Curl_conncache_extract_bundle(data, bundle); + Curl_conncache_unlock(conn); + + if(conn_candidate) { + /* Set the connection's owner correctly, then kill it */ + conn_candidate->data = data; + (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE); + } + else { + infof(data, "No more connections allowed to host: %d\n", + max_host_connections); + connections_available = FALSE; + } } + else + Curl_conncache_unlock(conn); + } if(connections_available && (max_total_connections > 0) && - (data->state.conn_cache->num_connections >= max_total_connections)) { + (Curl_conncache_size(data) >= max_total_connections)) { struct connectdata *conn_candidate; /* The cache is full. Let's see if we can kill a connection. */ - conn_candidate = Curl_oldest_idle_connection(data); + conn_candidate = Curl_conncache_extract_oldest(data); if(conn_candidate) { /* Set the connection's owner correctly, then kill it */ @@ -6713,6 +4520,9 @@ static CURLcode create_conn(struct Curl_easy *data, goto out; } else { + /* Mark the connection as used, before we add it */ + conn->inuse = TRUE; + /* * This is a brand new connection, so let's store it in the connection * cache of ours! @@ -6740,9 +4550,6 @@ static CURLcode create_conn(struct Curl_easy *data, #endif } - /* Mark the connection as used */ - conn->inuse = TRUE; - /* Setup and init stuff before DO starts, in preparing for the transfer. */ Curl_init_do(data, conn); @@ -6767,13 +4574,11 @@ static CURLcode create_conn(struct Curl_easy *data, *************************************************************/ result = resolve_server(data, conn, async); - out: +out: free(options); free(passwd); free(user); - free(socksproxy); - free(proxy); return result; } @@ -6827,7 +4632,7 @@ CURLcode Curl_setup_conn(struct connectdata *conn, /* set start time here for timeout purposes in the connect procedure, it is later set again for the progress meter purpose */ - conn->now = Curl_tvnow(); + conn->now = Curl_now(); if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) { conn->bits.tcpconnect[FIRSTSOCKET] = FALSE; @@ -6844,22 +4649,8 @@ CURLcode Curl_setup_conn(struct connectdata *conn, Curl_verboseconnect(conn); } - conn->now = Curl_tvnow(); /* time this *after* the connect is done, we - set this here perhaps a second time */ - -#ifdef __EMX__ - /* - * This check is quite a hack. We're calling _fsetmode to fix the problem - * with fwrite converting newline characters (you get mangled text files, - * and corrupted binary files when you download to stdout and redirect it to - * a file). - */ - - if((data->set.out)->_handle == NULL) { - _fsetmode(stdout, "b"); - } -#endif - + conn->now = Curl_now(); /* time this *after* the connect is done, we set + this here perhaps a second time */ return result; } @@ -6877,7 +4668,7 @@ CURLcode Curl_connect(struct Curl_easy *data, if(!result) { /* no error */ - if((*in_connect)->send_pipe->size || (*in_connect)->recv_pipe->size) + if((*in_connect)->send_pipe.size || (*in_connect)->recv_pipe.size) /* pipelining */ *protocol_done = TRUE; else if(!*asyncp) { @@ -6917,13 +4708,17 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn) { struct SingleRequest *k = &data->req; - if(conn) - conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to - * use */ + conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to + use */ data->state.done = FALSE; /* *_done() is not called yet */ data->state.expect100header = FALSE; + /* if the protocol used doesn't support wildcards, switch it off */ + if(data->state.wildcardmatch && + !(conn->handler->flags & PROTOPT_WILDCARD)) + data->state.wildcardmatch = FALSE; + if(data->set.opt_no_body) /* in HTTP lingo, no body means using the HEAD request... */ data->set.httpreq = HTTPREQ_HEAD; @@ -6935,16 +4730,15 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn) HTTP. */ data->set.httpreq = HTTPREQ_GET; - k->start = Curl_tvnow(); /* start time */ + k->start = Curl_now(); /* start time */ k->now = k->start; /* current time is now */ k->header = TRUE; /* assume header */ k->bytecount = 0; k->buf = data->state.buffer; - k->uploadbuf = data->state.uploadbuffer; k->hbufp = data->state.headerbuff; - k->ignorebody=FALSE; + k->ignorebody = FALSE; Curl_speedinit(data); @@ -6966,7 +4760,7 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn) * Returns the family as a single bit protocol identifier. */ -unsigned int get_protocol_family(unsigned int protocol) +static unsigned int get_protocol_family(unsigned int protocol) { unsigned int family; diff --git a/lib/url.h b/lib/url.h index f13c8e6..a70bd54 100644 --- a/lib/url.h +++ b/lib/url.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,15 +23,17 @@ ***************************************************************************/ #include "curl_setup.h" +#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE +#define READBUFFER_MAX CURL_MAX_READ_SIZE +#define READBUFFER_MIN 1024 + /* * Prototypes for library-wide functions provided by url.c */ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn); CURLcode Curl_open(struct Curl_easy **curl); -CURLcode Curl_init_userdefined(struct UserDefined *set); -CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, - va_list arg); +CURLcode Curl_init_userdefined(struct Curl_easy *data); CURLcode Curl_dupset(struct Curl_easy * dst, struct Curl_easy * src); void Curl_freeset(struct Curl_easy * data); CURLcode Curl_close(struct Curl_easy *data); /* opposite of curl_open() */ @@ -51,14 +53,14 @@ int Curl_protocol_getsock(struct connectdata *conn, int Curl_doing_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks); - +CURLcode Curl_parse_login_details(const char *login, const size_t len, + char **userptr, char **passwdptr, + char **optionsptr); bool Curl_isPipeliningEnabled(const struct Curl_easy *handle); CURLcode Curl_addHandleToPipeline(struct Curl_easy *handle, struct curl_llist *pipeline); int Curl_removeHandleFromPipeline(struct Curl_easy *handle, struct curl_llist *pipeline); -struct connectdata * -Curl_oldest_idle_connection(struct Curl_easy *data); /* remove the specified connection from all (possible) pipelines and related queues */ void Curl_getoff_all_pipelines(struct Curl_easy *data, diff --git a/lib/urldata.h b/lib/urldata.h index 7f87913..3d7b9e5 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -82,89 +82,15 @@ #include "cookie.h" #include "formdata.h" -#ifdef USE_OPENSSL -#include -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif -#endif /* USE_OPENSSL */ - -#ifdef USE_GNUTLS -#include -#endif - -#ifdef USE_MBEDTLS - -#include -#include -#include -#include - -#elif defined USE_POLARSSL - -#include -#include -#if POLARSSL_VERSION_NUMBER<0x01010000 -#include -#else -#include -#include -#endif /* POLARSSL_VERSION_NUMBER<0x01010000 */ - -#endif /* USE_POLARSSL */ - -#ifdef USE_CYASSL -#undef OCSP_REQUEST /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */ -#undef OCSP_RESPONSE /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */ -#include -#endif - -#ifdef USE_NSS -#include -#include -#endif - -#ifdef USE_GSKIT -#include -#endif - -#ifdef USE_AXTLS -#include -#include -#undef malloc -#undef calloc -#undef realloc -#endif /* USE_AXTLS */ - -#if defined(USE_SCHANNEL) || defined(USE_WINDOWS_SSPI) -#include "curl_sspi.h" -#endif -#ifdef USE_SCHANNEL -#include -#include -#endif - -#ifdef USE_DARWINSSL -#include -/* For some reason, when building for iOS, the omnibus header above does - * not include SecureTransport.h as of iOS SDK 5.1. */ -#include -#endif - #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_NETINET_IN6_H +#include +#endif #include "timeval.h" -#ifdef HAVE_ZLIB_H -#include /* for content-encoding */ -#ifdef __SYMBIAN32__ -/* zlib pollutes the namespace with this definition */ -#undef WIN32 -#endif -#endif - #include #include "http_chunks.h" /* for the structs and enum stuff */ @@ -172,6 +98,7 @@ #include "hash.h" #include "splay.h" +#include "mime.h" #include "imap.h" #include "pop3.h" #include "smtp.h" @@ -200,12 +127,12 @@ #include #endif /* HAVE_LIBSSH2_H */ -/* Download buffer size, keep it fairly big for speed reasons */ -#undef BUFSIZE -#define BUFSIZE CURL_MAX_WRITE_SIZE -#undef MAX_BUFSIZE -#define MAX_BUFSIZE CURL_MAX_READ_SIZE -#define CURL_BUFSIZE(x) ((x)?(x):(BUFSIZE)) +/* The upload buffer size, should not be smaller than CURL_MAX_WRITE_SIZE, as + it needs to hold a full buffer as could be sent in a write callback */ +#define UPLOAD_BUFSIZE CURL_MAX_WRITE_SIZE + +/* The "master buffer" is for HTTP pipelining */ +#define MASTERBUF_SIZE 16384 /* Initial size of the buffer to store headers in, it'll be enlarged in case of need. */ @@ -240,20 +167,6 @@ enum protection_level { }; #endif -#ifdef USE_SCHANNEL -/* Structs to store Schannel handles */ -struct curl_schannel_cred { - CredHandle cred_handle; - TimeStamp time_stamp; - int refcount; -}; - -struct curl_schannel_ctxt { - CtxtHandle ctxt_handle; - TimeStamp time_stamp; -}; -#endif - /* enum for the nonblocking SSL connection state machine */ typedef enum { ssl_connect_1, @@ -270,6 +183,9 @@ typedef enum { ssl_connection_complete } ssl_connection_state; +/* SSL backend-specific data; declared differently by each SSL backend */ +struct ssl_backend_data; + /* struct for data related to each SSL connection */ struct ssl_connect_data { /* Use ssl encrypted communications TRUE/FALSE, not necessarily using it atm @@ -278,81 +194,18 @@ struct ssl_connect_data { bool use; ssl_connection_state state; ssl_connect_state connecting_state; -#if defined(USE_OPENSSL) - /* these ones requires specific SSL-types */ - SSL_CTX* ctx; - SSL* handle; - X509* server_cert; -#elif defined(USE_GNUTLS) - gnutls_session_t session; - gnutls_certificate_credentials_t cred; -#ifdef USE_TLS_SRP - gnutls_srp_client_credentials_t srp_client_cred; -#endif -#elif defined(USE_MBEDTLS) - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_entropy_context entropy; - mbedtls_ssl_context ssl; - int server_fd; - mbedtls_x509_crt cacert; - mbedtls_x509_crt clicert; - mbedtls_x509_crl crl; - mbedtls_pk_context pk; - mbedtls_ssl_config config; - const char *protocols[3]; -#elif defined(USE_POLARSSL) - ctr_drbg_context ctr_drbg; - entropy_context entropy; - ssl_context ssl; - int server_fd; - x509_crt cacert; - x509_crt clicert; - x509_crl crl; - rsa_context rsa; -#elif defined(USE_CYASSL) - SSL_CTX* ctx; - SSL* handle; -#elif defined(USE_NSS) - PRFileDesc *handle; - char *client_nickname; - struct Curl_easy *data; - struct curl_llist *obj_list; - PK11GenericObject *obj_clicert; -#elif defined(USE_GSKIT) - gsk_handle handle; - int iocport; - int localfd; - int remotefd; -#elif defined(USE_AXTLS) - SSL_CTX* ssl_ctx; - SSL* ssl; -#elif defined(USE_SCHANNEL) - struct curl_schannel_cred *cred; - struct curl_schannel_ctxt *ctxt; - SecPkgContext_StreamSizes stream_sizes; - size_t encdata_length, decdata_length; - size_t encdata_offset, decdata_offset; - unsigned char *encdata_buffer, *decdata_buffer; - unsigned long req_flags, ret_flags; - CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */ - bool recv_sspi_close_notify; /* true if connection closed by close_notify */ - bool recv_connection_closed; /* true if connection closed, regardless how */ - bool use_alpn; /* true if ALPN is used for this connection */ -#elif defined(USE_DARWINSSL) - SSLContextRef ssl_ctx; - curl_socket_t ssl_sockfd; - bool ssl_direction; /* true if writing, false if reading */ - size_t ssl_write_buffered_length; -#elif defined(USE_SSL) -#error "SSL backend specific information missing from ssl_connect_data" +#if defined(USE_SSL) + struct ssl_backend_data *backend; #endif }; struct ssl_primary_config { long version; /* what version the client wants to use */ + long version_max; /* max supported version the client wants to use*/ bool verifypeer; /* set TRUE if this is desired */ bool verifyhost; /* set TRUE if CN/SAN must match hostname */ bool verifystatus; /* set TRUE if certificate status must be checked */ + bool sessionid; /* cache session IDs or not */ char *CApath; /* certificate dir (doesn't work on windows) */ char *CAfile; /* certificate to verify peer against */ char *clientcert; @@ -388,7 +241,6 @@ struct ssl_config_data { }; struct ssl_general_config { - bool sessionid; /* cache session IDs or not */ size_t max_ssl_sessions; /* SSL session id cache size */ }; @@ -405,12 +257,20 @@ struct curl_ssl_session { struct ssl_primary_config ssl_config; /* setup for this session */ }; +#ifdef USE_WINDOWS_SSPI +#include "curl_sspi.h" +#endif + /* Struct used for Digest challenge-response authentication */ struct digestdata { #if defined(USE_WINDOWS_SSPI) BYTE *input_token; size_t input_token_len; CtxtHandle *http_context; + /* copy of user/passwd used to make the identity for http_context. + either may be NULL. */ + char *user; + char *passwd; #else char *nonce; char *cnonce; @@ -421,6 +281,7 @@ struct digestdata { char *qop; char *algorithm; int nc; /* nounce count */ + bool userhash; #endif }; @@ -432,10 +293,6 @@ typedef enum { NTLMSTATE_LAST } curlntlm; -#ifdef USE_WINDOWS_SSPI -#include "curl_sspi.h" -#endif - #if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV) #include #endif @@ -602,16 +459,6 @@ struct hostname { #define KEEP_SENDBITS (KEEP_SEND | KEEP_SEND_HOLD | KEEP_SEND_PAUSE) -#ifdef HAVE_LIBZ -typedef enum { - ZLIB_UNINIT, /* uninitialized */ - ZLIB_INIT, /* initialized */ - ZLIB_GZIP_HEADER, /* reading gzip header */ - ZLIB_GZIP_INFLATING, /* inflating gzip stream */ - ZLIB_INIT_GZIP /* initialized in transparent gzip mode */ -} zlibInitState; -#endif - #ifdef CURLRES_ASYNCH struct Curl_async { char *hostname; @@ -672,8 +519,8 @@ struct SingleRequest { 100 reply (without a following second response code) result in a CURLE_GOT_NOTHING error code */ - struct timeval start; /* transfer started at this time */ - struct timeval now; /* current time */ + struct curltime start; /* transfer started at this time */ + struct curltime now; /* current time */ bool header; /* incoming data has HTTP header */ enum { HEADER_NORMAL, /* no bad header at all */ @@ -695,27 +542,16 @@ struct SingleRequest { Content-Range: header */ int httpcode; /* error code from the 'HTTP/1.? XXX' or 'RTSP/1.? XXX' line */ - struct timeval start100; /* time stamp to wait for the 100 code from */ + struct curltime start100; /* time stamp to wait for the 100 code from */ enum expect100 exp100; /* expect 100 continue state */ enum upgrade101 upgr101; /* 101 upgrade state */ - int auto_decoding; /* What content encoding. sec 3.5, RFC2616. */ - -#define IDENTITY 0 /* No encoding */ -#define DEFLATE 1 /* zlib deflate [RFC 1950 & 1951] */ -#define GZIP 2 /* gzip algorithm [RFC 1952] */ - -#ifdef HAVE_LIBZ - zlibInitState zlib_init; /* possible zlib init state; - undefined if Content-Encoding header. */ - z_stream z; /* State structure for zlib. */ -#endif - + struct contenc_writer_s *writer_stack; /* Content unencoding stack. */ + /* See sec 3.5, RFC2616. */ time_t timeofdoc; long bodywrites; char *buf; - char *uploadbuf; curl_socket_t maxfd; int keepon; @@ -824,6 +660,12 @@ struct Curl_handler { CURLcode (*readwrite)(struct Curl_easy *data, struct connectdata *conn, ssize_t *nread, bool *readmore); + /* This function can perform various checks on the connection. See + CONNCHECK_* for more information about the checks that can be performed, + and CONNRESULT_* for the results that can be returned. */ + unsigned int (*connection_check)(struct connectdata *conn, + unsigned int checks_to_perform); + long defport; /* Default port. */ unsigned int protocol; /* See CURLPROTO_* - this needs to be the single specific protocol bit */ @@ -850,6 +692,16 @@ struct Curl_handler { #define PROTOPT_STREAM (1<<9) /* a protocol with individual logical streams */ #define PROTOPT_URLOPTIONS (1<<10) /* allow options part in the userinfo field of the URL */ +#define PROTOPT_PROXY_AS_HTTP (1<<11) /* allow this non-HTTP scheme over a + HTTP proxy as HTTP proxies may know + this protocol and act as a gateway */ +#define PROTOPT_WILDCARD (1<<12) /* protocol supports wildcard matching */ + +#define CONNCHECK_NONE 0 /* No checks */ +#define CONNCHECK_ISDEAD (1<<0) /* Check if the connection is dead. */ + +#define CONNRESULT_NONE 0 /* No extra information. */ +#define CONNRESULT_DEAD (1<<0) /* The connection is dead. */ /* return the count of bytes sent, or -1 on error */ typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */ @@ -887,6 +739,25 @@ struct proxy_info { char *passwd; /* proxy password string, allocated */ }; +#define CONNECT_BUFFER_SIZE 16384 + +/* struct for HTTP CONNECT state data */ +struct http_connect_state { + char connect_buffer[CONNECT_BUFFER_SIZE]; + int perline; /* count bytes per line */ + int keepon; + char *line_start; + char *ptr; /* where to store more data */ + curl_off_t cl; /* size of content to read and ignore */ + bool chunked_encoding; + enum { + TUNNEL_INIT, /* init/default/no tunnel state */ + TUNNEL_CONNECT, /* CONNECT has been sent off */ + TUNNEL_COMPLETE /* CONNECT response received completely */ + } tunnel_state; + bool close_connection; +}; + /* * The connectdata struct contains all fields and variables that should be * unique for an entire connection. @@ -897,6 +768,8 @@ struct connectdata { connection is used! */ struct Curl_easy *data; + struct curl_llist_element bundle_node; /* conncache */ + /* chunk is for HTTP chunked encoding, but is in the general connectdata struct only because we can do just about any protocol through a HTTP proxy and a HTTP proxy may in fact respond using chunked encoding */ @@ -906,9 +779,10 @@ struct connectdata { void *closesocket_client; bool inuse; /* This is a marker for the connection cache logic. If this is - TRUE this handle is being used by an easy handle and cannot - be used by any other easy handle without careful - consideration (== only for pipelining). */ + TRUE this handle is being used by one or more easy handles + and can only used by any other easy handle without careful + consideration (== only for pipelining/multiplexing) and it + cannot be used by another multi handle! */ /**** Fields set when inited and not modified again */ long connection_id; /* Contains a unique number to make it easier to @@ -976,8 +850,8 @@ struct connectdata { int httpversion; /* the HTTP version*10 reported by the server */ int rtspversion; /* the RTSP version*10 reported by the server */ - struct timeval now; /* "current" time */ - struct timeval created; /* creation time */ + struct curltime now; /* "current" time */ + struct curltime created; /* creation time */ curl_socket_t sock[2]; /* two sockets, the second is used for the data transfer when doing FTP */ curl_socket_t tempsock[2]; /* temporary sockets for happy eyeballs */ @@ -991,6 +865,9 @@ struct connectdata { #endif /* USE_RECV_BEFORE_SEND_WORKAROUND */ struct ssl_connect_data ssl[2]; /* this is for ssl-stuff */ struct ssl_connect_data proxy_ssl[2]; /* this is for proxy ssl-stuff */ +#ifdef USE_SSL + void *ssl_extra; /* separately allocated backend-specific data */ +#endif struct ssl_primary_config ssl_config; struct ssl_primary_config proxy_ssl_config; bool tls_upgraded; @@ -1000,7 +877,7 @@ struct connectdata { /* connecttime: when connect() is called on the current IP address. Used to be able to track when to move on to try next IP - but only when the multi interface is used. */ - struct timeval connecttime; + struct curltime connecttime; /* The two fields below get set in Curl_connecthost */ int num_addr; /* number of addresses to try to connect to */ time_t timeoutms_per_addr; /* how long time in milliseconds to spend on @@ -1057,10 +934,10 @@ struct connectdata { handle */ bool writechannel_inuse; /* whether the write channel is in use by an easy handle */ - struct curl_llist *send_pipe; /* List of handles waiting to - send on this pipeline */ - struct curl_llist *recv_pipe; /* List of handles waiting to read - their responses on this pipeline */ + struct curl_llist send_pipe; /* List of handles waiting to send on this + pipeline */ + struct curl_llist recv_pipe; /* List of handles waiting to read their + responses on this pipeline */ char *master_buffer; /* The master buffer allocated on-demand; used for pipelining. */ size_t read_pos; /* Current read position in the master buffer */ @@ -1127,15 +1004,8 @@ struct connectdata { char *localdev; unsigned short localport; int localportrange; - - /* tunnel as in tunnel through a HTTP proxy with CONNECT */ - enum { - TUNNEL_INIT, /* init/default/no tunnel state */ - TUNNEL_CONNECT, /* CONNECT has been sent off */ - TUNNEL_COMPLETE /* CONNECT response received completely */ - } tunnel_state[2]; /* two separate ones to allow FTP */ + struct http_connect_state *connect_state; /* for HTTP CONNECT */ struct connectbundle *bundle; /* The bundle we are member of */ - int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */ #ifdef USE_UNIX_SOCKETS @@ -1154,10 +1024,8 @@ struct PureInfo { int httpcode; /* Recent HTTP, FTP, RTSP or SMTP response code */ int httpproxycode; /* response code from proxy when received separate */ int httpversion; /* the http version number X.Y = X*10+Y */ - long filetime; /* If requested, this is might get set. Set to -1 if the time - was unretrievable. We cannot have this of type time_t, - since time_t is unsigned on several platforms such as - OpenVMS. */ + time_t filetime; /* If requested, this is might get set. Set to -1 if the + time was unretrievable. */ bool timecond; /* set to TRUE if the time condition didn't match, which thus made the document NOT get fetched */ long header_size; /* size of read header(s) in bytes */ @@ -1205,34 +1073,36 @@ struct Progress { int width; /* screen width at download start */ int flags; /* see progress.h */ - double timespent; + time_t timespent; curl_off_t dlspeed; curl_off_t ulspeed; - double t_nslookup; - double t_connect; - double t_appconnect; - double t_pretransfer; - double t_starttransfer; - double t_redirect; + time_t t_nslookup; + time_t t_connect; + time_t t_appconnect; + time_t t_pretransfer; + time_t t_starttransfer; + time_t t_redirect; + + struct curltime start; + struct curltime t_startsingle; + struct curltime t_startop; + struct curltime t_acceptdata; - struct timeval start; - struct timeval t_startsingle; - struct timeval t_startop; - struct timeval t_acceptdata; + bool is_t_startransfer_set; /* upload speed limit */ - struct timeval ul_limit_start; + struct curltime ul_limit_start; curl_off_t ul_limit_size; /* download speed limit */ - struct timeval dl_limit_start; + struct curltime dl_limit_start; curl_off_t dl_limit_size; -#define CURR_TIME (5+1) /* 6 entries for 5 seconds */ +#define CURR_TIME (5 + 1) /* 6 entries for 5 seconds */ curl_off_t speeder[ CURR_TIME ]; - struct timeval speeder_time[ CURR_TIME ]; + struct curltime speeder_time[ CURR_TIME ]; int speeder_c; }; @@ -1241,8 +1111,10 @@ typedef enum { HTTPREQ_GET, HTTPREQ_POST, HTTPREQ_POST_FORM, /* we make a difference internally */ + HTTPREQ_POST_MIME, /* we make a difference internally */ HTTPREQ_PUT, HTTPREQ_HEAD, + HTTPREQ_OPTIONS, HTTPREQ_CUSTOM, HTTPREQ_LAST /* last in list */ } Curl_HttpReq; @@ -1282,8 +1154,8 @@ struct auth { this resource */ bool done; /* TRUE when the auth phase is done and ready to do the *actual* request */ - bool multi; /* TRUE if this is not yet authenticated but within the auth - multipass negotiation */ + bool multipass; /* TRUE if this is not yet authenticated but within the + auth multipass negotiation */ bool iestyle; /* TRUE if digest should be done IE-style or FALSE if it should be RFC compliant */ }; @@ -1293,6 +1165,43 @@ struct Curl_http2_dep { struct Curl_easy *data; }; +/* + * This struct is for holding data that was attempted to get sent to the user's + * callback but is held due to pausing. One instance per type (BOTH, HEADER, + * BODY). + */ +struct tempbuf { + char *buf; /* allocated buffer to keep data in when a write callback + returns to make the connection paused */ + size_t len; /* size of the 'tempwrite' allocated buffer */ + int type; /* type of the 'tempwrite' buffer as a bitmask that is used with + Curl_client_write() */ +}; + +/* Timers */ +typedef enum { + EXPIRE_100_TIMEOUT, + EXPIRE_ASYNC_NAME, + EXPIRE_CONNECTTIMEOUT, + EXPIRE_DNS_PER_NAME, + EXPIRE_HAPPY_EYEBALLS, + EXPIRE_MULTI_PENDING, + EXPIRE_RUN_NOW, + EXPIRE_SPEEDCHECK, + EXPIRE_TIMEOUT, + EXPIRE_TOOFAST, + EXPIRE_LAST /* not an actual timer, used as a marker only */ +} expire_id; + +/* + * One instance for each timeout an easy handle can set. + */ +struct time_node { + struct curl_llist_element list; + struct curltime time; + expire_id eid; +}; + struct UrlState { /* Points to the connection cache */ @@ -1304,7 +1213,7 @@ struct UrlState { bool multi_owned_by_easy; /* buffers to store authentication data in, as parsed from input options */ - struct timeval keeps_speed; /* for the progress meter really */ + struct curltime keeps_speed; /* for the progress meter really */ struct connectdata *lastconnect; /* The last connection, NULL if undefined */ @@ -1312,8 +1221,8 @@ struct UrlState { size_t headersize; /* size of the allocation */ char *buffer; /* download buffer */ - char uploadbuffer[BUFSIZE+1]; /* upload buffer */ - curl_off_t current_speed; /* the ProgressShow() funcion sets this, + char uploadbuffer[UPLOAD_BUFSIZE + 1]; /* upload buffer */ + curl_off_t current_speed; /* the ProgressShow() function sets this, bytes / second */ bool this_is_a_follow; /* this is a followed Location: request */ @@ -1326,12 +1235,9 @@ struct UrlState { int first_remote_port; /* remote port of the first (not followed) request */ struct curl_ssl_session *session; /* array of 'max_ssl_sessions' size */ long sessionage; /* number of the most recent session */ - char *tempwrite; /* allocated buffer to keep data in when a write - callback returns to make the connection paused */ - size_t tempwritesize; /* size of the 'tempwrite' allocated buffer */ - int tempwritetype; /* type of the 'tempwrite' buffer as a bitmask that is - used with Curl_client_write() */ - char *scratch; /* huge buffer[BUFSIZE*2] when doing upload CRLF replacing */ + unsigned int tempcount; /* number of entries in use in tempwrite, 0 - 3 */ + struct tempbuf tempwrite[3]; /* BOTH, HEADER, BODY */ + char *scratch; /* huge buffer[set.buffer_size*2] for upload CRLF replacing */ bool errorbuf; /* Set to TRUE if the error buffer is already filled in. This must be set to FALSE every time _easy_perform() is called. */ @@ -1359,18 +1265,20 @@ struct UrlState { ares_channel f.e. */ #if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H) - ENGINE *engine; + /* void instead of ENGINE to avoid bleeding OpenSSL into this header */ + void *engine; #endif /* USE_OPENSSL */ - struct timeval expiretime; /* set this with Curl_expire() only */ + struct curltime expiretime; /* set this with Curl_expire() only */ struct Curl_tree timenode; /* for the splay stuff */ - struct curl_llist *timeoutlist; /* list of pending timeouts */ + struct curl_llist timeoutlist; /* list of pending timeouts */ + struct time_node expires[EXPIRE_LAST]; /* nodes for each expire type */ /* a place to store the most recently set FTP entrypath */ char *most_recent_ftp_entrypath; /* set after initial USER failure, to prevent an authentication loop */ bool ftp_trying_alternative; - + bool wildcardmatch; /* enable wildcard matching */ int httpversion; /* the lowest HTTP version*10 reported by any server involved in this request */ bool expect100header; /* TRUE if we added Expect: 100-continue */ @@ -1420,6 +1328,9 @@ struct UrlState { struct Curl_easy *stream_depends_on; bool stream_depends_e; /* set or don't set the Exclusive bit */ int stream_weight; +#ifdef CURLDEBUG + bool conncache_lock; +#endif }; @@ -1505,7 +1416,7 @@ enum dupstring { STRING_RTSP_SESSION_ID, /* Session ID to use */ STRING_RTSP_STREAM_URI, /* Stream URI for this request */ STRING_RTSP_TRANSPORT, /* Transport for this session */ -#ifdef USE_LIBSSH2 +#if defined(USE_LIBSSH2) || defined(USE_LIBSSH) STRING_SSH_PRIVATE_KEY, /* path to the private key file for auth */ STRING_SSH_PUBLIC_KEY, /* path to the public key file for auth */ STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */ @@ -1515,7 +1426,7 @@ enum dupstring { STRING_PROXY_SERVICE_NAME, /* Proxy service name */ #endif #if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ - defined(USE_SPNEGO) + defined(USE_SPNEGO) || defined(HAVE_GSSAPI) STRING_SERVICE_NAME, /* Service name */ #endif STRING_MAIL_FROM, @@ -1531,7 +1442,7 @@ enum dupstring { #ifdef USE_UNIX_SOCKETS STRING_UNIX_SOCKET_PATH, /* path to Unix socket, if used */ #endif - + STRING_TARGET, /* CURLOPT_REQUEST_TARGET */ /* -- end of zero-terminated strings -- */ STRING_LASTZEROTERMINATED, @@ -1558,6 +1469,7 @@ struct UserDefined { long use_port; /* which port to use (when not using default) */ unsigned long httpauth; /* kind of HTTP authentication to use (bitmask) */ unsigned long proxyauth; /* kind of proxy authentication to use (bitmask) */ + unsigned long socks5auth;/* kind of SOCKS5 authentication to use (bitmask) */ long followlocation; /* as in HTTP Location: */ long maxredirs; /* maximum no. of http(s) redirects to follow, set to -1 for infinity */ @@ -1608,6 +1520,7 @@ struct UserDefined { long timeout; /* in milliseconds, 0 means no timeout */ long connecttimeout; /* in milliseconds, 0 means no timeout */ long accepttimeout; /* in milliseconds, 0 means no timeout */ + long happy_eyeballs_timeout; /* in milliseconds, 0 is a valid value */ long server_response_timeout; /* in milliseconds, 0 means no timeout */ long tftp_blksize; /* in bytes, 0 means use default */ bool tftp_no_options; /* do not send TFTP options requests */ @@ -1620,7 +1533,8 @@ struct UserDefined { curl_off_t set_resume_from; /* continue [ftp] transfer from here */ struct curl_slist *headers; /* linked list of extra headers */ struct curl_slist *proxyheaders; /* linked list of extra CONNECT headers */ - struct curl_httppost *httppost; /* linked list of POST data */ + struct curl_httppost *httppost; /* linked list of old POST data */ + curl_mimepart mimepost; /* MIME/POST data. */ bool sep_headers; /* handle host and proxy headers separately */ bool cookiesession; /* new cookie session? */ bool crlf; /* convert crlf on ftp upload(?) */ @@ -1642,6 +1556,7 @@ struct UserDefined { Curl_HttpReq httpreq; /* what kind of HTTP request (if any) is this */ long httpversion; /* when non-zero, a specific HTTP version requested to be used in the library's request(s) */ + bool strip_path_slash; /* strip off initial slash from path */ struct ssl_config_data ssl; /* user defined SSL stuff */ struct ssl_config_data proxy_ssl; /* user defined SSL stuff for proxy */ struct ssl_general_config general_ssl; /* general user defined SSL stuff */ @@ -1665,6 +1580,7 @@ struct UserDefined { curl_sshkeycallback ssh_keyfunc; /* key matching callback */ void *ssh_keyfunc_userp; /* custom pointer to callback */ + bool ssh_compression; /* enable SSH compression */ /* Here follows boolean settings that define how to behave during this session. They are STATIC, set by libcurl users or at least initially @@ -1682,7 +1598,7 @@ struct UserDefined { bool http_keep_sending_on_error; /* for HTTP status codes >= 300 */ bool http_follow_location; /* follow HTTP redirects */ bool http_transfer_encoding; /* request compressed HTTP transfer-encoding */ - bool http_disable_hostname_check_before_authentication; + bool allow_auth_to_other_hosts; bool include_header; /* include received protocol headers in data output */ bool http_set_referer; /* is a custom referer used */ bool http_auto_referer; /* set "correct" referer when following location: */ @@ -1730,7 +1646,7 @@ struct UserDefined { /* Common RTSP header options */ Curl_RtspReq rtspreq; /* RTSP request type */ long rtspversion; /* like httpversion, for RTSP */ - bool wildcardmatch; /* enable wildcard matching */ + bool wildcard_enabled; /* enable wildcard matching */ curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer starts */ curl_chunk_end_callback chunk_end; /* called after part transferring @@ -1755,6 +1671,8 @@ struct UserDefined { bool pipewait; /* wait for pipe/multiplex status before starting a new connection */ long expect_100_timeout; /* in milliseconds */ + bool suppress_connect_headers; /* suppress proxy CONNECT response headers + from user callbacks */ struct Curl_easy *stream_depends_on; bool stream_depends_e; /* set or don't set the Exclusive bit */ @@ -1763,6 +1681,10 @@ struct UserDefined { struct Curl_http2_dep *stream_dependents; bool abstract_unix_socket; + + curl_resolver_start_callback resolver_start; /* optional callback called + before resolver start */ + void *resolver_start_client; /* pointer to pass to resolver start callback */ }; struct Names { @@ -1791,6 +1713,8 @@ struct Curl_easy { struct Curl_easy *prev; struct connectdata *easy_conn; /* the "unit's" connection */ + struct curl_llist_element connect_queue; + struct curl_llist_element pipeline_queue; CURLMstate mstate; /* the handle's state */ CURLcode result; /* previous result */ diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c index 7d9200a..131d9da 100644 --- a/lib/vauth/digest.c +++ b/lib/vauth/digest.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,7 @@ * KIND, either express or implied. * * RFC2831 DIGEST-MD5 authentication + * RFC7616 DIGEST-SHA256, DIGEST-SHA512-256 authentication * ***************************************************************************/ @@ -34,6 +35,7 @@ #include "curl_base64.h" #include "curl_hmac.h" #include "curl_md5.h" +#include "curl_sha256.h" #include "vtls/vtls.h" #include "warnless.h" #include "strtok.h" @@ -144,6 +146,15 @@ static void auth_digest_md5_to_ascii(unsigned char *source, /* 16 bytes */ snprintf((char *) &dest[i * 2], 3, "%02x", source[i]); } +/* Convert sha256 chunk to RFC7616 -suitable ascii string*/ +static void auth_digest_sha256_to_ascii(unsigned char *source, /* 32 bytes */ + unsigned char *dest) /* 65 bytes */ +{ + int i; + for(i = 0; i < 32; i++) + snprintf((char *) &dest[i * 2], 3, "%02x", source[i]); +} + /* Perform quoted-string escaping as described in RFC2616 and its errata */ static char *auth_digest_string_quoted(const char *source) { @@ -205,7 +216,7 @@ static CURLcode auth_digest_get_qop_values(const char *options, int *value) { char *tmp; char *token; - char *tok_buf; + char *tok_buf = NULL; /* Initialise the output */ *value = 0; @@ -237,7 +248,7 @@ static CURLcode auth_digest_get_qop_values(const char *options, int *value) * auth_decode_digest_md5_message() * * This is used internally to decode an already encoded DIGEST-MD5 challenge - * message into the seperate attributes. + * message into the separate attributes. * * Parameters: * @@ -360,13 +371,12 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, char qop_options[64]; int qop_values; char cnonce[33]; - unsigned int entropy[4]; char nonceCount[] = "00000001"; char method[] = "AUTHENTICATE"; char qop[] = DIGEST_QOP_VALUE_STRING_AUTH; char *spn = NULL; - /* Decode the challange message */ + /* Decode the challenge message */ result = auth_decode_digest_md5_message(chlg64, nonce, sizeof(nonce), realm, sizeof(realm), algorithm, sizeof(algorithm), @@ -387,15 +397,11 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, if(!(qop_values & DIGEST_QOP_VALUE_AUTH)) return CURLE_BAD_CONTENT_ENCODING; - /* Generate 16 bytes of random data */ - result = Curl_rand(data, &entropy[0], 4); + /* Generate 32 random hex chars, 32 bytes + 1 zero termination */ + result = Curl_rand_hex(data, (unsigned char *)cnonce, sizeof(cnonce)); if(result) return result; - /* Convert the random data into a 32 byte hex string */ - snprintf(cnonce, sizeof(cnonce), "%08x%08x%08x%08x", - entropy[0], entropy[1], entropy[2], entropy[3]); - /* So far so good, now calculate A1 and H(A1) according to RFC 2831 */ ctxt = Curl_MD5_init(Curl_DIGEST_MD5); if(!ctxt) @@ -502,7 +508,7 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, /* * Curl_auth_decode_digest_http_message() * - * This is used to decode a HTTP DIGEST challenge message into the seperate + * This is used to decode a HTTP DIGEST challenge message into the separate * attributes. * * Parameters: @@ -563,7 +569,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, return CURLE_OUT_OF_MEMORY; } else if(strcasecompare(value, "qop")) { - char *tok_buf; + char *tok_buf = NULL; /* Tokenize the list and choose auth if possible, use a temporary clone of the buffer since strtok_r() ruins it */ tmp = strdup(content); @@ -607,9 +613,22 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, digest->algo = CURLDIGESTALGO_MD5SESS; else if(strcasecompare(content, "MD5")) digest->algo = CURLDIGESTALGO_MD5; + else if(strcasecompare(content, "SHA-256")) + digest->algo = CURLDIGESTALGO_SHA256; + else if(strcasecompare(content, "SHA-256-SESS")) + digest->algo = CURLDIGESTALGO_SHA256SESS; + else if(strcasecompare(content, "SHA-512-256")) + digest->algo = CURLDIGESTALGO_SHA512_256; + else if(strcasecompare(content, "SHA-512-256-SESS")) + digest->algo = CURLDIGESTALGO_SHA512_256SESS; else return CURLE_BAD_CONTENT_ENCODING; } + else if(strcasecompare(value, "userhash")) { + if(strcasecompare(content, "true")) { + digest->userhash = TRUE; + } + } else { /* Unknown specifier, ignore it! */ } @@ -640,7 +659,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, } /* - * Curl_auth_create_digest_http_message() + * _Curl_auth_create_digest_http_message() * * This is used to generate a HTTP DIGEST response message ready for sending * to the recipient. @@ -659,20 +678,24 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, * * Returns CURLE_OK on success. */ -CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - const unsigned char *request, - const unsigned char *uripath, - struct digestdata *digest, - char **outptr, size_t *outlen) +static CURLcode _Curl_auth_create_digest_http_message( + struct Curl_easy *data, + const char *userp, + const char *passwdp, + const unsigned char *request, + const unsigned char *uripath, + struct digestdata *digest, + char **outptr, size_t *outlen, + void (*convert_to_ascii)(unsigned char *, unsigned char *), + void (*hash)(unsigned char *, const unsigned char *)) { CURLcode result; - unsigned char md5buf[16]; /* 16 bytes/128 bits */ - unsigned char request_digest[33]; - unsigned char *md5this; - unsigned char ha1[33]; /* 32 digits and 1 zero byte */ - unsigned char ha2[33]; /* 32 digits and 1 zero byte */ + unsigned char hashbuf[32]; /* 32 bytes/256 bits */ + unsigned char request_digest[65]; + unsigned char *hashthis; + unsigned char ha1[65]; /* 64 digits and 1 zero byte */ + unsigned char ha2[65]; /* 64 digits and 1 zero byte */ + char userh[65]; char cnoncebuf[33]; char *cnonce = NULL; size_t cnonce_sz = 0; @@ -684,12 +707,10 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, digest->nc = 1; if(!digest->cnonce) { - unsigned int rnd[4]; - result = Curl_rand(data, &rnd[0], 4); + result = Curl_rand_hex(data, (unsigned char *)cnoncebuf, + sizeof(cnoncebuf)); if(result) return result; - snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x", - rnd[0], rnd[1], rnd[2], rnd[3]); result = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), &cnonce, &cnonce_sz); @@ -699,6 +720,17 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, digest->cnonce = cnonce; } + if(digest->userhash) { + hashthis = (unsigned char *) aprintf("%s:%s", userp, digest->realm); + if(!hashthis) + return CURLE_OUT_OF_MEMORY; + + CURL_OUTPUT_DIGEST_CONV(data, hashthis); + hash(hashbuf, hashthis); + free(hashthis); + convert_to_ascii(hashbuf, (unsigned char *)userh); + } + /* If the algorithm is "MD5" or unspecified (which then defaults to MD5): @@ -710,26 +742,29 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, unq(nonce-value) ":" unq(cnonce-value) */ - md5this = (unsigned char *) - aprintf("%s:%s:%s", userp, digest->realm, passwdp); - if(!md5this) + hashthis = (unsigned char *) + aprintf("%s:%s:%s", digest->userhash ? userh : userp, + digest->realm, passwdp); + if(!hashthis) return CURLE_OUT_OF_MEMORY; - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - free(md5this); - auth_digest_md5_to_ascii(md5buf, ha1); + CURL_OUTPUT_DIGEST_CONV(data, hashthis); /* convert on non-ASCII machines */ + hash(hashbuf, hashthis); + free(hashthis); + convert_to_ascii(hashbuf, ha1); - if(digest->algo == CURLDIGESTALGO_MD5SESS) { + if(digest->algo == CURLDIGESTALGO_MD5SESS || + digest->algo == CURLDIGESTALGO_SHA256SESS || + digest->algo == CURLDIGESTALGO_SHA512_256SESS) { /* nonce and cnonce are OUTSIDE the hash */ tmp = aprintf("%s:%s:%s", ha1, digest->nonce, digest->cnonce); if(!tmp) return CURLE_OUT_OF_MEMORY; CURL_OUTPUT_DIGEST_CONV(data, tmp); /* Convert on non-ASCII machines */ - Curl_md5it(md5buf, (unsigned char *) tmp); + hash(hashbuf, (unsigned char *) tmp); free(tmp); - auth_digest_md5_to_ascii(md5buf, ha1); + convert_to_ascii(hashbuf, ha1); } /* @@ -745,27 +780,32 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, 5.1.1 of RFC 2616) */ - md5this = (unsigned char *) aprintf("%s:%s", request, uripath); + hashthis = (unsigned char *) aprintf("%s:%s", request, uripath); if(digest->qop && strcasecompare(digest->qop, "auth-int")) { /* We don't support auth-int for PUT or POST at the moment. - TODO: replace md5 of empty string with entity-body for PUT/POST */ - unsigned char *md5this2 = (unsigned char *) - aprintf("%s:%s", md5this, "d41d8cd98f00b204e9800998ecf8427e"); - free(md5this); - md5this = md5this2; + TODO: replace hash of empty string with entity-body for PUT/POST */ + char hashed[65]; + unsigned char *hashthis2; + + hash(hashbuf, (const unsigned char *)""); + convert_to_ascii(hashbuf, (unsigned char *)hashed); + + hashthis2 = (unsigned char *)aprintf("%s:%s", hashthis, hashed); + free(hashthis); + hashthis = hashthis2; } - if(!md5this) + if(!hashthis) return CURLE_OUT_OF_MEMORY; - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - free(md5this); - auth_digest_md5_to_ascii(md5buf, ha2); + CURL_OUTPUT_DIGEST_CONV(data, hashthis); /* convert on non-ASCII machines */ + hash(hashbuf, hashthis); + free(hashthis); + convert_to_ascii(hashbuf, ha2); if(digest->qop) { - md5this = (unsigned char *) aprintf("%s:%s:%08x:%s:%s:%s", + hashthis = (unsigned char *) aprintf("%s:%s:%08x:%s:%s:%s", ha1, digest->nonce, digest->nc, @@ -774,19 +814,19 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, ha2); } else { - md5this = (unsigned char *) aprintf("%s:%s:%s", + hashthis = (unsigned char *) aprintf("%s:%s:%s", ha1, digest->nonce, ha2); } - if(!md5this) + if(!hashthis) return CURLE_OUT_OF_MEMORY; - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - free(md5this); - auth_digest_md5_to_ascii(md5buf, request_digest); + CURL_OUTPUT_DIGEST_CONV(data, hashthis); /* convert on non-ASCII machines */ + hash(hashbuf, hashthis); + free(hashthis); + convert_to_ascii(hashbuf, request_digest); /* For test case 64 (snooped from a Mozilla 1.3a request) @@ -801,7 +841,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, characters. algorithm and qop with standard values only contain web-safe characters. */ - userp_quoted = auth_digest_string_quoted(userp); + userp_quoted = auth_digest_string_quoted(digest->userhash ? userh : userp); if(!userp_quoted) return CURLE_OUT_OF_MEMORY; @@ -865,6 +905,16 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, response = tmp; } + if(digest->userhash) { + /* Append the userhash */ + tmp = aprintf("%s, userhash=true", response); + free(response); + if(!tmp) + return CURLE_OUT_OF_MEMORY; + + response = tmp; + } + /* Return the output */ *outptr = response; *outlen = strlen(response); @@ -873,6 +923,58 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, } /* + * Curl_auth_create_digest_http_message() + * + * This is used to generate a HTTP DIGEST response message ready for sending + * to the recipient. + * + * Parameters: + * + * data [in] - The session handle. + * userp [in] - The user name. + * passdwp [in] - The user's password. + * request [in] - The HTTP request. + * uripath [in] - The path of the HTTP uri. + * digest [in/out] - The digest data struct being used and modified. + * outptr [in/out] - The address where a pointer to newly allocated memory + * holding the result will be stored upon completion. + * outlen [out] - The length of the output message. + * + * Returns CURLE_OK on success. + */ +CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, + const char *userp, + const char *passwdp, + const unsigned char *request, + const unsigned char *uripath, + struct digestdata *digest, + char **outptr, size_t *outlen) +{ + switch(digest->algo) { + case CURLDIGESTALGO_MD5: + case CURLDIGESTALGO_MD5SESS: + return _Curl_auth_create_digest_http_message(data, userp, passwdp, + request, uripath, digest, + outptr, outlen, + auth_digest_md5_to_ascii, + Curl_md5it); + + case CURLDIGESTALGO_SHA256: + case CURLDIGESTALGO_SHA256SESS: + case CURLDIGESTALGO_SHA512_256: + case CURLDIGESTALGO_SHA512_256SESS: + return _Curl_auth_create_digest_http_message(data, userp, passwdp, + request, uripath, digest, + outptr, outlen, + auth_digest_sha256_to_ascii, + Curl_sha256it); + + default: + return CURLE_UNSUPPORTED_PROTOCOL; + } +} + +/* * Curl_auth_digest_cleanup() * * This is used to clean up the digest specific data. @@ -894,6 +996,7 @@ void Curl_auth_digest_cleanup(struct digestdata *digest) digest->nc = 0; digest->algo = CURLDIGESTALGO_MD5; /* default algorithm */ digest->stale = FALSE; /* default means normal, not stale */ + digest->userhash = FALSE; } #endif /* !USE_WINDOWS_SSPI */ diff --git a/lib/vauth/digest.h b/lib/vauth/digest.h index 5722dce..8686c44 100644 --- a/lib/vauth/digest.h +++ b/lib/vauth/digest.h @@ -31,7 +31,11 @@ enum { CURLDIGESTALGO_MD5, - CURLDIGESTALGO_MD5SESS + CURLDIGESTALGO_MD5SESS, + CURLDIGESTALGO_SHA256, + CURLDIGESTALGO_SHA256SESS, + CURLDIGESTALGO_SHA512_256, + CURLDIGESTALGO_SHA512_256SESS }; /* This is used to extract the realm from a challenge message */ diff --git a/lib/vauth/digest_sspi.c b/lib/vauth/digest_sspi.c index 15f3d8c..a3f96ed 100644 --- a/lib/vauth/digest_sspi.c +++ b/lib/vauth/digest_sspi.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2014 - 2016, Steve Holme, . - * Copyright (C) 2015, Daniel Stenberg, , et al. + * Copyright (C) 2015 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -320,7 +320,7 @@ CURLcode Curl_override_sspi_http_realm(const char *chlg, /* * Curl_auth_decode_digest_http_message() * - * This is used to decode a HTTP DIGEST challenge message into the seperate + * This is used to decode a HTTP DIGEST challenge message into the separate * attributes. * * Parameters: @@ -352,8 +352,8 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, if(!Curl_auth_digest_get_pair(p, value, content, &p)) break; - if(Curl_strcasecompare(value, "stale") - && Curl_strcasecompare(content, "true")) { + if(strcasecompare(value, "stale") && + strcasecompare(content, "true")) { stale = true; break; } @@ -412,7 +412,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, size_t token_max; char *resp; BYTE *output_token; - size_t output_token_len; + size_t output_token_len = 0; PSecPkgInfo SecurityPackage; SecBuffer chlg_buf[5]; SecBufferDesc chlg_desc; @@ -438,6 +438,20 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, return CURLE_OUT_OF_MEMORY; } + /* If the user/passwd that was used to make the identity for http_context + has changed then delete that context. */ + if((userp && !digest->user) || (!userp && digest->user) || + (passwdp && !digest->passwd) || (!passwdp && digest->passwd) || + (userp && digest->user && strcmp(userp, digest->user)) || + (passwdp && digest->passwd && strcmp(passwdp, digest->passwd))) { + if(digest->http_context) { + s_pSecFn->DeleteSecurityContext(digest->http_context); + Curl_safefree(digest->http_context); + } + Curl_safefree(digest->user); + Curl_safefree(digest->passwd); + } + if(digest->http_context) { chlg_desc.ulVersion = SECBUFFER_VERSION; chlg_desc.cBuffers = 5; @@ -479,6 +493,10 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ TCHAR *spn; + /* free the copy of user/passwd used to make the previous identity */ + Curl_safefree(digest->user); + Curl_safefree(digest->passwd); + if(userp && *userp) { /* Populate our identity structure */ if(Curl_create_sspi_identity(userp, passwdp, &identity)) { @@ -500,6 +518,25 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, /* Use the current Windows user */ p_identity = NULL; + if(userp) { + digest->user = strdup(userp); + + if(!digest->user) { + free(output_token); + return CURLE_OUT_OF_MEMORY; + } + } + + if(passwdp) { + digest->passwd = strdup(passwdp); + + if(!digest->passwd) { + free(output_token); + Curl_safefree(digest->user); + return CURLE_OUT_OF_MEMORY; + } + } + /* Acquire our credentials handle */ status = s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *) TEXT(SP_NAME_DIGEST), @@ -550,7 +587,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, if(!digest->http_context) return CURLE_OUT_OF_MEMORY; - /* Generate our reponse message */ + /* Generate our response message */ status = s_pSecFn->InitializeSecurityContext(&credentials, NULL, spn, ISC_REQ_USE_HTTP_STYLE, 0, 0, @@ -586,7 +623,7 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, return CURLE_OUT_OF_MEMORY; } - /* Copy the generated reponse */ + /* Copy the generated response */ memcpy(resp, output_token, output_token_len); resp[output_token_len] = 0; @@ -623,6 +660,10 @@ void Curl_auth_digest_cleanup(struct digestdata *digest) s_pSecFn->DeleteSecurityContext(digest->http_context); Curl_safefree(digest->http_context); } + + /* Free the copy of user/passwd used to make the identity for http_context */ + Curl_safefree(digest->user); + Curl_safefree(digest->passwd); } #endif /* USE_WINDOWS_SSPI && !CURL_DISABLE_CRYPTO_AUTH */ diff --git a/lib/vauth/krb5_gssapi.c b/lib/vauth/krb5_gssapi.c index c754fae..560ecc5 100644 --- a/lib/vauth/krb5_gssapi.c +++ b/lib/vauth/krb5_gssapi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2014 - 2016, Steve Holme, . + * Copyright (C) 2014 - 2017, Steve Holme, . * Copyright (C) 2015, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which @@ -68,7 +68,7 @@ bool Curl_auth_is_gssapi_supported(void) * passdwp [in] - The user's password. * service [in] - The service type such as http, smtp, pop or imap. * host [in[ - The host name. - * mutual_auth [in] - Flag specifing whether or not mutual authentication + * mutual_auth [in] - Flag specifying whether or not mutual authentication * is enabled. * chlg64 [in] - Pointer to the optional base64 encoded challenge * message. diff --git a/lib/vauth/krb5_sspi.c b/lib/vauth/krb5_sspi.c index 151794e..1b4cef4 100644 --- a/lib/vauth/krb5_sspi.c +++ b/lib/vauth/krb5_sspi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2014 - 2016, Steve Holme, . + * Copyright (C) 2014 - 2017, Steve Holme, . * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -74,7 +74,7 @@ bool Curl_auth_is_gssapi_supported(void) * passdwp [in] - The user's password. * service [in] - The service type such as http, smtp, pop or imap. * host [in] - The host name. - * mutual_auth [in] - Flag specifing whether or not mutual authentication + * mutual_auth [in] - Flag specifying whether or not mutual authentication * is enabled. * chlg64 [in] - The optional base64 encoded challenge message. * krb5 [in/out] - The Kerberos 5 data struct being used and modified. diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c index 96861c9..1e0d479 100644 --- a/lib/vauth/ntlm.c +++ b/lib/vauth/ntlm.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -44,7 +44,9 @@ #include "rand.h" #include "vtls/vtls.h" -#ifdef USE_NSS +/* SSL backend-specific #if branches in this file must be kept in the order + documented in curl_ntlm_core. */ +#if defined(NTLM_NEEDS_NSS_INIT) #include "vtls/nssg.h" /* for Curl_nss_force_init() */ #endif @@ -272,7 +274,7 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data, unsigned char *type2 = NULL; size_t type2_len = 0; -#if defined(USE_NSS) +#if defined(NTLM_NEEDS_NSS_INIT) /* Make sure the crypto backend is initialized */ result = Curl_nss_force_init(data); if(result) @@ -350,6 +352,7 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length) * * Parameters: * + * data [in] - The session handle. * userp [in] - The user name in the format User or Domain\User. * passdwp [in] - The user's password. * ntlm [in/out] - The NTLM data struct being used and modified. @@ -359,7 +362,8 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length) * * Returns CURLE_OK on success. */ -CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, +CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data, + const char *userp, const char *passwdp, struct ntlmdata *ntlm, char **outptr, size_t *outlen) @@ -394,7 +398,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, /* Clean up any former leftovers and initialise to defaults */ Curl_auth_ntlm_cleanup(ntlm); -#if USE_NTRESPONSES && USE_NTLM2SESSION +#if defined(USE_NTRESPONSES) && defined(USE_NTLM2SESSION) #define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY #else #define NTLM2FLAG 0 @@ -458,7 +462,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, }); /* Return with binary blob encoded into base64 */ - return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); + return Curl_base64_encode(data, (char *)ntlmbuf, size, outptr, outlen); } /* @@ -509,7 +513,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, unsigned char ntlmbuf[NTLM_BUFSIZE]; int lmrespoff; unsigned char lmresp[24]; /* fixed-size */ -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES int ntrespoff; unsigned int ntresplen = 24; unsigned char ntresp[24]; /* fixed-size */ @@ -539,8 +543,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, else user = userp; - if(user) - userlen = strlen(user); + userlen = strlen(user); /* Get the machine's un-qualified host name as NTLM doesn't like the fully qualified domain name */ @@ -552,13 +555,13 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, hostlen = strlen(host); } -#if USE_NTRESPONSES && USE_NTLM_V2 +#if defined(USE_NTRESPONSES) && defined(USE_NTLM_V2) if(ntlm->target_info_len) { unsigned char ntbuffer[0x18]; - unsigned int entropy[2]; + unsigned char entropy[8]; unsigned char ntlmv2hash[0x18]; - result = Curl_rand(data, &entropy[0], 2); + result = Curl_rand(data, entropy, 8); if(result) return result; @@ -572,15 +575,13 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, return result; /* LMv2 response */ - result = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], + result = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, entropy, &ntlm->nonce[0], lmresp); if(result) return result; /* NTLMv2 response */ - result = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], + result = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, entropy, ntlm, &ntlmv2resp, &ntresplen); if(result) return result; @@ -590,16 +591,16 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, else #endif -#if USE_NTRESPONSES && USE_NTLM2SESSION +#if defined(USE_NTRESPONSES) && defined(USE_NTLM2SESSION) /* We don't support NTLM2 if we don't have USE_NTRESPONSES */ if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) { unsigned char ntbuffer[0x18]; unsigned char tmp[0x18]; unsigned char md5sum[MD5_DIGEST_LENGTH]; - unsigned int entropy[2]; + unsigned char entropy[8]; /* Need to create 8 bytes random data */ - result = Curl_rand(data, &entropy[0], 2); + result = Curl_rand(data, entropy, 8); if(result) return result; @@ -630,12 +631,12 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, #endif { -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES unsigned char ntbuffer[0x18]; #endif unsigned char lmbuffer[0x18]; -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); if(result) return result; @@ -661,7 +662,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, } lmrespoff = 64; /* size of the message header */ -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES ntrespoff = lmrespoff + 0x18; domoff = ntrespoff + ntresplen; #else @@ -721,7 +722,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, SHORTPAIR(lmrespoff), 0x0, 0x0, -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES SHORTPAIR(ntresplen), /* NT-response length, twice */ SHORTPAIR(ntresplen), SHORTPAIR(ntrespoff), @@ -768,7 +769,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, ntlm_print_hex(stderr, (char *)&ntlmbuf[lmrespoff], 0x18); }); -#if USE_NTRESPONSES +#ifdef USE_NTRESPONSES if(size < (NTLM_BUFSIZE - ntresplen)) { DEBUGASSERT(size == (size_t)ntrespoff); memcpy(&ntlmbuf[size], ptr_ntresp, ntresplen); @@ -829,7 +830,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, return CURLE_CONV_FAILED; /* Return with binary blob encoded into base64 */ - result = Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); + result = Curl_base64_encode(data, (char *)ntlmbuf, size, outptr, outlen); Curl_auth_ntlm_cleanup(ntlm); diff --git a/lib/vauth/ntlm_sspi.c b/lib/vauth/ntlm_sspi.c index c330517..e748ce3 100644 --- a/lib/vauth/ntlm_sspi.c +++ b/lib/vauth/ntlm_sspi.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -29,6 +29,7 @@ #include "vauth/vauth.h" #include "urldata.h" #include "curl_base64.h" +#include "curl_ntlm_core.h" #include "warnless.h" #include "curl_multibyte.h" #include "sendf.h" @@ -66,6 +67,7 @@ bool Curl_auth_is_ntlm_supported(void) * * Parameters: * + * data [in] - The session handle. * userp [in] - The user name in the format User or Domain\User. * passdwp [in] - The user's password. * ntlm [in/out] - The NTLM data struct being used and modified. @@ -75,7 +77,8 @@ bool Curl_auth_is_ntlm_supported(void) * * Returns CURLE_OK on success. */ -CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, +CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data, + const char *userp, const char *passwdp, struct ntlmdata *ntlm, char **outptr, size_t *outlen) @@ -166,7 +169,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, return CURLE_RECV_ERROR; /* Base64 encode the response */ - return Curl_base64_encode(NULL, (char *) ntlm->output_token, + return Curl_base64_encode(data, (char *) ntlm->output_token, type_1_buf.cbBuffer, outptr, outlen); } diff --git a/lib/vauth/spnego_gssapi.c b/lib/vauth/spnego_gssapi.c index 8840db8..5196c27 100644 --- a/lib/vauth/spnego_gssapi.c +++ b/lib/vauth/spnego_gssapi.c @@ -180,6 +180,10 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data, return CURLE_OUT_OF_MEMORY; } + /* Free previous token */ + if(nego->output_token.length && nego->output_token.value) + gss_release_buffer(&unused_status, &nego->output_token); + nego->output_token = output_token; return CURLE_OK; diff --git a/lib/vauth/spnego_sspi.c b/lib/vauth/spnego_sspi.c index 5fa95e2..a6797cd 100644 --- a/lib/vauth/spnego_sspi.c +++ b/lib/vauth/spnego_sspi.c @@ -34,6 +34,7 @@ #include "warnless.h" #include "curl_multibyte.h" #include "sendf.h" +#include "strerror.h" /* The last #include files should be: */ #include "curl_memory.h" @@ -224,6 +225,8 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data, free(chlg); if(GSS_ERROR(nego->status)) { + failf(data, "InitializeSecurityContext failed: %s", + Curl_sspi_strerror(data->easy_conn, nego->status)); return CURLE_OUT_OF_MEMORY; } diff --git a/lib/vauth/vauth.h b/lib/vauth/vauth.h index 9d61228..dfaf985 100644 --- a/lib/vauth/vauth.h +++ b/lib/vauth/vauth.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2014 - 2016, Steve Holme, . + * Copyright (C) 2014 - 2017, Steve Holme, . * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -119,7 +119,8 @@ void Curl_auth_digest_cleanup(struct digestdata *digest); bool Curl_auth_is_ntlm_supported(void); /* This is used to generate a base64 encoded NTLM type-1 message */ -CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, +CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data, + const char *userp, const char *passwdp, struct ntlmdata *ntlm, char **outptr, diff --git a/lib/version.c b/lib/version.c index 3d17768..1752e14 100644 --- a/lib/version.c +++ b/lib/version.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,6 +26,7 @@ #include "urldata.h" #include "vtls/vtls.h" #include "http2.h" +#include "ssh.h" #include "curl_printf.h" #ifdef USE_ARES @@ -64,6 +65,18 @@ #define CURL_LIBSSH2_VERSION LIBSSH2_VERSION #endif +#ifdef HAVE_ZLIB_H +#include +#ifdef __SYMBIAN32__ +/* zlib pollutes the namespace with this definition */ +#undef WIN32 +#endif +#endif + +#ifdef HAVE_BROTLI +#include +#endif + void Curl_version_init(void); /* For thread safety purposes this function is called by global_init so that @@ -74,6 +87,18 @@ void Curl_version_init(void) curl_version_info(CURLVERSION_NOW); } +#ifdef HAVE_BROTLI +static size_t brotli_version(char *buf, size_t bufsz) +{ + uint32_t brotli_version = BrotliDecoderVersion(); + unsigned int major = brotli_version >> 24; + unsigned int minor = (brotli_version & 0x00FFFFFF) >> 12; + unsigned int patch = brotli_version & 0x00000FFF; + + return snprintf(buf, bufsz, "%u.%u.%u", major, minor, patch); +} +#endif + char *curl_version(void) { static bool initialized; @@ -105,6 +130,14 @@ char *curl_version(void) left -= len; ptr += len; #endif +#ifdef HAVE_BROTLI + len = snprintf(ptr, left, "%s", " brotli/"); + left -= len; + ptr += len; + len = brotli_version(ptr, left); + left -= len; + ptr += len; +#endif #ifdef USE_ARES /* this function is only present in c-ares, not in the original ares */ len = snprintf(ptr, left, " c-ares/%s", ares_version(NULL)); @@ -144,6 +177,11 @@ char *curl_version(void) left -= len; ptr += len; #endif +#ifdef USE_LIBSSH + len = snprintf(ptr, left, " libssh/%s", CURL_LIBSSH_VERSION); + left -= len; + ptr += len; +#endif #ifdef USE_NGHTTP2 len = Curl_http2_ver(ptr, left); left -= len; @@ -232,10 +270,8 @@ static const char * const protocols[] = { #ifndef CURL_DISABLE_RTSP "rtsp", #endif -#ifdef USE_LIBSSH2 +#if defined(USE_LIBSSH) || defined(USE_LIBSSH2) "scp", -#endif -#ifdef USE_LIBSSH2 "sftp", #endif #if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ @@ -324,8 +360,11 @@ static curl_version_info_data version_info = { #if defined(USE_LIBPSL) | CURL_VERSION_PSL #endif -#if defined(HTTPS_PROXY_SUPPORT) - | CURL_VERSION_HTTPS_PROXY +#if defined(CURL_WITH_MULTI_SSL) + | CURL_VERSION_MULTI_SSL +#endif +#if defined(HAVE_BROTLI) + | CURL_VERSION_BROTLI #endif , NULL, /* ssl_version */ @@ -337,17 +376,22 @@ static curl_version_info_data version_info = { NULL, /* libidn version */ 0, /* iconv version */ NULL, /* ssh lib version */ + 0, /* brotli_ver_num */ + NULL, /* brotli version */ }; curl_version_info_data *curl_version_info(CURLversion stamp) { static bool initialized; -#ifdef USE_LIBSSH2 +#if defined(USE_LIBSSH) || defined(USE_LIBSSH2) static char ssh_buffer[80]; #endif #ifdef USE_SSL static char ssl_buffer[80]; #endif +#ifdef HAVE_BROTLI + static char brotli_buffer[80]; +#endif if(initialized) return &version_info; @@ -355,6 +399,10 @@ curl_version_info_data *curl_version_info(CURLversion stamp) #ifdef USE_SSL Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer)); version_info.ssl_version = ssl_buffer; + if(Curl_ssl->support_https_proxy) + version_info.features |= CURL_VERSION_HTTPS_PROXY; + else + version_info.features &= ~CURL_VERSION_HTTPS_PROXY; #endif #ifdef HAVE_LIBZ @@ -387,9 +435,18 @@ curl_version_info_data *curl_version_info(CURLversion stamp) #endif /* _LIBICONV_VERSION */ #endif -#ifdef USE_LIBSSH2 +#if defined(USE_LIBSSH2) snprintf(ssh_buffer, sizeof(ssh_buffer), "libssh2/%s", LIBSSH2_VERSION); version_info.libssh_version = ssh_buffer; +#elif defined(USE_LIBSSH) + snprintf(ssh_buffer, sizeof(ssh_buffer), "libssh/%s", CURL_LIBSSH_VERSION); + version_info.libssh_version = ssh_buffer; +#endif + +#ifdef HAVE_BROTLI + version_info.brotli_ver_num = BrotliDecoderVersion(); + brotli_version(brotli_buffer, sizeof brotli_buffer); + version_info.brotli_version = brotli_buffer; #endif (void)stamp; /* avoid compiler warnings, we don't use this */ diff --git a/lib/vtls/axtls.c b/lib/vtls/axtls.c index 1de758b..9294f49 100644 --- a/lib/vtls/axtls.c +++ b/lib/vtls/axtls.c @@ -47,21 +47,12 @@ #include "curl_memory.h" #include "memdebug.h" +struct ssl_backend_data { + SSL_CTX* ssl_ctx; + SSL* ssl; +}; -/* Global axTLS init, called from Curl_ssl_init() */ -int Curl_axtls_init(void) -{ -/* axTLS has no global init. Everything is done through SSL and SSL_CTX - * structs stored in connectdata structure. Perhaps can move to axtls.h. - */ - return 1; -} - -int Curl_axtls_cleanup(void) -{ - /* axTLS has no global cleanup. Perhaps can move this to axtls.h. */ - return 1; -} +#define BACKEND connssl->backend static CURLcode map_error_to_curl(int axtls_err) { @@ -120,13 +111,13 @@ static Curl_send axtls_send; static void free_ssl_structs(struct ssl_connect_data *connssl) { - if(connssl->ssl) { - ssl_free(connssl->ssl); - connssl->ssl = NULL; + if(BACKEND->ssl) { + ssl_free(BACKEND->ssl); + BACKEND->ssl = NULL; } - if(connssl->ssl_ctx) { - ssl_ctx_free(connssl->ssl_ctx); - connssl->ssl_ctx = NULL; + if(BACKEND->ssl_ctx) { + ssl_ctx_free(BACKEND->ssl_ctx); + BACKEND->ssl_ctx = NULL; } } @@ -137,6 +128,7 @@ static void free_ssl_structs(struct ssl_connect_data *connssl) */ static CURLcode connect_prep(struct connectdata *conn, int sockindex) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct Curl_easy *data = conn->data; SSL_CTX *ssl_ctx; SSL *ssl = NULL; @@ -151,11 +143,17 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex) SSL_SERVER_VERIFY_LATER | SSL_CONNECT_IN_PARTS; - if(conn->ssl[sockindex].state == ssl_connection_complete) + if(connssl->state == ssl_connection_complete) /* to make us tolerant against being called more than once for the same connection */ return CURLE_OK; + if(SSL_CONN_CONFIG(version_max) != CURL_SSLVERSION_MAX_NONE) { + failf(data, "axtls does not support CURL_SSLVERSION_MAX"); + return CURLE_SSL_CONNECT_ERROR; + } + + /* axTLS only supports TLSv1 */ /* check to see if we've been told to use an explicit SSL/TLS version */ switch(SSL_CONN_CONFIG(version)) { @@ -179,8 +177,8 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex) return CURLE_SSL_CONNECT_ERROR; } - conn->ssl[sockindex].ssl_ctx = ssl_ctx; - conn->ssl[sockindex].ssl = NULL; + BACKEND->ssl_ctx = ssl_ctx; + BACKEND->ssl = NULL; /* Load the trusted CA cert bundle file */ if(SSL_CONN_CONFIG(CAfile)) { @@ -206,7 +204,7 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex) /* Load client certificate */ if(SSL_SET_OPTION(cert)) { - i=0; + i = 0; /* Instead of trying to analyze cert type here, let axTLS try them all. */ while(cert_types[i] != 0) { ssl_fcn_return = ssl_obj_load(ssl_ctx, cert_types[i], @@ -230,7 +228,7 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex) If a pkcs12 file successfully loaded a cert, then there's nothing to do because the key has already been loaded. */ if(SSL_SET_OPTION(key) && cert_types[i] != SSL_OBJ_PKCS12) { - i=0; + i = 0; /* Instead of trying to analyze key type here, let axTLS try them all. */ while(key_types[i] != 0) { ssl_fcn_return = ssl_obj_load(ssl_ctx, key_types[i], @@ -256,7 +254,7 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex) * 2) setting up callbacks. these seem gnutls specific */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { const uint8_t *ssl_sessionid; size_t ssl_idsize; @@ -275,10 +273,26 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex) if(!ssl) ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex], NULL, 0, NULL); - conn->ssl[sockindex].ssl = ssl; + BACKEND->ssl = ssl; return CURLE_OK; } +static void Curl_axtls_close(struct connectdata *conn, int sockindex) +{ + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + + infof(conn->data, " Curl_axtls_close\n"); + + /* line from openssl.c: (void)SSL_shutdown(BACKEND->ssl); + axTLS compat layer does nothing for SSL_shutdown */ + + /* The following line is from openssl.c. There seems to be no axTLS + equivalent. ssl_free and ssl_ctx_free close things. + SSL_set_connect_state(connssl->handle); */ + + free_ssl_structs(connssl); +} + /* * For both blocking and non-blocking connects, this function finalizes the * SSL connection. @@ -286,7 +300,8 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex) static CURLcode connect_finish(struct connectdata *conn, int sockindex) { struct Curl_easy *data = conn->data; - SSL *ssl = conn->ssl[sockindex].ssl; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + SSL *ssl = BACKEND->ssl; const char *peer_CN; uint32_t dns_altname_index; const char *dns_altname; @@ -381,12 +396,12 @@ static CURLcode connect_finish(struct connectdata *conn, int sockindex) } /* General housekeeping */ - conn->ssl[sockindex].state = ssl_connection_complete; + connssl->state = ssl_connection_complete; conn->recv[sockindex] = axtls_recv; conn->send[sockindex] = axtls_send; /* Put our freshly minted SSL session in cache */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { const uint8_t *ssl_sessionid = ssl_get_session_id(ssl); size_t ssl_idsize = ssl_get_session_id_size(ssl); Curl_ssl_sessionid_lock(conn); @@ -403,11 +418,10 @@ static CURLcode connect_finish(struct connectdata *conn, int sockindex) * Use axTLS's non-blocking connection feature to open an SSL connection. * This is called after a TCP connection is already established. */ -CURLcode Curl_axtls_connect_nonblocking( - struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_axtls_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; CURLcode conn_step; int ssl_fcn_return; int i; @@ -415,23 +429,23 @@ CURLcode Curl_axtls_connect_nonblocking( *done = FALSE; /* connectdata is calloc'd and connecting_state is only changed in this function, so this is safe, as the state is effectively initialized. */ - if(conn->ssl[sockindex].connecting_state == ssl_connect_1) { + if(connssl->connecting_state == ssl_connect_1) { conn_step = connect_prep(conn, sockindex); if(conn_step != CURLE_OK) { Curl_axtls_close(conn, sockindex); return conn_step; } - conn->ssl[sockindex].connecting_state = ssl_connect_2; + connssl->connecting_state = ssl_connect_2; } - if(conn->ssl[sockindex].connecting_state == ssl_connect_2) { + if(connssl->connecting_state == ssl_connect_2) { /* Check to make sure handshake was ok. */ - if(ssl_handshake_status(conn->ssl[sockindex].ssl) != SSL_OK) { + if(ssl_handshake_status(BACKEND->ssl) != SSL_OK) { /* Loop to perform more work in between sleeps. This is work around the fact that axtls does not expose any knowledge about when work needs to be performed. This can save ~25% of time on SSL handshakes. */ - for(i=0; i<5; i++) { - ssl_fcn_return = ssl_read(conn->ssl[sockindex].ssl, NULL); + for(i = 0; i<5; i++) { + ssl_fcn_return = ssl_read(BACKEND->ssl, NULL); if(ssl_fcn_return < 0) { Curl_axtls_close(conn, sockindex); ssl_display_error(ssl_fcn_return); /* goes to stdout. */ @@ -441,10 +455,10 @@ CURLcode Curl_axtls_connect_nonblocking( } } infof(conn->data, "handshake completed successfully\n"); - conn->ssl[sockindex].connecting_state = ssl_connect_3; + connssl->connecting_state = ssl_connect_3; } - if(conn->ssl[sockindex].connecting_state == ssl_connect_3) { + if(connssl->connecting_state == ssl_connect_3) { conn_step = connect_finish(conn, sockindex); if(conn_step != CURLE_OK) { Curl_axtls_close(conn, sockindex); @@ -452,15 +466,15 @@ CURLcode Curl_axtls_connect_nonblocking( } /* Reset connect state */ - conn->ssl[sockindex].connecting_state = ssl_connect_1; + connssl->connecting_state = ssl_connect_1; *done = TRUE; return CURLE_OK; } /* Unrecognized state. Things are very bad. */ - conn->ssl[sockindex].state = ssl_connection_none; - conn->ssl[sockindex].connecting_state = ssl_connect_1; + connssl->state = ssl_connection_none; + connssl->connecting_state = ssl_connect_1; /* Return value perhaps not strictly correct, but distinguishes the issue.*/ return CURLE_BAD_FUNCTION_ARGUMENT; } @@ -470,15 +484,13 @@ CURLcode Curl_axtls_connect_nonblocking( * This function is called after the TCP connect has completed. Setup the TLS * layer and do all necessary magic for a blocking connect. */ -CURLcode -Curl_axtls_connect(struct connectdata *conn, - int sockindex) - +static CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex) { struct Curl_easy *data = conn->data; CURLcode conn_step = connect_prep(conn, sockindex); int ssl_fcn_return; - SSL *ssl = conn->ssl[sockindex].ssl; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + SSL *ssl = BACKEND->ssl; long timeout_ms; if(conn_step != CURLE_OK) { @@ -524,8 +536,9 @@ static ssize_t axtls_send(struct connectdata *conn, size_t len, CURLcode *err) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; /* ssl_write() returns 'int' while write() and send() returns 'size_t' */ - int rc = ssl_write(conn->ssl[sockindex].ssl, mem, (int)len); + int rc = ssl_write(BACKEND->ssl, mem, (int)len); infof(conn->data, " axtls_send\n"); @@ -538,27 +551,11 @@ static ssize_t axtls_send(struct connectdata *conn, return rc; } -void Curl_axtls_close(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - infof(conn->data, " Curl_axtls_close\n"); - - /* line from openssl.c: (void)SSL_shutdown(connssl->ssl); - axTLS compat layer does nothing for SSL_shutdown */ - - /* The following line is from openssl.c. There seems to be no axTLS - equivalent. ssl_free and ssl_ctx_free close things. - SSL_set_connect_state(connssl->handle); */ - - free_ssl_structs(connssl); -} - /* * This function is called to shut down the SSL layer but keep the * socket open (CCC - Clear Command Channel) */ -int Curl_axtls_shutdown(struct connectdata *conn, int sockindex) +static int Curl_axtls_shutdown(struct connectdata *conn, int sockindex) { /* Outline taken from openssl.c since functions are in axTLS compat layer. axTLS's error set is much smaller, so a lot of error-handling was removed. @@ -578,17 +575,17 @@ int Curl_axtls_shutdown(struct connectdata *conn, int sockindex) /* axTLS compat layer does nothing for SSL_shutdown, so we do nothing too if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE) - (void)SSL_shutdown(connssl->ssl); + (void)SSL_shutdown(BACKEND->ssl); */ - if(connssl->ssl) { + if(BACKEND->ssl) { int what = SOCKET_READABLE(conn->sock[sockindex], SSL_SHUTDOWN_TIMEOUT); if(what > 0) { /* Something to read, let's do it and hope that it is the close notify alert from the server. buf is managed internally by axTLS and will be released upon calling ssl_free via free_ssl_structs. */ - nread = (ssize_t)ssl_read(connssl->ssl, &buf); + nread = (ssize_t)ssl_read(BACKEND->ssl, &buf); if(nread < SSL_OK) { failf(data, "close notify alert not received during shutdown"); @@ -624,7 +621,7 @@ static ssize_t axtls_recv(struct connectdata *conn, /* connection data */ *err = CURLE_OK; if(connssl) { - ret = ssl_read(connssl->ssl, &read_buf); + ret = ssl_read(BACKEND->ssl, &read_buf); if(ret > SSL_OK) { /* ssl_read returns SSL_OK if there is more data to read, so if it is larger, then all data has been read already. */ @@ -657,9 +654,10 @@ static ssize_t axtls_recv(struct connectdata *conn, /* connection data */ * 0 means the connection has been closed * -1 means the connection status is unknown */ -int Curl_axtls_check_cxn(struct connectdata *conn) +static int Curl_axtls_check_cxn(struct connectdata *conn) { - /* openssl.c line: rc = SSL_peek(conn->ssl[FIRSTSOCKET].ssl, (void*)&buf, 1); + /* openssl.c line: + rc = SSL_peek(conn->ssl[FIRSTSOCKET].backend->ssl, (void*)&buf, 1); axTLS compat layer always returns the last argument, so connection is always alive? */ @@ -667,7 +665,7 @@ int Curl_axtls_check_cxn(struct connectdata *conn) return 1; /* connection still in place */ } -void Curl_axtls_session_free(void *ptr) +static void Curl_axtls_session_free(void *ptr) { (void)ptr; /* free the ID */ @@ -675,14 +673,13 @@ void Curl_axtls_session_free(void *ptr) compatibility layer does nothing, so we do nothing too. */ } -size_t Curl_axtls_version(char *buffer, size_t size) +static size_t Curl_axtls_version(char *buffer, size_t size) { return snprintf(buffer, size, "axTLS/%s", ssl_version()); } -CURLcode Curl_axtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) +static CURLcode Curl_axtls_random(struct Curl_easy *data, + unsigned char *entropy, size_t length) { static bool ssl_seeded = FALSE; (void)data; @@ -697,4 +694,49 @@ CURLcode Curl_axtls_random(struct Curl_easy *data, return CURLE_OK; } +static void *Curl_axtls_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return BACKEND->ssl; +} + +const struct Curl_ssl Curl_ssl_axtls = { + { CURLSSLBACKEND_AXTLS, "axtls" }, /* info */ + + 0, /* have_ca_path */ + 0, /* have_certinfo */ + 0, /* have_pinnedpubkey */ + 0, /* have_ssl_ctx */ + 0, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + /* + * axTLS has no global init. Everything is done through SSL and SSL_CTX + * structs stored in connectdata structure. + */ + Curl_none_init, /* init */ + /* axTLS has no global cleanup. */ + Curl_none_cleanup, /* cleanup */ + Curl_axtls_version, /* version */ + Curl_axtls_check_cxn, /* check_cxn */ + Curl_axtls_shutdown, /* shutdown */ + Curl_none_data_pending, /* data_pending */ + Curl_axtls_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_axtls_connect, /* connect */ + Curl_axtls_connect_nonblocking, /* connect_nonblocking */ + Curl_axtls_get_internals, /* get_internals */ + Curl_axtls_close, /* close_one */ + Curl_none_close_all, /* close_all */ + Curl_axtls_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_none_md5sum, /* md5sum */ + NULL /* sha256sum */ +}; + #endif /* USE_AXTLS */ diff --git a/lib/vtls/axtls.h b/lib/vtls/axtls.h index 53797ea..3f1e129 100644 --- a/lib/vtls/axtls.h +++ b/lib/vtls/axtls.h @@ -27,44 +27,7 @@ #include "curl/curl.h" #include "urldata.h" -int Curl_axtls_init(void); -int Curl_axtls_cleanup(void); -CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_axtls_connect_nonblocking( - struct connectdata *conn, - int sockindex, - bool *done); - - /* close a SSL connection */ -void Curl_axtls_close(struct connectdata *conn, int sockindex); - -void Curl_axtls_session_free(void *ptr); -size_t Curl_axtls_version(char *buffer, size_t size); -int Curl_axtls_shutdown(struct connectdata *conn, int sockindex); -int Curl_axtls_check_cxn(struct connectdata *conn); -CURLcode Curl_axtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); - -/* Set the API backend definition to axTLS */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS - -/* API setup for axTLS */ -#define curlssl_init Curl_axtls_init -#define curlssl_cleanup Curl_axtls_cleanup -#define curlssl_connect Curl_axtls_connect -#define curlssl_connect_nonblocking Curl_axtls_connect_nonblocking -#define curlssl_session_free(x) Curl_axtls_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_axtls_close -#define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_axtls_version -#define curlssl_check_cxn(x) Curl_axtls_check_cxn(x) -#define curlssl_data_pending(x,y) ((void)x, (void)y, 0) -#define curlssl_random(x,y,z) Curl_axtls_random(x,y,z) +extern const struct Curl_ssl Curl_ssl_axtls; #endif /* USE_AXTLS */ #endif /* HEADER_CURL_AXTLS_H */ diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 5e5947c..1bd42d2 100644 --- a/lib/vtls/cyassl.c +++ b/lib/vtls/cyassl.c @@ -44,10 +44,40 @@ and that's a problem since options.h hasn't been included yet. */ #include #endif -#ifdef HAVE_LIMITS_H -#include +/* To determine what functions are available we rely on one or both of: + - the user's options.h generated by CyaSSL/wolfSSL + - the symbols detected by curl's configure + Since they are markedly different from one another, and one or the other may + not be available, we do some checking below to bring things in sync. */ + +/* HAVE_ALPN is wolfSSL's build time symbol for enabling ALPN in options.h. */ +#ifndef HAVE_ALPN +#ifdef HAVE_WOLFSSL_USEALPN +#define HAVE_ALPN +#endif #endif +/* WOLFSSL_ALLOW_SSLV3 is wolfSSL's build time symbol for enabling SSLv3 in + options.h, but is only seen in >= 3.6.6 since that's when they started + disabling SSLv3 by default. */ +#ifndef WOLFSSL_ALLOW_SSLV3 +#if (LIBCYASSL_VERSION_HEX < 0x03006006) || \ + defined(HAVE_WOLFSSLV3_CLIENT_METHOD) +#define WOLFSSL_ALLOW_SSLV3 +#endif +#endif + +/* HAVE_SUPPORTED_CURVES is wolfSSL's build time symbol for enabling the ECC + supported curve extension in options.h. Note ECC is enabled separately. */ +#ifndef HAVE_SUPPORTED_CURVES +#if defined(HAVE_CYASSL_CTX_USESUPPORTEDCURVE) || \ + defined(HAVE_WOLFSSL_CTX_USESUPPORTEDCURVE) +#define HAVE_SUPPORTED_CURVES +#endif +#endif + +#include + #include "urldata.h" #include "sendf.h" #include "inet_pton.h" @@ -59,6 +89,7 @@ and that's a problem since options.h hasn't been included yet. */ #include "x509asn1.h" #include "curl_printf.h" +#include #include #ifdef HAVE_CYASSL_ERROR_SSL_H #include @@ -78,37 +109,24 @@ and that's a problem since options.h hasn't been included yet. */ #define CYASSL_MAX_ERROR_SZ 80 #endif -/* To determine what functions are available we rely on one or both of: - - the user's options.h generated by CyaSSL/wolfSSL - - the symbols detected by curl's configure - Since they are markedly different from one another, and one or the other may - not be available, we do some checking below to bring things in sync. */ - -/* HAVE_ALPN is wolfSSL's build time symbol for enabling ALPN in options.h. */ -#ifndef HAVE_ALPN -#ifdef HAVE_WOLFSSL_USEALPN -#define HAVE_ALPN +/* KEEP_PEER_CERT is a product of the presence of build time symbol + OPENSSL_EXTRA without NO_CERTS, depending on the version. KEEP_PEER_CERT is + in wolfSSL's settings.h, and the latter two are build time symbols in + options.h. */ +#ifndef KEEP_PEER_CERT +#if defined(HAVE_CYASSL_GET_PEER_CERTIFICATE) || \ + defined(HAVE_WOLFSSL_GET_PEER_CERTIFICATE) || \ + (defined(OPENSSL_EXTRA) && !defined(NO_CERTS)) +#define KEEP_PEER_CERT #endif #endif -/* WOLFSSL_ALLOW_SSLV3 is wolfSSL's build time symbol for enabling SSLv3 in - options.h, but is only seen in >= 3.6.6 since that's when they started - disabling SSLv3 by default. */ -#ifndef WOLFSSL_ALLOW_SSLV3 -#if (LIBCYASSL_VERSION_HEX < 0x03006006) || \ - defined(HAVE_WOLFSSLV3_CLIENT_METHOD) -#define WOLFSSL_ALLOW_SSLV3 -#endif -#endif +struct ssl_backend_data { + SSL_CTX* ctx; + SSL* handle; +}; -/* HAVE_SUPPORTED_CURVES is wolfSSL's build time symbol for enabling the ECC - supported curve extension in options.h. Note ECC is enabled separately. */ -#ifndef HAVE_SUPPORTED_CURVES -#if defined(HAVE_CYASSL_CTX_USESUPPORTEDCURVE) || \ - defined(HAVE_WOLFSSL_CTX_USESUPPORTEDCURVE) -#define HAVE_SUPPORTED_CURVES -#endif -#endif +#define BACKEND connssl->backend static Curl_recv cyassl_recv; static Curl_send cyassl_send; @@ -136,7 +154,7 @@ cyassl_connect_step1(struct connectdata *conn, char error_buffer[CYASSL_MAX_ERROR_SZ]; char *ciphers; struct Curl_easy *data = conn->data; - struct ssl_connect_data* conssl = &conn->ssl[sockindex]; + struct ssl_connect_data* connssl = &conn->ssl[sockindex]; SSL_METHOD* req_method = NULL; curl_socket_t sockfd = conn->sock[sockindex]; #ifdef HAVE_SNI @@ -146,9 +164,14 @@ cyassl_connect_step1(struct connectdata *conn, #define use_sni(x) Curl_nop_stmt #endif - if(conssl->state == ssl_connection_complete) + if(connssl->state == ssl_connection_complete) return CURLE_OK; + if(SSL_CONN_CONFIG(version_max) != CURL_SSLVERSION_MAX_NONE) { + failf(data, "CyaSSL does not support to set maximum SSL/TLS version"); + return CURLE_SSL_CONNECT_ERROR; + } + /* check to see if we've been told to use an explicit SSL/TLS version */ switch(SSL_CONN_CONFIG(version)) { case CURL_SSLVERSION_DEFAULT: @@ -176,8 +199,14 @@ cyassl_connect_step1(struct connectdata *conn, use_sni(TRUE); break; case CURL_SSLVERSION_TLSv1_3: +#ifdef WOLFSSL_TLS13 + req_method = wolfTLSv1_3_client_method(); + use_sni(TRUE); + break; +#else failf(data, "CyaSSL: TLS 1.3 is not yet supported"); return CURLE_SSL_CONNECT_ERROR; +#endif case CURL_SSLVERSION_SSLv3: #ifdef WOLFSSL_ALLOW_SSLV3 req_method = SSLv3_client_method(); @@ -200,11 +229,11 @@ cyassl_connect_step1(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; } - if(conssl->ctx) - SSL_CTX_free(conssl->ctx); - conssl->ctx = SSL_CTX_new(req_method); + if(BACKEND->ctx) + SSL_CTX_free(BACKEND->ctx); + BACKEND->ctx = SSL_CTX_new(req_method); - if(!conssl->ctx) { + if(!BACKEND->ctx) { failf(data, "SSL: couldn't create a context!"); return CURLE_OUT_OF_MEMORY; } @@ -220,9 +249,13 @@ cyassl_connect_step1(struct connectdata *conn, version. We use wolfSSL_CTX_SetMinVersion and not CyaSSL_SetMinVersion because only the former will work before the user's CTX callback is called. */ - if((wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1) != 1) && - (wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1_1) != 1) && - (wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1_2) != 1)) { + if((wolfSSL_CTX_SetMinVersion(BACKEND->ctx, WOLFSSL_TLSV1) != 1) && + (wolfSSL_CTX_SetMinVersion(BACKEND->ctx, WOLFSSL_TLSV1_1) != 1) && + (wolfSSL_CTX_SetMinVersion(BACKEND->ctx, WOLFSSL_TLSV1_2) != 1) +#ifdef WOLFSSL_TLS13 + && (wolfSSL_CTX_SetMinVersion(BACKEND->ctx, WOLFSSL_TLSV1_3) != 1) +#endif + ) { failf(data, "SSL: couldn't set the minimum protocol version"); return CURLE_SSL_CONNECT_ERROR; } @@ -232,7 +265,7 @@ cyassl_connect_step1(struct connectdata *conn, ciphers = SSL_CONN_CONFIG(cipher_list); if(ciphers) { - if(!SSL_CTX_set_cipher_list(conssl->ctx, ciphers)) { + if(!SSL_CTX_set_cipher_list(BACKEND->ctx, ciphers)) { failf(data, "failed setting cipher list: %s", ciphers); return CURLE_SSL_CIPHER; } @@ -242,7 +275,7 @@ cyassl_connect_step1(struct connectdata *conn, #ifndef NO_FILESYSTEM /* load trusted cacert */ if(SSL_CONN_CONFIG(CAfile)) { - if(1 != SSL_CTX_load_verify_locations(conssl->ctx, + if(1 != SSL_CTX_load_verify_locations(BACKEND->ctx, SSL_CONN_CONFIG(CAfile), SSL_CONN_CONFIG(CApath))) { if(SSL_CONN_CONFIG(verifypeer)) { @@ -279,7 +312,7 @@ cyassl_connect_step1(struct connectdata *conn, if(SSL_SET_OPTION(cert) && SSL_SET_OPTION(key)) { int file_type = do_file_type(SSL_SET_OPTION(cert_type)); - if(SSL_CTX_use_certificate_file(conssl->ctx, SSL_SET_OPTION(cert), + if(SSL_CTX_use_certificate_file(BACKEND->ctx, SSL_SET_OPTION(cert), file_type) != 1) { failf(data, "unable to use client certificate (no key or wrong pass" " phrase?)"); @@ -287,7 +320,7 @@ cyassl_connect_step1(struct connectdata *conn, } file_type = do_file_type(SSL_SET_OPTION(key_type)); - if(SSL_CTX_use_PrivateKey_file(conssl->ctx, SSL_SET_OPTION(key), + if(SSL_CTX_use_PrivateKey_file(BACKEND->ctx, SSL_SET_OPTION(key), file_type) != 1) { failf(data, "unable to set private key"); return CURLE_SSL_CONNECT_ERROR; @@ -299,7 +332,7 @@ cyassl_connect_step1(struct connectdata *conn, * fail to connect if the verification fails, or if it should continue * anyway. In the latter case the result of the verification is checked with * SSL_get_verify_result() below. */ - SSL_CTX_set_verify(conssl->ctx, + SSL_CTX_set_verify(BACKEND->ctx, SSL_CONN_CONFIG(verifypeer)?SSL_VERIFY_PEER: SSL_VERIFY_NONE, NULL); @@ -318,7 +351,7 @@ cyassl_connect_step1(struct connectdata *conn, #ifdef ENABLE_IPV6 (0 == Curl_inet_pton(AF_INET6, hostname, &addr6)) && #endif - (CyaSSL_CTX_UseSNI(conssl->ctx, CYASSL_SNI_HOST_NAME, hostname, + (CyaSSL_CTX_UseSNI(BACKEND->ctx, CYASSL_SNI_HOST_NAME, hostname, (unsigned short)hostname_len) != 1)) { infof(data, "WARNING: failed to configure server name indication (SNI) " "TLS extension\n"); @@ -331,15 +364,15 @@ cyassl_connect_step1(struct connectdata *conn, https://github.com/wolfSSL/wolfssl/issues/366 The supported curves below are those also supported by OpenSSL 1.0.2 and in the same order. */ - CyaSSL_CTX_UseSupportedCurve(conssl->ctx, 0x17); /* secp256r1 */ - CyaSSL_CTX_UseSupportedCurve(conssl->ctx, 0x19); /* secp521r1 */ - CyaSSL_CTX_UseSupportedCurve(conssl->ctx, 0x18); /* secp384r1 */ + CyaSSL_CTX_UseSupportedCurve(BACKEND->ctx, 0x17); /* secp256r1 */ + CyaSSL_CTX_UseSupportedCurve(BACKEND->ctx, 0x19); /* secp521r1 */ + CyaSSL_CTX_UseSupportedCurve(BACKEND->ctx, 0x18); /* secp384r1 */ #endif /* give application a chance to interfere with SSL set up. */ if(data->set.ssl.fsslctx) { CURLcode result = CURLE_OK; - result = (*data->set.ssl.fsslctx)(data, conssl->ctx, + result = (*data->set.ssl.fsslctx)(data, BACKEND->ctx, data->set.ssl.fsslctxp); if(result) { failf(data, "error signaled by ssl ctx callback"); @@ -357,10 +390,10 @@ cyassl_connect_step1(struct connectdata *conn, #endif /* Let's make an SSL structure */ - if(conssl->handle) - SSL_free(conssl->handle); - conssl->handle = SSL_new(conssl->ctx); - if(!conssl->handle) { + if(BACKEND->handle) + SSL_free(BACKEND->handle); + BACKEND->handle = SSL_new(BACKEND->ctx); + if(!BACKEND->handle) { failf(data, "SSL: couldn't create a context (handle)!"); return CURLE_OUT_OF_MEMORY; } @@ -383,7 +416,7 @@ cyassl_connect_step1(struct connectdata *conn, strcpy(protocols + strlen(protocols), ALPN_HTTP_1_1); infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1); - if(wolfSSL_UseALPN(conssl->handle, protocols, + if(wolfSSL_UseALPN(BACKEND->handle, protocols, (unsigned)strlen(protocols), WOLFSSL_ALPN_CONTINUE_ON_MISMATCH) != SSL_SUCCESS) { failf(data, "SSL: failed setting ALPN protocols"); @@ -393,16 +426,16 @@ cyassl_connect_step1(struct connectdata *conn, #endif /* HAVE_ALPN */ /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { void *ssl_sessionid = NULL; Curl_ssl_sessionid_lock(conn); if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) { /* we got a session id, use it! */ - if(!SSL_set_session(conssl->handle, ssl_sessionid)) { + if(!SSL_set_session(BACKEND->handle, ssl_sessionid)) { Curl_ssl_sessionid_unlock(conn); failf(data, "SSL: SSL_set_session failed: %s", - ERR_error_string(SSL_get_error(conssl->handle, 0), + ERR_error_string(SSL_get_error(BACKEND->handle, 0), error_buffer)); return CURLE_SSL_CONNECT_ERROR; } @@ -413,12 +446,12 @@ cyassl_connect_step1(struct connectdata *conn, } /* pass the raw socket into the SSL layer */ - if(!SSL_set_fd(conssl->handle, (int)sockfd)) { + if(!SSL_set_fd(BACKEND->handle, (int)sockfd)) { failf(data, "SSL: SSL_set_fd failed"); return CURLE_SSL_CONNECT_ERROR; } - conssl->connecting_state = ssl_connect_2; + connssl->connecting_state = ssl_connect_2; return CURLE_OK; } @@ -429,7 +462,7 @@ cyassl_connect_step2(struct connectdata *conn, { int ret = -1; struct Curl_easy *data = conn->data; - struct ssl_connect_data* conssl = &conn->ssl[sockindex]; + struct ssl_connect_data* connssl = &conn->ssl[sockindex]; const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; const char * const dispname = SSL_IS_PROXY() ? @@ -443,22 +476,22 @@ cyassl_connect_step2(struct connectdata *conn, /* Enable RFC2818 checks */ if(SSL_CONN_CONFIG(verifyhost)) { - ret = CyaSSL_check_domain_name(conssl->handle, hostname); + ret = CyaSSL_check_domain_name(BACKEND->handle, hostname); if(ret == SSL_FAILURE) return CURLE_OUT_OF_MEMORY; } - ret = SSL_connect(conssl->handle); + ret = SSL_connect(BACKEND->handle); if(ret != 1) { char error_buffer[CYASSL_MAX_ERROR_SZ]; - int detail = SSL_get_error(conssl->handle, ret); + int detail = SSL_get_error(BACKEND->handle, ret); if(SSL_ERROR_WANT_READ == detail) { - conssl->connecting_state = ssl_connect_2_reading; + connssl->connecting_state = ssl_connect_2_reading; return CURLE_OK; } else if(SSL_ERROR_WANT_WRITE == detail) { - conssl->connecting_state = ssl_connect_2_writing; + connssl->connecting_state = ssl_connect_2_writing; return CURLE_OK; } /* There is no easy way to override only the CN matching. @@ -519,7 +552,7 @@ cyassl_connect_step2(struct connectdata *conn, curl_asn1Element *pubkey; CURLcode result; - x509 = SSL_get_peer_certificate(conssl->handle); + x509 = SSL_get_peer_certificate(BACKEND->handle); if(!x509) { failf(data, "SSL: failed retrieving server certificate"); return CURLE_SSL_PINNEDPUBKEYNOTMATCH; @@ -561,7 +594,7 @@ cyassl_connect_step2(struct connectdata *conn, char *protocol = NULL; unsigned short protocol_len = 0; - rc = wolfSSL_ALPN_GetProtocol(conssl->handle, &protocol, &protocol_len); + rc = wolfSSL_ALPN_GetProtocol(BACKEND->handle, &protocol, &protocol_len); if(rc == SSL_SUCCESS) { infof(data, "ALPN, server accepted to use %.*s\n", protocol_len, @@ -590,11 +623,11 @@ cyassl_connect_step2(struct connectdata *conn, } #endif /* HAVE_ALPN */ - conssl->connecting_state = ssl_connect_3; + connssl->connecting_state = ssl_connect_3; #if (LIBCYASSL_VERSION_HEX >= 0x03009010) infof(data, "SSL connection using %s / %s\n", - wolfSSL_get_version(conssl->handle), - wolfSSL_get_cipher_name(conssl->handle)); + wolfSSL_get_version(BACKEND->handle), + wolfSSL_get_cipher_name(BACKEND->handle)); #else infof(data, "SSL connected\n"); #endif @@ -613,12 +646,12 @@ cyassl_connect_step3(struct connectdata *conn, DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { bool incache; SSL_SESSION *our_ssl_sessionid; void *old_ssl_sessionid = NULL; - our_ssl_sessionid = SSL_get_session(connssl->handle); + our_ssl_sessionid = SSL_get_session(BACKEND->handle); Curl_ssl_sessionid_lock(conn); incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, @@ -655,12 +688,13 @@ static ssize_t cyassl_send(struct connectdata *conn, size_t len, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; char error_buffer[CYASSL_MAX_ERROR_SZ]; int memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len; - int rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen); + int rc = SSL_write(BACKEND->handle, mem, memlen); if(rc < 0) { - int err = SSL_get_error(conn->ssl[sockindex].handle, rc); + int err = SSL_get_error(BACKEND->handle, rc); switch(err) { case SSL_ERROR_WANT_READ: @@ -679,18 +713,18 @@ static ssize_t cyassl_send(struct connectdata *conn, return rc; } -void Curl_cyassl_close(struct connectdata *conn, int sockindex) +static void Curl_cyassl_close(struct connectdata *conn, int sockindex) { - struct ssl_connect_data *conssl = &conn->ssl[sockindex]; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - if(conssl->handle) { - (void)SSL_shutdown(conssl->handle); - SSL_free(conssl->handle); - conssl->handle = NULL; + if(BACKEND->handle) { + (void)SSL_shutdown(BACKEND->handle); + SSL_free(BACKEND->handle); + BACKEND->handle = NULL; } - if(conssl->ctx) { - SSL_CTX_free(conssl->ctx); - conssl->ctx = NULL; + if(BACKEND->ctx) { + SSL_CTX_free(BACKEND->ctx); + BACKEND->ctx = NULL; } } @@ -700,12 +734,13 @@ static ssize_t cyassl_recv(struct connectdata *conn, size_t buffersize, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[num]; char error_buffer[CYASSL_MAX_ERROR_SZ]; int buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize; - int nread = SSL_read(conn->ssl[num].handle, buf, buffsize); + int nread = SSL_read(BACKEND->handle, buf, buffsize); if(nread < 0) { - int err = SSL_get_error(conn->ssl[num].handle, nread); + int err = SSL_get_error(BACKEND->handle, nread); switch(err) { case SSL_ERROR_ZERO_RETURN: /* no more data */ @@ -727,16 +762,18 @@ static ssize_t cyassl_recv(struct connectdata *conn, } -void Curl_cyassl_session_free(void *ptr) +static void Curl_cyassl_session_free(void *ptr) { (void)ptr; /* CyaSSL reuses sessions on own, no free */ } -size_t Curl_cyassl_version(char *buffer, size_t size) +static size_t Curl_cyassl_version(char *buffer, size_t size) { -#ifdef WOLFSSL_VERSION +#if LIBCYASSL_VERSION_HEX >= 0x03006000 + return snprintf(buffer, size, "wolfSSL/%s", wolfSSL_lib_version()); +#elif defined(WOLFSSL_VERSION) return snprintf(buffer, size, "wolfSSL/%s", WOLFSSL_VERSION); #elif defined(CYASSL_VERSION) return snprintf(buffer, size, "CyaSSL/%s", CYASSL_VERSION); @@ -746,16 +783,18 @@ size_t Curl_cyassl_version(char *buffer, size_t size) } -int Curl_cyassl_init(void) +static int Curl_cyassl_init(void) { return (CyaSSL_Init() == SSL_SUCCESS); } -bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex) +static bool Curl_cyassl_data_pending(const struct connectdata* conn, + int connindex) { - if(conn->ssl[connindex].handle) /* SSL is in use */ - return (0 != SSL_pending(conn->ssl[connindex].handle)) ? TRUE : FALSE; + const struct ssl_connect_data *connssl = &conn->ssl[connindex]; + if(BACKEND->handle) /* SSL is in use */ + return (0 != SSL_pending(BACKEND->handle)) ? TRUE : FALSE; else return FALSE; } @@ -765,14 +804,14 @@ bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex) * This function is called to shut down the SSL layer but keep the * socket open (CCC - Clear Command Channel) */ -int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex) +static int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex) { int retval = 0; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - if(connssl->handle) { - SSL_free(connssl->handle); - connssl->handle = NULL; + if(BACKEND->handle) { + SSL_free(BACKEND->handle); + BACKEND->handle = NULL; } return retval; } @@ -797,7 +836,7 @@ cyassl_connect_common(struct connectdata *conn, return CURLE_OK; } - if(ssl_connect_1==connssl->connecting_state) { + if(ssl_connect_1 == connssl->connecting_state) { /* Find out how much more time we're allowed */ timeout_ms = Curl_timeleft(data, NULL, TRUE); @@ -829,9 +868,9 @@ cyassl_connect_common(struct connectdata *conn, if(connssl->connecting_state == ssl_connect_2_reading || connssl->connecting_state == ssl_connect_2_writing) { - curl_socket_t writefd = ssl_connect_2_writing== + curl_socket_t writefd = ssl_connect_2_writing == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== + curl_socket_t readfd = ssl_connect_2_reading == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, @@ -892,18 +931,14 @@ cyassl_connect_common(struct connectdata *conn, } -CURLcode -Curl_cyassl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_cyassl_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { return cyassl_connect_common(conn, sockindex, TRUE, done); } -CURLcode -Curl_cyassl_connect(struct connectdata *conn, - int sockindex) +static CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex) { CURLcode result; bool done = FALSE; @@ -917,9 +952,8 @@ Curl_cyassl_connect(struct connectdata *conn, return CURLE_OK; } -CURLcode Curl_cyassl_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) +static CURLcode Curl_cyassl_random(struct Curl_easy *data, + unsigned char *entropy, size_t length) { RNG rng; (void)data; @@ -932,10 +966,10 @@ CURLcode Curl_cyassl_random(struct Curl_easy *data, return CURLE_OK; } -void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum /* output */, - size_t unused) +static void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum /* output */, + size_t unused) { Sha256 SHA256pw; (void)unused; @@ -944,4 +978,48 @@ void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */ Sha256Final(&SHA256pw, sha256sum); } +static void *Curl_cyassl_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return BACKEND->handle; +} + +const struct Curl_ssl Curl_ssl_cyassl = { + { CURLSSLBACKEND_WOLFSSL, "WolfSSL" }, /* info */ + + 0, /* have_ca_path */ + 0, /* have_certinfo */ +#ifdef KEEP_PEER_CERT + 1, /* have_pinnedpubkey */ +#else + 0, /* have_pinnedpubkey */ +#endif + 1, /* have_ssl_ctx */ + 0, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_cyassl_init, /* init */ + Curl_none_cleanup, /* cleanup */ + Curl_cyassl_version, /* version */ + Curl_none_check_cxn, /* check_cxn */ + Curl_cyassl_shutdown, /* shutdown */ + Curl_cyassl_data_pending, /* data_pending */ + Curl_cyassl_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_cyassl_connect, /* connect */ + Curl_cyassl_connect_nonblocking, /* connect_nonblocking */ + Curl_cyassl_get_internals, /* get_internals */ + Curl_cyassl_close, /* close_one */ + Curl_none_close_all, /* close_all */ + Curl_cyassl_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_none_md5sum, /* md5sum */ + Curl_cyassl_sha256sum /* sha256sum */ +}; + #endif diff --git a/lib/vtls/cyassl.h b/lib/vtls/cyassl.h index f47719e..01e11cc 100644 --- a/lib/vtls/cyassl.h +++ b/lib/vtls/cyassl.h @@ -25,68 +25,7 @@ #ifdef USE_CYASSL -/* KEEP_PEER_CERT is a product of the presence of build time symbol - OPENSSL_EXTRA without NO_CERTS, depending on the version. KEEP_PEER_CERT is - in wolfSSL's settings.h, and the latter two are build time symbols in - options.h. */ -#ifndef KEEP_PEER_CERT -#if defined(HAVE_CYASSL_GET_PEER_CERTIFICATE) || \ - defined(HAVE_WOLFSSL_GET_PEER_CERTIFICATE) || \ - (defined(OPENSSL_EXTRA) && !defined(NO_CERTS)) -#define KEEP_PEER_CERT -#endif -#endif - -CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex); -bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex); -int Curl_cyassl_shutdown(struct connectdata* conn, int sockindex); - - /* close a SSL connection */ -void Curl_cyassl_close(struct connectdata *conn, int sockindex); - -void Curl_cyassl_session_free(void *ptr); -size_t Curl_cyassl_version(char *buffer, size_t size); -int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex); -int Curl_cyassl_init(void); -CURLcode Curl_cyassl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); -CURLcode Curl_cyassl_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); -void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t unused); - -/* Set the API backend definition to CyaSSL */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL - -/* this backend supports CURLOPT_SSL_CTX_* */ -#define have_curlssl_ssl_ctx 1 - -#ifdef KEEP_PEER_CERT -/* this backend supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 -#endif - -/* API setup for CyaSSL */ -#define curlssl_init Curl_cyassl_init -#define curlssl_cleanup() Curl_nop_stmt -#define curlssl_connect Curl_cyassl_connect -#define curlssl_connect_nonblocking Curl_cyassl_connect_nonblocking -#define curlssl_session_free(x) Curl_cyassl_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_cyassl_close -#define curlssl_shutdown(x,y) Curl_cyassl_shutdown(x,y) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_cyassl_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) Curl_cyassl_data_pending(x,y) -#define curlssl_random(x,y,z) Curl_cyassl_random(x,y,z) -#define curlssl_sha256sum(a,b,c,d) Curl_cyassl_sha256sum(a,b,c,d) +extern const struct Curl_ssl Curl_ssl_cyassl; #endif /* USE_CYASSL */ #endif /* HEADER_CURL_CYASSL_H */ diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c index 050bf96..694ac57 100644 --- a/lib/vtls/darwinssl.c +++ b/lib/vtls/darwinssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2014, Nick Zitzmann, . + * Copyright (C) 2012 - 2017, Nick Zitzmann, . * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which @@ -22,7 +22,7 @@ ***************************************************************************/ /* - * Source file for all iOS and Mac OS X SecureTransport-specific code for the + * Source file for all iOS and macOS SecureTransport-specific code for the * TLS/SSL layer. No code but vtls.c should ever call or use these functions. */ @@ -34,21 +34,28 @@ #ifdef USE_DARWINSSL -#ifdef HAVE_LIMITS_H +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-pointer-compare" +#endif /* __clang__ */ + #include -#endif #include +/* For some reason, when building for iOS, the omnibus header above does + * not include SecureTransport.h as of iOS SDK 5.1. */ #include #include #include -/* The Security framework has changed greatly between iOS and different OS X +/* The Security framework has changed greatly between iOS and different macOS versions, and we will try to support as many of them as we can (back to Leopard and iOS 5) by using macros and weak-linking. - IMPORTANT: If TLS 1.1 and 1.2 support are important for you on OS X, then - you must build this project against the 10.8 SDK or later. */ + In general, you want to build this using the most recent OS SDK, since some + features require curl to be built against the latest SDK. TLS 1.1 and 1.2 + support, for instance, require the macOS 10.8 SDK or later. TLS 1.3 + requires the macOS 10.13 or iOS 11 SDK or later. */ #if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) #if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 @@ -57,6 +64,7 @@ #define CURL_BUILD_IOS 0 #define CURL_BUILD_IOS_7 0 +#define CURL_BUILD_IOS_11 0 #define CURL_BUILD_MAC 1 /* This is the maximum API level we are allowed to use when building: */ #define CURL_BUILD_MAC_10_5 MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 @@ -64,10 +72,11 @@ #define CURL_BUILD_MAC_10_7 MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 #define CURL_BUILD_MAC_10_8 MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 #define CURL_BUILD_MAC_10_9 MAC_OS_X_VERSION_MAX_ALLOWED >= 1090 +#define CURL_BUILD_MAC_10_13 MAC_OS_X_VERSION_MAX_ALLOWED >= 101300 /* These macros mean "the following code is present to allow runtime backward compatibility with at least this cat or earlier": - (You set this at build-time by setting the MACOSX_DEPLOYMENT_TARGET - environmental variable.) */ + (You set this at build-time using the compiler command line option + "-mmacos-version-min.") */ #define CURL_SUPPORT_MAC_10_5 MAC_OS_X_VERSION_MIN_REQUIRED <= 1050 #define CURL_SUPPORT_MAC_10_6 MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 #define CURL_SUPPORT_MAC_10_7 MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 @@ -77,11 +86,14 @@ #elif TARGET_OS_EMBEDDED || TARGET_OS_IPHONE #define CURL_BUILD_IOS 1 #define CURL_BUILD_IOS_7 __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 +#define CURL_BUILD_IOS_11 __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 #define CURL_BUILD_MAC 0 #define CURL_BUILD_MAC_10_5 0 #define CURL_BUILD_MAC_10_6 0 #define CURL_BUILD_MAC_10_7 0 #define CURL_BUILD_MAC_10_8 0 +#define CURL_BUILD_MAC_10_9 0 +#define CURL_BUILD_MAC_10_13 0 #define CURL_SUPPORT_MAC_10_5 0 #define CURL_SUPPORT_MAC_10_6 0 #define CURL_SUPPORT_MAC_10_7 0 @@ -113,6 +125,63 @@ #define ioErr -36 #define paramErr -50 +struct ssl_backend_data { + SSLContextRef ssl_ctx; + curl_socket_t ssl_sockfd; + bool ssl_direction; /* true if writing, false if reading */ + size_t ssl_write_buffered_length; +}; + +#define BACKEND connssl->backend + +/* pinned public key support tests */ + +/* version 1 supports macOS 10.12+ and iOS 10+ */ +#if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || \ + (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)) +#define DARWIN_SSL_PINNEDPUBKEY_V1 1 +#endif + +/* version 2 supports MacOSX 10.7+ */ +#if (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) +#define DARWIN_SSL_PINNEDPUBKEY_V2 1 +#endif + +#if defined(DARWIN_SSL_PINNEDPUBKEY_V1) || defined(DARWIN_SSL_PINNEDPUBKEY_V2) +/* this backend supports CURLOPT_PINNEDPUBLICKEY */ +#define DARWIN_SSL_PINNEDPUBKEY 1 +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + +#ifdef DARWIN_SSL_PINNEDPUBKEY +/* both new and old APIs return rsa keys missing the spki header (not DER) */ +static const unsigned char rsa4096SpkiHeader[] = { + 0x30, 0x82, 0x02, 0x22, 0x30, 0x0d, + 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, + 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, + 0x00, 0x03, 0x82, 0x02, 0x0f, 0x00}; + +static const unsigned char rsa2048SpkiHeader[] = { + 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, + 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, + 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, + 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00}; +#ifdef DARWIN_SSL_PINNEDPUBKEY_V1 +/* the *new* version doesn't return DER encoded ecdsa certs like the old... */ +static const unsigned char ecDsaSecp256r1SpkiHeader[] = { + 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, + 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, + 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, + 0x42, 0x00}; + +static const unsigned char ecDsaSecp384r1SpkiHeader[] = { + 0x30, 0x76, 0x30, 0x10, 0x06, 0x07, + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, + 0x01, 0x06, 0x05, 0x2b, 0x81, 0x04, + 0x00, 0x22, 0x03, 0x62, 0x00}; +#endif /* DARWIN_SSL_PINNEDPUBKEY_V1 */ +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + /* The following two functions were ripped from Apple sample code, * with some modifications: */ static OSStatus SocketRead(SSLConnectionRef connection, @@ -126,7 +195,7 @@ static OSStatus SocketRead(SSLConnectionRef connection, UInt8 *currData = (UInt8 *)data; /*int sock = *(int *)connection;*/ struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection; - int sock = connssl->ssl_sockfd; + int sock = BACKEND->ssl_sockfd; OSStatus rtn = noErr; size_t bytesRead; ssize_t rrtn; @@ -155,7 +224,7 @@ static OSStatus SocketRead(SSLConnectionRef connection, break; case EAGAIN: rtn = errSSLWouldBlock; - connssl->ssl_direction = false; + BACKEND->ssl_direction = false; break; default: rtn = ioErr; @@ -186,7 +255,7 @@ static OSStatus SocketWrite(SSLConnectionRef connection, size_t bytesSent = 0; /*int sock = *(int *)connection;*/ struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection; - int sock = connssl->ssl_sockfd; + int sock = BACKEND->ssl_sockfd; ssize_t length; size_t dataLen = *dataLength; const UInt8 *dataPtr = (UInt8 *)data; @@ -206,7 +275,7 @@ static OSStatus SocketWrite(SSLConnectionRef connection, theErr = errno; if(theErr == EAGAIN) { ortn = errSSLWouldBlock; - connssl->ssl_direction = true; + BACKEND->ssl_direction = true; } else { ortn = ioErr; @@ -774,6 +843,30 @@ CF_INLINE const char *TLSCipherNameForNumber(SSLCipherSuite cipher) return "TLS_RSA_PSK_WITH_NULL_SHA384"; break; #endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */ +#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 + /* New ChaCha20+Poly1305 cipher-suites used by TLS 1.3: */ + case TLS_AES_128_GCM_SHA256: + return "TLS_AES_128_GCM_SHA256"; + break; + case TLS_AES_256_GCM_SHA384: + return "TLS_AES_256_GCM_SHA384"; + break; + case TLS_CHACHA20_POLY1305_SHA256: + return "TLS_CHACHA20_POLY1305_SHA256"; + break; + case TLS_AES_128_CCM_SHA256: + return "TLS_AES_128_CCM_SHA256"; + break; + case TLS_AES_128_CCM_8_SHA256: + return "TLS_AES_128_CCM_8_SHA256"; + break; + case TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: + return "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"; + break; + case TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: + return "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"; + break; +#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */ } return "TLS_NULL_WITH_NULL_NULL"; } @@ -814,7 +907,7 @@ CF_INLINE void GetDarwinVersionNumber(int *major, int *minor) into a string. Some aren't available under iOS or newer cats. So here's a unified function for getting a string describing the certificate that ought to work in all cats starting with Leopard. */ -CF_INLINE CFStringRef CopyCertSubject(SecCertificateRef cert) +CF_INLINE CFStringRef getsubject(SecCertificateRef cert) { CFStringRef server_cert_summary = CFSTR("(null)"); @@ -841,6 +934,54 @@ CF_INLINE CFStringRef CopyCertSubject(SecCertificateRef cert) return server_cert_summary; } +static CURLcode CopyCertSubject(struct Curl_easy *data, + SecCertificateRef cert, char **certp) +{ + CFStringRef c = getsubject(cert); + CURLcode result = CURLE_OK; + const char *direct; + char *cbuf = NULL; + *certp = NULL; + + if(!c) { + failf(data, "SSL: invalid CA certificate subject"); + return CURLE_OUT_OF_MEMORY; + } + + /* If the subject is already available as UTF-8 encoded (ie 'direct') then + use that, else convert it. */ + direct = CFStringGetCStringPtr(c, kCFStringEncodingUTF8); + if(direct) { + *certp = strdup(direct); + if(!*certp) { + failf(data, "SSL: out of memory"); + result = CURLE_OUT_OF_MEMORY; + } + } + else { + size_t cbuf_size = ((size_t)CFStringGetLength(c) * 4) + 1; + cbuf = calloc(cbuf_size, 1); + if(cbuf) { + if(!CFStringGetCString(c, cbuf, cbuf_size, + kCFStringEncodingUTF8)) { + failf(data, "SSL: invalid CA certificate subject"); + result = CURLE_SSL_CACERT; + } + else + /* pass back the buffer */ + *certp = cbuf; + } + else { + failf(data, "SSL: couldn't allocate %zu bytes of memory", cbuf_size); + result = CURLE_OUT_OF_MEMORY; + } + } + if(result) + free(cbuf); + CFRelease(c); + return result; +} + #if CURL_SUPPORT_MAC_10_6 /* The SecKeychainSearch API was deprecated in Lion, and using it will raise deprecation warnings, so let's not compile this unless it's necessary: */ @@ -933,7 +1074,7 @@ static OSStatus CopyIdentityWithLabel(char *label, keys_list_count = CFArrayGetCount(keys_list); *out_cert_and_key = NULL; status = 1; - for(i=0; idata; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + long max_supported_version_by_os; + + /* macOS 10.5-10.7 supported TLS 1.0 only. + macOS 10.8 and later, and iOS 5 and later, added TLS 1.1 and 1.2. + macOS 10.13 and later, and iOS 11 and later, added TLS 1.3. */ +#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 + if(__builtin_available(macOS 10.13, iOS 11.0, *)) { + max_supported_version_by_os = CURL_SSLVERSION_MAX_TLSv1_3; + } + else { + max_supported_version_by_os = CURL_SSLVERSION_MAX_TLSv1_2; + } +#else + max_supported_version_by_os = CURL_SSLVERSION_MAX_TLSv1_2; +#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */ + + switch(ssl_version) { + case CURL_SSLVERSION_DEFAULT: + case CURL_SSLVERSION_TLSv1: + ssl_version = CURL_SSLVERSION_TLSv1_0; + ssl_version_max = max_supported_version_by_os; + break; + } + + switch(ssl_version_max) { + case CURL_SSLVERSION_MAX_NONE: + ssl_version_max = ssl_version << 16; + break; + case CURL_SSLVERSION_MAX_DEFAULT: + ssl_version_max = max_supported_version_by_os; + break; + } + +#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS + if(SSLSetProtocolVersionMax != NULL) { + SSLProtocol darwin_ver_min = kTLSProtocol1; + SSLProtocol darwin_ver_max = kTLSProtocol1; + CURLcode result = darwinssl_version_from_curl(&darwin_ver_min, + ssl_version); + if(result) { + failf(data, "unsupported min version passed via CURLOPT_SSLVERSION"); + return result; + } + result = darwinssl_version_from_curl(&darwin_ver_max, + ssl_version_max >> 16); + if(result) { + failf(data, "unsupported max version passed via CURLOPT_SSLVERSION"); + return result; + } + + (void)SSLSetProtocolVersionMin(BACKEND->ssl_ctx, darwin_ver_min); + (void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, darwin_ver_max); + return result; + } + else { +#if CURL_SUPPORT_MAC_10_8 + long i = ssl_version; + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, + kSSLProtocolAll, + false); + for(; i <= (ssl_version_max >> 16); i++) { + switch(i) { + case CURL_SSLVERSION_TLSv1_0: + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, + kTLSProtocol1, + true); + break; + case CURL_SSLVERSION_TLSv1_1: + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, + kTLSProtocol11, + true); + break; + case CURL_SSLVERSION_TLSv1_2: + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, + kTLSProtocol12, + true); + break; + case CURL_SSLVERSION_TLSv1_3: + failf(data, "Your version of the OS does not support TLSv1.3"); + return CURLE_SSL_CONNECT_ERROR; + } + } + return CURLE_OK; +#endif /* CURL_SUPPORT_MAC_10_8 */ + } +#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ + failf(data, "DarwinSSL: cannot set SSL protocol"); + return CURLE_SSL_CONNECT_ERROR; +} + + static CURLcode darwinssl_connect_step1(struct connectdata *conn, int sockindex) { @@ -1072,10 +1390,10 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, #if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS if(SSLCreateContext != NULL) { /* use the newer API if avaialble */ - if(connssl->ssl_ctx) - CFRelease(connssl->ssl_ctx); - connssl->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType); - if(!connssl->ssl_ctx) { + if(BACKEND->ssl_ctx) + CFRelease(BACKEND->ssl_ctx); + BACKEND->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType); + if(!BACKEND->ssl_ctx) { failf(data, "SSL: couldn't create a context!"); return CURLE_OUT_OF_MEMORY; } @@ -1083,9 +1401,9 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, else { /* The old ST API does not exist under iOS, so don't compile it: */ #if CURL_SUPPORT_MAC_10_8 - if(connssl->ssl_ctx) - (void)SSLDisposeContext(connssl->ssl_ctx); - err = SSLNewContext(false, &(connssl->ssl_ctx)); + if(BACKEND->ssl_ctx) + (void)SSLDisposeContext(BACKEND->ssl_ctx); + err = SSLNewContext(false, &(BACKEND->ssl_ctx)); if(err != noErr) { failf(data, "SSL: couldn't create a context: OSStatus %d", err); return CURLE_OUT_OF_MEMORY; @@ -1093,15 +1411,15 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, #endif /* CURL_SUPPORT_MAC_10_8 */ } #else - if(connssl->ssl_ctx) - (void)SSLDisposeContext(connssl->ssl_ctx); - err = SSLNewContext(false, &(connssl->ssl_ctx)); + if(BACKEND->ssl_ctx) + (void)SSLDisposeContext(BACKEND->ssl_ctx); + err = SSLNewContext(false, &(BACKEND->ssl_ctx)); if(err != noErr) { failf(data, "SSL: couldn't create a context: OSStatus %d", err); return CURLE_OUT_OF_MEMORY; } #endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ - connssl->ssl_write_buffered_length = 0UL; /* reset buffered write length */ + BACKEND->ssl_write_buffered_length = 0UL; /* reset buffered write length */ /* check to see if we've been told to use an explicit SSL/TLS version */ #if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS @@ -1109,39 +1427,43 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, switch(conn->ssl_config.version) { case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_TLSv1: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12); + (void)SSLSetProtocolVersionMin(BACKEND->ssl_ctx, kTLSProtocol1); +#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 + if(__builtin_available(macOS 10.13, iOS 11.0, *)) { + (void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, kTLSProtocol13); + } + else { + (void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, kTLSProtocol12); + } +#else + (void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, kTLSProtocol12); +#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */ break; case CURL_SSLVERSION_TLSv1_0: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol1); - break; case CURL_SSLVERSION_TLSv1_1: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol11); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol11); - break; case CURL_SSLVERSION_TLSv1_2: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol12); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12); - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "DarwinSSL: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + { + CURLcode result = set_ssl_version_min_max(conn, sockindex); + if(result != CURLE_OK) + return result; + break; + } case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol3); + err = SSLSetProtocolVersionMin(BACKEND->ssl_ctx, kSSLProtocol3); if(err != noErr) { failf(data, "Your version of the OS does not support SSLv3"); return CURLE_SSL_CONNECT_ERROR; } - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol3); + (void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, kSSLProtocol3); break; case CURL_SSLVERSION_SSLv2: - err = SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol2); + err = SSLSetProtocolVersionMin(BACKEND->ssl_ctx, kSSLProtocol2); if(err != noErr) { failf(data, "Your version of the OS does not support SSLv2"); return CURLE_SSL_CONNECT_ERROR; } - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol2); + (void)SSLSetProtocolVersionMax(BACKEND->ssl_ctx, kSSLProtocol2); break; default: failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); @@ -1150,42 +1472,34 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } else { #if CURL_SUPPORT_MAC_10_8 - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kSSLProtocolAll, false); switch(conn->ssl_config.version) { case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_TLSv1: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kTLSProtocol1, true); - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kTLSProtocol11, true); - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kTLSProtocol12, true); break; case CURL_SSLVERSION_TLSv1_0: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol1, - true); - break; case CURL_SSLVERSION_TLSv1_1: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol11, - true); - break; case CURL_SSLVERSION_TLSv1_2: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol12, - true); - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "DarwinSSL: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + { + CURLcode result = set_ssl_version_min_max(conn, sockindex); + if(result != CURLE_OK) + return result; + break; + } case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + err = SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kSSLProtocol3, true); if(err != noErr) { @@ -1194,7 +1508,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } break; case CURL_SSLVERSION_SSLv2: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + err = SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kSSLProtocol2, true); if(err != noErr) { @@ -1209,12 +1523,17 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, #endif /* CURL_SUPPORT_MAC_10_8 */ } #else - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocolAll, false); + if(conn->ssl_config.version_max != CURL_SSLVERSION_MAX_NONE) { + failf(data, "Your version of the OS does not support to set maximum" + " SSL/TLS version"); + return CURLE_SSL_CONNECT_ERROR; + } + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kSSLProtocolAll, false); switch(conn->ssl_config.version) { case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_TLSv1: case CURL_SSLVERSION_TLSv1_0: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + (void)SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kTLSProtocol1, true); break; @@ -1228,7 +1547,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, failf(data, "Your version of the OS does not support TLSv1.3"); return CURLE_SSL_CONNECT_ERROR; case CURL_SSLVERSION_SSLv2: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + err = SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kSSLProtocol2, true); if(err != noErr) { @@ -1237,7 +1556,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } break; case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, + err = SSLSetProtocolVersionEnabled(BACKEND->ssl_ctx, kSSLProtocol3, true); if(err != noErr) { @@ -1279,7 +1598,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, else err = CopyIdentityWithLabel(ssl_cert, &cert_and_key); - if(err == noErr) { + if(err == noErr && cert_and_key) { SecCertificateRef cert = NULL; CFTypeRef certs_c[1]; CFArrayRef certs; @@ -1287,25 +1606,21 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, /* If we found one, print it out: */ err = SecIdentityCopyCertificate(cert_and_key, &cert); if(err == noErr) { - CFStringRef cert_summary = CopyCertSubject(cert); - char cert_summary_c[128]; - - if(cert_summary) { - memset(cert_summary_c, 0, 128); - if(CFStringGetCString(cert_summary, - cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Client certificate: %s\n", cert_summary_c); - } - CFRelease(cert_summary); - CFRelease(cert); + char *certp; + CURLcode result = CopyCertSubject(data, cert, &certp); + if(!result) { + infof(data, "Client certificate: %s\n", certp); + free(certp); } + + CFRelease(cert); + if(result) + return result; } certs_c[0] = cert_and_key; certs = CFArrayCreate(NULL, (const void **)certs_c, 1L, &kCFTypeArrayCallBacks); - err = SSLSetCertificate(connssl->ssl_ctx, certs); + err = SSLSetCertificate(BACKEND->ssl_ctx, certs); if(certs) CFRelease(certs); if(err != noErr) { @@ -1368,7 +1683,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, if(SSLSetSessionOption != NULL) { #endif /* CURL_BUILD_MAC */ bool break_on_auth = !conn->ssl_config.verifypeer || ssl_cafile; - err = SSLSetSessionOption(connssl->ssl_ctx, + err = SSLSetSessionOption(BACKEND->ssl_ctx, kSSLSessionOptionBreakOnServerAuth, break_on_auth); if(err != noErr) { @@ -1378,7 +1693,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } else { #if CURL_SUPPORT_MAC_10_8 - err = SSLSetEnableCertVerify(connssl->ssl_ctx, + err = SSLSetEnableCertVerify(BACKEND->ssl_ctx, conn->ssl_config.verifypeer?true:false); if(err != noErr) { failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err); @@ -1387,7 +1702,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, #endif /* CURL_SUPPORT_MAC_10_8 */ } #else - err = SSLSetEnableCertVerify(connssl->ssl_ctx, + err = SSLSetEnableCertVerify(BACKEND->ssl_ctx, conn->ssl_config.verifypeer?true:false); if(err != noErr) { failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err); @@ -1408,7 +1723,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, * Both hostname check and SNI require SSLSetPeerDomainName(). * Also: the verifyhost setting influences SNI usage */ if(conn->ssl_config.verifyhost) { - err = SSLSetPeerDomainName(connssl->ssl_ctx, hostname, + err = SSLSetPeerDomainName(BACKEND->ssl_ctx, hostname, strlen(hostname)); if(err != noErr) { @@ -1425,17 +1740,20 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, "the OS.\n"); } } + else { + infof(data, "WARNING: disabling hostname validation also disables SNI.\n"); + } /* Disable cipher suites that ST supports but are not safe. These ciphers are unlikely to be used in any case since ST gives other ciphers a much higher priority, but it's probably better that we not connect at all than to give the user a false sense of security if the server only supports insecure ciphers. (Note: We don't care about SSLv2-only ciphers.) */ - (void)SSLGetNumberSupportedCiphers(connssl->ssl_ctx, &all_ciphers_count); + (void)SSLGetNumberSupportedCiphers(BACKEND->ssl_ctx, &all_ciphers_count); all_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite)); allowed_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite)); if(all_ciphers && allowed_ciphers && - SSLGetSupportedCiphers(connssl->ssl_ctx, all_ciphers, + SSLGetSupportedCiphers(BACKEND->ssl_ctx, all_ciphers, &all_ciphers_count) == noErr) { for(i = 0UL ; i < all_ciphers_count ; i++) { #if CURL_BUILD_MAC @@ -1517,7 +1835,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, break; } } - err = SSLSetEnabledCiphers(connssl->ssl_ctx, allowed_ciphers, + err = SSLSetEnabledCiphers(BACKEND->ssl_ctx, allowed_ciphers, allowed_ciphers_count); if(err != noErr) { failf(data, "SSL: SSLSetEnabledCiphers() failed: OSStatus %d", err); @@ -1538,15 +1856,15 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, specifically doesn't want us doing that: */ if(SSLSetSessionOption != NULL) { /* TODO s/data->set.ssl.enable_beast/SSL_SET_OPTION(enable_beast)/g */ - SSLSetSessionOption(connssl->ssl_ctx, kSSLSessionOptionSendOneByteRecord, + SSLSetSessionOption(BACKEND->ssl_ctx, kSSLSessionOptionSendOneByteRecord, !data->set.ssl.enable_beast); - SSLSetSessionOption(connssl->ssl_ctx, kSSLSessionOptionFalseStart, + SSLSetSessionOption(BACKEND->ssl_ctx, kSSLSessionOptionFalseStart, data->set.ssl.falsestart); /* false start support */ } #endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */ /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { char *ssl_sessionid; size_t ssl_sessionid_len; @@ -1554,7 +1872,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid, &ssl_sessionid_len, sockindex)) { /* we got a session id, use it! */ - err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len); + err = SSLSetPeerID(BACKEND->ssl_ctx, ssl_sessionid, ssl_sessionid_len); Curl_ssl_sessionid_unlock(conn); if(err != noErr) { failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err); @@ -1572,7 +1890,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, verifypeer, SSL_CONN_CONFIG(verifyhost), hostname, port); ssl_sessionid_len = strlen(ssl_sessionid); - err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len); + err = SSLSetPeerID(BACKEND->ssl_ctx, ssl_sessionid, ssl_sessionid_len); if(err != noErr) { Curl_ssl_sessionid_unlock(conn); failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err); @@ -1589,7 +1907,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } } - err = SSLSetIOFuncs(connssl->ssl_ctx, SocketRead, SocketWrite); + err = SSLSetIOFuncs(BACKEND->ssl_ctx, SocketRead, SocketWrite); if(err != noErr) { failf(data, "SSL: SSLSetIOFuncs() failed: OSStatus %d", err); return CURLE_SSL_CONNECT_ERROR; @@ -1599,8 +1917,8 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, /* We need to store the FD in a constant memory address, because * SSLSetConnection() will not copy that address. I've found that * conn->sock[sockindex] may change on its own. */ - connssl->ssl_sockfd = sockfd; - err = SSLSetConnection(connssl->ssl_ctx, connssl); + BACKEND->ssl_sockfd = sockfd; + err = SSLSetConnection(BACKEND->ssl_ctx, connssl); if(err != noErr) { failf(data, "SSL: SSLSetConnection() failed: %d", err); return CURLE_SSL_CONNECT_ERROR; @@ -1663,7 +1981,7 @@ static int read_cert(const char *file, unsigned char **out, size_t *outlen) { int fd; ssize_t n, len = 0, cap = 512; - unsigned char buf[cap], *data; + unsigned char buf[512], *data; fd = open(file, 0); if(fd < 0) @@ -1741,6 +2059,8 @@ static int append_cert_to_array(struct Curl_easy *data, CFMutableArrayRef array) { CFDataRef certdata = CFDataCreate(kCFAllocatorDefault, buf, buflen); + char *certp; + CURLcode result; if(!certdata) { failf(data, "SSL: failed to allocate array for CA certificate"); return CURLE_OUT_OF_MEMORY; @@ -1755,25 +2075,10 @@ static int append_cert_to_array(struct Curl_easy *data, } /* Check if cacert is valid. */ - CFStringRef subject = CopyCertSubject(cacert); - if(subject) { - char subject_cbuf[128]; - memset(subject_cbuf, 0, 128); - if(!CFStringGetCString(subject, - subject_cbuf, - 128, - kCFStringEncodingUTF8)) { - CFRelease(cacert); - failf(data, "SSL: invalid CA certificate subject"); - return CURLE_SSL_CACERT; - } - CFRelease(subject); - } - else { - CFRelease(cacert); - failf(data, "SSL: invalid CA certificate"); - return CURLE_SSL_CACERT; - } + result = CopyCertSubject(data, cacert, &certp); + if(result) + return result; + free(certp); CFArrayAppendValue(array, cacert); CFRelease(cacert); @@ -1898,6 +2203,113 @@ static int verify_cert(const char *cafile, struct Curl_easy *data, } } +#ifdef DARWIN_SSL_PINNEDPUBKEY +static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data, + SSLContextRef ctx, + const char *pinnedpubkey) +{ /* Scratch */ + size_t pubkeylen, realpubkeylen, spkiHeaderLength = 24; + unsigned char *pubkey = NULL, *realpubkey = NULL; + const unsigned char *spkiHeader = NULL; + CFDataRef publicKeyBits = NULL; + + /* Result is returned to caller */ + CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; + + /* if a path wasn't specified, don't pin */ + if(!pinnedpubkey) + return CURLE_OK; + + + if(!ctx) + return result; + + do { + SecTrustRef trust; + OSStatus ret = SSLCopyPeerTrust(ctx, &trust); + if(ret != noErr || trust == NULL) + break; + + SecKeyRef keyRef = SecTrustCopyPublicKey(trust); + CFRelease(trust); + if(keyRef == NULL) + break; + +#ifdef DARWIN_SSL_PINNEDPUBKEY_V1 + + publicKeyBits = SecKeyCopyExternalRepresentation(keyRef, NULL); + CFRelease(keyRef); + if(publicKeyBits == NULL) + break; + +#elif DARWIN_SSL_PINNEDPUBKEY_V2 + + OSStatus success = SecItemExport(keyRef, kSecFormatOpenSSL, 0, NULL, + &publicKeyBits); + CFRelease(keyRef); + if(success != errSecSuccess || publicKeyBits == NULL) + break; + +#endif /* DARWIN_SSL_PINNEDPUBKEY_V2 */ + + pubkeylen = CFDataGetLength(publicKeyBits); + pubkey = (unsigned char *)CFDataGetBytePtr(publicKeyBits); + + switch(pubkeylen) { + case 526: + /* 4096 bit RSA pubkeylen == 526 */ + spkiHeader = rsa4096SpkiHeader; + break; + case 270: + /* 2048 bit RSA pubkeylen == 270 */ + spkiHeader = rsa2048SpkiHeader; + break; +#ifdef DARWIN_SSL_PINNEDPUBKEY_V1 + case 65: + /* ecDSA secp256r1 pubkeylen == 65 */ + spkiHeader = ecDsaSecp256r1SpkiHeader; + spkiHeaderLength = 26; + break; + case 97: + /* ecDSA secp384r1 pubkeylen == 97 */ + spkiHeader = ecDsaSecp384r1SpkiHeader; + spkiHeaderLength = 23; + break; + default: + infof(data, "SSL: unhandled public key length: %d\n", pubkeylen); +#elif DARWIN_SSL_PINNEDPUBKEY_V2 + default: + /* ecDSA secp256r1 pubkeylen == 91 header already included? + * ecDSA secp384r1 header already included too + * we assume rest of algorithms do same, so do nothing + */ + result = Curl_pin_peer_pubkey(data, pinnedpubkey, pubkey, + pubkeylen); +#endif /* DARWIN_SSL_PINNEDPUBKEY_V2 */ + continue; /* break from loop */ + } + + realpubkeylen = pubkeylen + spkiHeaderLength; + realpubkey = malloc(realpubkeylen); + if(!realpubkey) + break; + + memcpy(realpubkey, spkiHeader, spkiHeaderLength); + memcpy(realpubkey + spkiHeaderLength, pubkey, pubkeylen); + + result = Curl_pin_peer_pubkey(data, pinnedpubkey, realpubkey, + realpubkeylen); + + } while(0); + + Curl_safefree(realpubkey); + if(publicKeyBits != NULL) + CFRelease(publicKeyBits); + + return result; +} +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + static CURLcode darwinssl_connect_step2(struct connectdata *conn, int sockindex) { @@ -1914,12 +2326,12 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex) || ssl_connect_2_writing == connssl->connecting_state); /* Here goes nothing: */ - err = SSLHandshake(connssl->ssl_ctx); + err = SSLHandshake(BACKEND->ssl_ctx); if(err != noErr) { switch(err) { case errSSLWouldBlock: /* they're not done with us yet */ - connssl->connecting_state = connssl->ssl_direction ? + connssl->connecting_state = BACKEND->ssl_direction ? ssl_connect_2_writing : ssl_connect_2_reading; return CURLE_OK; @@ -1928,7 +2340,7 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex) case -9841: if(SSL_CONN_CONFIG(CAfile) && SSL_CONN_CONFIG(verifypeer)) { int res = verify_cert(SSL_CONN_CONFIG(CAfile), data, - connssl->ssl_ctx); + BACKEND->ssl_ctx); if(res != CURLE_OK) return res; } @@ -2004,9 +2416,20 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex) /* we have been connected fine, we're not waiting for anything else. */ connssl->connecting_state = ssl_connect_3; +#ifdef DARWIN_SSL_PINNEDPUBKEY + if(data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]) { + CURLcode result = pkp_pin_peer_pubkey(data, BACKEND->ssl_ctx, + data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]); + if(result) { + failf(data, "SSL: public key does not match pinned public key!"); + return result; + } + } +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + /* Informational message */ - (void)SSLGetNegotiatedCipher(connssl->ssl_ctx, &cipher); - (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol); + (void)SSLGetNegotiatedCipher(BACKEND->ssl_ctx, &cipher); + (void)SSLGetNegotiatedProtocolVersion(BACKEND->ssl_ctx, &protocol); switch(protocol) { case kSSLProtocol2: infof(data, "SSL 2.0 connection using %s\n", @@ -2029,7 +2452,13 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex) infof(data, "TLS 1.2 connection using %s\n", TLSCipherNameForNumber(cipher)); break; -#endif +#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ +#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 + case kTLSProtocol13: + infof(data, "TLS 1.3 connection using %s\n", + TLSCipherNameForNumber(cipher)); + break; +#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */ default: infof(data, "Unknown protocol connection\n"); break; @@ -2047,36 +2476,32 @@ show_verbose_server_cert(struct connectdata *conn, { struct Curl_easy *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - CFStringRef server_cert_summary; - char server_cert_summary_c[128]; CFArrayRef server_certs = NULL; SecCertificateRef server_cert; OSStatus err; CFIndex i, count; SecTrustRef trust = NULL; - if(!connssl->ssl_ctx) + if(!BACKEND->ssl_ctx) return; #if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS #if CURL_BUILD_IOS #pragma unused(server_certs) - err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust); + err = SSLCopyPeerTrust(BACKEND->ssl_ctx, &trust); /* For some reason, SSLCopyPeerTrust() can return noErr and yet return a null trust, so be on guard for that: */ if(err == noErr && trust) { count = SecTrustGetCertificateCount(trust); for(i = 0L ; i < count ; i++) { + CURLcode result; + char *certp; server_cert = SecTrustGetCertificateAtIndex(trust, i); - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); + result = CopyCertSubject(data, server_cert, &certp); + if(!result) { + infof(data, "Server certificate: %s\n", certp); + free(certp); } - CFRelease(server_cert_summary); } CFRelease(trust); } @@ -2089,45 +2514,40 @@ show_verbose_server_cert(struct connectdata *conn, Lion or later. */ if(SecTrustEvaluateAsync != NULL) { #pragma unused(server_certs) - err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust); + err = SSLCopyPeerTrust(BACKEND->ssl_ctx, &trust); /* For some reason, SSLCopyPeerTrust() can return noErr and yet return a null trust, so be on guard for that: */ if(err == noErr && trust) { count = SecTrustGetCertificateCount(trust); for(i = 0L ; i < count ; i++) { + char *certp; + CURLcode result; server_cert = SecTrustGetCertificateAtIndex(trust, i); - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); + result = CopyCertSubject(data, server_cert, &certp); + if(!result) { + infof(data, "Server certificate: %s\n", certp); + free(certp); } - CFRelease(server_cert_summary); } CFRelease(trust); } } else { #if CURL_SUPPORT_MAC_10_8 - err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs); + err = SSLCopyPeerCertificates(BACKEND->ssl_ctx, &server_certs); /* Just in case SSLCopyPeerCertificates() returns null too... */ if(err == noErr && server_certs) { count = CFArrayGetCount(server_certs); for(i = 0L ; i < count ; i++) { + char *certp; + CURLcode result; server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs, i); - - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); + result = CopyCertSubject(data, server_cert, &certp); + if(!result) { + infof(data, "Server certificate: %s\n", certp); + free(certp); } - CFRelease(server_cert_summary); } CFRelease(server_certs); } @@ -2136,20 +2556,18 @@ show_verbose_server_cert(struct connectdata *conn, #endif /* CURL_BUILD_IOS */ #else #pragma unused(trust) - err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs); + err = SSLCopyPeerCertificates(BACKEND->ssl_ctx, &server_certs); if(err == noErr) { count = CFArrayGetCount(server_certs); for(i = 0L ; i < count ; i++) { + CURLcode result; + char *certp; server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs, i); - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); + result = CopyCertSubject(data, server_cert, &certp); + if(!result) { + infof(data, "Server certificate: %s\n", certp); + free(certp); } - CFRelease(server_cert_summary); } CFRelease(server_certs); } @@ -2198,7 +2616,7 @@ darwinssl_connect_common(struct connectdata *conn, return CURLE_OK; } - if(ssl_connect_1==connssl->connecting_state) { + if(ssl_connect_1 == connssl->connecting_state) { /* Find out how much more time we're allowed */ timeout_ms = Curl_timeleft(data, NULL, TRUE); @@ -2293,17 +2711,13 @@ darwinssl_connect_common(struct connectdata *conn, return CURLE_OK; } -CURLcode -Curl_darwinssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { return darwinssl_connect_common(conn, sockindex, TRUE, done); } -CURLcode -Curl_darwinssl_connect(struct connectdata *conn, - int sockindex) +static CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex) { CURLcode result; bool done = FALSE; @@ -2318,28 +2732,28 @@ Curl_darwinssl_connect(struct connectdata *conn, return CURLE_OK; } -void Curl_darwinssl_close(struct connectdata *conn, int sockindex) +static void Curl_darwinssl_close(struct connectdata *conn, int sockindex) { struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - if(connssl->ssl_ctx) { - (void)SSLClose(connssl->ssl_ctx); + if(BACKEND->ssl_ctx) { + (void)SSLClose(BACKEND->ssl_ctx); #if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS if(SSLCreateContext != NULL) - CFRelease(connssl->ssl_ctx); + CFRelease(BACKEND->ssl_ctx); #if CURL_SUPPORT_MAC_10_8 else - (void)SSLDisposeContext(connssl->ssl_ctx); + (void)SSLDisposeContext(BACKEND->ssl_ctx); #endif /* CURL_SUPPORT_MAC_10_8 */ #else - (void)SSLDisposeContext(connssl->ssl_ctx); + (void)SSLDisposeContext(BACKEND->ssl_ctx); #endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ - connssl->ssl_ctx = NULL; + BACKEND->ssl_ctx = NULL; } - connssl->ssl_sockfd = 0; + BACKEND->ssl_sockfd = 0; } -int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex) +static int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex) { struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct Curl_easy *data = conn->data; @@ -2348,7 +2762,7 @@ int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex) int rc; char buf[120]; - if(!connssl->ssl_ctx) + if(!BACKEND->ssl_ctx) return 0; if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE) @@ -2392,7 +2806,7 @@ int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex) return rc; } -void Curl_darwinssl_session_free(void *ptr) +static void Curl_darwinssl_session_free(void *ptr) { /* ST, as of iOS 5 and Mountain Lion, has no public method of deleting a cached session ID inside the Security framework. There is a private @@ -2403,7 +2817,7 @@ void Curl_darwinssl_session_free(void *ptr) Curl_safefree(ptr); } -size_t Curl_darwinssl_version(char *buffer, size_t size) +static size_t Curl_darwinssl_version(char *buffer, size_t size) { return snprintf(buffer, size, "SecureTransport"); } @@ -2416,14 +2830,14 @@ size_t Curl_darwinssl_version(char *buffer, size_t size) * 0 means the connection has been closed * -1 means the connection status is unknown */ -int Curl_darwinssl_check_cxn(struct connectdata *conn) +static int Curl_darwinssl_check_cxn(struct connectdata *conn) { struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET]; OSStatus err; SSLSessionState state; - if(connssl->ssl_ctx) { - err = SSLGetSessionState(connssl->ssl_ctx, &state); + if(BACKEND->ssl_ctx) { + err = SSLGetSessionState(BACKEND->ssl_ctx, &state); if(err == noErr) return state == kSSLConnected || state == kSSLHandshake; return -1; @@ -2431,15 +2845,15 @@ int Curl_darwinssl_check_cxn(struct connectdata *conn) return 0; } -bool Curl_darwinssl_data_pending(const struct connectdata *conn, - int connindex) +static bool Curl_darwinssl_data_pending(const struct connectdata *conn, + int connindex) { const struct ssl_connect_data *connssl = &conn->ssl[connindex]; OSStatus err; size_t buffer; - if(connssl->ssl_ctx) { /* SSL is in use */ - err = SSLGetBufferedReadSize(connssl->ssl_ctx, &buffer); + if(BACKEND->ssl_ctx) { /* SSL is in use */ + err = SSLGetBufferedReadSize(BACKEND->ssl_ctx, &buffer); if(err == noErr) return buffer > 0UL; return false; @@ -2448,14 +2862,16 @@ bool Curl_darwinssl_data_pending(const struct connectdata *conn, return false; } -CURLcode Curl_darwinssl_random(unsigned char *entropy, - size_t length) +static CURLcode Curl_darwinssl_random(struct Curl_easy *data UNUSED_PARAM, + unsigned char *entropy, size_t length) { /* arc4random_buf() isn't available on cats older than Lion, so let's do this manually for the benefit of the older cats. */ size_t i; u_int32_t random_number = 0; + (void)data; + for(i = 0 ; i < length ; i++) { if(i % sizeof(u_int32_t) == 0) random_number = arc4random(); @@ -2466,16 +2882,26 @@ CURLcode Curl_darwinssl_random(unsigned char *entropy, return CURLE_OK; } -void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len) +static CURLcode Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *md5sum, /* output */ + size_t md5len) { (void)md5len; (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum); + return CURLE_OK; } -bool Curl_darwinssl_false_start(void) +static void Curl_darwinssl_sha256sum(const unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum, /* output */ + size_t sha256len) +{ + assert(sha256len >= CURL_SHA256_DIGEST_LENGTH); + (void)CC_SHA256(tmp, (CC_LONG)tmplen, sha256sum); +} + +static bool Curl_darwinssl_false_start(void) { #if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 if(SSLSetSessionOption != NULL) @@ -2510,15 +2936,15 @@ static ssize_t darwinssl_send(struct connectdata *conn, over again with no new data until it quits returning errSSLWouldBlock. */ /* Do we have buffered data to write from the last time we were called? */ - if(connssl->ssl_write_buffered_length) { + if(BACKEND->ssl_write_buffered_length) { /* Write the buffered data: */ - err = SSLWrite(connssl->ssl_ctx, NULL, 0UL, &processed); + err = SSLWrite(BACKEND->ssl_ctx, NULL, 0UL, &processed); switch(err) { case noErr: /* processed is always going to be 0 because we didn't write to the buffer, so return how much was written to the socket */ - processed = connssl->ssl_write_buffered_length; - connssl->ssl_write_buffered_length = 0UL; + processed = BACKEND->ssl_write_buffered_length; + BACKEND->ssl_write_buffered_length = 0UL; break; case errSSLWouldBlock: /* argh, try again */ *curlcode = CURLE_AGAIN; @@ -2531,13 +2957,13 @@ static ssize_t darwinssl_send(struct connectdata *conn, } else { /* We've got new data to write: */ - err = SSLWrite(connssl->ssl_ctx, mem, len, &processed); + err = SSLWrite(BACKEND->ssl_ctx, mem, len, &processed); if(err != noErr) { switch(err) { case errSSLWouldBlock: /* Data was buffered but not sent, we have to tell the caller to try sending again, and remember how much was buffered */ - connssl->ssl_write_buffered_length = len; + BACKEND->ssl_write_buffered_length = len; *curlcode = CURLE_AGAIN; return -1L; default: @@ -2559,7 +2985,7 @@ static ssize_t darwinssl_recv(struct connectdata *conn, /*struct Curl_easy *data = conn->data;*/ struct ssl_connect_data *connssl = &conn->ssl[num]; size_t processed = 0UL; - OSStatus err = SSLRead(connssl->ssl_ctx, buf, buffersize, &processed); + OSStatus err = SSLRead(BACKEND->ssl_ctx, buf, buffersize, &processed); if(err != noErr) { switch(err) { @@ -2590,4 +3016,52 @@ static ssize_t darwinssl_recv(struct connectdata *conn, return (ssize_t)processed; } +static void *Curl_darwinssl_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return BACKEND->ssl_ctx; +} + +const struct Curl_ssl Curl_ssl_darwinssl = { + { CURLSSLBACKEND_DARWINSSL, "darwinssl" }, /* info */ + + 0, /* have_ca_path */ + 0, /* have_certinfo */ +#ifdef DARWIN_SSL_PINNEDPUBKEY + 1, /* have_pinnedpubkey */ +#else + 0, /* have_pinnedpubkey */ +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + 0, /* have_ssl_ctx */ + 0, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_none_init, /* init */ + Curl_none_cleanup, /* cleanup */ + Curl_darwinssl_version, /* version */ + Curl_darwinssl_check_cxn, /* check_cxn */ + Curl_darwinssl_shutdown, /* shutdown */ + Curl_darwinssl_data_pending, /* data_pending */ + Curl_darwinssl_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_darwinssl_connect, /* connect */ + Curl_darwinssl_connect_nonblocking, /* connect_nonblocking */ + Curl_darwinssl_get_internals, /* get_internals */ + Curl_darwinssl_close, /* close_one */ + Curl_none_close_all, /* close_all */ + Curl_darwinssl_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_darwinssl_false_start, /* false_start */ + Curl_darwinssl_md5sum, /* md5sum */ + Curl_darwinssl_sha256sum /* sha256sum */ +}; + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #endif /* USE_DARWINSSL */ diff --git a/lib/vtls/darwinssl.h b/lib/vtls/darwinssl.h index 4bd41ca..23c7f70 100644 --- a/lib/vtls/darwinssl.h +++ b/lib/vtls/darwinssl.h @@ -26,51 +26,7 @@ #ifdef USE_DARWINSSL -CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -/* close a SSL connection */ -void Curl_darwinssl_close(struct connectdata *conn, int sockindex); - -void Curl_darwinssl_session_free(void *ptr); -size_t Curl_darwinssl_version(char *buffer, size_t size); -int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex); -int Curl_darwinssl_check_cxn(struct connectdata *conn); -bool Curl_darwinssl_data_pending(const struct connectdata *conn, - int connindex); - -CURLcode Curl_darwinssl_random(unsigned char *entropy, - size_t length); -void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len); -bool Curl_darwinssl_false_start(void); - -/* Set the API backend definition to SecureTransport */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL - -/* API setup for SecureTransport */ -#define curlssl_init() (1) -#define curlssl_cleanup() Curl_nop_stmt -#define curlssl_connect Curl_darwinssl_connect -#define curlssl_connect_nonblocking Curl_darwinssl_connect_nonblocking -#define curlssl_session_free(x) Curl_darwinssl_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_darwinssl_close -#define curlssl_shutdown(x,y) 0 -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_darwinssl_version -#define curlssl_check_cxn Curl_darwinssl_check_cxn -#define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y) -#define curlssl_random(x,y,z) ((void)x, Curl_darwinssl_random(y,z)) -#define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d) -#define curlssl_false_start() Curl_darwinssl_false_start() +extern const struct Curl_ssl Curl_ssl_darwinssl; #endif /* USE_DARWINSSL */ #endif /* HEADER_CURL_DARWINSSL_H */ diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c index a0d462b..afc90a8 100644 --- a/lib/vtls/gskit.c +++ b/lib/vtls/gskit.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -61,9 +61,7 @@ #endif -#ifdef HAVE_LIMITS_H -# include -#endif +#include #include #include "urldata.h" @@ -98,6 +96,14 @@ #define CURL_GSKPROTO_TLSV12_MASK (1 << CURL_GSKPROTO_TLSV12) #define CURL_GSKPROTO_LAST 5 +struct ssl_backend_data { + gsk_handle handle; + int iocport; + int localfd; + int remotefd; +}; + +#define BACKEND connssl->backend /* Supported ciphers. */ typedef struct { @@ -320,7 +326,7 @@ static CURLcode set_ciphers(struct connectdata *conn, /* We allocate GSKit buffers of the same size as the input string: since GSKit tokens are always shorter than their cipher names, allocated buffers - will always be large enough to accomodate the result. */ + will always be large enough to accommodate the result. */ l = strlen(cipherlist) + 1; memset((char *) ciphers, 0, sizeof ciphers); for(i = 0; i < CURL_GSKPROTO_LAST; i++) { @@ -427,7 +433,7 @@ static CURLcode set_ciphers(struct connectdata *conn, } -int Curl_gskit_init(void) +static int Curl_gskit_init(void) { /* No initialisation needed. */ @@ -435,7 +441,7 @@ int Curl_gskit_init(void) } -void Curl_gskit_cleanup(void) +static void Curl_gskit_cleanup(void) { /* Nothing to do. */ } @@ -495,14 +501,14 @@ static void cancel_async_handshake(struct connectdata *conn, int sockindex) Qso_OverlappedIO_t cstat; if(QsoCancelOperation(conn->sock[sockindex], 0) > 0) - QsoWaitForIOCompletion(connssl->iocport, &cstat, (struct timeval *) NULL); + QsoWaitForIOCompletion(BACKEND->iocport, &cstat, (struct timeval *) NULL); } static void close_async_handshake(struct ssl_connect_data *connssl) { - QsoDestroyIOCompletionPort(connssl->iocport); - connssl->iocport = -1; + QsoDestroyIOCompletionPort(BACKEND->iocport); + BACKEND->iocport = -1; } /* SSL over SSL @@ -620,12 +626,12 @@ static int pipe_ssloverssl(struct connectdata *conn, int sockindex, FD_ZERO(&fds_write); n = -1; if(directions & SOS_READ) { - FD_SET(connssl->remotefd, &fds_write); - n = connssl->remotefd; + FD_SET(BACKEND->remotefd, &fds_write); + n = BACKEND->remotefd; } if(directions & SOS_WRITE) { - FD_SET(connssl->remotefd, &fds_read); - n = connssl->remotefd; + FD_SET(BACKEND->remotefd, &fds_read); + n = BACKEND->remotefd; FD_SET(conn->sock[sockindex], &fds_write); if(n < conn->sock[sockindex]) n = conn->sock[sockindex]; @@ -634,14 +640,15 @@ static int pipe_ssloverssl(struct connectdata *conn, int sockindex, if(i < 0) return -1; /* Select error. */ - if(FD_ISSET(connssl->remotefd, &fds_write)) { + if(FD_ISSET(BACKEND->remotefd, &fds_write)) { /* Try getting data from HTTPS proxy and pipe it upstream. */ n = 0; - i = gsk_secure_soc_read(connproxyssl->handle, buf, sizeof buf, &n); + i = gsk_secure_soc_read(connproxyssl->backend->handle, + buf, sizeof buf, &n); switch(i) { case GSK_OK: if(n) { - i = write(connssl->remotefd, buf, n); + i = write(BACKEND->remotefd, buf, n); if(i < 0) return -1; ret = 1; @@ -655,14 +662,14 @@ static int pipe_ssloverssl(struct connectdata *conn, int sockindex, } } - if(FD_ISSET(connssl->remotefd, &fds_read) && + if(FD_ISSET(BACKEND->remotefd, &fds_read) && FD_ISSET(conn->sock[sockindex], &fds_write)) { /* Pipe data to HTTPS proxy. */ - n = read(connssl->remotefd, buf, sizeof buf); + n = read(BACKEND->remotefd, buf, sizeof buf); if(n < 0) return -1; if(n) { - i = gsk_secure_soc_write(connproxyssl->handle, buf, n, &m); + i = gsk_secure_soc_write(connproxyssl->backend->handle, buf, n, &m); if(i != GSK_OK || n != m) return -1; ret = 1; @@ -676,23 +683,23 @@ static int pipe_ssloverssl(struct connectdata *conn, int sockindex, static void close_one(struct ssl_connect_data *connssl, struct connectdata *conn, int sockindex) { - if(connssl->handle) { - gskit_status(conn->data, gsk_secure_soc_close(&connssl->handle), + if(BACKEND->handle) { + gskit_status(conn->data, gsk_secure_soc_close(&BACKEND->handle), "gsk_secure_soc_close()", 0); /* Last chance to drain output. */ while(pipe_ssloverssl(conn, sockindex, SOS_WRITE) > 0) ; - connssl->handle = (gsk_handle) NULL; - if(connssl->localfd >= 0) { - close(connssl->localfd); - connssl->localfd = -1; + BACKEND->handle = (gsk_handle) NULL; + if(BACKEND->localfd >= 0) { + close(BACKEND->localfd); + BACKEND->localfd = -1; } - if(connssl->remotefd >= 0) { - close(connssl->remotefd); - connssl->remotefd = -1; + if(BACKEND->remotefd >= 0) { + close(BACKEND->remotefd); + BACKEND->remotefd = -1; } } - if(connssl->iocport >= 0) + if(BACKEND->iocport >= 0) close_async_handshake(connssl); } @@ -700,13 +707,14 @@ static void close_one(struct ssl_connect_data *connssl, static ssize_t gskit_send(struct connectdata *conn, int sockindex, const void *mem, size_t len, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct Curl_easy *data = conn->data; CURLcode cc = CURLE_SEND_ERROR; int written; if(pipe_ssloverssl(conn, sockindex, SOS_WRITE) >= 0) { cc = gskit_status(data, - gsk_secure_soc_write(conn->ssl[sockindex].handle, + gsk_secure_soc_write(BACKEND->handle, (char *) mem, (int) len, &written), "gsk_secure_soc_write()", CURLE_SEND_ERROR); if(cc == CURLE_OK) @@ -724,6 +732,7 @@ static ssize_t gskit_send(struct connectdata *conn, int sockindex, static ssize_t gskit_recv(struct connectdata *conn, int num, char *buf, size_t buffersize, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[num]; struct Curl_easy *data = conn->data; int buffsize; int nread; @@ -731,7 +740,7 @@ static ssize_t gskit_recv(struct connectdata *conn, int num, char *buf, if(pipe_ssloverssl(conn, num, SOS_READ) >= 0) { buffsize = buffersize > (size_t) INT_MAX? INT_MAX: (int) buffersize; - cc = gskit_status(data, gsk_secure_soc_read(conn->ssl[num].handle, + cc = gskit_status(data, gsk_secure_soc_read(BACKEND->handle, buf, buffsize, &nread), "gsk_secure_soc_read()", CURLE_RECV_ERROR); } @@ -748,6 +757,40 @@ static ssize_t gskit_recv(struct connectdata *conn, int num, char *buf, return (ssize_t) nread; } +static CURLcode +set_ssl_version_min_max(unsigned int *protoflags, struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + long i = ssl_version; + switch(ssl_version_max) { + case CURL_SSLVERSION_MAX_NONE: + ssl_version_max = ssl_version; + break; + case CURL_SSLVERSION_MAX_DEFAULT: + ssl_version_max = CURL_SSLVERSION_TLSv1_2; + break; + } + for(; i <= (ssl_version_max >> 16); ++i) { + switch(i) { + case CURL_SSLVERSION_TLSv1_0: + *protoflags |= CURL_GSKPROTO_TLSV10_MASK; + break; + case CURL_SSLVERSION_TLSv1_1: + *protoflags |= CURL_GSKPROTO_TLSV11_MASK; + break; + case CURL_SSLVERSION_TLSv1_2: + *protoflags |= CURL_GSKPROTO_TLSV11_MASK; + break; + case CURL_SSLVERSION_TLSv1_3: + failf(data, "GSKit: TLS 1.3 is not yet supported"); + return CURLE_SSL_CONNECT_ERROR; + } + } + + return CURLE_OK; +} static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) { @@ -764,7 +807,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) const char * const hostname = SSL_IS_PROXY()? conn->http_proxy.host.name: conn->host.name; const char *sni; - unsigned int protoflags; + unsigned int protoflags = 0; long timeout; Qso_OverlappedIO_t commarea; int sockpair[2]; @@ -772,10 +815,10 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) /* Create SSL environment, start (preferably asynchronous) handshake. */ - connssl->handle = (gsk_handle) NULL; - connssl->iocport = -1; - connssl->localfd = -1; - connssl->remotefd = -1; + BACKEND->handle = (gsk_handle) NULL; + BACKEND->iocport = -1; + BACKEND->localfd = -1; + BACKEND->remotefd = -1; /* GSKit supports two ways of specifying an SSL context: either by * application identifier (that should have been defined at the system @@ -808,7 +851,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) } /* Create secure session. */ - result = gskit_status(data, gsk_secure_soc_open(envir, &connssl->handle), + result = gskit_status(data, gsk_secure_soc_open(envir, &BACKEND->handle), "gsk_secure_soc_open()", CURLE_SSL_CONNECT_ERROR); gsk_environment_close(&envir); if(result) @@ -818,18 +861,18 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) if(conn->proxy_ssl[sockindex].use) { if(inetsocketpair(sockpair)) return CURLE_SSL_CONNECT_ERROR; - connssl->localfd = sockpair[0]; - connssl->remotefd = sockpair[1]; - setsockopt(connssl->localfd, SOL_SOCKET, SO_RCVBUF, + BACKEND->localfd = sockpair[0]; + BACKEND->remotefd = sockpair[1]; + setsockopt(BACKEND->localfd, SOL_SOCKET, SO_RCVBUF, (void *) sobufsize, sizeof sobufsize); - setsockopt(connssl->remotefd, SOL_SOCKET, SO_RCVBUF, + setsockopt(BACKEND->remotefd, SOL_SOCKET, SO_RCVBUF, (void *) sobufsize, sizeof sobufsize); - setsockopt(connssl->localfd, SOL_SOCKET, SO_SNDBUF, + setsockopt(BACKEND->localfd, SOL_SOCKET, SO_SNDBUF, (void *) sobufsize, sizeof sobufsize); - setsockopt(connssl->remotefd, SOL_SOCKET, SO_SNDBUF, + setsockopt(BACKEND->remotefd, SOL_SOCKET, SO_SNDBUF, (void *) sobufsize, sizeof sobufsize); - curlx_nonblock(connssl->localfd, TRUE); - curlx_nonblock(connssl->remotefd, TRUE); + curlx_nonblock(BACKEND->localfd, TRUE); + curlx_nonblock(BACKEND->remotefd, TRUE); } /* Determine which SSL/TLS version should be enabled. */ @@ -849,17 +892,13 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK; break; case CURL_SSLVERSION_TLSv1_0: - protoflags = CURL_GSKPROTO_TLSV10_MASK; - break; case CURL_SSLVERSION_TLSv1_1: - protoflags = CURL_GSKPROTO_TLSV11_MASK; - break; case CURL_SSLVERSION_TLSv1_2: - protoflags = CURL_GSKPROTO_TLSV12_MASK; - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "GSKit: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + result = set_ssl_version_min_max(&protoflags, conn); + if(result != CURLE_OK) + return result; + break; default: failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); return CURLE_SSL_CONNECT_ERROR; @@ -867,7 +906,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) /* Process SNI. Ignore if not supported (on OS400 < V7R1). */ if(sni) { - result = set_buffer(data, connssl->handle, + result = set_buffer(data, BACKEND->handle, GSK_SSL_EXTN_SERVERNAME_REQUEST, sni, TRUE); if(result == CURLE_UNSUPPORTED_PROTOCOL) result = CURLE_OK; @@ -881,34 +920,34 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) if(timeout < 0) result = CURLE_OPERATION_TIMEDOUT; else - result = set_numeric(data, connssl->handle, GSK_HANDSHAKE_TIMEOUT, + result = set_numeric(data, BACKEND->handle, GSK_HANDSHAKE_TIMEOUT, (timeout + 999) / 1000); } if(!result) - result = set_numeric(data, connssl->handle, GSK_OS400_READ_TIMEOUT, 1); + result = set_numeric(data, BACKEND->handle, GSK_OS400_READ_TIMEOUT, 1); if(!result) - result = set_numeric(data, connssl->handle, GSK_FD, connssl->localfd >= 0? - connssl->localfd: conn->sock[sockindex]); + result = set_numeric(data, BACKEND->handle, GSK_FD, BACKEND->localfd >= 0? + BACKEND->localfd: conn->sock[sockindex]); if(!result) - result = set_ciphers(conn, connssl->handle, &protoflags); + result = set_ciphers(conn, BACKEND->handle, &protoflags); if(!protoflags) { failf(data, "No SSL protocol/cipher combination enabled"); result = CURLE_SSL_CIPHER; } if(!result) - result = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV2, + result = set_enum(data, BACKEND->handle, GSK_PROTOCOL_SSLV2, (protoflags & CURL_GSKPROTO_SSLV2_MASK)? GSK_PROTOCOL_SSLV2_ON: GSK_PROTOCOL_SSLV2_OFF, FALSE); if(!result) - result = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV3, + result = set_enum(data, BACKEND->handle, GSK_PROTOCOL_SSLV3, (protoflags & CURL_GSKPROTO_SSLV3_MASK)? GSK_PROTOCOL_SSLV3_ON: GSK_PROTOCOL_SSLV3_OFF, FALSE); if(!result) - result = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV1, + result = set_enum(data, BACKEND->handle, GSK_PROTOCOL_TLSV1, (protoflags & CURL_GSKPROTO_TLSV10_MASK)? GSK_PROTOCOL_TLSV1_ON: GSK_PROTOCOL_TLSV1_OFF, FALSE); if(!result) { - result = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV11, + result = set_enum(data, BACKEND->handle, GSK_PROTOCOL_TLSV11, (protoflags & CURL_GSKPROTO_TLSV11_MASK)? GSK_TRUE: GSK_FALSE, TRUE); if(result == CURLE_UNSUPPORTED_PROTOCOL) { @@ -920,7 +959,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) } } if(!result) { - result = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV12, + result = set_enum(data, BACKEND->handle, GSK_PROTOCOL_TLSV12, (protoflags & CURL_GSKPROTO_TLSV12_MASK)? GSK_TRUE: GSK_FALSE, TRUE); if(result == CURLE_UNSUPPORTED_PROTOCOL) { @@ -932,18 +971,18 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) } } if(!result) - result = set_enum(data, connssl->handle, GSK_SERVER_AUTH_TYPE, + result = set_enum(data, BACKEND->handle, GSK_SERVER_AUTH_TYPE, verifypeer? GSK_SERVER_AUTH_FULL: GSK_SERVER_AUTH_PASSTHRU, FALSE); if(!result) { /* Start handshake. Try asynchronous first. */ memset(&commarea, 0, sizeof commarea); - connssl->iocport = QsoCreateIOCompletionPort(); - if(connssl->iocport != -1) { + BACKEND->iocport = QsoCreateIOCompletionPort(); + if(BACKEND->iocport != -1) { result = gskit_status(data, - gsk_secure_soc_startInit(connssl->handle, - connssl->iocport, + gsk_secure_soc_startInit(BACKEND->handle, + BACKEND->iocport, &commarea), "gsk_secure_soc_startInit()", CURLE_SSL_CONNECT_ERROR); @@ -963,7 +1002,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) } else { /* No more completion port available. Use synchronous IO. */ - result = gskit_status(data, gsk_secure_soc_init(connssl->handle), + result = gskit_status(data, gsk_secure_soc_init(BACKEND->handle), "gsk_secure_soc_init()", CURLE_SSL_CONNECT_ERROR); if(!result) { connssl->connecting_state = ssl_connect_3; @@ -996,7 +1035,7 @@ static CURLcode gskit_connect_step2(struct connectdata *conn, int sockindex, timeout_ms = 0; stmv.tv_sec = timeout_ms / 1000; stmv.tv_usec = (timeout_ms - stmv.tv_sec * 1000) * 1000; - switch(QsoWaitForIOCompletion(connssl->iocport, &cstat, &stmv)) { + switch(QsoWaitForIOCompletion(BACKEND->iocport, &cstat, &stmv)) { case 1: /* Operation complete. */ break; case -1: /* An error occurred: handshake still in progress. */ @@ -1045,7 +1084,7 @@ static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex) /* SSL handshake done: gather certificate info and verify host. */ - if(gskit_status(data, gsk_attribute_get_cert_info(connssl->handle, + if(gskit_status(data, gsk_attribute_get_cert_info(BACKEND->handle, GSK_PARTNER_CERT_INFO, &cdev, &cdec), "gsk_attribute_get_cert_info()", CURLE_SSL_CONNECT_ERROR) == @@ -1186,9 +1225,8 @@ static CURLcode gskit_connect_common(struct connectdata *conn, int sockindex, } -CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { CURLcode result; @@ -1199,7 +1237,7 @@ CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn, } -CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex) +static CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex) { CURLcode result; bool done; @@ -1215,14 +1253,14 @@ CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex) } -void Curl_gskit_close(struct connectdata *conn, int sockindex) +static void Curl_gskit_close(struct connectdata *conn, int sockindex) { close_one(&conn->ssl[sockindex], conn, sockindex); close_one(&conn->proxy_ssl[sockindex], conn, sockindex); } -int Curl_gskit_shutdown(struct connectdata *conn, int sockindex) +static int Curl_gskit_shutdown(struct connectdata *conn, int sockindex) { struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct Curl_easy *data = conn->data; @@ -1231,7 +1269,7 @@ int Curl_gskit_shutdown(struct connectdata *conn, int sockindex) int rc; char buf[120]; - if(!connssl->handle) + if(!BACKEND->handle) return 0; if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE) @@ -1276,21 +1314,22 @@ int Curl_gskit_shutdown(struct connectdata *conn, int sockindex) } -size_t Curl_gskit_version(char *buffer, size_t size) +static size_t Curl_gskit_version(char *buffer, size_t size) { strncpy(buffer, "GSKit", size); return strlen(buffer); } -int Curl_gskit_check_cxn(struct connectdata *cxn) +static int Curl_gskit_check_cxn(struct connectdata *cxn) { + struct ssl_connect_data *connssl = &cxn->ssl[FIRSTSOCKET]; int err; int errlen; /* The only thing that can be tested here is at the socket level. */ - if(!cxn->ssl[FIRSTSOCKET].handle) + if(!BACKEND->handle) return 0; /* connection has been closed */ err = 0; @@ -1304,4 +1343,46 @@ int Curl_gskit_check_cxn(struct connectdata *cxn) return -1; /* connection status unknown */ } +static void *Curl_gskit_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return BACKEND->handle; +} + +const struct Curl_ssl Curl_ssl_gskit = { + { CURLSSLBACKEND_GSKIT, "gskit" }, /* info */ + + 0, /* have_ca_path */ + 1, /* have_certinfo */ + 1, /* have_pinnedpubkey */ + 0, /* have_ssl_ctx */ + /* TODO: convert to 1 and fix test #1014 (if need) */ + 0, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_gskit_init, /* init */ + Curl_gskit_cleanup, /* cleanup */ + Curl_gskit_version, /* version */ + Curl_gskit_check_cxn, /* check_cxn */ + Curl_gskit_shutdown, /* shutdown */ + Curl_none_data_pending, /* data_pending */ + Curl_none_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_gskit_connect, /* connect */ + Curl_gskit_connect_nonblocking, /* connect_nonblocking */ + Curl_gskit_get_internals, /* get_internals */ + Curl_gskit_close, /* close_one */ + Curl_none_close_all, /* close_all */ + /* No session handling for GSKit */ + Curl_none_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_none_md5sum, /* md5sum */ + NULL /* sha256sum */ +}; + #endif /* USE_GSKIT */ diff --git a/lib/vtls/gskit.h b/lib/vtls/gskit.h index 2297592..466ee4d 100644 --- a/lib/vtls/gskit.h +++ b/lib/vtls/gskit.h @@ -30,44 +30,8 @@ #include "urldata.h" #ifdef USE_GSKIT -int Curl_gskit_init(void); -void Curl_gskit_cleanup(void); -CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn, - int sockindex, bool *done); -void Curl_gskit_close(struct connectdata *conn, int sockindex); -int Curl_gskit_shutdown(struct connectdata *conn, int sockindex); -size_t Curl_gskit_version(char *buffer, size_t size); -int Curl_gskit_check_cxn(struct connectdata *cxn); - -/* Support HTTPS-proxy */ -/* TODO: add '#define HTTPS_PROXY_SUPPORT 1' and fix test #1014 (if need) */ - -/* Set the API backend definition to GSKit */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* API setup for GSKit */ -#define curlssl_init Curl_gskit_init -#define curlssl_cleanup Curl_gskit_cleanup -#define curlssl_connect Curl_gskit_connect -#define curlssl_connect_nonblocking Curl_gskit_connect_nonblocking - -/* No session handling for GSKit */ -#define curlssl_session_free(x) Curl_nop_stmt -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_gskit_close -#define curlssl_shutdown(x,y) Curl_gskit_shutdown(x,y) -#define curlssl_set_engine(x,y) CURLE_NOT_BUILT_IN -#define curlssl_set_engine_default(x) CURLE_NOT_BUILT_IN -#define curlssl_engines_list(x) NULL -#define curlssl_version Curl_gskit_version -#define curlssl_check_cxn(x) Curl_gskit_check_cxn(x) -#define curlssl_data_pending(x,y) 0 -#define curlssl_random(x,y,z) (x=x, y=y, z=z, CURLE_NOT_BUILT_IN) +extern const struct Curl_ssl Curl_ssl_gskit; #endif /* USE_GSKIT */ diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index faa70ac..0788741 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -60,17 +60,6 @@ /* The last #include file should be: */ #include "memdebug.h" -/* - Some hackish cast macros based on: - https://developer.gnome.org/glib/unstable/glib-Type-Conversion-Macros.html -*/ -#ifndef GNUTLS_POINTER_TO_INT_CAST -#define GNUTLS_POINTER_TO_INT_CAST(p) ((int) (long) (p)) -#endif -#ifndef GNUTLS_INT_TO_POINTER_CAST -#define GNUTLS_INT_TO_POINTER_CAST(i) ((void *) (long) (i)) -#endif - /* Enable GnuTLS debugging by defining GTLSDEBUG */ /*#define GTLSDEBUG */ @@ -109,6 +98,16 @@ static bool gtls_inited = FALSE; # include #endif +struct ssl_backend_data { + gnutls_session_t session; + gnutls_certificate_credentials_t cred; +#ifdef USE_TLS_SRP + gnutls_srp_client_credentials_t srp_client_cred; +#endif +}; + +#define BACKEND connssl->backend + /* * Custom push and pull callback functions used by GNU TLS to read and write * to the socket. These functions are simple wrappers to send() and recv() @@ -153,7 +152,7 @@ static int gtls_mapped_sockerrno(void) static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len) { - ssize_t ret = swrite(GNUTLS_POINTER_TO_INT_CAST(s), buf, len); + ssize_t ret = swrite(CURLX_POINTER_TO_INTEGER_CAST(s), buf, len); #if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS) if(ret < 0) gnutls_transport_set_global_errno(gtls_mapped_sockerrno()); @@ -163,7 +162,7 @@ static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len) static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len) { - ssize_t ret = sread(GNUTLS_POINTER_TO_INT_CAST(s), buf, len); + ssize_t ret = sread(CURLX_POINTER_TO_INTEGER_CAST(s), buf, len); #if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS) if(ret < 0) gnutls_transport_set_global_errno(gtls_mapped_sockerrno()); @@ -188,7 +187,7 @@ static ssize_t Curl_gtls_pull_ssl(void *s, void *buf, size_t len) * must only be called from within curl_global_init() to keep the thread * situation under control! */ -int Curl_gtls_init(void) +static int Curl_gtls_init(void) { int ret = 1; if(!gtls_inited) { @@ -202,27 +201,28 @@ int Curl_gtls_init(void) return ret; } -int Curl_gtls_cleanup(void) +static void Curl_gtls_cleanup(void) { if(gtls_inited) { gnutls_global_deinit(); gtls_inited = FALSE; } - return 1; } +#ifndef CURL_DISABLE_VERBOSE_STRINGS static void showtime(struct Curl_easy *data, const char *text, time_t stamp) { struct tm buffer; const struct tm *tm = &buffer; + char str[96]; CURLcode result = Curl_gmtime(stamp, &buffer); if(result) return; - snprintf(data->state.buffer, - BUFSIZE, + snprintf(str, + sizeof(str), "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT", text, Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], @@ -232,8 +232,9 @@ static void showtime(struct Curl_easy *data, tm->tm_hour, tm->tm_min, tm->tm_sec); - infof(data, "%s\n", data->state.buffer); + infof(data, "%s\n", str); } +#endif static gnutls_datum_t load_file(const char *file) { @@ -276,9 +277,9 @@ static CURLcode handshake(struct connectdata *conn, { struct Curl_easy *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - gnutls_session_t session = conn->ssl[sockindex].session; + gnutls_session_t session = BACKEND->session; curl_socket_t sockfd = conn->sock[sockindex]; - long timeout_ms; + time_t timeout_ms; int rc; int what; @@ -296,9 +297,9 @@ static CURLcode handshake(struct connectdata *conn, if(connssl->connecting_state == ssl_connect_2_reading || connssl->connecting_state == ssl_connect_2_writing) { - curl_socket_t writefd = ssl_connect_2_writing== + curl_socket_t writefd = ssl_connect_2_writing == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== + curl_socket_t readfd = ssl_connect_2_reading == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, @@ -314,7 +315,7 @@ static CURLcode handshake(struct connectdata *conn, return CURLE_OK; else if(timeout_ms) { /* timeout */ - failf(data, "SSL connection timeout at %ld", timeout_ms); + failf(data, "SSL connection timeout at %ld", (long)timeout_ms); return CURLE_OPERATION_TIMEDOUT; } } @@ -375,11 +376,106 @@ static gnutls_x509_crt_fmt_t do_file_type(const char *type) return -1; } +#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT +static CURLcode +set_ssl_version_min_max(int *list, size_t list_size, struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + long i = ssl_version; + long protocol_priority_idx = 0; + + switch(ssl_version_max) { + case CURL_SSLVERSION_MAX_NONE: + ssl_version_max = ssl_version << 16; + break; + case CURL_SSLVERSION_MAX_DEFAULT: + ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2; + break; + } + + for(; i <= (ssl_version_max >> 16) && + protocol_priority_idx < list_size; ++i) { + switch(i) { + case CURL_SSLVERSION_TLSv1_0: + protocol_priority[protocol_priority_idx++] = GNUTLS_TLS1_0; + break; + case CURL_SSLVERSION_TLSv1_1: + protocol_priority[protocol_priority_idx++] = GNUTLS_TLS1_1; + break; + case CURL_SSLVERSION_TLSv1_2: + protocol_priority[protocol_priority_idx++] = GNUTLS_TLS1_2; + break; + case CURL_SSLVERSION_TLSv1_3: + failf(data, "GnuTLS: TLS 1.3 is not yet supported"); + return CURLE_SSL_CONNECT_ERROR; + } + } + return CURLE_OK; +} +#else +#define GNUTLS_CIPHERS "NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509" +/* If GnuTLS was compiled without support for SRP it will error out if SRP is + requested in the priority string, so treat it specially + */ +#define GNUTLS_SRP "+SRP" + +static CURLcode +set_ssl_version_min_max(const char **prioritylist, struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + if(ssl_version == CURL_SSLVERSION_TLSv1_3 || + ssl_version_max == CURL_SSLVERSION_MAX_TLSv1_3) { + failf(data, "GnuTLS: TLS 1.3 is not yet supported"); + return CURLE_SSL_CONNECT_ERROR; + } + if(ssl_version_max == CURL_SSLVERSION_MAX_NONE) { + ssl_version_max = ssl_version << 16; + } + switch(ssl_version | ssl_version_max) { + case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_0: + *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" + "+VERS-TLS1.0:" GNUTLS_SRP; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_1: + *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" + "+VERS-TLS1.0:+VERS-TLS1.1:" GNUTLS_SRP; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_2: + case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_DEFAULT: + *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" + "+VERS-TLS1.0:+VERS-TLS1.1:+VERS-TLS1.2:" GNUTLS_SRP; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_1: + *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" + "+VERS-TLS1.1:" GNUTLS_SRP; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_2: + case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_DEFAULT: + *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" + "+VERS-TLS1.1:+VERS-TLS1.2:" GNUTLS_SRP; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_TLSv1_2: + case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_DEFAULT: + *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" + "+VERS-TLS1.2:" GNUTLS_SRP; + return CURLE_OK; + } + + failf(data, "GnuTLS: cannot set ssl protocol"); + return CURLE_SSL_CONNECT_ERROR; +} +#endif + static CURLcode gtls_connect_step1(struct connectdata *conn, int sockindex) { struct Curl_easy *data = conn->data; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; unsigned int init_flags; gnutls_session_t session; int rc; @@ -406,13 +502,8 @@ gtls_connect_step1(struct connectdata *conn, GNUTLS_CIPHER_3DES_CBC, }; static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 }; - static int protocol_priority[] = { 0, 0, 0, 0 }; + int protocol_priority[] = { 0, 0, 0, 0 }; #else -#define GNUTLS_CIPHERS "NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509" -/* If GnuTLS was compiled without support for SRP it will error out if SRP is - requested in the priority string, so treat it specially - */ -#define GNUTLS_SRP "+SRP" const char *prioritylist; const char *err = NULL; #endif @@ -420,7 +511,7 @@ gtls_connect_step1(struct connectdata *conn, const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; - if(conn->ssl[sockindex].state == ssl_connection_complete) + if(connssl->state == ssl_connection_complete) /* to make us tolerant against being called more than once for the same connection */ return CURLE_OK; @@ -436,7 +527,7 @@ gtls_connect_step1(struct connectdata *conn, sni = FALSE; /* SSLv3 has no SNI */ /* allocate a cred struct */ - rc = gnutls_certificate_allocate_credentials(&conn->ssl[sockindex].cred); + rc = gnutls_certificate_allocate_credentials(&BACKEND->cred); if(rc != GNUTLS_E_SUCCESS) { failf(data, "gnutls_cert_all_cred() failed: %s", gnutls_strerror(rc)); return CURLE_SSL_CONNECT_ERROR; @@ -447,15 +538,14 @@ gtls_connect_step1(struct connectdata *conn, infof(data, "Using TLS-SRP username: %s\n", SSL_SET_OPTION(username)); rc = gnutls_srp_allocate_client_credentials( - &conn->ssl[sockindex].srp_client_cred); + &BACKEND->srp_client_cred); if(rc != GNUTLS_E_SUCCESS) { failf(data, "gnutls_srp_allocate_client_cred() failed: %s", gnutls_strerror(rc)); return CURLE_OUT_OF_MEMORY; } - rc = gnutls_srp_set_client_credentials(conn->ssl[sockindex]. - srp_client_cred, + rc = gnutls_srp_set_client_credentials(BACKEND->srp_client_cred, SSL_SET_OPTION(username), SSL_SET_OPTION(password)); if(rc != GNUTLS_E_SUCCESS) { @@ -468,10 +558,10 @@ gtls_connect_step1(struct connectdata *conn, if(SSL_CONN_CONFIG(CAfile)) { /* set the trusted CA cert bundle file */ - gnutls_certificate_set_verify_flags(conn->ssl[sockindex].cred, + gnutls_certificate_set_verify_flags(BACKEND->cred, GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT); - rc = gnutls_certificate_set_x509_trust_file(conn->ssl[sockindex].cred, + rc = gnutls_certificate_set_x509_trust_file(BACKEND->cred, SSL_CONN_CONFIG(CAfile), GNUTLS_X509_FMT_PEM); if(rc < 0) { @@ -488,7 +578,7 @@ gtls_connect_step1(struct connectdata *conn, #ifdef HAS_CAPATH if(SSL_CONN_CONFIG(CApath)) { /* set the trusted CA cert directory */ - rc = gnutls_certificate_set_x509_trust_dir(conn->ssl[sockindex].cred, + rc = gnutls_certificate_set_x509_trust_dir(BACKEND->cred, SSL_CONN_CONFIG(CApath), GNUTLS_X509_FMT_PEM); if(rc < 0) { @@ -507,13 +597,13 @@ gtls_connect_step1(struct connectdata *conn, /* use system ca certificate store as fallback */ if(SSL_CONN_CONFIG(verifypeer) && !(SSL_CONN_CONFIG(CAfile) || SSL_CONN_CONFIG(CApath))) { - gnutls_certificate_set_x509_system_trust(conn->ssl[sockindex].cred); + gnutls_certificate_set_x509_system_trust(BACKEND->cred); } #endif if(SSL_SET_OPTION(CRLfile)) { /* set the CRL list file */ - rc = gnutls_certificate_set_x509_crl_file(conn->ssl[sockindex].cred, + rc = gnutls_certificate_set_x509_crl_file(BACKEND->cred, SSL_SET_OPTION(CRLfile), GNUTLS_X509_FMT_PEM); if(rc < 0) { @@ -534,14 +624,14 @@ gtls_connect_step1(struct connectdata *conn, init_flags |= GNUTLS_NO_TICKETS; #endif - rc = gnutls_init(&conn->ssl[sockindex].session, init_flags); + rc = gnutls_init(&BACKEND->session, init_flags); if(rc != GNUTLS_E_SUCCESS) { failf(data, "gnutls_init() failed: %d", rc); return CURLE_SSL_CONNECT_ERROR; } /* convenient assign */ - session = conn->ssl[sockindex].session; + session = BACKEND->session; if((0 == Curl_inet_pton(AF_INET, hostname, &addr)) && #ifdef ENABLE_IPV6 @@ -576,7 +666,7 @@ gtls_connect_step1(struct connectdata *conn, return CURLE_SSL_CONNECT_ERROR; } - switch(SSL_CONN_CONFIG(version) { + switch(SSL_CONN_CONFIG(version)) { case CURL_SSLVERSION_SSLv3: protocol_priority[0] = GNUTLS_SSL3; break; @@ -587,17 +677,16 @@ gtls_connect_step1(struct connectdata *conn, protocol_priority[2] = GNUTLS_TLS1_2; break; case CURL_SSLVERSION_TLSv1_0: - protocol_priority[0] = GNUTLS_TLS1_0; - break; case CURL_SSLVERSION_TLSv1_1: - protocol_priority[0] = GNUTLS_TLS1_1; - break; case CURL_SSLVERSION_TLSv1_2: - protocol_priority[0] = GNUTLS_TLS1_2; - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "GnuTLS: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + { + CURLcode result = set_ssl_version_min_max(protocol_priority, + sizeof(protocol_priority)/sizeof(protocol_priority[0]), conn); + if(result != CURLE_OK) + return result; + break; + } case CURL_SSLVERSION_SSLv2: failf(data, "GnuTLS does not support SSLv2"); return CURLE_SSL_CONNECT_ERROR; @@ -625,20 +714,15 @@ gtls_connect_step1(struct connectdata *conn, prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:" GNUTLS_SRP; break; case CURL_SSLVERSION_TLSv1_0: - prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" - "+VERS-TLS1.0:" GNUTLS_SRP; - break; case CURL_SSLVERSION_TLSv1_1: - prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" - "+VERS-TLS1.1:" GNUTLS_SRP; - break; case CURL_SSLVERSION_TLSv1_2: - prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" - "+VERS-TLS1.2:" GNUTLS_SRP; - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "GnuTLS: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + { + CURLcode result = set_ssl_version_min_max(&prioritylist, conn); + if(result != CURLE_OK) + return result; + break; + } case CURL_SSLVERSION_SSLv2: failf(data, "GnuTLS does not support SSLv2"); return CURLE_SSL_CONNECT_ERROR; @@ -677,7 +761,8 @@ gtls_connect_step1(struct connectdata *conn, gnutls_datum_t protocols[2]; #ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { + if(data->set.httpversion >= CURL_HTTP_VERSION_2 && + (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) { protocols[cur].data = (unsigned char *)NGHTTP2_PROTO_VERSION_ID; protocols[cur].size = NGHTTP2_PROTO_VERSION_ID_LEN; cur++; @@ -703,7 +788,7 @@ gtls_connect_step1(struct connectdata *conn, GNUTLS_PKCS_USE_PBES2_AES_128 | GNUTLS_PKCS_USE_PBES2_AES_192 | GNUTLS_PKCS_USE_PBES2_AES_256; rc = gnutls_certificate_set_x509_key_file2( - conn->ssl[sockindex].cred, + BACKEND->cred, SSL_SET_OPTION(cert), SSL_SET_OPTION(key) ? SSL_SET_OPTION(key) : SSL_SET_OPTION(cert), @@ -723,7 +808,7 @@ gtls_connect_step1(struct connectdata *conn, } else { if(gnutls_certificate_set_x509_key_file( - conn->ssl[sockindex].cred, + BACKEND->cred, SSL_SET_OPTION(cert), SSL_SET_OPTION(key) ? SSL_SET_OPTION(key) : SSL_SET_OPTION(cert), @@ -739,7 +824,7 @@ gtls_connect_step1(struct connectdata *conn, /* put the credentials to the current session */ if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP) { rc = gnutls_credentials_set(session, GNUTLS_CRD_SRP, - conn->ssl[sockindex].srp_client_cred); + BACKEND->srp_client_cred); if(rc != GNUTLS_E_SUCCESS) { failf(data, "gnutls_credentials_set() failed: %s", gnutls_strerror(rc)); return CURLE_SSL_CONNECT_ERROR; @@ -749,7 +834,7 @@ gtls_connect_step1(struct connectdata *conn, #endif { rc = gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, - conn->ssl[sockindex].cred); + BACKEND->cred); if(rc != GNUTLS_E_SUCCESS) { failf(data, "gnutls_credentials_set() failed: %s", gnutls_strerror(rc)); return CURLE_SSL_CONNECT_ERROR; @@ -757,13 +842,13 @@ gtls_connect_step1(struct connectdata *conn, } if(conn->proxy_ssl[sockindex].use) { - transport_ptr = conn->proxy_ssl[sockindex].session; + transport_ptr = conn->proxy_ssl[sockindex].backend->session; gnutls_transport_push = Curl_gtls_push_ssl; gnutls_transport_pull = Curl_gtls_pull_ssl; } else { /* file descriptor for the socket */ - transport_ptr = GNUTLS_INT_TO_POINTER_CAST(conn->sock[sockindex]); + transport_ptr = CURLX_INTEGER_TO_POINTER_CAST(conn->sock[sockindex]); gnutls_transport_push = Curl_gtls_push; gnutls_transport_pull = Curl_gtls_pull; } @@ -790,7 +875,7 @@ gtls_connect_step1(struct connectdata *conn, /* This might be a reconnect, so we check for a session ID in the cache to speed up things */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { void *ssl_sessionid; size_t ssl_idsize; @@ -879,18 +964,21 @@ gtls_connect_step3(struct connectdata *conn, gnutls_datum_t issuerp; char certbuf[256] = ""; /* big enough? */ size_t size; - unsigned int algo; - unsigned int bits; time_t certclock; const char *ptr; struct Curl_easy *data = conn->data; - gnutls_session_t session = conn->ssl[sockindex].session; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + gnutls_session_t session = BACKEND->session; int rc; #ifdef HAS_ALPN gnutls_datum_t proto; #endif CURLcode result = CURLE_OK; +#ifndef CURL_DISABLE_VERBOSE_STRINGS + unsigned int algo; + unsigned int bits; gnutls_protocol_t version = gnutls_protocol_get_version(session); +#endif const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; @@ -1111,7 +1199,7 @@ gtls_connect_step3(struct connectdata *conn, SSL_SET_OPTION(issuercert)?SSL_SET_OPTION(issuercert):"none"); } - size=sizeof(certbuf); + size = sizeof(certbuf); rc = gnutls_x509_crt_get_dn_by_oid(x509_cert, GNUTLS_OID_X520_COMMON_NAME, 0, /* the first and only one */ FALSE, @@ -1151,7 +1239,7 @@ gtls_connect_step3(struct connectdata *conn, #endif if(addrlen) { - for(i=0; ; i++) { + for(i = 0; ; i++) { certaddrlen = sizeof(certaddr); ret = gnutls_x509_crt_get_subject_alt_name(x509_cert, i, certaddr, &certaddrlen, NULL); @@ -1259,6 +1347,7 @@ gtls_connect_step3(struct connectdata *conn, */ +#ifndef CURL_DISABLE_VERBOSE_STRINGS /* public key algorithm's parameters */ algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits); infof(data, "\t certificate public key: %s\n", @@ -1283,12 +1372,13 @@ gtls_connect_step3(struct connectdata *conn, gnutls_x509_crt_get_issuer_dn(x509_cert, certbuf, &size); infof(data, "\t issuer: %s\n", certbuf); - gnutls_x509_crt_deinit(x509_cert); - /* compression algorithm (if any) */ ptr = gnutls_compression_get_name(gnutls_compression_get(session)); /* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */ infof(data, "\t compression: %s\n", ptr); +#endif + + gnutls_x509_crt_deinit(x509_cert); #ifdef HAS_ALPN if(conn->bits.tls_enable_alpn) { @@ -1319,7 +1409,7 @@ gtls_connect_step3(struct connectdata *conn, conn->recv[sockindex] = gtls_recv; conn->send[sockindex] = gtls_send; - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { /* we always unconditionally get the session id here, as even if we already got it from the cache and asked to use it in the connection, it might've been rejected and then a new one is in use now and we need to @@ -1382,7 +1472,7 @@ gtls_connect_common(struct connectdata *conn, struct ssl_connect_data *connssl = &conn->ssl[sockindex]; /* Initiate the connection, if not already done */ - if(ssl_connect_1==connssl->connecting_state) { + if(ssl_connect_1 == connssl->connecting_state) { rc = gtls_connect_step1(conn, sockindex); if(rc) return rc; @@ -1394,29 +1484,24 @@ gtls_connect_common(struct connectdata *conn, return rc; /* Finish connecting once the handshake is done */ - if(ssl_connect_1==connssl->connecting_state) { + if(ssl_connect_1 == connssl->connecting_state) { rc = gtls_connect_step3(conn, sockindex); if(rc) return rc; } - *done = ssl_connect_1==connssl->connecting_state; + *done = ssl_connect_1 == connssl->connecting_state; return CURLE_OK; } -CURLcode -Curl_gtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_gtls_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { return gtls_connect_common(conn, sockindex, TRUE, done); } -CURLcode -Curl_gtls_connect(struct connectdata *conn, - int sockindex) - +static CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex) { CURLcode result; bool done = FALSE; @@ -1430,15 +1515,18 @@ Curl_gtls_connect(struct connectdata *conn, return CURLE_OK; } -bool Curl_gtls_data_pending(const struct connectdata *conn, int connindex) +static bool Curl_gtls_data_pending(const struct connectdata *conn, + int connindex) { + const struct ssl_connect_data *connssl = &conn->ssl[connindex]; bool res = FALSE; - if(conn->ssl[connindex].session && - 0 != gnutls_record_check_pending(conn->ssl[connindex].session)) + if(BACKEND->session && + 0 != gnutls_record_check_pending(BACKEND->session)) res = TRUE; - if(conn->proxy_ssl[connindex].session && - 0 != gnutls_record_check_pending(conn->proxy_ssl[connindex].session)) + connssl = &conn->proxy_ssl[connindex]; + if(BACKEND->session && + 0 != gnutls_record_check_pending(BACKEND->session)) res = TRUE; return res; @@ -1450,7 +1538,8 @@ static ssize_t gtls_send(struct connectdata *conn, size_t len, CURLcode *curlcode) { - ssize_t rc = gnutls_record_send(conn->ssl[sockindex].session, mem, len); + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + ssize_t rc = gnutls_record_send(BACKEND->session, mem, len); if(rc < 0) { *curlcode = (rc == GNUTLS_E_AGAIN) @@ -1463,26 +1552,26 @@ static ssize_t gtls_send(struct connectdata *conn, return rc; } -static void close_one(struct ssl_connect_data *ssl) +static void close_one(struct ssl_connect_data *connssl) { - if(ssl->session) { - gnutls_bye(ssl->session, GNUTLS_SHUT_RDWR); - gnutls_deinit(ssl->session); - ssl->session = NULL; + if(BACKEND->session) { + gnutls_bye(BACKEND->session, GNUTLS_SHUT_RDWR); + gnutls_deinit(BACKEND->session); + BACKEND->session = NULL; } - if(ssl->cred) { - gnutls_certificate_free_credentials(ssl->cred); - ssl->cred = NULL; + if(BACKEND->cred) { + gnutls_certificate_free_credentials(BACKEND->cred); + BACKEND->cred = NULL; } #ifdef USE_TLS_SRP - if(ssl->srp_client_cred) { - gnutls_srp_free_client_credentials(ssl->srp_client_cred); - ssl->srp_client_cred = NULL; + if(BACKEND->srp_client_cred) { + gnutls_srp_free_client_credentials(BACKEND->srp_client_cred); + BACKEND->srp_client_cred = NULL; } #endif } -void Curl_gtls_close(struct connectdata *conn, int sockindex) +static void Curl_gtls_close(struct connectdata *conn, int sockindex) { close_one(&conn->ssl[sockindex]); close_one(&conn->proxy_ssl[sockindex]); @@ -1492,8 +1581,9 @@ void Curl_gtls_close(struct connectdata *conn, int sockindex) * This function is called to shut down the SSL layer but keep the * socket open (CCC - Clear Command Channel) */ -int Curl_gtls_shutdown(struct connectdata *conn, int sockindex) +static int Curl_gtls_shutdown(struct connectdata *conn, int sockindex) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; ssize_t result; int retval = 0; struct Curl_easy *data = conn->data; @@ -1506,16 +1596,16 @@ int Curl_gtls_shutdown(struct connectdata *conn, int sockindex) we do not send one. Let's hope other servers do the same... */ if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE) - gnutls_bye(conn->ssl[sockindex].session, GNUTLS_SHUT_WR); + gnutls_bye(BACKEND->session, GNUTLS_SHUT_WR); - if(conn->ssl[sockindex].session) { + if(BACKEND->session) { while(!done) { int what = SOCKET_READABLE(conn->sock[sockindex], SSL_SHUTDOWN_TIMEOUT); if(what > 0) { /* Something to read, let's do it and hope that it is the close notify alert from the server */ - result = gnutls_record_recv(conn->ssl[sockindex].session, + result = gnutls_record_recv(BACKEND->session, buf, sizeof(buf)); switch(result) { case 0: @@ -1546,18 +1636,18 @@ int Curl_gtls_shutdown(struct connectdata *conn, int sockindex) done = 1; } } - gnutls_deinit(conn->ssl[sockindex].session); + gnutls_deinit(BACKEND->session); } - gnutls_certificate_free_credentials(conn->ssl[sockindex].cred); + gnutls_certificate_free_credentials(BACKEND->cred); #ifdef USE_TLS_SRP if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP && SSL_SET_OPTION(username) != NULL) - gnutls_srp_free_client_credentials(conn->ssl[sockindex].srp_client_cred); + gnutls_srp_free_client_credentials(BACKEND->srp_client_cred); #endif - conn->ssl[sockindex].cred = NULL; - conn->ssl[sockindex].session = NULL; + BACKEND->cred = NULL; + BACKEND->session = NULL; return retval; } @@ -1568,9 +1658,10 @@ static ssize_t gtls_recv(struct connectdata *conn, /* connection data */ size_t buffersize, /* max amount to read */ CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[num]; ssize_t ret; - ret = gnutls_record_recv(conn->ssl[num].session, buf, buffersize); + ret = gnutls_record_recv(BACKEND->session, buf, buffersize); if((ret == GNUTLS_E_AGAIN) || (ret == GNUTLS_E_INTERRUPTED)) { *curlcode = CURLE_AGAIN; return -1; @@ -1590,6 +1681,7 @@ static ssize_t gtls_recv(struct connectdata *conn, /* connection data */ if(ret < 0) { failf(conn->data, "GnuTLS recv error (%d): %s", + (int)ret, gnutls_strerror((int)ret)); *curlcode = CURLE_RECV_ERROR; return -1; @@ -1598,12 +1690,12 @@ static ssize_t gtls_recv(struct connectdata *conn, /* connection data */ return ret; } -void Curl_gtls_session_free(void *ptr) +static void Curl_gtls_session_free(void *ptr) { free(ptr); } -size_t Curl_gtls_version(char *buffer, size_t size) +static size_t Curl_gtls_version(char *buffer, size_t size) { return snprintf(buffer, size, "GnuTLS/%s", gnutls_check_version(NULL)); } @@ -1633,9 +1725,8 @@ static int Curl_gtls_seed(struct Curl_easy *data) #endif /* data might be NULL! */ -CURLcode Curl_gtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) +static CURLcode Curl_gtls_random(struct Curl_easy *data, + unsigned char *entropy, size_t length) { #if defined(USE_GNUTLS_NETTLE) int rc; @@ -1650,10 +1741,10 @@ CURLcode Curl_gtls_random(struct Curl_easy *data, return CURLE_OK; } -void Curl_gtls_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len) +static CURLcode Curl_gtls_md5sum(unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *md5sum, /* output */ + size_t md5len) { #if defined(USE_GNUTLS_NETTLE) struct md5_ctx MD5pw; @@ -1667,12 +1758,13 @@ void Curl_gtls_md5sum(unsigned char *tmp, /* input */ memcpy(md5sum, gcry_md_read(MD5pw, 0), md5len); gcry_md_close(MD5pw); #endif + return CURLE_OK; } -void Curl_gtls_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len) +static void Curl_gtls_sha256sum(const unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum, /* output */ + size_t sha256len) { #if defined(USE_GNUTLS_NETTLE) struct sha256_ctx SHA256pw; @@ -1688,7 +1780,7 @@ void Curl_gtls_sha256sum(const unsigned char *tmp, /* input */ #endif } -bool Curl_gtls_cert_status_request(void) +static bool Curl_gtls_cert_status_request(void) { #ifdef HAS_OCSP return TRUE; @@ -1697,4 +1789,44 @@ bool Curl_gtls_cert_status_request(void) #endif } +static void *Curl_gtls_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return BACKEND->session; +} + +const struct Curl_ssl Curl_ssl_gnutls = { + { CURLSSLBACKEND_GNUTLS, "gnutls" }, /* info */ + + 1, /* have_ca_path */ + 1, /* have_certinfo */ + 1, /* have_pinnedpubkey */ + 0, /* have_ssl_ctx */ + 1, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_gtls_init, /* init */ + Curl_gtls_cleanup, /* cleanup */ + Curl_gtls_version, /* version */ + Curl_none_check_cxn, /* check_cxn */ + Curl_gtls_shutdown, /* shutdown */ + Curl_gtls_data_pending, /* data_pending */ + Curl_gtls_random, /* random */ + Curl_gtls_cert_status_request, /* cert_status_request */ + Curl_gtls_connect, /* connect */ + Curl_gtls_connect_nonblocking, /* connect_nonblocking */ + Curl_gtls_get_internals, /* get_internals */ + Curl_gtls_close, /* close_one */ + Curl_none_close_all, /* close_all */ + Curl_gtls_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_gtls_md5sum, /* md5sum */ + Curl_gtls_sha256sum /* sha256sum */ +}; + #endif /* USE_GNUTLS */ diff --git a/lib/vtls/gtls.h b/lib/vtls/gtls.h index 462c048..780fc10 100644 --- a/lib/vtls/gtls.h +++ b/lib/vtls/gtls.h @@ -28,69 +28,7 @@ #include "urldata.h" -int Curl_gtls_init(void); -int Curl_gtls_cleanup(void); -CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_gtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); -bool Curl_gtls_data_pending(const struct connectdata *conn, - int connindex); - - /* close a SSL connection */ -void Curl_gtls_close(struct connectdata *conn, int sockindex); - -void Curl_gtls_session_free(void *ptr); -size_t Curl_gtls_version(char *buffer, size_t size); -int Curl_gtls_shutdown(struct connectdata *conn, int sockindex); -CURLcode Curl_gtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); -void Curl_gtls_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len); -void Curl_gtls_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len); - -bool Curl_gtls_cert_status_request(void); - -/* Support HTTPS-proxy */ -#define HTTPS_PROXY_SUPPORT 1 - -/* Set the API backend definition to GnuTLS */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* this backend supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for GnuTLS */ -#define curlssl_init Curl_gtls_init -#define curlssl_cleanup Curl_gtls_cleanup -#define curlssl_connect Curl_gtls_connect -#define curlssl_connect_nonblocking Curl_gtls_connect_nonblocking -#define curlssl_session_free(x) Curl_gtls_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_gtls_close -#define curlssl_shutdown(x,y) Curl_gtls_shutdown(x,y) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_gtls_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) Curl_gtls_data_pending(x,y) -#define curlssl_random(x,y,z) Curl_gtls_random(x,y,z) -#define curlssl_md5sum(a,b,c,d) Curl_gtls_md5sum(a,b,c,d) -#define curlssl_sha256sum(a,b,c,d) Curl_gtls_sha256sum(a,b,c,d) -#define curlssl_cert_status_request() Curl_gtls_cert_status_request() +extern const struct Curl_ssl Curl_ssl_gnutls; #endif /* USE_GNUTLS */ #endif /* HEADER_CURL_GTLS_H */ diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 07239bf..28251a3 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -61,13 +61,28 @@ #include "curl_memory.h" #include "memdebug.h" +struct ssl_backend_data { + mbedtls_ctr_drbg_context ctr_drbg; + mbedtls_entropy_context entropy; + mbedtls_ssl_context ssl; + int server_fd; + mbedtls_x509_crt cacert; + mbedtls_x509_crt clicert; + mbedtls_x509_crl crl; + mbedtls_pk_context pk; + mbedtls_ssl_config config; + const char *protocols[3]; +}; + +#define BACKEND connssl->backend + /* apply threading? */ #if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) #define THREADING_SUPPORT #endif #if defined(THREADING_SUPPORT) -static mbedtls_entropy_context entropy; +static mbedtls_entropy_context ts_entropy; static int entropy_init_initialized = 0; @@ -131,7 +146,7 @@ static void mbed_debug(void *context, int level, const char *f_name, /* * profile */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr = +static const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr = { /* Hashes from SHA-1 and above */ MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA1) | @@ -157,6 +172,71 @@ const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr = static Curl_recv mbed_recv; static Curl_send mbed_send; +static CURLcode mbedtls_version_from_curl(int *mbedver, long version) +{ + switch(version) { + case CURL_SSLVERSION_TLSv1_0: + *mbedver = MBEDTLS_SSL_MINOR_VERSION_1; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_1: + *mbedver = MBEDTLS_SSL_MINOR_VERSION_2; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_2: + *mbedver = MBEDTLS_SSL_MINOR_VERSION_3; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_3: + break; + } + return CURLE_SSL_CONNECT_ERROR; +} + +static CURLcode +set_ssl_version_min_max(struct connectdata *conn, int sockindex) +{ + struct Curl_easy *data = conn->data; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + int mbedtls_ver_min = MBEDTLS_SSL_MINOR_VERSION_1; + int mbedtls_ver_max = MBEDTLS_SSL_MINOR_VERSION_1; + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + CURLcode result = CURLE_OK; + + switch(ssl_version) { + case CURL_SSLVERSION_DEFAULT: + case CURL_SSLVERSION_TLSv1: + ssl_version = CURL_SSLVERSION_TLSv1_0; + ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2; + break; + } + + switch(ssl_version_max) { + case CURL_SSLVERSION_MAX_NONE: + ssl_version_max = ssl_version << 16; + break; + case CURL_SSLVERSION_MAX_DEFAULT: + ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2; + break; + } + + result = mbedtls_version_from_curl(&mbedtls_ver_min, ssl_version); + if(result) { + failf(data, "unsupported min version passed via CURLOPT_SSLVERSION"); + return result; + } + result = mbedtls_version_from_curl(&mbedtls_ver_max, ssl_version_max >> 16); + if(result) { + failf(data, "unsupported max version passed via CURLOPT_SSLVERSION"); + return result; + } + + mbedtls_ssl_conf_min_version(&BACKEND->config, MBEDTLS_SSL_MAJOR_VERSION_3, + mbedtls_ver_min); + mbedtls_ssl_conf_max_version(&BACKEND->config, MBEDTLS_SSL_MAJOR_VERSION_3, + mbedtls_ver_max); + + return result; +} + static CURLcode mbed_connect_step1(struct connectdata *conn, int sockindex) @@ -173,7 +253,7 @@ mbed_connect_step1(struct connectdata *conn, const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; int ret = -1; char errorbuf[128]; - errorbuf[0]=0; + errorbuf[0] = 0; /* mbedTLS only supports SSLv3 and TLSv1 */ if(SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv2) { @@ -182,11 +262,11 @@ mbed_connect_step1(struct connectdata *conn, } #ifdef THREADING_SUPPORT - entropy_init_mutex(&entropy); - mbedtls_ctr_drbg_init(&connssl->ctr_drbg); + entropy_init_mutex(&ts_entropy); + mbedtls_ctr_drbg_init(&BACKEND->ctr_drbg); - ret = mbedtls_ctr_drbg_seed(&connssl->ctr_drbg, entropy_func_mutex, - &entropy, NULL, 0); + ret = mbedtls_ctr_drbg_seed(&BACKEND->ctr_drbg, entropy_func_mutex, + &ts_entropy, NULL, 0); if(ret) { #ifdef MBEDTLS_ERROR_C mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); @@ -195,11 +275,11 @@ mbed_connect_step1(struct connectdata *conn, -ret, errorbuf); } #else - mbedtls_entropy_init(&connssl->entropy); - mbedtls_ctr_drbg_init(&connssl->ctr_drbg); + mbedtls_entropy_init(&BACKEND->entropy); + mbedtls_ctr_drbg_init(&BACKEND->ctr_drbg); - ret = mbedtls_ctr_drbg_seed(&connssl->ctr_drbg, mbedtls_entropy_func, - &connssl->entropy, NULL, 0); + ret = mbedtls_ctr_drbg_seed(&BACKEND->ctr_drbg, mbedtls_entropy_func, + &BACKEND->entropy, NULL, 0); if(ret) { #ifdef MBEDTLS_ERROR_C mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); @@ -210,10 +290,10 @@ mbed_connect_step1(struct connectdata *conn, #endif /* THREADING_SUPPORT */ /* Load the trusted CA */ - mbedtls_x509_crt_init(&connssl->cacert); + mbedtls_x509_crt_init(&BACKEND->cacert); if(ssl_cafile) { - ret = mbedtls_x509_crt_parse_file(&connssl->cacert, ssl_cafile); + ret = mbedtls_x509_crt_parse_file(&BACKEND->cacert, ssl_cafile); if(ret<0) { #ifdef MBEDTLS_ERROR_C @@ -228,7 +308,7 @@ mbed_connect_step1(struct connectdata *conn, } if(ssl_capath) { - ret = mbedtls_x509_crt_parse_path(&connssl->cacert, ssl_capath); + ret = mbedtls_x509_crt_parse_path(&BACKEND->cacert, ssl_capath); if(ret<0) { #ifdef MBEDTLS_ERROR_C @@ -243,10 +323,10 @@ mbed_connect_step1(struct connectdata *conn, } /* Load the client certificate */ - mbedtls_x509_crt_init(&connssl->clicert); + mbedtls_x509_crt_init(&BACKEND->clicert); if(ssl_cert) { - ret = mbedtls_x509_crt_parse_file(&connssl->clicert, ssl_cert); + ret = mbedtls_x509_crt_parse_file(&BACKEND->clicert, ssl_cert); if(ret) { #ifdef MBEDTLS_ERROR_C @@ -260,12 +340,12 @@ mbed_connect_step1(struct connectdata *conn, } /* Load the client private key */ - mbedtls_pk_init(&connssl->pk); + mbedtls_pk_init(&BACKEND->pk); if(SSL_SET_OPTION(key)) { - ret = mbedtls_pk_parse_keyfile(&connssl->pk, SSL_SET_OPTION(key), + ret = mbedtls_pk_parse_keyfile(&BACKEND->pk, SSL_SET_OPTION(key), SSL_SET_OPTION(key_passwd)); - if(ret == 0 && !mbedtls_pk_can_do(&connssl->pk, MBEDTLS_PK_RSA)) + if(ret == 0 && !mbedtls_pk_can_do(&BACKEND->pk, MBEDTLS_PK_RSA)) ret = MBEDTLS_ERR_PK_TYPE_MISMATCH; if(ret) { @@ -280,10 +360,10 @@ mbed_connect_step1(struct connectdata *conn, } /* Load the CRL */ - mbedtls_x509_crl_init(&connssl->crl); + mbedtls_x509_crl_init(&BACKEND->crl); if(ssl_crlfile) { - ret = mbedtls_x509_crl_parse_file(&connssl->crl, ssl_crlfile); + ret = mbedtls_x509_crl_parse_file(&BACKEND->crl, ssl_crlfile); if(ret) { #ifdef MBEDTLS_ERROR_C @@ -298,14 +378,14 @@ mbed_connect_step1(struct connectdata *conn, infof(data, "mbedTLS: Connecting to %s:%d\n", hostname, port); - mbedtls_ssl_config_init(&connssl->config); + mbedtls_ssl_config_init(&BACKEND->config); - mbedtls_ssl_init(&connssl->ssl); - if(mbedtls_ssl_setup(&connssl->ssl, &connssl->config)) { + mbedtls_ssl_init(&BACKEND->ssl); + if(mbedtls_ssl_setup(&BACKEND->ssl, &BACKEND->config)) { failf(data, "mbedTLS: ssl_init failed"); return CURLE_SSL_CONNECT_ERROR; } - ret = mbedtls_ssl_config_defaults(&connssl->config, + ret = mbedtls_ssl_config_defaults(&BACKEND->config, MBEDTLS_SSL_IS_CLIENT, MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT); @@ -315,76 +395,67 @@ mbed_connect_step1(struct connectdata *conn, } /* new profile with RSA min key len = 1024 ... */ - mbedtls_ssl_conf_cert_profile(&connssl->config, + mbedtls_ssl_conf_cert_profile(&BACKEND->config, &mbedtls_x509_crt_profile_fr); switch(SSL_CONN_CONFIG(version)) { case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_TLSv1: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, + mbedtls_ssl_conf_min_version(&BACKEND->config, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1); infof(data, "mbedTLS: Set min SSL version to TLS 1.0\n"); break; case CURL_SSLVERSION_SSLv3: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, + mbedtls_ssl_conf_min_version(&BACKEND->config, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, + mbedtls_ssl_conf_max_version(&BACKEND->config, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0); infof(data, "mbedTLS: Set SSL version to SSLv3\n"); break; case CURL_SSLVERSION_TLSv1_0: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_1); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_1); - infof(data, "mbedTLS: Set SSL version to TLS 1.0\n"); - break; case CURL_SSLVERSION_TLSv1_1: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_2); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_2); - infof(data, "mbedTLS: Set SSL version to TLS 1.1\n"); - break; case CURL_SSLVERSION_TLSv1_2: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_3); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_3); - infof(data, "mbedTLS: Set SSL version to TLS 1.2\n"); - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "mbedTLS: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + { + CURLcode result = set_ssl_version_min_max(conn, sockindex); + if(result != CURLE_OK) + return result; + break; + } default: failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); return CURLE_SSL_CONNECT_ERROR; } - mbedtls_ssl_conf_authmode(&connssl->config, MBEDTLS_SSL_VERIFY_OPTIONAL); + mbedtls_ssl_conf_authmode(&BACKEND->config, MBEDTLS_SSL_VERIFY_OPTIONAL); - mbedtls_ssl_conf_rng(&connssl->config, mbedtls_ctr_drbg_random, - &connssl->ctr_drbg); - mbedtls_ssl_set_bio(&connssl->ssl, &conn->sock[sockindex], + mbedtls_ssl_conf_rng(&BACKEND->config, mbedtls_ctr_drbg_random, + &BACKEND->ctr_drbg); + mbedtls_ssl_set_bio(&BACKEND->ssl, &conn->sock[sockindex], mbedtls_net_send, mbedtls_net_recv, NULL /* rev_timeout() */); - mbedtls_ssl_conf_ciphersuites(&connssl->config, + mbedtls_ssl_conf_ciphersuites(&BACKEND->config, mbedtls_ssl_list_ciphersuites()); +#if defined(MBEDTLS_SSL_RENEGOTIATION) + mbedtls_ssl_conf_renegotiation(&BACKEND->config, + MBEDTLS_SSL_RENEGOTIATION_ENABLED); +#endif + #if defined(MBEDTLS_SSL_SESSION_TICKETS) - mbedtls_ssl_conf_session_tickets(&connssl->config, + mbedtls_ssl_conf_session_tickets(&BACKEND->config, MBEDTLS_SSL_SESSION_TICKETS_DISABLED); #endif /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { void *old_session = NULL; Curl_ssl_sessionid_lock(conn); if(!Curl_ssl_getsessionid(conn, &old_session, NULL, sockindex)) { - ret = mbedtls_ssl_set_session(&connssl->ssl, old_session); + ret = mbedtls_ssl_set_session(&BACKEND->ssl, old_session); if(ret) { Curl_ssl_sessionid_unlock(conn); failf(data, "mbedtls_ssl_set_session returned -0x%x", -ret); @@ -395,15 +466,15 @@ mbed_connect_step1(struct connectdata *conn, Curl_ssl_sessionid_unlock(conn); } - mbedtls_ssl_conf_ca_chain(&connssl->config, - &connssl->cacert, - &connssl->crl); + mbedtls_ssl_conf_ca_chain(&BACKEND->config, + &BACKEND->cacert, + &BACKEND->crl); if(SSL_SET_OPTION(key)) { - mbedtls_ssl_conf_own_cert(&connssl->config, - &connssl->clicert, &connssl->pk); + mbedtls_ssl_conf_own_cert(&BACKEND->config, + &BACKEND->clicert, &BACKEND->pk); } - if(mbedtls_ssl_set_hostname(&connssl->ssl, hostname)) { + if(mbedtls_ssl_set_hostname(&BACKEND->ssl, hostname)) { /* mbedtls_ssl_set_hostname() sets the name to use in CN/SAN checks *and* the name to set in the SNI extension. So even if curl connects to a host specified as an IP address, this function must be used. */ @@ -413,7 +484,7 @@ mbed_connect_step1(struct connectdata *conn, #ifdef HAS_ALPN if(conn->bits.tls_enable_alpn) { - const char **p = &connssl->protocols[0]; + const char **p = &BACKEND->protocols[0]; #ifdef USE_NGHTTP2 if(data->set.httpversion >= CURL_HTTP_VERSION_2) *p++ = NGHTTP2_PROTO_VERSION_ID; @@ -422,19 +493,19 @@ mbed_connect_step1(struct connectdata *conn, *p = NULL; /* this function doesn't clone the protocols array, which is why we need to keep it around */ - if(mbedtls_ssl_conf_alpn_protocols(&connssl->config, - &connssl->protocols[0])) { + if(mbedtls_ssl_conf_alpn_protocols(&BACKEND->config, + &BACKEND->protocols[0])) { failf(data, "Failed setting ALPN protocols"); return CURLE_SSL_CONNECT_ERROR; } - for(p = &connssl->protocols[0]; *p; ++p) + for(p = &BACKEND->protocols[0]; *p; ++p) infof(data, "ALPN, offering %s\n", *p); } #endif #ifdef MBEDTLS_DEBUG /* In order to make that work in mbedtls MBEDTLS_DEBUG_C must be defined. */ - mbedtls_ssl_conf_dbg(&connssl->config, mbed_debug, data); + mbedtls_ssl_conf_dbg(&BACKEND->config, mbed_debug, data); /* - 0 No debug * - 1 Error * - 2 State change @@ -444,6 +515,16 @@ mbed_connect_step1(struct connectdata *conn, mbedtls_debug_set_threshold(4); #endif + /* give application a chance to interfere with mbedTLS set up. */ + if(data->set.ssl.fsslctx) { + ret = (*data->set.ssl.fsslctx)(data, &BACKEND->config, + data->set.ssl.fsslctxp); + if(ret) { + failf(data, "error signaled by ssl ctx callback"); + return ret; + } + } + connssl->connecting_state = ssl_connect_2; return CURLE_OK; @@ -471,7 +552,7 @@ mbed_connect_step2(struct connectdata *conn, conn->recv[sockindex] = mbed_recv; conn->send[sockindex] = mbed_send; - ret = mbedtls_ssl_handshake(&connssl->ssl); + ret = mbedtls_ssl_handshake(&BACKEND->ssl); if(ret == MBEDTLS_ERR_SSL_WANT_READ) { connssl->connecting_state = ssl_connect_2_reading; @@ -491,10 +572,10 @@ mbed_connect_step2(struct connectdata *conn, } infof(data, "mbedTLS: Handshake complete, cipher is %s\n", - mbedtls_ssl_get_ciphersuite(&conn->ssl[sockindex].ssl) + mbedtls_ssl_get_ciphersuite(&BACKEND->ssl) ); - ret = mbedtls_ssl_get_verify_result(&conn->ssl[sockindex].ssl); + ret = mbedtls_ssl_get_verify_result(&BACKEND->ssl); if(ret && SSL_CONN_CONFIG(verifypeer)) { if(ret & MBEDTLS_X509_BADCERT_EXPIRED) @@ -514,7 +595,7 @@ mbed_connect_step2(struct connectdata *conn, return CURLE_PEER_FAILED_VERIFICATION; } - peercert = mbedtls_ssl_get_peer_cert(&connssl->ssl); + peercert = mbedtls_ssl_get_peer_cert(&BACKEND->ssl); if(peercert && data->set.verbose) { const size_t bufsize = 16384; @@ -584,7 +665,7 @@ mbed_connect_step2(struct connectdata *conn, #ifdef HAS_ALPN if(conn->bits.tls_enable_alpn) { - next_protocol = mbedtls_ssl_get_alpn_protocol(&connssl->ssl); + next_protocol = mbedtls_ssl_get_alpn_protocol(&BACKEND->ssl); if(next_protocol) { infof(data, "ALPN, server accepted to use %s\n", next_protocol); @@ -623,7 +704,7 @@ mbed_connect_step3(struct connectdata *conn, DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { int ret; mbedtls_ssl_session *our_ssl_sessionid; void *old_ssl_sessionid = NULL; @@ -634,8 +715,9 @@ mbed_connect_step3(struct connectdata *conn, mbedtls_ssl_session_init(our_ssl_sessionid); - ret = mbedtls_ssl_get_session(&connssl->ssl, our_ssl_sessionid); + ret = mbedtls_ssl_get_session(&BACKEND->ssl, our_ssl_sessionid); if(ret) { + free(our_ssl_sessionid); failf(data, "mbedtls_ssl_get_session returned -0x%x", -ret); return CURLE_SSL_CONNECT_ERROR; } @@ -663,9 +745,10 @@ static ssize_t mbed_send(struct connectdata *conn, int sockindex, const void *mem, size_t len, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; int ret = -1; - ret = mbedtls_ssl_write(&conn->ssl[sockindex].ssl, + ret = mbedtls_ssl_write(&BACKEND->ssl, (unsigned char *)mem, len); if(ret < 0) { @@ -677,22 +760,23 @@ static ssize_t mbed_send(struct connectdata *conn, int sockindex, return ret; } -void Curl_mbedtls_close_all(struct Curl_easy *data) +static void Curl_mbedtls_close_all(struct Curl_easy *data) { (void)data; } -void Curl_mbedtls_close(struct connectdata *conn, int sockindex) +static void Curl_mbedtls_close(struct connectdata *conn, int sockindex) { - mbedtls_pk_free(&conn->ssl[sockindex].pk); - mbedtls_x509_crt_free(&conn->ssl[sockindex].clicert); - mbedtls_x509_crt_free(&conn->ssl[sockindex].cacert); - mbedtls_x509_crl_free(&conn->ssl[sockindex].crl); - mbedtls_ssl_config_free(&conn->ssl[sockindex].config); - mbedtls_ssl_free(&conn->ssl[sockindex].ssl); - mbedtls_ctr_drbg_free(&conn->ssl[sockindex].ctr_drbg); + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + mbedtls_pk_free(&BACKEND->pk); + mbedtls_x509_crt_free(&BACKEND->clicert); + mbedtls_x509_crt_free(&BACKEND->cacert); + mbedtls_x509_crl_free(&BACKEND->crl); + mbedtls_ssl_config_free(&BACKEND->config); + mbedtls_ssl_free(&BACKEND->ssl); + mbedtls_ctr_drbg_free(&BACKEND->ctr_drbg); #ifndef THREADING_SUPPORT - mbedtls_entropy_free(&conn->ssl[sockindex].entropy); + mbedtls_entropy_free(&BACKEND->entropy); #endif /* THREADING_SUPPORT */ } @@ -700,11 +784,12 @@ static ssize_t mbed_recv(struct connectdata *conn, int num, char *buf, size_t buffersize, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[num]; int ret = -1; ssize_t len = -1; memset(buf, 0, buffersize); - ret = mbedtls_ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, + ret = mbedtls_ssl_read(&BACKEND->ssl, (unsigned char *)buf, buffersize); if(ret <= 0) { @@ -721,21 +806,21 @@ static ssize_t mbed_recv(struct connectdata *conn, int num, return len; } -void Curl_mbedtls_session_free(void *ptr) +static void Curl_mbedtls_session_free(void *ptr) { mbedtls_ssl_session_free(ptr); free(ptr); } -size_t Curl_mbedtls_version(char *buffer, size_t size) +static size_t Curl_mbedtls_version(char *buffer, size_t size) { unsigned int version = mbedtls_version_get_number(); return snprintf(buffer, size, "mbedTLS/%d.%d.%d", version>>24, (version>>16)&0xff, (version>>8)&0xff); } -CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy, - size_t length) +static CURLcode Curl_mbedtls_random(struct Curl_easy *data, + unsigned char *entropy, size_t length) { #if defined(MBEDTLS_CTR_DRBG_C) int ret = -1; @@ -744,7 +829,7 @@ CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy, mbedtls_ctr_drbg_context ctr_drbg; mbedtls_entropy_init(&ctr_entropy); mbedtls_ctr_drbg_init(&ctr_drbg); - errorbuf[0]=0; + errorbuf[0] = 0; ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &ctr_entropy, NULL, 0); @@ -802,7 +887,7 @@ mbed_connect_common(struct connectdata *conn, return CURLE_OK; } - if(ssl_connect_1==connssl->connecting_state) { + if(ssl_connect_1 == connssl->connecting_state) { /* Find out how much more time we're allowed */ timeout_ms = Curl_timeleft(data, NULL, TRUE); @@ -833,9 +918,9 @@ mbed_connect_common(struct connectdata *conn, if(connssl->connecting_state == ssl_connect_2_reading || connssl->connecting_state == ssl_connect_2_writing) { - curl_socket_t writefd = ssl_connect_2_writing== + curl_socket_t writefd = ssl_connect_2_writing == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== + curl_socket_t readfd = ssl_connect_2_reading == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, @@ -875,13 +960,13 @@ mbed_connect_common(struct connectdata *conn, } /* repeat step2 until all transactions are done. */ - if(ssl_connect_3==connssl->connecting_state) { + if(ssl_connect_3 == connssl->connecting_state) { retcode = mbed_connect_step3(conn, sockindex); if(retcode) return retcode; } - if(ssl_connect_done==connssl->connecting_state) { + if(ssl_connect_done == connssl->connecting_state) { connssl->state = ssl_connection_complete; conn->recv[sockindex] = mbed_recv; conn->send[sockindex] = mbed_send; @@ -896,18 +981,14 @@ mbed_connect_common(struct connectdata *conn, return CURLE_OK; } -CURLcode -Curl_mbedtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_mbedtls_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { return mbed_connect_common(conn, sockindex, TRUE, done); } -CURLcode -Curl_mbedtls_connect(struct connectdata *conn, - int sockindex) +static CURLcode Curl_mbedtls_connect(struct connectdata *conn, int sockindex) { CURLcode retcode; bool done = FALSE; @@ -925,19 +1006,70 @@ Curl_mbedtls_connect(struct connectdata *conn, * return 0 error initializing SSL * return 1 SSL initialized successfully */ -int Curl_mbedtls_init(void) +static int Curl_mbedtls_init(void) { return Curl_polarsslthreadlock_thread_setup(); } -void Curl_mbedtls_cleanup(void) +static void Curl_mbedtls_cleanup(void) { (void)Curl_polarsslthreadlock_thread_cleanup(); } -int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex) +static bool Curl_mbedtls_data_pending(const struct connectdata *conn, + int sockindex) +{ + const struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + return mbedtls_ssl_get_bytes_avail(&BACKEND->ssl) != 0; +} + +static void Curl_mbedtls_sha256sum(const unsigned char *input, + size_t inputlen, + unsigned char *sha256sum, + size_t sha256len UNUSED_PARAM) +{ + (void)sha256len; + mbedtls_sha256(input, inputlen, sha256sum, 0); +} + +static void *Curl_mbedtls_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) { - return mbedtls_ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0; + (void)info; + return &BACKEND->ssl; } +const struct Curl_ssl Curl_ssl_mbedtls = { + { CURLSSLBACKEND_MBEDTLS, "mbedtls" }, /* info */ + + 1, /* have_ca_path */ + 0, /* have_certinfo */ + 1, /* have_pinnedpubkey */ + 1, /* have_ssl_ctx */ + 0, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_mbedtls_init, /* init */ + Curl_mbedtls_cleanup, /* cleanup */ + Curl_mbedtls_version, /* version */ + Curl_none_check_cxn, /* check_cxn */ + Curl_none_shutdown, /* shutdown */ + Curl_mbedtls_data_pending, /* data_pending */ + Curl_mbedtls_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_mbedtls_connect, /* connect */ + Curl_mbedtls_connect_nonblocking, /* connect_nonblocking */ + Curl_mbedtls_get_internals, /* get_internals */ + Curl_mbedtls_close, /* close_one */ + Curl_mbedtls_close_all, /* close_all */ + Curl_mbedtls_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_none_md5sum, /* md5sum */ + Curl_mbedtls_sha256sum /* sha256sum */ +}; + #endif /* USE_MBEDTLS */ diff --git a/lib/vtls/mbedtls.h b/lib/vtls/mbedtls.h index 5b0bcf6..4a93860 100644 --- a/lib/vtls/mbedtls.h +++ b/lib/vtls/mbedtls.h @@ -26,54 +26,7 @@ #ifdef USE_MBEDTLS -#include - -/* Called on first use mbedTLS, setup threading if supported */ -int Curl_mbedtls_init(void); -void Curl_mbedtls_cleanup(void); -int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex); - -CURLcode Curl_mbedtls_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_mbedtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -/* tell mbedTLS to close down all open information regarding connections (and - thus session ID caching etc) */ -void Curl_mbedtls_close_all(struct Curl_easy *data); - - /* close a SSL connection */ -void Curl_mbedtls_close(struct connectdata *conn, int sockindex); - -void Curl_mbedtls_session_free(void *ptr); -size_t Curl_mbedtls_version(char *buffer, size_t size); -int Curl_mbedtls_shutdown(struct connectdata *conn, int sockindex); - -CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy, - size_t length); - -/* this backends supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for mbedTLS */ -#define curlssl_init() Curl_mbedtls_init() -#define curlssl_cleanup() Curl_mbedtls_cleanup() -#define curlssl_connect Curl_mbedtls_connect -#define curlssl_connect_nonblocking Curl_mbedtls_connect_nonblocking -#define curlssl_session_free(x) Curl_mbedtls_session_free(x) -#define curlssl_close_all Curl_mbedtls_close_all -#define curlssl_close Curl_mbedtls_close -#define curlssl_shutdown(x,y) 0 -#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL) -#define curlssl_version Curl_mbedtls_version -#define curlssl_check_cxn(x) (x=x, -1) -#define curlssl_data_pending(x,y) Curl_mbedtls_data_pending(x, y) -#define CURL_SSL_BACKEND CURLSSLBACKEND_MBEDTLS -#define curlssl_sha256sum(a,b,c,d) mbedtls_sha256(a,b,c,0) -#define curlssl_random(x,y,z) Curl_mbedtls_random(x, y, z) +extern const struct Curl_ssl Curl_ssl_mbedtls; #endif /* USE_MBEDTLS */ #endif /* HEADER_CURL_MBEDTLS_H */ diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index d5158ac..458f9d8 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -56,7 +56,8 @@ #include #include #include -#include /* for SECKEY_DestroyPublicKey() */ +#include /* for SECKEY_DestroyPublicKey() */ +#include /* for PR_ImportTCPSocket */ #define NSSVERNUM ((NSS_VMAJOR<<16)|(NSS_VMINOR<<8)|NSS_VPATCH) @@ -77,14 +78,30 @@ /* enough to fit the string "PEM Token #[0|1]" */ #define SLOTSIZE 13 -PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd); +struct ssl_backend_data { + PRFileDesc *handle; + char *client_nickname; + struct Curl_easy *data; + struct curl_llist obj_list; + PK11GenericObject *obj_clicert; +}; + +#define BACKEND connssl->backend + static PRLock *nss_initlock = NULL; static PRLock *nss_crllock = NULL; static PRLock *nss_findslot_lock = NULL; -static struct curl_llist *nss_crl_list = NULL; +static PRLock *nss_trustload_lock = NULL; +static struct curl_llist nss_crl_list; static NSSInitContext *nss_context = NULL; static volatile int initialized = 0; +/* type used to wrap pointers as list nodes */ +struct ptr_list_wrap { + void *ptr; + struct curl_llist_element node; +}; + typedef struct { const char *name; int num; @@ -201,7 +218,10 @@ static const cipher_s cipherlist[] = { }; static const char *pem_library = "libnsspem.so"; -static SECMODModule *mod = NULL; +static SECMODModule *pem_module = NULL; + +static const char *trust_library = "libnssckbi.so"; +static SECMODModule *trust_module = NULL; /* NSPR I/O layer we use to detect blocking direction during SSL handshake */ static PRDescIdentity nspr_io_identity = PR_INVALID_IO_LAYER; @@ -261,7 +281,7 @@ static SECStatus set_ciphers(struct Curl_easy *data, PRFileDesc * model, found = PR_FALSE; - for(i=0; iptr = ptr; + Curl_llist_insert_next(list, list->tail, wrap, &wrap->node); + return CURLE_OK; +} + /* Call PK11_CreateGenericObject() with the given obj_class and filename. If * the call succeeds, append the object handle to the list of objects so that * the object can be destroyed in Curl_nss_close(). */ -static CURLcode nss_create_object(struct ssl_connect_data *ssl, +static CURLcode nss_create_object(struct ssl_connect_data *connssl, CK_OBJECT_CLASS obj_class, const char *filename, bool cacert) { @@ -401,26 +433,36 @@ static CURLcode nss_create_object(struct ssl_connect_data *ssl, PK11_SETATTRS(attrs, attr_cnt, CKA_CLASS, &obj_class, sizeof(obj_class)); PK11_SETATTRS(attrs, attr_cnt, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL)); PK11_SETATTRS(attrs, attr_cnt, CKA_LABEL, (unsigned char *)filename, - strlen(filename) + 1); + (CK_ULONG)strlen(filename) + 1); if(CKO_CERTIFICATE == obj_class) { CK_BBOOL *pval = (cacert) ? (&cktrue) : (&ckfalse); PK11_SETATTRS(attrs, attr_cnt, CKA_TRUST, pval, sizeof(*pval)); } - obj = PK11_CreateGenericObject(slot, attrs, attr_cnt, PR_FALSE); + /* PK11_CreateManagedGenericObject() was introduced in NSS 3.34 because + * PK11_DestroyGenericObject() does not release resources allocated by + * PK11_CreateGenericObject() early enough. */ + obj = +#ifdef HAVE_PK11_CREATEMANAGEDGENERICOBJECT + PK11_CreateManagedGenericObject +#else + PK11_CreateGenericObject +#endif + (slot, attrs, attr_cnt, PR_FALSE); + PK11_FreeSlot(slot); if(!obj) return result; - if(!Curl_llist_insert_next(ssl->obj_list, ssl->obj_list->tail, obj)) { + if(insert_wrapped_ptr(&BACKEND->obj_list, obj) != CURLE_OK) { PK11_DestroyGenericObject(obj); return CURLE_OUT_OF_MEMORY; } if(!cacert && CKO_CERTIFICATE == obj_class) /* store reference to a client certificate */ - ssl->obj_clicert = obj; + BACKEND->obj_clicert = obj; return CURLE_OK; } @@ -430,17 +472,21 @@ static CURLcode nss_create_object(struct ssl_connect_data *ssl, * NSS objects in Curl_nss_close() */ static void nss_destroy_object(void *user, void *ptr) { - PK11GenericObject *obj = (PK11GenericObject *)ptr; + struct ptr_list_wrap *wrap = (struct ptr_list_wrap *) ptr; + PK11GenericObject *obj = (PK11GenericObject *) wrap->ptr; (void) user; PK11_DestroyGenericObject(obj); + free(wrap); } /* same as nss_destroy_object() but for CRL items */ static void nss_destroy_crl_item(void *user, void *ptr) { - SECItem *crl_der = (SECItem *)ptr; + struct ptr_list_wrap *wrap = (struct ptr_list_wrap *) ptr; + SECItem *crl_der = (SECItem *) wrap->ptr; (void) user; SECITEM_FreeItem(crl_der, PR_TRUE); + free(wrap); } static CURLcode nss_load_cert(struct ssl_connect_data *ssl, @@ -496,7 +542,7 @@ static CURLcode nss_cache_crl(SECItem *crl_der) PR_Lock(nss_crllock); /* store the CRL item so that we can free it in Curl_nss_cleanup() */ - if(!Curl_llist_insert_next(nss_crl_list, nss_crl_list->tail, crl_der)) { + if(insert_wrapped_ptr(&nss_crl_list, crl_der) != CURLE_OK) { SECITEM_FreeItem(crl_der, PR_TRUE); PR_Unlock(nss_crllock); return CURLE_OUT_OF_MEMORY; @@ -581,7 +627,7 @@ fail: static CURLcode nss_load_key(struct connectdata *conn, int sockindex, char *key_file) { - PK11SlotInfo *slot; + PK11SlotInfo *slot, *tmp; SECStatus status; CURLcode result; struct ssl_connect_data *ssl = conn->ssl; @@ -600,7 +646,9 @@ static CURLcode nss_load_key(struct connectdata *conn, int sockindex, return CURLE_SSL_CERTPROBLEM; /* This will force the token to be seen as re-inserted */ - SECMOD_WaitForAnyTokenEvent(mod, 0, 0); + tmp = SECMOD_WaitForAnyTokenEvent(pem_module, 0, 0); + if(tmp) + PK11_FreeSlot(tmp); PK11_IsPresent(slot); status = PK11_Authenticate(slot, PR_TRUE, SSL_SET_OPTION(key_passwd)); @@ -964,7 +1012,7 @@ static SECStatus check_issuer_cert(PRFileDesc *sock, char *issuer_nickname) { CERTCertificate *cert, *cert_issuer, *issuer; - SECStatus res=SECSuccess; + SECStatus res = SECSuccess; void *proto_win = NULL; cert = SSL_PeerCertificate(sock); @@ -976,7 +1024,7 @@ static SECStatus check_issuer_cert(PRFileDesc *sock, if((!cert_issuer) || (!issuer)) res = SECFailure; else if(SECITEM_CompareItem(&cert_issuer->derCert, - &issuer->derCert)!=SECEqual) + &issuer->derCert) != SECEqual) res = SECFailure; CERT_DestroyCertificate(cert); @@ -989,7 +1037,7 @@ static CURLcode cmp_peer_pubkey(struct ssl_connect_data *connssl, const char *pinnedpubkey) { CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; - struct Curl_easy *data = connssl->data; + struct Curl_easy *data = BACKEND->data; CERTCertificate *cert; if(!pinnedpubkey) @@ -997,7 +1045,7 @@ static CURLcode cmp_peer_pubkey(struct ssl_connect_data *connssl, return CURLE_OK; /* get peer certificate */ - cert = SSL_PeerCertificate(connssl->handle); + cert = SSL_PeerCertificate(BACKEND->handle); if(cert) { /* extract public key from peer certificate */ SECKEYPublicKey *pubkey = CERT_ExtractPublicKey(cert); @@ -1041,11 +1089,11 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, struct SECKEYPrivateKeyStr **pRetKey) { struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg; - struct Curl_easy *data = connssl->data; - const char *nickname = connssl->client_nickname; + struct Curl_easy *data = BACKEND->data; + const char *nickname = BACKEND->client_nickname; static const char pem_slotname[] = "PEM Token #1"; - if(connssl->obj_clicert) { + if(BACKEND->obj_clicert) { /* use the cert/key provided by PEM reader */ SECItem cert_der = { 0, NULL, 0 }; void *proto_win = SSL_RevealPinArg(sock); @@ -1058,7 +1106,7 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, return SECFailure; } - if(PK11_ReadRawAttribute(PK11_TypeGeneric, connssl->obj_clicert, CKA_VALUE, + if(PK11_ReadRawAttribute(PK11_TypeGeneric, BACKEND->obj_clicert, CKA_VALUE, &cert_der) != SECSuccess) { failf(data, "NSS: CKA_VALUE not found in PK11 generic object"); PK11_FreeSlot(slot); @@ -1178,6 +1226,50 @@ static PRStatus nspr_io_close(PRFileDesc *fd) return close_fn(fd); } +/* load a PKCS #11 module */ +static CURLcode nss_load_module(SECMODModule **pmod, const char *library, + const char *name) +{ + char *config_string; + SECMODModule *module = *pmod; + if(module) + /* already loaded */ + return CURLE_OK; + + config_string = aprintf("library=%s name=%s", library, name); + if(!config_string) + return CURLE_OUT_OF_MEMORY; + + module = SECMOD_LoadUserModule(config_string, NULL, PR_FALSE); + free(config_string); + + if(module && module->loaded) { + /* loaded successfully */ + *pmod = module; + return CURLE_OK; + } + + if(module) + SECMOD_DestroyModule(module); + return CURLE_FAILED_INIT; +} + +/* unload a PKCS #11 module */ +static void nss_unload_module(SECMODModule **pmod) +{ + SECMODModule *module = *pmod; + if(!module) + /* not loaded */ + return; + + if(SECMOD_UnloadUserModule(module) != SECSuccess) + /* unload failed */ + return; + + SECMOD_DestroyModule(module); + *pmod = NULL; +} + /* data might be NULL */ static CURLcode nss_init_core(struct Curl_easy *data, const char *cert_dir) { @@ -1227,9 +1319,7 @@ static CURLcode nss_init(struct Curl_easy *data) return CURLE_OK; /* list of all CRL items we need to destroy in Curl_nss_cleanup() */ - nss_crl_list = Curl_llist_alloc(nss_destroy_crl_item); - if(!nss_crl_list) - return CURLE_OUT_OF_MEMORY; + Curl_llist_init(&nss_crl_list, nss_destroy_crl_item); /* First we check if $SSL_DIR points to a valid dir */ cert_dir = getenv("SSL_DIR"); @@ -1281,7 +1371,7 @@ static CURLcode nss_init(struct Curl_easy *data) * @retval 0 error initializing SSL * @retval 1 SSL initialized successfully */ -int Curl_nss_init(void) +static int Curl_nss_init(void) { /* curl_global_init() is not thread-safe so this test is ok */ if(nss_initlock == NULL) { @@ -1289,6 +1379,7 @@ int Curl_nss_init(void) nss_initlock = PR_NewLock(); nss_crllock = PR_NewLock(); nss_findslot_lock = PR_NewLock(); + nss_trustload_lock = PR_NewLock(); } /* We will actually initialize NSS later */ @@ -1315,7 +1406,7 @@ CURLcode Curl_nss_force_init(struct Curl_easy *data) } /* Global cleanup */ -void Curl_nss_cleanup(void) +static void Curl_nss_cleanup(void) { /* This function isn't required to be threadsafe and this is only done * as a safety feature. @@ -1327,23 +1418,21 @@ void Curl_nss_cleanup(void) * the certificates. */ SSL_ClearSessionCache(); - if(mod && SECSuccess == SECMOD_UnloadUserModule(mod)) { - SECMOD_DestroyModule(mod); - mod = NULL; - } + nss_unload_module(&pem_module); + nss_unload_module(&trust_module); NSS_ShutdownContext(nss_context); nss_context = NULL; } /* destroy all CRL items */ - Curl_llist_destroy(nss_crl_list, NULL); - nss_crl_list = NULL; + Curl_llist_destroy(&nss_crl_list, NULL); PR_Unlock(nss_initlock); PR_DestroyLock(nss_initlock); PR_DestroyLock(nss_crllock); PR_DestroyLock(nss_findslot_lock); + PR_DestroyLock(nss_trustload_lock); nss_initlock = NULL; initialized = 0; @@ -1357,14 +1446,14 @@ void Curl_nss_cleanup(void) * 0 means the connection has been closed * -1 means the connection status is unknown */ -int -Curl_nss_check_cxn(struct connectdata *conn) +static int Curl_nss_check_cxn(struct connectdata *conn) { + struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET]; int rc; char buf; rc = - PR_Recv(conn->ssl[FIRSTSOCKET].handle, (void *)&buf, 1, PR_MSG_PEEK, + PR_Recv(BACKEND->handle, (void *)&buf, 1, PR_MSG_PEEK, PR_SecondsToInterval(1)); if(rc > 0) return 1; /* connection still in place */ @@ -1378,49 +1467,49 @@ Curl_nss_check_cxn(struct connectdata *conn) static void nss_close(struct ssl_connect_data *connssl) { /* before the cleanup, check whether we are using a client certificate */ - const bool client_cert = (connssl->client_nickname != NULL) - || (connssl->obj_clicert != NULL); + const bool client_cert = (BACKEND->client_nickname != NULL) + || (BACKEND->obj_clicert != NULL); - free(connssl->client_nickname); - connssl->client_nickname = NULL; + free(BACKEND->client_nickname); + BACKEND->client_nickname = NULL; /* destroy all NSS objects in order to avoid failure of NSS shutdown */ - Curl_llist_destroy(connssl->obj_list, NULL); - connssl->obj_list = NULL; - connssl->obj_clicert = NULL; + Curl_llist_destroy(&BACKEND->obj_list, NULL); + BACKEND->obj_clicert = NULL; - if(connssl->handle) { + if(BACKEND->handle) { if(client_cert) /* A server might require different authentication based on the * particular path being requested by the client. To support this * scenario, we must ensure that a connection will never reuse the * authentication data from a previous connection. */ - SSL_InvalidateSession(connssl->handle); + SSL_InvalidateSession(BACKEND->handle); - PR_Close(connssl->handle); - connssl->handle = NULL; + PR_Close(BACKEND->handle); + BACKEND->handle = NULL; } } /* * This function is called when an SSL connection is closed. */ -void Curl_nss_close(struct connectdata *conn, int sockindex) +static void Curl_nss_close(struct connectdata *conn, int sockindex) { struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct ssl_connect_data *connssl_proxy = &conn->proxy_ssl[sockindex]; - if(connssl->handle || connssl_proxy->handle) { + if(BACKEND->handle || connssl_proxy->backend->handle) { /* NSS closes the socket we previously handed to it, so we must mark it as closed to avoid double close */ fake_sclose(conn->sock[sockindex]); conn->sock[sockindex] = CURL_SOCKET_BAD; } - if(connssl->handle) - /* nss_close(connssl) will transitively close also connssl_proxy->handle - if both are used. Clear it to avoid a double close leading to crash. */ - connssl_proxy->handle = NULL; + if(BACKEND->handle) + /* nss_close(connssl) will transitively close also + connssl_proxy->backend->handle if both are used. Clear it to avoid + a double close leading to crash. */ + connssl_proxy->backend->handle = NULL; nss_close(connssl); nss_close(connssl_proxy); @@ -1466,12 +1555,44 @@ static CURLcode nss_load_ca_certificates(struct connectdata *conn, struct Curl_easy *data = conn->data; const char *cafile = SSL_CONN_CONFIG(CAfile); const char *capath = SSL_CONN_CONFIG(CApath); + bool use_trust_module; + CURLcode result = CURLE_OK; - if(cafile) { - CURLcode result = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE); - if(result) - return result; + /* treat empty string as unset */ + if(cafile && !cafile[0]) + cafile = NULL; + if(capath && !capath[0]) + capath = NULL; + + infof(data, " CAfile: %s\n CApath: %s\n", + cafile ? cafile : "none", + capath ? capath : "none"); + + /* load libnssckbi.so if no other trust roots were specified */ + use_trust_module = !cafile && !capath; + + PR_Lock(nss_trustload_lock); + if(use_trust_module && !trust_module) { + /* libnssckbi.so needed but not yet loaded --> load it! */ + result = nss_load_module(&trust_module, trust_library, "trust"); + infof(data, "%s %s\n", (result) ? "failed to load" : "loaded", + trust_library); + if(result == CURLE_FAILED_INIT) + /* make the error non-fatal if we are not going to verify peer */ + result = CURLE_SSL_CACERT_BADFILE; + } + else if(!use_trust_module && trust_module) { + /* libnssckbi.so not needed but already loaded --> unload it! */ + infof(data, "unloading %s\n", trust_library); + nss_unload_module(&trust_module); } + PR_Unlock(nss_trustload_lock); + + if(cafile) + result = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE); + + if(result) + return result; if(capath) { struct_stat st; @@ -1505,85 +1626,111 @@ static CURLcode nss_load_ca_certificates(struct connectdata *conn, infof(data, "warning: CURLOPT_CAPATH not a directory (%s)\n", capath); } - infof(data, " CAfile: %s\n CApath: %s\n", - cafile ? cafile : "none", - capath ? capath : "none"); - return CURLE_OK; } -static CURLcode nss_init_sslver(SSLVersionRange *sslver, - struct Curl_easy *data, - struct connectdata *conn) +static CURLcode nss_sslver_from_curl(PRUint16 *nssver, long version) { - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_DEFAULT: - /* map CURL_SSLVERSION_DEFAULT to NSS default */ - if(SSL_VersionRangeGetDefault(ssl_variant_stream, sslver) != SECSuccess) - return CURLE_SSL_CONNECT_ERROR; - /* ... but make sure we use at least TLSv1.0 according to libcurl API */ - if(sslver->min < SSL_LIBRARY_VERSION_TLS_1_0) - sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; - return CURLE_OK; - + switch(version) { case CURL_SSLVERSION_TLSv1: - sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; /* TODO: set sslver->max to SSL_LIBRARY_VERSION_TLS_1_3 once stable */ #ifdef SSL_LIBRARY_VERSION_TLS_1_2 - sslver->max = SSL_LIBRARY_VERSION_TLS_1_2; + *nssver = SSL_LIBRARY_VERSION_TLS_1_2; #elif defined SSL_LIBRARY_VERSION_TLS_1_1 - sslver->max = SSL_LIBRARY_VERSION_TLS_1_1; + *nssver = SSL_LIBRARY_VERSION_TLS_1_1; #else - sslver->max = SSL_LIBRARY_VERSION_TLS_1_0; + *nssver = SSL_LIBRARY_VERSION_TLS_1_0; #endif return CURLE_OK; case CURL_SSLVERSION_SSLv2: - sslver->min = SSL_LIBRARY_VERSION_2; - sslver->max = SSL_LIBRARY_VERSION_2; + *nssver = SSL_LIBRARY_VERSION_2; return CURLE_OK; case CURL_SSLVERSION_SSLv3: - sslver->min = SSL_LIBRARY_VERSION_3_0; - sslver->max = SSL_LIBRARY_VERSION_3_0; + *nssver = SSL_LIBRARY_VERSION_3_0; return CURLE_OK; case CURL_SSLVERSION_TLSv1_0: - sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_0; + *nssver = SSL_LIBRARY_VERSION_TLS_1_0; return CURLE_OK; case CURL_SSLVERSION_TLSv1_1: #ifdef SSL_LIBRARY_VERSION_TLS_1_1 - sslver->min = SSL_LIBRARY_VERSION_TLS_1_1; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_1; + *nssver = SSL_LIBRARY_VERSION_TLS_1_1; return CURLE_OK; +#else + return CURLE_SSL_CONNECT_ERROR; #endif - break; case CURL_SSLVERSION_TLSv1_2: #ifdef SSL_LIBRARY_VERSION_TLS_1_2 - sslver->min = SSL_LIBRARY_VERSION_TLS_1_2; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_2; + *nssver = SSL_LIBRARY_VERSION_TLS_1_2; return CURLE_OK; +#else + return CURLE_SSL_CONNECT_ERROR; #endif - break; case CURL_SSLVERSION_TLSv1_3: #ifdef SSL_LIBRARY_VERSION_TLS_1_3 - sslver->min = SSL_LIBRARY_VERSION_TLS_1_3; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_3; + *nssver = SSL_LIBRARY_VERSION_TLS_1_3; return CURLE_OK; +#else + return CURLE_SSL_CONNECT_ERROR; #endif - break; default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); return CURLE_SSL_CONNECT_ERROR; } +} + +static CURLcode nss_init_sslver(SSLVersionRange *sslver, + struct Curl_easy *data, + struct connectdata *conn) +{ + CURLcode result; + const long min = SSL_CONN_CONFIG(version); + const long max = SSL_CONN_CONFIG(version_max); + + /* map CURL_SSLVERSION_DEFAULT to NSS default */ + if(min == CURL_SSLVERSION_DEFAULT || max == CURL_SSLVERSION_MAX_DEFAULT) { + /* map CURL_SSLVERSION_DEFAULT to NSS default */ + if(SSL_VersionRangeGetDefault(ssl_variant_stream, sslver) != SECSuccess) + return CURLE_SSL_CONNECT_ERROR; + /* ... but make sure we use at least TLSv1.0 according to libcurl API */ + if(sslver->min < SSL_LIBRARY_VERSION_TLS_1_0) + sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; + } + + switch(min) { + case CURL_SSLVERSION_DEFAULT: + break; + case CURL_SSLVERSION_TLSv1: + sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; + break; + default: + result = nss_sslver_from_curl(&sslver->min, min); + if(result) { + failf(data, "unsupported min version passed via CURLOPT_SSLVERSION"); + return result; + } + if(max == CURL_SSLVERSION_MAX_NONE) + sslver->max = sslver->min; + } + + switch(max) { + case CURL_SSLVERSION_MAX_NONE: + case CURL_SSLVERSION_MAX_DEFAULT: + break; + default: + result = nss_sslver_from_curl(&sslver->max, max >> 16); + if(result) { + failf(data, "unsupported max version passed via CURLOPT_SSLVERSION"); + return result; + } + } - failf(data, "TLS minor version cannot be set"); - return CURLE_SSL_CONNECT_ERROR; + return CURLE_OK; } static CURLcode nss_fail_connect(struct ssl_connect_data *connssl, @@ -1606,8 +1753,7 @@ static CURLcode nss_fail_connect(struct ssl_connect_data *connssl, } /* cleanup on connection failure */ - Curl_llist_destroy(connssl->obj_list, NULL); - connssl->obj_list = NULL; + Curl_llist_destroy(&BACKEND->obj_list, NULL); return curlerr; } @@ -1621,7 +1767,7 @@ static CURLcode nss_set_blocking(struct ssl_connect_data *connssl, sock_opt.option = PR_SockOpt_Nonblocking; sock_opt.value.non_blocking = !blocking; - if(PR_SetSocketOption(connssl->handle, &sock_opt) != PR_SUCCESS) + if(PR_SetSocketOption(BACKEND->handle, &sock_opt) != PR_SUCCESS) return nss_fail_connect(connssl, data, CURLE_SSL_CONNECT_ERROR); return CURLE_OK; @@ -1645,12 +1791,10 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) SSL_LIBRARY_VERSION_TLS_1_0 /* max */ }; - connssl->data = data; + BACKEND->data = data; /* list of all NSS objects we need to destroy in Curl_nss_close() */ - connssl->obj_list = Curl_llist_alloc(nss_destroy_object); - if(!connssl->obj_list) - return CURLE_OUT_OF_MEMORY; + Curl_llist_init(&BACKEND->obj_list, nss_destroy_object); /* FIXME. NSS doesn't support multiple databases open at the same time. */ PR_Lock(nss_initlock); @@ -1660,29 +1804,17 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) goto error; } - result = CURLE_SSL_CONNECT_ERROR; - - if(!mod) { - char *configstring = aprintf("library=%s name=PEM", pem_library); - if(!configstring) { - PR_Unlock(nss_initlock); - goto error; - } - mod = SECMOD_LoadUserModule(configstring, NULL, PR_FALSE); - free(configstring); - - if(!mod || !mod->loaded) { - if(mod) { - SECMOD_DestroyModule(mod); - mod = NULL; - } - infof(data, "WARNING: failed to load NSS PEM library %s. Using " - "OpenSSL PEM certificates will not work.\n", pem_library); - } - } - PK11_SetPasswordFunc(nss_get_password); + + result = nss_load_module(&pem_module, pem_library, "PEM"); PR_Unlock(nss_initlock); + if(result == CURLE_FAILED_INIT) + infof(data, "WARNING: failed to load NSS PEM library %s. Using " + "OpenSSL PEM certificates will not work.\n", pem_library); + else if(result) + goto error; + + result = CURLE_SSL_CONNECT_ERROR; model = PR_NewTCPSocket(); if(!model) @@ -1697,7 +1829,7 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) goto error; /* do not use SSL cache if disabled or we are not going to verify peer */ - ssl_no_cache = (data->set.general_ssl.sessionid + ssl_no_cache = (SSL_SET_OPTION(primary.sessionid) && SSL_CONN_CONFIG(verifypeer)) ? PR_FALSE : PR_TRUE; if(SSL_OptionSet(model, SSL_NO_CACHE, ssl_no_cache) != SECSuccess) goto error; @@ -1747,9 +1879,12 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) if(SSL_HandshakeCallback(model, HandshakeCallback, conn) != SECSuccess) goto error; - if(SSL_CONN_CONFIG(verifypeer)) { + { const CURLcode rv = nss_load_ca_certificates(conn, sockindex); - if(rv) { + if((rv == CURLE_SSL_CACERT_BADFILE) && !SSL_CONN_CONFIG(verifypeer)) + /* not a fatal error because we are not going to verify the peer */ + infof(data, "warning: CA certificates failed to load\n"); + else if(rv) { result = rv; goto error; } @@ -1768,7 +1903,7 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) char *nickname = dup_nickname(data, SSL_SET_OPTION(cert)); if(nickname) { /* we are not going to use libnsspem.so to read the client cert */ - connssl->obj_clicert = NULL; + BACKEND->obj_clicert = NULL; } else { CURLcode rv = cert_stuff(conn, sockindex, SSL_SET_OPTION(cert), @@ -1781,10 +1916,10 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) } /* store the nickname for SelectClientCert() called during handshake */ - connssl->client_nickname = nickname; + BACKEND->client_nickname = nickname; } else - connssl->client_nickname = NULL; + BACKEND->client_nickname = NULL; if(SSL_GetClientAuthDataHook(model, SelectClientCert, (void *)connssl) != SECSuccess) { @@ -1794,8 +1929,8 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) if(conn->proxy_ssl[sockindex].use) { DEBUGASSERT(ssl_connection_complete == conn->proxy_ssl[sockindex].state); - DEBUGASSERT(conn->proxy_ssl[sockindex].handle != NULL); - nspr_io = conn->proxy_ssl[sockindex].handle; + DEBUGASSERT(conn->proxy_ssl[sockindex].backend->handle != NULL); + nspr_io = conn->proxy_ssl[sockindex].backend->handle; second_layer = TRUE; } else { @@ -1825,8 +1960,8 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) } /* import our model socket onto the current I/O stack */ - connssl->handle = SSL_ImportFD(model, nspr_io); - if(!connssl->handle) { + BACKEND->handle = SSL_ImportFD(model, nspr_io); + if(!BACKEND->handle) { if(!second_layer) PR_Close(nspr_io); goto error; @@ -1837,36 +1972,36 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) /* This is the password associated with the cert that we're using */ if(SSL_SET_OPTION(key_passwd)) { - SSL_SetPKCS11PinArg(connssl->handle, SSL_SET_OPTION(key_passwd)); + SSL_SetPKCS11PinArg(BACKEND->handle, SSL_SET_OPTION(key_passwd)); } #ifdef SSL_ENABLE_OCSP_STAPLING if(SSL_CONN_CONFIG(verifystatus)) { - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_OCSP_STAPLING, PR_TRUE) + if(SSL_OptionSet(BACKEND->handle, SSL_ENABLE_OCSP_STAPLING, PR_TRUE) != SECSuccess) goto error; } #endif #ifdef SSL_ENABLE_NPN - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_NPN, conn->bits.tls_enable_npn + if(SSL_OptionSet(BACKEND->handle, SSL_ENABLE_NPN, conn->bits.tls_enable_npn ? PR_TRUE : PR_FALSE) != SECSuccess) goto error; #endif #ifdef SSL_ENABLE_ALPN - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_ALPN, conn->bits.tls_enable_alpn + if(SSL_OptionSet(BACKEND->handle, SSL_ENABLE_ALPN, conn->bits.tls_enable_alpn ? PR_TRUE : PR_FALSE) != SECSuccess) goto error; #endif #if NSSVERNUM >= 0x030f04 /* 3.15.4 */ if(data->set.ssl.falsestart) { - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_FALSE_START, PR_TRUE) + if(SSL_OptionSet(BACKEND->handle, SSL_ENABLE_FALSE_START, PR_TRUE) != SECSuccess) goto error; - if(SSL_SetCanFalseStartCallback(connssl->handle, CanFalseStartCallback, + if(SSL_SetCanFalseStartCallback(BACKEND->handle, CanFalseStartCallback, conn) != SECSuccess) goto error; } @@ -1878,7 +2013,8 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) unsigned char protocols[128]; #ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { + if(data->set.httpversion >= CURL_HTTP_VERSION_2 && + (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) { protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN; memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID, NGHTTP2_PROTO_VERSION_ID_LEN); @@ -1889,24 +2025,24 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) memcpy(&protocols[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH); cur += ALPN_HTTP_1_1_LENGTH; - if(SSL_SetNextProtoNego(connssl->handle, protocols, cur) != SECSuccess) + if(SSL_SetNextProtoNego(BACKEND->handle, protocols, cur) != SECSuccess) goto error; } #endif /* Force handshake on next I/O */ - if(SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE) + if(SSL_ResetHandshake(BACKEND->handle, /* asServer */ PR_FALSE) != SECSuccess) goto error; /* propagate hostname to the TLS layer */ - if(SSL_SetURL(connssl->handle, SSL_IS_PROXY() ? conn->http_proxy.host.name : + if(SSL_SetURL(BACKEND->handle, SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name) != SECSuccess) goto error; /* prevent NSS from re-using the session for a different hostname */ - if(SSL_SetSockPeerID(connssl->handle, SSL_IS_PROXY() ? + if(SSL_SetSockPeerID(BACKEND->handle, SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name) != SECSuccess) goto error; @@ -1934,8 +2070,8 @@ static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) /* check timeout situation */ - const long time_left = Curl_timeleft(data, NULL, TRUE); - if(time_left < 0L) { + const time_t time_left = Curl_timeleft(data, NULL, TRUE); + if(time_left < 0) { failf(data, "timed out before SSL handshake"); result = CURLE_OPERATION_TIMEDOUT; goto error; @@ -1943,7 +2079,7 @@ static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) /* Force the handshake now */ timeout = PR_MillisecondsToInterval((PRUint32) time_left); - if(SSL_ForceHandshakeWithTimeout(connssl->handle, timeout) != SECSuccess) { + if(SSL_ForceHandshakeWithTimeout(BACKEND->handle, timeout) != SECSuccess) { if(PR_GetError() == PR_WOULD_BLOCK_ERROR) /* blocking direction is updated by nss_update_connecting_state() */ return CURLE_AGAIN; @@ -1954,7 +2090,7 @@ static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) goto error; } - result = display_conn_info(conn, connssl->handle); + result = display_conn_info(conn, BACKEND->handle); if(result) goto error; @@ -1963,7 +2099,7 @@ static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) char *nickname = dup_nickname(data, SSL_SET_OPTION(issuercert)); if(nickname) { /* we support only nicknames in case of issuercert for now */ - ret = check_issuer_cert(connssl->handle, nickname); + ret = check_issuer_cert(BACKEND->handle, nickname); free(nickname); } @@ -2049,13 +2185,13 @@ static CURLcode nss_connect_common(struct connectdata *conn, int sockindex, return CURLE_OK; } -CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) +static CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) { return nss_connect_common(conn, sockindex, /* blocking */ NULL); } -CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn, - int sockindex, bool *done) +static CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { return nss_connect_common(conn, sockindex, done); } @@ -2066,8 +2202,14 @@ static ssize_t nss_send(struct connectdata *conn, /* connection data */ size_t len, /* amount to write */ CURLcode *curlcode) { - ssize_t rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0, - PR_INTERVAL_NO_WAIT); + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + ssize_t rc; + + /* The SelectClientCert() hook uses this for infof() and failf() but the + handle stored in nss_setup_connect() could have already been freed. */ + BACKEND->data = conn->data; + + rc = PR_Send(BACKEND->handle, mem, (int)len, 0, PR_INTERVAL_NO_WAIT); if(rc < 0) { PRInt32 err = PR_GetError(); if(err == PR_WOULD_BLOCK_ERROR) @@ -2091,14 +2233,21 @@ static ssize_t nss_send(struct connectdata *conn, /* connection data */ return rc; /* number of bytes */ } -static ssize_t nss_recv(struct connectdata * conn, /* connection data */ - int num, /* socketindex */ +static ssize_t nss_recv(struct connectdata *conn, /* connection data */ + int sockindex, /* socketindex */ char *buf, /* store read data here */ size_t buffersize, /* max amount to read */ CURLcode *curlcode) { - ssize_t nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0, - PR_INTERVAL_NO_WAIT); + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + ssize_t nread; + + /* The SelectClientCert() hook uses this for infof() and failf() but the + handle stored in nss_setup_connect() could have already been freed. */ + BACKEND->data = conn->data; + + nread = PR_Recv(BACKEND->handle, buf, (int)buffersize, 0, + PR_INTERVAL_NO_WAIT); if(nread < 0) { /* failed SSL read */ PRInt32 err = PR_GetError(); @@ -2124,22 +2273,22 @@ static ssize_t nss_recv(struct connectdata * conn, /* connection data */ return nread; } -size_t Curl_nss_version(char *buffer, size_t size) +static size_t Curl_nss_version(char *buffer, size_t size) { return snprintf(buffer, size, "NSS/%s", NSS_VERSION); } /* data might be NULL */ -int Curl_nss_seed(struct Curl_easy *data) +static int Curl_nss_seed(struct Curl_easy *data) { /* make sure that NSS is initialized */ return !!Curl_nss_force_init(data); } /* data might be NULL */ -CURLcode Curl_nss_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) +static CURLcode Curl_nss_random(struct Curl_easy *data, + unsigned char *entropy, + size_t length) { Curl_nss_seed(data); /* Initiate the seed if not already done */ @@ -2150,10 +2299,10 @@ CURLcode Curl_nss_random(struct Curl_easy *data, return CURLE_OK; } -void Curl_nss_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len) +static CURLcode Curl_nss_md5sum(unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *md5sum, /* output */ + size_t md5len) { PK11Context *MD5pw = PK11_CreateDigestContext(SEC_OID_MD5); unsigned int MD5out; @@ -2161,12 +2310,14 @@ void Curl_nss_md5sum(unsigned char *tmp, /* input */ PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen)); PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len)); PK11_DestroyContext(MD5pw, PR_TRUE); + + return CURLE_OK; } -void Curl_nss_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len) +static void Curl_nss_sha256sum(const unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum, /* output */ + size_t sha256len) { PK11Context *SHA256pw = PK11_CreateDigestContext(SEC_OID_SHA256); unsigned int SHA256out; @@ -2176,7 +2327,7 @@ void Curl_nss_sha256sum(const unsigned char *tmp, /* input */ PK11_DestroyContext(SHA256pw, PR_TRUE); } -bool Curl_nss_cert_status_request(void) +static bool Curl_nss_cert_status_request(void) { #ifdef SSL_ENABLE_OCSP_STAPLING return TRUE; @@ -2185,7 +2336,7 @@ bool Curl_nss_cert_status_request(void) #endif } -bool Curl_nss_false_start(void) +static bool Curl_nss_false_start(void) { #if NSSVERNUM >= 0x030f04 /* 3.15.4 */ return TRUE; @@ -2194,4 +2345,46 @@ bool Curl_nss_false_start(void) #endif } +static void *Curl_nss_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return BACKEND->handle; +} + +const struct Curl_ssl Curl_ssl_nss = { + { CURLSSLBACKEND_NSS, "nss" }, /* info */ + + 1, /* have_ca_path */ + 1, /* have_certinfo */ + 1, /* have_pinnedpubkey */ + 0, /* have_ssl_ctx */ + 1, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_nss_init, /* init */ + Curl_nss_cleanup, /* cleanup */ + Curl_nss_version, /* version */ + Curl_nss_check_cxn, /* check_cxn */ + /* NSS has no shutdown function provided and thus always fail */ + Curl_none_shutdown, /* shutdown */ + Curl_none_data_pending, /* data_pending */ + Curl_nss_random, /* random */ + Curl_nss_cert_status_request, /* cert_status_request */ + Curl_nss_connect, /* connect */ + Curl_nss_connect_nonblocking, /* connect_nonblocking */ + Curl_nss_get_internals, /* get_internals */ + Curl_nss_close, /* close_one */ + Curl_none_close_all, /* close_all */ + /* NSS has its own session ID cache */ + Curl_none_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_nss_false_start, /* false_start */ + Curl_nss_md5sum, /* md5sum */ + Curl_nss_sha256sum /* sha256sum */ +}; + #endif /* USE_NSS */ diff --git a/lib/vtls/nssg.h b/lib/vtls/nssg.h index 8c46929..41e51b0 100644 --- a/lib/vtls/nssg.h +++ b/lib/vtls/nssg.h @@ -30,79 +30,10 @@ #include "urldata.h" -CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); -/* close a SSL connection */ -void Curl_nss_close(struct connectdata *conn, int sockindex); - -int Curl_nss_init(void); -void Curl_nss_cleanup(void); - -size_t Curl_nss_version(char *buffer, size_t size); -int Curl_nss_check_cxn(struct connectdata *cxn); -int Curl_nss_seed(struct Curl_easy *data); - /* initialize NSS library if not already */ CURLcode Curl_nss_force_init(struct Curl_easy *data); -CURLcode Curl_nss_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); - -void Curl_nss_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len); - -void Curl_nss_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len); - -bool Curl_nss_cert_status_request(void); - -bool Curl_nss_false_start(void); - -/* Support HTTPS-proxy */ -#define HTTPS_PROXY_SUPPORT 1 - -/* Set the API backend definition to NSS */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_NSS - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* this backends supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for NSS */ -#define curlssl_init Curl_nss_init -#define curlssl_cleanup Curl_nss_cleanup -#define curlssl_connect Curl_nss_connect -#define curlssl_connect_nonblocking Curl_nss_connect_nonblocking - -/* NSS has its own session ID cache */ -#define curlssl_session_free(x) Curl_nop_stmt -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_nss_close -/* NSS has no shutdown function provided and thus always fail */ -#define curlssl_shutdown(x,y) ((void)x, (void)y, 1) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_nss_version -#define curlssl_check_cxn(x) Curl_nss_check_cxn(x) -#define curlssl_data_pending(x,y) ((void)x, (void)y, 0) -#define curlssl_random(x,y,z) Curl_nss_random(x,y,z) -#define curlssl_md5sum(a,b,c,d) Curl_nss_md5sum(a,b,c,d) -#define curlssl_sha256sum(a,b,c,d) Curl_nss_sha256sum(a,b,c,d) -#define curlssl_cert_status_request() Curl_nss_cert_status_request() -#define curlssl_false_start() Curl_nss_false_start() +extern const struct Curl_ssl Curl_ssl_nss; #endif /* USE_NSS */ #endif /* HEADER_CURL_NSSG_H */ diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index eb625fe..2a6b3cf 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -34,9 +34,7 @@ #ifdef USE_OPENSSL -#ifdef HAVE_LIMITS_H #include -#endif #include "urldata.h" #include "sendf.h" @@ -51,21 +49,24 @@ #include "strcase.h" #include "hostcheck.h" #include "curl_printf.h" - #include +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif #include #include +#ifndef OPENSSL_NO_DSA #include +#endif #include #include #include #include #include #include - -#ifdef HAVE_OPENSSL_PKCS12_H +#include +#include #include -#endif #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_OCSP) #include @@ -109,7 +110,6 @@ #define HAVE_OPAQUE_EVP_PKEY 1 /* since 1.1.0 -pre3 */ #define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */ #define CONST_EXTS const -#define CONST_ASN1_BIT_STRING const #define HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED 1 #else /* For OpenSSL before 1.1.0 */ @@ -117,7 +117,6 @@ #define X509_get0_notBefore(x) X509_get_notBefore(x) #define X509_get0_notAfter(x) X509_get_notAfter(x) #define CONST_EXTS /* nope */ -#define CONST_ASN1_BIT_STRING /* nope */ #ifdef LIBRESSL_VERSION_NUMBER static unsigned long OpenSSL_version_num(void) { @@ -144,6 +143,19 @@ static unsigned long OpenSSL_version_num(void) #define OPENSSL_load_builtin_modules(x) #endif +/* + * Whether SSL_CTX_set_keylog_callback is available. + * OpenSSL: supported since 1.1.1 https://github.com/openssl/openssl/pull/2287 + * BoringSSL: supported since d28f59c27bac (committed 2015-11-19) + * LibreSSL: unsupported in at least 2.5.1 (explicitly check for it since it + * lies and pretends to be OpenSSL 2.0.0). + */ +#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && \ + !defined(LIBRESSL_VERSION_NUMBER)) || \ + defined(OPENSSL_IS_BORINGSSL) +#define HAVE_KEYLOG_CALLBACK +#endif + #if defined(LIBRESSL_VERSION_NUMBER) #define OSSL_PACKAGE "LibreSSL" #elif defined(OPENSSL_IS_BORINGSSL) @@ -152,14 +164,200 @@ static unsigned long OpenSSL_version_num(void) #define OSSL_PACKAGE "OpenSSL" #endif +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) +/* up2date versions of OpenSSL maintain the default reasonably secure without + * breaking compatibility, so it is better not to override the default by curl + */ +#define DEFAULT_CIPHER_SELECTION NULL +#else +/* ... but it is not the case with old versions of OpenSSL */ +#define DEFAULT_CIPHER_SELECTION \ + "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH" +#endif + +#define ENABLE_SSLKEYLOGFILE + +#ifdef ENABLE_SSLKEYLOGFILE +typedef struct ssl_tap_state { + int master_key_length; + unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH]; + unsigned char client_random[SSL3_RANDOM_SIZE]; +} ssl_tap_state_t; +#endif /* ENABLE_SSLKEYLOGFILE */ + +struct ssl_backend_data { + /* these ones requires specific SSL-types */ + SSL_CTX* ctx; + SSL* handle; + X509* server_cert; +#ifdef ENABLE_SSLKEYLOGFILE + /* tap_state holds the last seen master key if we're logging them */ + ssl_tap_state_t tap_state; +#endif +}; + +#define BACKEND connssl->backend + /* * Number of bytes to read from the random number seed file. This must be * a finite value (because some entropy "files" like /dev/urandom have * an infinite length), but must be large enough to provide enough - * entopy to properly seed OpenSSL's PRNG. + * entropy to properly seed OpenSSL's PRNG. */ #define RAND_LOAD_LENGTH 1024 +#ifdef ENABLE_SSLKEYLOGFILE +/* The fp for the open SSLKEYLOGFILE, or NULL if not open */ +static FILE *keylog_file_fp; + +#ifdef HAVE_KEYLOG_CALLBACK +static void ossl_keylog_callback(const SSL *ssl, const char *line) +{ + (void)ssl; + + /* Using fputs here instead of fprintf since libcurl's fprintf replacement + may not be thread-safe. */ + if(keylog_file_fp && line && *line) { + char stackbuf[256]; + char *buf; + size_t linelen = strlen(line); + + if(linelen <= sizeof(stackbuf) - 2) + buf = stackbuf; + else { + buf = malloc(linelen + 2); + if(!buf) + return; + } + strncpy(buf, line, linelen); + buf[linelen] = '\n'; + buf[linelen + 1] = '\0'; + + fputs(buf, keylog_file_fp); + if(buf != stackbuf) + free(buf); + } +} +#else +#define KEYLOG_PREFIX "CLIENT_RANDOM " +#define KEYLOG_PREFIX_LEN (sizeof(KEYLOG_PREFIX) - 1) +/* + * tap_ssl_key is called by libcurl to make the CLIENT_RANDOMs if the OpenSSL + * being used doesn't have native support for doing that. + */ +static void tap_ssl_key(const SSL *ssl, ssl_tap_state_t *state) +{ + const char *hex = "0123456789ABCDEF"; + int pos, i; + char line[KEYLOG_PREFIX_LEN + 2 * SSL3_RANDOM_SIZE + 1 + + 2 * SSL_MAX_MASTER_KEY_LENGTH + 1 + 1]; + const SSL_SESSION *session = SSL_get_session(ssl); + unsigned char client_random[SSL3_RANDOM_SIZE]; + unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH]; + int master_key_length = 0; + + if(!session || !keylog_file_fp) + return; + +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + /* ssl->s3 is not checked in openssl 1.1.0-pre6, but let's assume that + * we have a valid SSL context if we have a non-NULL session. */ + SSL_get_client_random(ssl, client_random, SSL3_RANDOM_SIZE); + master_key_length = (int) + SSL_SESSION_get_master_key(session, master_key, SSL_MAX_MASTER_KEY_LENGTH); +#else + if(ssl->s3 && session->master_key_length > 0) { + master_key_length = session->master_key_length; + memcpy(master_key, session->master_key, session->master_key_length); + memcpy(client_random, ssl->s3->client_random, SSL3_RANDOM_SIZE); + } +#endif + + if(master_key_length <= 0) + return; + + /* Skip writing keys if there is no key or it did not change. */ + if(state->master_key_length == master_key_length && + !memcmp(state->master_key, master_key, master_key_length) && + !memcmp(state->client_random, client_random, SSL3_RANDOM_SIZE)) { + return; + } + + state->master_key_length = master_key_length; + memcpy(state->master_key, master_key, master_key_length); + memcpy(state->client_random, client_random, SSL3_RANDOM_SIZE); + + memcpy(line, KEYLOG_PREFIX, KEYLOG_PREFIX_LEN); + pos = KEYLOG_PREFIX_LEN; + + /* Client Random for SSLv3/TLS */ + for(i = 0; i < SSL3_RANDOM_SIZE; i++) { + line[pos++] = hex[client_random[i] >> 4]; + line[pos++] = hex[client_random[i] & 0xF]; + } + line[pos++] = ' '; + + /* Master Secret (size is at most SSL_MAX_MASTER_KEY_LENGTH) */ + for(i = 0; i < master_key_length; i++) { + line[pos++] = hex[master_key[i] >> 4]; + line[pos++] = hex[master_key[i] & 0xF]; + } + line[pos++] = '\n'; + line[pos] = '\0'; + + /* Using fputs here instead of fprintf since libcurl's fprintf replacement + may not be thread-safe. */ + fputs(line, keylog_file_fp); +} +#endif /* !HAVE_KEYLOG_CALLBACK */ +#endif /* ENABLE_SSLKEYLOGFILE */ + +static const char *SSL_ERROR_to_str(int err) +{ + switch(err) { + case SSL_ERROR_NONE: + return "SSL_ERROR_NONE"; + case SSL_ERROR_SSL: + return "SSL_ERROR_SSL"; + case SSL_ERROR_WANT_READ: + return "SSL_ERROR_WANT_READ"; + case SSL_ERROR_WANT_WRITE: + return "SSL_ERROR_WANT_WRITE"; + case SSL_ERROR_WANT_X509_LOOKUP: + return "SSL_ERROR_WANT_X509_LOOKUP"; + case SSL_ERROR_SYSCALL: + return "SSL_ERROR_SYSCALL"; + case SSL_ERROR_ZERO_RETURN: + return "SSL_ERROR_ZERO_RETURN"; + case SSL_ERROR_WANT_CONNECT: + return "SSL_ERROR_WANT_CONNECT"; + case SSL_ERROR_WANT_ACCEPT: + return "SSL_ERROR_WANT_ACCEPT"; +#if defined(SSL_ERROR_WANT_ASYNC) + case SSL_ERROR_WANT_ASYNC: + return "SSL_ERROR_WANT_ASYNC"; +#endif +#if defined(SSL_ERROR_WANT_ASYNC_JOB) + case SSL_ERROR_WANT_ASYNC_JOB: + return "SSL_ERROR_WANT_ASYNC_JOB"; +#endif +#if defined(SSL_ERROR_WANT_EARLY) + case SSL_ERROR_WANT_EARLY: + return "SSL_ERROR_WANT_EARLY"; +#endif + default: + return "SSL_ERROR unknown"; + } +} + +/* Return error string for last OpenSSL error + */ +static char *ossl_strerror(unsigned long error, char *buf, size_t size) +{ + ERR_error_string_n(error, buf, size); + return buf; +} + static int passwd_callback(char *buf, int num, int encrypting, void *global_passwd) { @@ -168,7 +366,7 @@ static int passwd_callback(char *buf, int num, int encrypting, if(!encrypting) { int klen = curlx_uztosi(strlen((char *)global_passwd)); if(num > klen) { - memcpy(buf, global_passwd, klen+1); + memcpy(buf, global_passwd, klen + 1); return klen; } } @@ -188,8 +386,7 @@ static CURLcode Curl_ossl_seed(struct Curl_easy *data) /* we have the "SSL is seeded" boolean static to prevent multiple time-consuming seedings in vain */ static bool ssl_seeded = FALSE; - char *buf = data->state.buffer; /* point to the big buffer */ - int nread=0; + char fname[256]; if(ssl_seeded) return CURLE_OK; @@ -208,12 +405,12 @@ static CURLcode Curl_ossl_seed(struct Curl_easy *data) #endif { /* let the option override the define */ - nread += RAND_load_file((data->set.str[STRING_SSL_RANDOM_FILE]? - data->set.str[STRING_SSL_RANDOM_FILE]: - RANDOM_FILE), - RAND_LOAD_LENGTH); + RAND_load_file((data->set.str[STRING_SSL_RANDOM_FILE]? + data->set.str[STRING_SSL_RANDOM_FILE]: + RANDOM_FILE), + RAND_LOAD_LENGTH); if(rand_enough()) - return nread; + return CURLE_OK; } #if defined(HAVE_RAND_EGD) @@ -231,35 +428,47 @@ static CURLcode Curl_ossl_seed(struct Curl_easy *data) int ret = RAND_egd(data->set.str[STRING_SSL_EGDSOCKET]? data->set.str[STRING_SSL_EGDSOCKET]:EGD_SOCKET); if(-1 != ret) { - nread += ret; if(rand_enough()) - return nread; + return CURLE_OK; } } #endif - /* If we get here, it means we need to seed the PRNG using a "silly" - approach! */ + /* fallback to a custom seeding of the PRNG using a hash based on a current + time */ do { unsigned char randb[64]; - int len = sizeof(randb); - if(!RAND_bytes(randb, len)) - break; - RAND_add(randb, len, (len >> 1)); + size_t len = sizeof(randb); + size_t i, i_max; + for(i = 0, i_max = len / sizeof(struct curltime); i < i_max; ++i) { + struct curltime tv = Curl_now(); + Curl_wait_ms(1); + tv.tv_sec *= i + 1; + tv.tv_usec *= (unsigned int)i + 2; + tv.tv_sec ^= ((Curl_now().tv_sec + Curl_now().tv_usec) * + (i + 3)) << 8; + tv.tv_usec ^= (unsigned int) ((Curl_now().tv_sec + + Curl_now().tv_usec) * + (i + 4)) << 16; + memcpy(&randb[i * sizeof(struct curltime)], &tv, + sizeof(struct curltime)); + } + RAND_add(randb, (int)len, (double)len/2); } while(!rand_enough()); /* generates a default path for the random seed file */ - buf[0]=0; /* blank it first */ - RAND_file_name(buf, BUFSIZE); - if(buf[0]) { + fname[0] = 0; /* blank it first */ + RAND_file_name(fname, sizeof(fname)); + if(fname[0]) { /* we got a file name to try */ - nread += RAND_load_file(buf, RAND_LOAD_LENGTH); + RAND_load_file(fname, RAND_LOAD_LENGTH); if(rand_enough()) - return nread; + return CURLE_OK; } infof(data, "libcurl is now using a weak random seed!\n"); - return CURLE_SSL_CONNECT_ERROR; /* confusing error code */ + return (rand_enough() ? CURLE_OK : + CURLE_SSL_CONNECT_ERROR /* confusing error code */); } #ifndef SSL_FILETYPE_ENGINE @@ -335,6 +544,8 @@ int cert_stuff(struct connectdata *conn, char *key_passwd) { struct Curl_easy *data = conn->data; + char error_buffer[256]; + bool check_privkey = TRUE; int file_type = do_file_type(cert_type); @@ -360,7 +571,8 @@ int cert_stuff(struct connectdata *conn, "could not load PEM client certificate, " OSSL_PACKAGE " error %s, " "(no key found, wrong pass phrase, or wrong file format?)", - ERR_error_string(ERR_get_error(), NULL) ); + ossl_strerror(ERR_get_error(), error_buffer, + sizeof(error_buffer)) ); return 0; } break; @@ -376,7 +588,8 @@ int cert_stuff(struct connectdata *conn, "could not load ASN1 client certificate, " OSSL_PACKAGE " error %s, " "(no key found, wrong pass phrase, or wrong file format?)", - ERR_error_string(ERR_get_error(), NULL) ); + ossl_strerror(ERR_get_error(), error_buffer, + sizeof(error_buffer)) ); return 0; } break; @@ -405,7 +618,8 @@ int cert_stuff(struct connectdata *conn, 0, ¶ms, NULL, 1)) { failf(data, "ssl engine cannot load client cert with id" " '%s' [%s]", cert_file, - ERR_error_string(ERR_get_error(), NULL)); + ossl_strerror(ERR_get_error(), error_buffer, + sizeof(error_buffer))); return 0; } @@ -435,7 +649,6 @@ int cert_stuff(struct connectdata *conn, case SSL_FILETYPE_PKCS12: { -#ifdef HAVE_OPENSSL_PKCS12_H FILE *f; PKCS12 *p12; EVP_PKEY *pri; @@ -461,7 +674,8 @@ int cert_stuff(struct connectdata *conn, failf(data, "could not parse PKCS12 file, check password, " OSSL_PACKAGE " error %s", - ERR_error_string(ERR_get_error(), NULL) ); + ossl_strerror(ERR_get_error(), error_buffer, + sizeof(error_buffer)) ); PKCS12_free(p12); return 0; } @@ -472,7 +686,8 @@ int cert_stuff(struct connectdata *conn, failf(data, "could not load PKCS12 client certificate, " OSSL_PACKAGE " error %s", - ERR_error_string(ERR_get_error(), NULL) ); + ossl_strerror(ERR_get_error(), error_buffer, + sizeof(error_buffer)) ); goto fail; } @@ -520,10 +735,6 @@ int cert_stuff(struct connectdata *conn, if(!cert_done) return 0; /* failure! */ break; -#else - failf(data, "file type P12 for certificate not supported"); - return 0; -#endif } default: failf(data, "not supported file type '%s' for certificate", cert_type); @@ -538,7 +749,8 @@ int cert_stuff(struct connectdata *conn, break; if(!key_file) /* cert & key can only be in PEM case in the same file */ - key_file=cert_file; + key_file = cert_file; + /* FALLTHROUGH */ case SSL_FILETYPE_ASN1: if(SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type) != 1) { failf(data, "unable to set private key file: '%s' type %s", @@ -600,13 +812,13 @@ int cert_stuff(struct connectdata *conn, return 0; } - ssl=SSL_new(ctx); + ssl = SSL_new(ctx); if(!ssl) { failf(data, "unable to create an SSL structure"); return 0; } - x509=SSL_get_certificate(ssl); + x509 = SSL_get_certificate(ssl); /* This version was provided by Evan Jordan and is supposed to not leak memory as the previous version: */ @@ -616,17 +828,38 @@ int cert_stuff(struct connectdata *conn, EVP_PKEY_free(pktmp); } +#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_IS_BORINGSSL) + { + /* If RSA is used, don't check the private key if its flags indicate + * it doesn't support it. */ + EVP_PKEY *priv_key = SSL_get_privatekey(ssl); + int pktype; +#ifdef HAVE_OPAQUE_EVP_PKEY + pktype = EVP_PKEY_id(priv_key); +#else + pktype = priv_key->type; +#endif + if(pktype == EVP_PKEY_RSA) { + RSA *rsa = EVP_PKEY_get1_RSA(priv_key); + if(RSA_flags(rsa) & RSA_METHOD_FLAG_NO_CHECK) + check_privkey = FALSE; + RSA_free(rsa); /* Decrement reference count */ + } + } +#endif + SSL_free(ssl); /* If we are using DSA, we can copy the parameters from * the private key */ - - /* Now we know that a key and cert have been set against - * the SSL context */ - if(!SSL_CTX_check_private_key(ctx)) { - failf(data, "Private key does not match the certificate public key"); - return 0; + if(check_privkey == TRUE) { + /* Now we know that a key and cert have been set against + * the SSL context */ + if(!SSL_CTX_check_private_key(ctx)) { + failf(data, "Private key does not match the certificate public key"); + return 0; + } } } return 1; @@ -654,7 +887,7 @@ static int x509_name_oneline(X509_NAME *a, char *buf, size_t size) size--; /* don't overwrite the buffer end */ memcpy(buf, biomem->data, size); - buf[size]=0; + buf[size] = 0; BIO_free(bio_out); @@ -662,25 +895,18 @@ static int x509_name_oneline(X509_NAME *a, char *buf, size_t size) #endif } -/* Return error string for last OpenSSL error - */ -static char *ossl_strerror(unsigned long error, char *buf, size_t size) -{ - /* OpenSSL 0.9.6 and later has a function named - ERR_error_string_n() that takes the size of the buffer as a - third argument */ - ERR_error_string_n(error, buf, size); - return buf; -} - /** * Global SSL init * * @retval 0 error initializing SSL * @retval 1 SSL initialized successfully */ -int Curl_ossl_init(void) +static int Curl_ossl_init(void) { +#ifdef ENABLE_SSLKEYLOGFILE + char *keylog_file_name; +#endif + OPENSSL_load_builtin_modules(); #ifdef HAVE_ENGINE_LOAD_BUILTIN_ENGINES @@ -717,11 +943,32 @@ int Curl_ossl_init(void) OpenSSL_add_all_algorithms(); #endif +#ifdef ENABLE_SSLKEYLOGFILE + if(!keylog_file_fp) { + keylog_file_name = curl_getenv("SSLKEYLOGFILE"); + if(keylog_file_name) { + keylog_file_fp = fopen(keylog_file_name, FOPEN_APPENDTEXT); + if(keylog_file_fp) { +#ifdef WIN32 + if(setvbuf(keylog_file_fp, NULL, _IONBF, 0)) +#else + if(setvbuf(keylog_file_fp, NULL, _IOLBF, 4096)) +#endif + { + fclose(keylog_file_fp); + keylog_file_fp = NULL; + } + } + Curl_safefree(keylog_file_name); + } + } +#endif + return 1; } /* Global cleanup */ -void Curl_ossl_cleanup(void) +static void Curl_ossl_cleanup(void) { #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \ !defined(LIBRESSL_VERSION_NUMBER) @@ -753,6 +1000,13 @@ void Curl_ossl_cleanup(void) SSL_COMP_free_compression_methods(); #endif #endif + +#ifdef ENABLE_SSLKEYLOGFILE + if(keylog_file_fp) { + fclose(keylog_file_fp); + keylog_file_fp = NULL; + } +#endif } /* @@ -763,7 +1017,7 @@ void Curl_ossl_cleanup(void) * 0 means the connection has been closed * -1 means the connection status is unknown */ -int Curl_ossl_check_cxn(struct connectdata *conn) +static int Curl_ossl_check_cxn(struct connectdata *conn) { /* SSL_peek takes data out of the raw recv buffer without peeking so we use recv MSG_PEEK instead. Bug #795 */ @@ -774,7 +1028,7 @@ int Curl_ossl_check_cxn(struct connectdata *conn) (RECV_TYPE_ARG3)1, (RECV_TYPE_ARG4)MSG_PEEK); if(nread == 0) return 0; /* connection has been closed */ - else if(nread == 1) + if(nread == 1) return 1; /* connection still in place */ else if(nread == -1) { int err = SOCKERRNO; @@ -809,7 +1063,8 @@ int Curl_ossl_check_cxn(struct connectdata *conn) /* Selects an OpenSSL crypto engine */ -CURLcode Curl_ossl_set_engine(struct Curl_easy *data, const char *engine) +static CURLcode Curl_ossl_set_engine(struct Curl_easy *data, + const char *engine) { #if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H) ENGINE *e; @@ -854,7 +1109,7 @@ CURLcode Curl_ossl_set_engine(struct Curl_easy *data, const char *engine) /* Sets engine as default for all SSL operations */ -CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data) +static CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data) { #ifdef HAVE_OPENSSL_ENGINE_H if(data->state.engine) { @@ -876,7 +1131,7 @@ CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data) /* Return list of OpenSSL crypto engine names. */ -struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data) +static struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data) { struct curl_slist *list = NULL; #if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H) @@ -899,23 +1154,23 @@ struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data) static void ossl_close(struct ssl_connect_data *connssl) { - if(connssl->handle) { - (void)SSL_shutdown(connssl->handle); - SSL_set_connect_state(connssl->handle); + if(BACKEND->handle) { + (void)SSL_shutdown(BACKEND->handle); + SSL_set_connect_state(BACKEND->handle); - SSL_free(connssl->handle); - connssl->handle = NULL; + SSL_free(BACKEND->handle); + BACKEND->handle = NULL; } - if(connssl->ctx) { - SSL_CTX_free(connssl->ctx); - connssl->ctx = NULL; + if(BACKEND->ctx) { + SSL_CTX_free(BACKEND->ctx); + BACKEND->ctx = NULL; } } /* * This function is called when an SSL connection is closed. */ -void Curl_ossl_close(struct connectdata *conn, int sockindex) +static void Curl_ossl_close(struct connectdata *conn, int sockindex) { ossl_close(&conn->ssl[sockindex]); ossl_close(&conn->proxy_ssl[sockindex]); @@ -925,7 +1180,7 @@ void Curl_ossl_close(struct connectdata *conn, int sockindex) * This function is called to shut down the SSL layer but keep the * socket open (CCC - Clear Command Channel) */ -int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) +static int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) { int retval = 0; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; @@ -944,9 +1199,9 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) we do not send one. Let's hope other servers do the same... */ if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE) - (void)SSL_shutdown(connssl->handle); + (void)SSL_shutdown(BACKEND->handle); - if(connssl->handle) { + if(BACKEND->handle) { buffsize = (int)sizeof(buf); while(!done) { int what = SOCKET_READABLE(conn->sock[sockindex], @@ -956,9 +1211,8 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) /* Something to read, let's do it and hope that it is the close notify alert from the server */ - nread = (ssize_t)SSL_read(conn->ssl[sockindex].handle, buf, - buffsize); - err = SSL_get_error(conn->ssl[sockindex].handle, (int)nread); + nread = (ssize_t)SSL_read(BACKEND->handle, buf, buffsize); + err = SSL_get_error(BACKEND->handle, (int)nread); switch(err) { case SSL_ERROR_NONE: /* this is not an error */ @@ -979,8 +1233,10 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) default: /* openssl/ssl.h says "look at error stack/return value/errno" */ sslerror = ERR_get_error(); - failf(conn->data, OSSL_PACKAGE " SSL read: %s, errno %d", - ossl_strerror(sslerror, buf, sizeof(buf)), + failf(conn->data, OSSL_PACKAGE " SSL_read on shutdown: %s, errno %d", + (sslerror ? + ossl_strerror(sslerror, buf, sizeof(buf)) : + SSL_ERROR_to_str(err)), SOCKERRNO); done = 1; break; @@ -1001,7 +1257,7 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) if(data->set.verbose) { #ifdef HAVE_SSL_GET_SHUTDOWN - switch(SSL_get_shutdown(connssl->handle)) { + switch(SSL_get_shutdown(BACKEND->handle)) { case SSL_SENT_SHUTDOWN: infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN\n"); break; @@ -1016,13 +1272,13 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) #endif } - SSL_free(connssl->handle); - connssl->handle = NULL; + SSL_free(BACKEND->handle); + BACKEND->handle = NULL; } return retval; } -void Curl_ossl_session_free(void *ptr) +static void Curl_ossl_session_free(void *ptr) { /* free the ID */ SSL_SESSION_free(ptr); @@ -1032,7 +1288,7 @@ void Curl_ossl_session_free(void *ptr) * This function is called when the 'data' struct is going away. Close * down everything and free all resources! */ -void Curl_ossl_close_all(struct Curl_easy *data) +static void Curl_ossl_close_all(struct Curl_easy *data) { #ifdef HAVE_OPENSSL_ENGINE_H if(data->state.engine) { @@ -1124,7 +1380,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) numalts = sk_GENERAL_NAME_num(altnames); /* loop through all alternatives - until a dnsmatch */ - for(i=0; (i < numalts) && !dnsmatched; i++) { + for(i = 0; (i < numalts) && !dnsmatched; i++) { /* get a handle to alternative name number i */ const GENERAL_NAME *check = sk_GENERAL_NAME_value(altnames, i); @@ -1193,7 +1449,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) else { /* we have to look to the last occurrence of a commonName in the distinguished one to get the most significant one. */ - int j, i=-1; + int j, i = -1; /* The following is done because of a bug in 0.9.6b */ @@ -1202,14 +1458,14 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) X509_NAME *name = X509_get_subject_name(server_cert); if(name) - while((j = X509_NAME_get_index_by_NID(name, NID_commonName, i))>=0) - i=j; + while((j = X509_NAME_get_index_by_NID(name, NID_commonName, i)) >= 0) + i = j; /* we have the name entry and we will now convert this to a string that we can use for comparison. Doing this we support BMPstring, UTF8 etc. */ - if(i>=0) { + if(i >= 0) { ASN1_STRING *tmp = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i)); @@ -1222,7 +1478,7 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) { j = ASN1_STRING_length(tmp); if(j >= 0) { - peer_CN = OPENSSL_malloc(j+1); + peer_CN = OPENSSL_malloc(j + 1); if(peer_CN) { memcpy(peer_CN, ASN1_STRING_get0_data(tmp), j); peer_CN[j] = '\0'; @@ -1245,7 +1501,8 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) peer_CN = NULL; else { /* convert peer_CN from UTF8 */ - CURLcode rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN)); + CURLcode rc = Curl_convert_from_utf8(data, (char *)peer_CN, + strlen((char *)peer_CN)); /* Curl_convert_from_utf8 calls failf if unsuccessful */ if(rc) { OPENSSL_free(peer_CN); @@ -1291,7 +1548,7 @@ static CURLcode verifystatus(struct connectdata *conn, X509_STORE *st = NULL; STACK_OF(X509) *ch = NULL; - long len = SSL_get_tlsext_status_ocsp_resp(connssl->handle, &p); + long len = SSL_get_tlsext_status_ocsp_resp(BACKEND->handle, &p); if(!p) { failf(data, "No OCSP response received"); @@ -1321,11 +1578,12 @@ static CURLcode verifystatus(struct connectdata *conn, goto end; } - ch = SSL_get_peer_cert_chain(connssl->handle); - st = SSL_CTX_get_cert_store(connssl->ctx); + ch = SSL_get_peer_cert_chain(BACKEND->handle); + st = SSL_CTX_get_cert_store(BACKEND->ctx); #if ((OPENSSL_VERSION_NUMBER <= 0x1000201fL) /* Fixed after 1.0.2a */ || \ - defined(LIBRESSL_VERSION_NUMBER)) + (defined(LIBRESSL_VERSION_NUMBER) && \ + LIBRESSL_VERSION_NUMBER <= 0x2040200fL)) /* The authorized responder cert in the OCSP response MUST be signed by the peer cert's issuer (see RFC6960 section 4.2.2.2). If that's a root cert, no problem, but if it's an intermediate cert OpenSSL has a bug where it @@ -1607,7 +1865,7 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type, #ifdef HAS_NPN /* - * in is a list of lenght prefixed strings. this function has to select + * in is a list of length prefixed strings. this function has to select * the protocol we want to use from the list and write its string into out. */ @@ -1691,6 +1949,86 @@ get_ssl_version_txt(SSL *ssl) return "unknown"; } +static CURLcode +set_ssl_version_min_max(long *ctx_options, struct connectdata *conn, + int sockindex) +{ +#if (OPENSSL_VERSION_NUMBER < 0x1000100FL) || !defined(TLS1_3_VERSION) + /* convoluted #if condition just to avoid compiler warnings on unused + variable */ + struct Curl_easy *data = conn->data; +#endif + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + + if(ssl_version_max == CURL_SSLVERSION_MAX_NONE) { + ssl_version_max = ssl_version << 16; + } + + switch(ssl_version) { + case CURL_SSLVERSION_TLSv1_3: +#ifdef TLS1_3_VERSION + { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + SSL_CTX_set_max_proto_version(BACKEND->ctx, TLS1_3_VERSION); + *ctx_options |= SSL_OP_NO_TLSv1_2; + } +#else + (void)sockindex; + failf(data, OSSL_PACKAGE " was built without TLS 1.3 support"); + return CURLE_NOT_BUILT_IN; +#endif + /* FALLTHROUGH */ + case CURL_SSLVERSION_TLSv1_2: +#if OPENSSL_VERSION_NUMBER >= 0x1000100FL + *ctx_options |= SSL_OP_NO_TLSv1_1; +#else + failf(data, OSSL_PACKAGE " was built without TLS 1.2 support"); + return CURLE_NOT_BUILT_IN; +#endif + /* FALLTHROUGH */ + case CURL_SSLVERSION_TLSv1_1: +#if OPENSSL_VERSION_NUMBER >= 0x1000100FL + *ctx_options |= SSL_OP_NO_TLSv1; +#else + failf(data, OSSL_PACKAGE " was built without TLS 1.1 support"); + return CURLE_NOT_BUILT_IN; +#endif + /* FALLTHROUGH */ + case CURL_SSLVERSION_TLSv1_0: + *ctx_options |= SSL_OP_NO_SSLv2; + *ctx_options |= SSL_OP_NO_SSLv3; + break; + } + + switch(ssl_version_max) { + case CURL_SSLVERSION_MAX_TLSv1_0: +#if OPENSSL_VERSION_NUMBER >= 0x1000100FL + *ctx_options |= SSL_OP_NO_TLSv1_1; +#endif + /* FALLTHROUGH */ + case CURL_SSLVERSION_MAX_TLSv1_1: +#if OPENSSL_VERSION_NUMBER >= 0x1000100FL + *ctx_options |= SSL_OP_NO_TLSv1_2; +#endif + /* FALLTHROUGH */ + case CURL_SSLVERSION_MAX_TLSv1_2: + case CURL_SSLVERSION_MAX_DEFAULT: +#ifdef TLS1_3_VERSION + *ctx_options |= SSL_OP_NO_TLSv1_3; +#endif + break; + case CURL_SSLVERSION_MAX_TLSv1_3: +#ifdef TLS1_3_VERSION + break; +#else + failf(data, OSSL_PACKAGE " was built without TLS 1.3 support"); + return CURLE_NOT_BUILT_IN; +#endif + } + return CURLE_OK; +} + static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) { CURLcode result = CURLE_OK; @@ -1700,9 +2038,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) X509_LOOKUP *lookup = NULL; curl_socket_t sockfd = conn->sock[sockindex]; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - long ctx_options; + long ctx_options = 0; #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME bool sni; + const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : + conn->host.name; #ifdef ENABLE_IPV6 struct in6_addr addr; #else @@ -1721,8 +2061,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) const char * const ssl_capath = SSL_CONN_CONFIG(CApath); const bool verifypeer = SSL_CONN_CONFIG(verifypeer); const char * const ssl_crlfile = SSL_SET_OPTION(CRLfile); - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; + char error_buffer[256]; DEBUGASSERT(ssl_connect_1 == connssl->connecting_state); @@ -1782,25 +2121,25 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) return CURLE_SSL_CONNECT_ERROR; } - if(connssl->ctx) - SSL_CTX_free(connssl->ctx); - connssl->ctx = SSL_CTX_new(req_method); + if(BACKEND->ctx) + SSL_CTX_free(BACKEND->ctx); + BACKEND->ctx = SSL_CTX_new(req_method); - if(!connssl->ctx) { + if(!BACKEND->ctx) { failf(data, "SSL: couldn't create a context: %s", - ERR_error_string(ERR_peek_error(), NULL)); + ossl_strerror(ERR_peek_error(), error_buffer, sizeof(error_buffer))); return CURLE_OUT_OF_MEMORY; } #ifdef SSL_MODE_RELEASE_BUFFERS - SSL_CTX_set_mode(connssl->ctx, SSL_MODE_RELEASE_BUFFERS); + SSL_CTX_set_mode(BACKEND->ctx, SSL_MODE_RELEASE_BUFFERS); #endif #ifdef SSL_CTRL_SET_MSG_CALLBACK if(data->set.fdebug && data->set.verbose) { /* the SSL trace callback is only used for verbose logging */ - SSL_CTX_set_msg_callback(connssl->ctx, ssl_tls_trace); - SSL_CTX_set_msg_callback_arg(connssl->ctx, conn); + SSL_CTX_set_msg_callback(BACKEND->ctx, ssl_tls_trace); + SSL_CTX_set_msg_callback_arg(BACKEND->ctx, conn); } #endif @@ -1887,60 +2226,13 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) break; case CURL_SSLVERSION_TLSv1_0: - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_TLSv1_1; - ctx_options |= SSL_OP_NO_TLSv1_2; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif -#endif - break; - case CURL_SSLVERSION_TLSv1_1: -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; - ctx_options |= SSL_OP_NO_TLSv1; - ctx_options |= SSL_OP_NO_TLSv1_2; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif - break; -#else - failf(data, OSSL_PACKAGE " was built without TLS 1.1 support"); - return CURLE_NOT_BUILT_IN; -#endif - case CURL_SSLVERSION_TLSv1_2: -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; - ctx_options |= SSL_OP_NO_TLSv1; - ctx_options |= SSL_OP_NO_TLSv1_1; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif - break; -#else - failf(data, OSSL_PACKAGE " was built without TLS 1.2 support"); - return CURLE_NOT_BUILT_IN; -#endif - case CURL_SSLVERSION_TLSv1_3: -#ifdef TLS1_3_VERSION - SSL_CTX_set_max_proto_version(connssl->ctx, TLS1_3_VERSION); - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; - ctx_options |= SSL_OP_NO_TLSv1; - ctx_options |= SSL_OP_NO_TLSv1_1; - ctx_options |= SSL_OP_NO_TLSv1_2; + result = set_ssl_version_min_max(&ctx_options, conn, sockindex); + if(result != CURLE_OK) + return result; break; -#else - failf(data, OSSL_PACKAGE " was built without TLS 1.3 support"); - return CURLE_NOT_BUILT_IN; -#endif case CURL_SSLVERSION_SSLv2: #ifndef OPENSSL_NO_SSL2 @@ -1964,11 +2256,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) return CURLE_SSL_CONNECT_ERROR; } - SSL_CTX_set_options(connssl->ctx, ctx_options); + SSL_CTX_set_options(BACKEND->ctx, ctx_options); #ifdef HAS_NPN if(conn->bits.tls_enable_npn) - SSL_CTX_set_next_proto_select_cb(connssl->ctx, select_next_proto_cb, conn); + SSL_CTX_set_next_proto_select_cb(BACKEND->ctx, select_next_proto_cb, conn); #endif #ifdef HAS_ALPN @@ -1977,7 +2269,8 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) unsigned char protocols[128]; #ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { + if(data->set.httpversion >= CURL_HTTP_VERSION_2 && + (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) { protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN; memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID, @@ -1995,12 +2288,12 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) /* expects length prefixed preference ordered list of protocols in wire * format */ - SSL_CTX_set_alpn_protos(connssl->ctx, protocols, cur); + SSL_CTX_set_alpn_protos(BACKEND->ctx, protocols, cur); } #endif if(ssl_cert || ssl_cert_type) { - if(!cert_stuff(conn, connssl->ctx, ssl_cert, ssl_cert_type, + if(!cert_stuff(conn, BACKEND->ctx, ssl_cert, ssl_cert_type, SSL_SET_OPTION(key), SSL_SET_OPTION(key_type), SSL_SET_OPTION(key_passwd))) { /* failf() is already done in cert_stuff() */ @@ -2011,11 +2304,13 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) ciphers = SSL_CONN_CONFIG(cipher_list); if(!ciphers) ciphers = (char *)DEFAULT_CIPHER_SELECTION; - if(!SSL_CTX_set_cipher_list(connssl->ctx, ciphers)) { - failf(data, "failed setting cipher list: %s", ciphers); - return CURLE_SSL_CIPHER; + if(ciphers) { + if(!SSL_CTX_set_cipher_list(BACKEND->ctx, ciphers)) { + failf(data, "failed setting cipher list: %s", ciphers); + return CURLE_SSL_CIPHER; + } + infof(data, "Cipher selection: %s\n", ciphers); } - infof(data, "Cipher selection: %s\n", ciphers); #ifdef USE_TLS_SRP if(ssl_authtype == CURL_TLSAUTH_SRP) { @@ -2023,18 +2318,18 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) infof(data, "Using TLS-SRP username: %s\n", ssl_username); - if(!SSL_CTX_set_srp_username(connssl->ctx, ssl_username)) { + if(!SSL_CTX_set_srp_username(BACKEND->ctx, ssl_username)) { failf(data, "Unable to set SRP user name"); return CURLE_BAD_FUNCTION_ARGUMENT; } - if(!SSL_CTX_set_srp_password(connssl->ctx, SSL_SET_OPTION(password))) { + if(!SSL_CTX_set_srp_password(BACKEND->ctx, SSL_SET_OPTION(password))) { failf(data, "failed setting SRP password"); return CURLE_BAD_FUNCTION_ARGUMENT; } if(!SSL_CONN_CONFIG(cipher_list)) { infof(data, "Setting cipher list SRP\n"); - if(!SSL_CTX_set_cipher_list(connssl->ctx, "SRP")) { + if(!SSL_CTX_set_cipher_list(BACKEND->ctx, "SRP")) { failf(data, "failed setting SRP cipher list"); return CURLE_SSL_CIPHER; } @@ -2043,10 +2338,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) #endif if(ssl_cafile || ssl_capath) { - /* tell SSL where to find CA certificates that are used to verify - the servers certificate. */ - if(!SSL_CTX_load_verify_locations(connssl->ctx, ssl_cafile, ssl_capath)) { - if(verifypeer) { + if(verifypeer) { + /* tell SSL where to find CA certificates that are used to verify + the servers certificate. */ + if(!SSL_CTX_load_verify_locations(BACKEND->ctx, + ssl_cafile, ssl_capath)) { /* Fail if we insist on successfully verifying the server. */ failf(data, "error setting certificate verify locations:\n" " CAfile: %s\n CApath: %s", @@ -2055,46 +2351,41 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) return CURLE_SSL_CACERT_BADFILE; } else { - /* Just continue with a warning if no strict certificate verification - is required. */ - infof(data, "error setting certificate verify locations," - " continuing anyway:\n"); + /* Everything is fine. */ + infof(data, "successfully set certificate verify locations:\n" + " CAfile: %s\n CApath: %s\n", + ssl_cafile ? ssl_cafile : "none", + ssl_capath ? ssl_capath : "none"); } } else { - /* Everything is fine. */ - infof(data, "successfully set certificate verify locations:\n"); + infof(data, "ignoring certificate verify locations due to " + "disabled peer verification\n"); } - infof(data, - " CAfile: %s\n" - " CApath: %s\n", - ssl_cafile ? ssl_cafile : "none", - ssl_capath ? ssl_capath : "none"); } #ifdef CURL_CA_FALLBACK else if(verifypeer) { /* verfying the peer without any CA certificates won't work so use openssl's built in default as fallback */ - SSL_CTX_set_default_verify_paths(connssl->ctx); + SSL_CTX_set_default_verify_paths(BACKEND->ctx); } #endif if(ssl_crlfile) { /* tell SSL where to find CRL file that is used to check certificate * revocation */ - lookup=X509_STORE_add_lookup(SSL_CTX_get_cert_store(connssl->ctx), + lookup = X509_STORE_add_lookup(SSL_CTX_get_cert_store(BACKEND->ctx), X509_LOOKUP_file()); if(!lookup || (!X509_load_crl_file(lookup, ssl_crlfile, X509_FILETYPE_PEM)) ) { failf(data, "error loading CRL file: %s", ssl_crlfile); return CURLE_SSL_CRL_BADFILE; } - else { - /* Everything is fine. */ - infof(data, "successfully load CRL file:\n"); - X509_STORE_set_flags(SSL_CTX_get_cert_store(connssl->ctx), - X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL); - } + /* Everything is fine. */ + infof(data, "successfully load CRL file:\n"); + X509_STORE_set_flags(SSL_CTX_get_cert_store(BACKEND->ctx), + X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL); + infof(data, " CRLfile: %s\n", ssl_crlfile); } @@ -2107,7 +2398,7 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) */ #if defined(X509_V_FLAG_TRUSTED_FIRST) && !defined(X509_V_FLAG_NO_ALT_CHAINS) if(verifypeer) { - X509_STORE_set_flags(SSL_CTX_get_cert_store(connssl->ctx), + X509_STORE_set_flags(SSL_CTX_get_cert_store(BACKEND->ctx), X509_V_FLAG_TRUSTED_FIRST); } #endif @@ -2116,12 +2407,19 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) * fail to connect if the verification fails, or if it should continue * anyway. In the latter case the result of the verification is checked with * SSL_get_verify_result() below. */ - SSL_CTX_set_verify(connssl->ctx, + SSL_CTX_set_verify(BACKEND->ctx, verifypeer ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, NULL); + /* Enable logging of secrets to the file specified in env SSLKEYLOGFILE. */ +#if defined(ENABLE_SSLKEYLOGFILE) && defined(HAVE_KEYLOG_CALLBACK) + if(keylog_file_fp) { + SSL_CTX_set_keylog_callback(BACKEND->ctx, ossl_keylog_callback); + } +#endif + /* give application a chance to interfere with SSL set up. */ if(data->set.ssl.fsslctx) { - result = (*data->set.ssl.fsslctx)(data, connssl->ctx, + result = (*data->set.ssl.fsslctx)(data, BACKEND->ctx, data->set.ssl.fsslctxp); if(result) { failf(data, "error signaled by ssl ctx callback"); @@ -2130,10 +2428,10 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) } /* Lets make an SSL structure */ - if(connssl->handle) - SSL_free(connssl->handle); - connssl->handle = SSL_new(connssl->ctx); - if(!connssl->handle) { + if(BACKEND->handle) + SSL_free(BACKEND->handle); + BACKEND->handle = SSL_new(BACKEND->ctx); + if(!BACKEND->handle) { failf(data, "SSL: couldn't create a context (handle)!"); return CURLE_OUT_OF_MEMORY; } @@ -2141,34 +2439,35 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \ !defined(OPENSSL_NO_OCSP) if(SSL_CONN_CONFIG(verifystatus)) - SSL_set_tlsext_status_type(connssl->handle, TLSEXT_STATUSTYPE_ocsp); + SSL_set_tlsext_status_type(BACKEND->handle, TLSEXT_STATUSTYPE_ocsp); #endif - SSL_set_connect_state(connssl->handle); + SSL_set_connect_state(BACKEND->handle); - connssl->server_cert = 0x0; + BACKEND->server_cert = 0x0; #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME if((0 == Curl_inet_pton(AF_INET, hostname, &addr)) && #ifdef ENABLE_IPV6 (0 == Curl_inet_pton(AF_INET6, hostname, &addr)) && #endif sni && - !SSL_set_tlsext_host_name(connssl->handle, hostname)) + !SSL_set_tlsext_host_name(BACKEND->handle, hostname)) infof(data, "WARNING: failed to configure server name indication (SNI) " "TLS extension\n"); #endif /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { void *ssl_sessionid = NULL; Curl_ssl_sessionid_lock(conn); if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) { /* we got a session id, use it! */ - if(!SSL_set_session(connssl->handle, ssl_sessionid)) { + if(!SSL_set_session(BACKEND->handle, ssl_sessionid)) { Curl_ssl_sessionid_unlock(conn); failf(data, "SSL: SSL_set_session failed: %s", - ERR_error_string(ERR_get_error(), NULL)); + ossl_strerror(ERR_get_error(), error_buffer, + sizeof(error_buffer))); return CURLE_SSL_CONNECT_ERROR; } /* Informational message */ @@ -2179,16 +2478,17 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) if(conn->proxy_ssl[sockindex].use) { BIO *const bio = BIO_new(BIO_f_ssl()); + SSL *handle = conn->proxy_ssl[sockindex].backend->handle; DEBUGASSERT(ssl_connection_complete == conn->proxy_ssl[sockindex].state); - DEBUGASSERT(conn->proxy_ssl[sockindex].handle != NULL); + DEBUGASSERT(handle != NULL); DEBUGASSERT(bio != NULL); - BIO_set_ssl(bio, conn->proxy_ssl[sockindex].handle, FALSE); - SSL_set_bio(connssl->handle, bio, bio); + BIO_set_ssl(bio, handle, FALSE); + SSL_set_bio(BACKEND->handle, bio, bio); } - else if(!SSL_set_fd(connssl->handle, (int)sockfd)) { + else if(!SSL_set_fd(BACKEND->handle, (int)sockfd)) { /* pass the raw socket into the SSL layers */ failf(data, "SSL: SSL_set_fd failed: %s", - ERR_error_string(ERR_get_error(), NULL)); + ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer))); return CURLE_SSL_CONNECT_ERROR; } @@ -2210,27 +2510,31 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) ERR_clear_error(); - err = SSL_connect(connssl->handle); + err = SSL_connect(BACKEND->handle); + /* If keylogging is enabled but the keylog callback is not supported then log + secrets here, immediately after SSL_connect by using tap_ssl_key. */ +#if defined(ENABLE_SSLKEYLOGFILE) && !defined(HAVE_KEYLOG_CALLBACK) + tap_ssl_key(BACKEND->handle, &BACKEND->tap_state); +#endif /* 1 is fine 0 is "not successful but was shut down controlled" <0 is "handshake was not successful, because a fatal error occurred" */ if(1 != err) { - int detail = SSL_get_error(connssl->handle, err); + int detail = SSL_get_error(BACKEND->handle, err); if(SSL_ERROR_WANT_READ == detail) { connssl->connecting_state = ssl_connect_2_reading; return CURLE_OK; } - else if(SSL_ERROR_WANT_WRITE == detail) { + if(SSL_ERROR_WANT_WRITE == detail) { connssl->connecting_state = ssl_connect_2_writing; return CURLE_OK; } else { /* untreated error */ unsigned long errdetail; - char error_buffer[256]=""; /* OpenSSL documents that this must be at - least 256 bytes long. */ + char error_buffer[256]=""; CURLcode result; long lerr; int lib; @@ -2251,7 +2555,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) (reason == SSL_R_CERTIFICATE_VERIFY_FAILED)) { result = CURLE_SSL_CACERT; - lerr = SSL_get_verify_result(connssl->handle); + lerr = SSL_get_verify_result(BACKEND->handle); if(lerr != X509_V_OK) { *certverifyresult = lerr; snprintf(error_buffer, sizeof(error_buffer), @@ -2278,8 +2582,8 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; - failf(data, "Unknown SSL protocol error in connection to %s:%ld ", - hostname, port); + failf(data, OSSL_PACKAGE " SSL_connect: %s in connection to %s:%ld ", + SSL_ERROR_to_str(detail), hostname, port); return result; } @@ -2295,8 +2599,8 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) /* Informational message */ infof(data, "SSL connection using %s / %s\n", - get_ssl_version_txt(connssl->handle), - SSL_get_cipher(connssl->handle)); + get_ssl_version_txt(BACKEND->handle), + SSL_get_cipher(BACKEND->handle)); #ifdef HAS_ALPN /* Sets data and len to negotiated protocol, len is 0 if no protocol was @@ -2305,7 +2609,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) if(conn->bits.tls_enable_alpn) { const unsigned char *neg_protocol; unsigned int len; - SSL_get0_alpn_selected(connssl->handle, &neg_protocol, &len); + SSL_get0_alpn_selected(BACKEND->handle, &neg_protocol, &len); if(len != 0) { infof(data, "ALPN, server accepted to use %.*s\n", len, neg_protocol); @@ -2350,7 +2654,7 @@ static int asn1_object_dump(ASN1_OBJECT *a, char *buf, size_t len) do { \ long info_len = BIO_get_mem_data(mem, &ptr); \ Curl_ssl_push_certinfo_len(data, _num, _label, ptr, info_len); \ - if(1!=BIO_reset(mem)) \ + if(1 != BIO_reset(mem)) \ break; \ } WHILE_FALSE @@ -2398,12 +2702,12 @@ static int X509V3_ext(struct Curl_easy *data, /* no extensions, bail out */ return 1; - for(i=0; i < (int)sk_X509_EXTENSION_num(exts); i++) { + for(i = 0; i < (int)sk_X509_EXTENSION_num(exts); i++) { ASN1_OBJECT *obj; X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i); BUF_MEM *biomem; char buf[512]; - char *ptr=buf; + char *ptr = buf; char namebuf[128]; BIO *bio_out = BIO_new(BIO_s_mem()); @@ -2420,16 +2724,16 @@ static int X509V3_ext(struct Curl_easy *data, BIO_get_mem_ptr(bio_out, &biomem); for(j = 0; j < (size_t)biomem->length; j++) { - const char *sep=""; + const char *sep = ""; if(biomem->data[j] == '\n') { - sep=", "; + sep = ", "; j++; /* skip the newline */ }; while((j<(size_t)biomem->length) && (biomem->data[j] == ' ')) j++; if(j<(size_t)biomem->length) - ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%s%c", sep, - biomem->data[j]); + ptr += snprintf(ptr, sizeof(buf)-(ptr-buf), "%s%c", sep, + biomem->data[j]); } Curl_ssl_push_certinfo(data, certnum, namebuf, buf); @@ -2451,7 +2755,7 @@ static CURLcode get_cert_chain(struct connectdata *conn, int numcerts; BIO *mem; - sk = SSL_get_peer_cert_chain(connssl->handle); + sk = SSL_get_peer_cert_chain(BACKEND->handle); if(!sk) { return CURLE_OUT_OF_MEMORY; } @@ -2468,10 +2772,10 @@ static CURLcode get_cert_chain(struct connectdata *conn, for(i = 0; i < numcerts; i++) { ASN1_INTEGER *num; X509 *x = sk_X509_value(sk, i); - EVP_PKEY *pubkey=NULL; + EVP_PKEY *pubkey = NULL; int j; char *ptr; - CONST_ASN1_BIT_STRING ASN1_BIT_STRING *psig = NULL; + const ASN1_BIT_STRING *psig = NULL; X509_NAME_print_ex(mem, X509_get_subject_name(x), 0, XN_FLAG_ONELINE); push_certinfo("Subject", i); @@ -2552,44 +2856,25 @@ static CURLcode get_cert_chain(struct connectdata *conn, { const BIGNUM *n; const BIGNUM *e; - const BIGNUM *d; - const BIGNUM *p; - const BIGNUM *q; - const BIGNUM *dmp1; - const BIGNUM *dmq1; - const BIGNUM *iqmp; - RSA_get0_key(rsa, &n, &e, &d); - RSA_get0_factors(rsa, &p, &q); - RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); + RSA_get0_key(rsa, &n, &e, NULL); BN_print(mem, n); push_certinfo("RSA Public Key", i); print_pubkey_BN(rsa, n, i); print_pubkey_BN(rsa, e, i); - print_pubkey_BN(rsa, d, i); - print_pubkey_BN(rsa, p, i); - print_pubkey_BN(rsa, q, i); - print_pubkey_BN(rsa, dmp1, i); - print_pubkey_BN(rsa, dmq1, i); - print_pubkey_BN(rsa, iqmp, i); } #else BIO_printf(mem, "%d", BN_num_bits(rsa->n)); push_certinfo("RSA Public Key", i); print_pubkey_BN(rsa, n, i); print_pubkey_BN(rsa, e, i); - print_pubkey_BN(rsa, d, i); - print_pubkey_BN(rsa, p, i); - print_pubkey_BN(rsa, q, i); - print_pubkey_BN(rsa, dmp1, i); - print_pubkey_BN(rsa, dmq1, i); - print_pubkey_BN(rsa, iqmp, i); #endif break; } case EVP_PKEY_DSA: { +#ifndef OPENSSL_NO_DSA DSA *dsa; #ifdef HAVE_OPAQUE_EVP_PKEY dsa = EVP_PKEY_get0_DSA(pubkey); @@ -2601,25 +2886,23 @@ static CURLcode get_cert_chain(struct connectdata *conn, const BIGNUM *p; const BIGNUM *q; const BIGNUM *g; - const BIGNUM *priv_key; const BIGNUM *pub_key; DSA_get0_pqg(dsa, &p, &q, &g); - DSA_get0_key(dsa, &pub_key, &priv_key); + DSA_get0_key(dsa, &pub_key, NULL); print_pubkey_BN(dsa, p, i); print_pubkey_BN(dsa, q, i); print_pubkey_BN(dsa, g, i); - print_pubkey_BN(dsa, priv_key, i); print_pubkey_BN(dsa, pub_key, i); } #else print_pubkey_BN(dsa, p, i); print_pubkey_BN(dsa, q, i); print_pubkey_BN(dsa, g, i); - print_pubkey_BN(dsa, priv_key, i); print_pubkey_BN(dsa, pub_key, i); #endif +#endif /* !OPENSSL_NO_DSA */ break; } case EVP_PKEY_DH: @@ -2635,20 +2918,17 @@ static CURLcode get_cert_chain(struct connectdata *conn, const BIGNUM *p; const BIGNUM *q; const BIGNUM *g; - const BIGNUM *priv_key; const BIGNUM *pub_key; DH_get0_pqg(dh, &p, &q, &g); - DH_get0_key(dh, &pub_key, &priv_key); + DH_get0_key(dh, &pub_key, NULL); print_pubkey_BN(dh, p, i); print_pubkey_BN(dh, q, i); print_pubkey_BN(dh, g, i); - print_pubkey_BN(dh, priv_key, i); print_pubkey_BN(dh, pub_key, i); } #else print_pubkey_BN(dh, p, i); print_pubkey_BN(dh, g, i); - print_pubkey_BN(dh, priv_key, i); print_pubkey_BN(dh, pub_key, i); #endif break; @@ -2755,7 +3035,7 @@ static CURLcode servercert(struct connectdata *conn, struct Curl_easy *data = conn->data; X509 *issuer; FILE *fp; - char *buffer = data->state.buffer; + char buffer[2048]; const char *ptr; long * const certverifyresult = SSL_IS_PROXY() ? &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult; @@ -2765,8 +3045,9 @@ static CURLcode servercert(struct connectdata *conn, /* we've been asked to gather certificate info! */ (void)get_cert_chain(conn, connssl); - connssl->server_cert = SSL_get_peer_certificate(connssl->handle); - if(!connssl->server_cert) { + BACKEND->server_cert = SSL_get_peer_certificate(BACKEND->handle); + if(!BACKEND->server_cert) { + BIO_free(mem); if(!strict) return CURLE_OK; @@ -2776,33 +3057,33 @@ static CURLcode servercert(struct connectdata *conn, infof(data, "%s certificate:\n", SSL_IS_PROXY() ? "Proxy" : "Server"); - rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert), - buffer, BUFSIZE); + rc = x509_name_oneline(X509_get_subject_name(BACKEND->server_cert), + buffer, sizeof(buffer)); infof(data, " subject: %s\n", rc?"[NONE]":buffer); - ASN1_TIME_print(mem, X509_get0_notBefore(connssl->server_cert)); + ASN1_TIME_print(mem, X509_get0_notBefore(BACKEND->server_cert)); len = BIO_get_mem_data(mem, (char **) &ptr); infof(data, " start date: %.*s\n", len, ptr); - rc = BIO_reset(mem); + (void)BIO_reset(mem); - ASN1_TIME_print(mem, X509_get0_notAfter(connssl->server_cert)); + ASN1_TIME_print(mem, X509_get0_notAfter(BACKEND->server_cert)); len = BIO_get_mem_data(mem, (char **) &ptr); infof(data, " expire date: %.*s\n", len, ptr); - rc = BIO_reset(mem); + (void)BIO_reset(mem); BIO_free(mem); if(SSL_CONN_CONFIG(verifyhost)) { - result = verifyhost(conn, connssl->server_cert); + result = verifyhost(conn, BACKEND->server_cert); if(result) { - X509_free(connssl->server_cert); - connssl->server_cert = NULL; + X509_free(BACKEND->server_cert); + BACKEND->server_cert = NULL; return result; } } - rc = x509_name_oneline(X509_get_issuer_name(connssl->server_cert), - buffer, BUFSIZE); + rc = x509_name_oneline(X509_get_issuer_name(BACKEND->server_cert), + buffer, sizeof(buffer)); if(rc) { if(strict) failf(data, "SSL: couldn't get X509-issuer name!"); @@ -2821,8 +3102,8 @@ static CURLcode servercert(struct connectdata *conn, if(strict) failf(data, "SSL: Unable to open issuer cert (%s)", SSL_SET_OPTION(issuercert)); - X509_free(connssl->server_cert); - connssl->server_cert = NULL; + X509_free(BACKEND->server_cert); + BACKEND->server_cert = NULL; return CURLE_SSL_ISSUER_ERROR; } @@ -2831,7 +3112,7 @@ static CURLcode servercert(struct connectdata *conn, if(strict) failf(data, "SSL: Unable to read issuer cert (%s)", SSL_SET_OPTION(issuercert)); - X509_free(connssl->server_cert); + X509_free(BACKEND->server_cert); X509_free(issuer); fclose(fp); return CURLE_SSL_ISSUER_ERROR; @@ -2839,13 +3120,13 @@ static CURLcode servercert(struct connectdata *conn, fclose(fp); - if(X509_check_issued(issuer, connssl->server_cert) != X509_V_OK) { + if(X509_check_issued(issuer, BACKEND->server_cert) != X509_V_OK) { if(strict) failf(data, "SSL: Certificate issuer check failed (%s)", SSL_SET_OPTION(issuercert)); - X509_free(connssl->server_cert); + X509_free(BACKEND->server_cert); X509_free(issuer); - connssl->server_cert = NULL; + BACKEND->server_cert = NULL; return CURLE_SSL_ISSUER_ERROR; } @@ -2854,7 +3135,7 @@ static CURLcode servercert(struct connectdata *conn, X509_free(issuer); } - lerr = *certverifyresult = SSL_get_verify_result(connssl->handle); + lerr = *certverifyresult = SSL_get_verify_result(BACKEND->handle); if(*certverifyresult != X509_V_OK) { if(SSL_CONN_CONFIG(verifypeer)) { @@ -2879,8 +3160,8 @@ static CURLcode servercert(struct connectdata *conn, if(SSL_CONN_CONFIG(verifystatus)) { result = verifystatus(conn, connssl); if(result) { - X509_free(connssl->server_cert); - connssl->server_cert = NULL; + X509_free(BACKEND->server_cert); + BACKEND->server_cert = NULL; return result; } } @@ -2893,13 +3174,13 @@ static CURLcode servercert(struct connectdata *conn, ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; if(!result && ptr) { - result = pkp_pin_peer_pubkey(data, connssl->server_cert, ptr); + result = pkp_pin_peer_pubkey(data, BACKEND->server_cert, ptr); if(result) failf(data, "SSL: public key does not match pinned public key!"); } - X509_free(connssl->server_cert); - connssl->server_cert = NULL; + X509_free(BACKEND->server_cert); + BACKEND->server_cert = NULL; connssl->connecting_state = ssl_connect_done; return result; @@ -2913,12 +3194,12 @@ static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex) DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { bool incache; SSL_SESSION *our_ssl_sessionid; void *old_ssl_sessionid = NULL; - our_ssl_sessionid = SSL_get1_session(connssl->handle); + our_ssl_sessionid = SSL_get1_session(BACKEND->handle); /* SSL_get1_session() will increment the reference count and the session will stay in memory until explicitly freed with SSL_SESSION_free(3), @@ -3023,9 +3304,9 @@ static CURLcode ossl_connect_common(struct connectdata *conn, if(connssl->connecting_state == ssl_connect_2_reading || connssl->connecting_state == ssl_connect_2_writing) { - curl_socket_t writefd = ssl_connect_2_writing== + curl_socket_t writefd = ssl_connect_2_writing == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== + curl_socket_t readfd = ssl_connect_2_reading == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, @@ -3035,16 +3316,14 @@ static CURLcode ossl_connect_common(struct connectdata *conn, failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); return CURLE_SSL_CONNECT_ERROR; } - else if(0 == what) { + if(0 == what) { if(nonblocking) { *done = FALSE; return CURLE_OK; } - else { - /* timeout */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } + /* timeout */ + failf(data, "SSL connection timeout"); + return CURLE_OPERATION_TIMEDOUT; } /* socket is readable or writable */ } @@ -3085,14 +3364,14 @@ static CURLcode ossl_connect_common(struct connectdata *conn, return CURLE_OK; } -CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn, + int sockindex, + bool *done) { return ossl_connect_common(conn, sockindex, TRUE, done); } -CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex) +static CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex) { CURLcode result; bool done = FALSE; @@ -3106,18 +3385,23 @@ CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex) return CURLE_OK; } -bool Curl_ossl_data_pending(const struct connectdata *conn, int connindex) +static bool Curl_ossl_data_pending(const struct connectdata *conn, + int connindex) { - if(conn->ssl[connindex].handle) - /* SSL is in use */ - return (0 != SSL_pending(conn->ssl[connindex].handle) || - (conn->proxy_ssl[connindex].handle && - 0 != SSL_pending(conn->proxy_ssl[connindex].handle))) ? - TRUE : FALSE; - else - return FALSE; + const struct ssl_connect_data *connssl = &conn->ssl[connindex]; + const struct ssl_connect_data *proxyssl = &conn->proxy_ssl[connindex]; + + if(connssl->backend->handle && SSL_pending(connssl->backend->handle)) + return TRUE; + + if(proxyssl->backend->handle && SSL_pending(proxyssl->backend->handle)) + return TRUE; + + return FALSE; } +static size_t Curl_ossl_version(char *buffer, size_t size); + static ssize_t ossl_send(struct connectdata *conn, int sockindex, const void *mem, @@ -3127,19 +3411,19 @@ static ssize_t ossl_send(struct connectdata *conn, /* SSL_write() is said to return 'int' while write() and send() returns 'size_t' */ int err; - char error_buffer[256]; /* OpenSSL documents that this must be at least 256 - bytes long. */ + char error_buffer[256]; unsigned long sslerror; int memlen; int rc; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; ERR_clear_error(); memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len; - rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen); + rc = SSL_write(BACKEND->handle, mem, memlen); if(rc <= 0) { - err = SSL_get_error(conn->ssl[sockindex].handle, rc); + err = SSL_get_error(BACKEND->handle, rc); switch(err) { case SSL_ERROR_WANT_READ: @@ -3174,7 +3458,8 @@ static ssize_t ossl_send(struct connectdata *conn, return -1; } /* a true error */ - failf(conn->data, "SSL_write() return error %d", err); + failf(conn->data, OSSL_PACKAGE " SSL_write: %s, errno %d", + SSL_ERROR_to_str(err), SOCKERRNO); *curlcode = CURLE_SEND_ERROR; return -1; } @@ -3188,19 +3473,19 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */ size_t buffersize, /* max amount to read */ CURLcode *curlcode) { - char error_buffer[256]; /* OpenSSL documents that this must be at - least 256 bytes long. */ + char error_buffer[256]; unsigned long sslerror; ssize_t nread; int buffsize; + struct ssl_connect_data *connssl = &conn->ssl[num]; ERR_clear_error(); buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize; - nread = (ssize_t)SSL_read(conn->ssl[num].handle, buf, buffsize); + nread = (ssize_t)SSL_read(BACKEND->handle, buf, buffsize); if(nread <= 0) { /* failed SSL_read */ - int err = SSL_get_error(conn->ssl[num].handle, (int)nread); + int err = SSL_get_error(BACKEND->handle, (int)nread); switch(err) { case SSL_ERROR_NONE: /* this is not an error */ @@ -3219,8 +3504,10 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */ if((nread < 0) || sslerror) { /* If the return code was negative or there actually is an error in the queue */ - failf(conn->data, "SSL read: %s, errno %d", - ossl_strerror(sslerror, error_buffer, sizeof(error_buffer)), + failf(conn->data, OSSL_PACKAGE " SSL_read: %s, errno %d", + (sslerror ? + ossl_strerror(sslerror, error_buffer, sizeof(error_buffer)) : + SSL_ERROR_to_str(err)), SOCKERRNO); *curlcode = CURLE_RECV_ERROR; return -1; @@ -3230,7 +3517,7 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */ return nread; } -size_t Curl_ossl_version(char *buffer, size_t size) +static size_t Curl_ossl_version(char *buffer, size_t size) { #ifdef OPENSSL_IS_BORINGSSL return snprintf(buffer, size, OSSL_PACKAGE); @@ -3239,9 +3526,9 @@ size_t Curl_ossl_version(char *buffer, size_t size) unsigned long ssleay_value; sub[2]='\0'; sub[1]='\0'; - ssleay_value=OpenSSL_version_num(); + ssleay_value = OpenSSL_version_num(); if(ssleay_value < 0x906000) { - ssleay_value=SSLEAY_VERSION_NUMBER; + ssleay_value = SSLEAY_VERSION_NUMBER; sub[0]='\0'; } else { @@ -3270,8 +3557,8 @@ size_t Curl_ossl_version(char *buffer, size_t size) } /* can be called with data == NULL */ -CURLcode Curl_ossl_random(struct Curl_easy *data, unsigned char *entropy, - size_t length) +static CURLcode Curl_ossl_random(struct Curl_easy *data, + unsigned char *entropy, size_t length) { int rc; if(data) { @@ -3287,33 +3574,42 @@ CURLcode Curl_ossl_random(struct Curl_easy *data, unsigned char *entropy, return (rc == 1 ? CURLE_OK : CURLE_FAILED_INIT); } -void Curl_ossl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum /* output */, - size_t unused) +static CURLcode Curl_ossl_md5sum(unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *md5sum /* output */, + size_t unused) { - MD5_CTX MD5pw; - (void)unused; - MD5_Init(&MD5pw); - MD5_Update(&MD5pw, tmp, tmplen); - MD5_Final(md5sum, &MD5pw); + EVP_MD_CTX *mdctx; + unsigned int len = 0; + (void) unused; + + mdctx = EVP_MD_CTX_create(); + EVP_DigestInit_ex(mdctx, EVP_md5(), NULL); + EVP_DigestUpdate(mdctx, tmp, tmplen); + EVP_DigestFinal_ex(mdctx, md5sum, &len); + EVP_MD_CTX_destroy(mdctx); + return CURLE_OK; } #if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) -void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum /* output */, - size_t unused) +static void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum /* output */, + size_t unused) { - SHA256_CTX SHA256pw; - (void)unused; - SHA256_Init(&SHA256pw); - SHA256_Update(&SHA256pw, tmp, tmplen); - SHA256_Final(sha256sum, &SHA256pw); + EVP_MD_CTX *mdctx; + unsigned int len = 0; + (void) unused; + + mdctx = EVP_MD_CTX_create(); + EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL); + EVP_DigestUpdate(mdctx, tmp, tmplen); + EVP_DigestFinal_ex(mdctx, sha256sum, &len); + EVP_MD_CTX_destroy(mdctx); } #endif -bool Curl_ossl_cert_status_request(void) +static bool Curl_ossl_cert_status_request(void) { #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \ !defined(OPENSSL_NO_OCSP) @@ -3322,4 +3618,50 @@ bool Curl_ossl_cert_status_request(void) return FALSE; #endif } + +static void *Curl_ossl_get_internals(struct ssl_connect_data *connssl, + CURLINFO info) +{ + /* Legacy: CURLINFO_TLS_SESSION must return an SSL_CTX pointer. */ + return info == CURLINFO_TLS_SESSION ? + (void *)BACKEND->ctx : (void *)BACKEND->handle; +} + +const struct Curl_ssl Curl_ssl_openssl = { + { CURLSSLBACKEND_OPENSSL, "openssl" }, /* info */ + + 1, /* have_ca_path */ + 1, /* have_certinfo */ + 1, /* have_pinnedpubkey */ + 1, /* have_ssl_ctx */ + 1, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_ossl_init, /* init */ + Curl_ossl_cleanup, /* cleanup */ + Curl_ossl_version, /* version */ + Curl_ossl_check_cxn, /* check_cxn */ + Curl_ossl_shutdown, /* shutdown */ + Curl_ossl_data_pending, /* data_pending */ + Curl_ossl_random, /* random */ + Curl_ossl_cert_status_request, /* cert_status_request */ + Curl_ossl_connect, /* connect */ + Curl_ossl_connect_nonblocking, /* connect_nonblocking */ + Curl_ossl_get_internals, /* get_internals */ + Curl_ossl_close, /* close_one */ + Curl_ossl_close_all, /* close_all */ + Curl_ossl_session_free, /* session_free */ + Curl_ossl_set_engine, /* set_engine */ + Curl_ossl_set_engine_default, /* set_engine_default */ + Curl_ossl_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_ossl_md5sum, /* md5sum */ +#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) + Curl_ossl_sha256sum /* sha256sum */ +#else + NULL /* sha256sum */ +#endif +}; + #endif /* USE_OPENSSL */ diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h index b9648d5..114dc4b 100644 --- a/lib/vtls/openssl.h +++ b/lib/vtls/openssl.h @@ -31,96 +31,7 @@ #include "urldata.h" -CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -/* close a SSL connection */ -void Curl_ossl_close(struct connectdata *conn, int sockindex); - -/* tell OpenSSL to close down all open information regarding connections (and - thus session ID caching etc) */ -void Curl_ossl_close_all(struct Curl_easy *data); - -/* Sets an OpenSSL engine */ -CURLcode Curl_ossl_set_engine(struct Curl_easy *data, const char *engine); - -/* function provided for the generic SSL-layer, called when a session id - should be freed */ -void Curl_ossl_session_free(void *ptr); - -/* Sets engine as default for all SSL operations */ -CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data); - -/* Build list of OpenSSL engines */ -struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data); - -int Curl_ossl_init(void); -void Curl_ossl_cleanup(void); - -size_t Curl_ossl_version(char *buffer, size_t size); -int Curl_ossl_check_cxn(struct connectdata *cxn); -int Curl_ossl_shutdown(struct connectdata *conn, int sockindex); -bool Curl_ossl_data_pending(const struct connectdata *conn, - int connindex); - -/* return 0 if a find random is filled in */ -CURLcode Curl_ossl_random(struct Curl_easy *data, unsigned char *entropy, - size_t length); -void Curl_ossl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum /* output */, - size_t unused); -void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum /* output */, - size_t unused); - -bool Curl_ossl_cert_status_request(void); - -/* Support HTTPS-proxy */ -#define HTTPS_PROXY_SUPPORT 1 - -/* Set the API backend definition to OpenSSL */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* this backend supports CURLOPT_SSL_CTX_* */ -#define have_curlssl_ssl_ctx 1 - -/* this backend supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for OpenSSL */ -#define curlssl_init Curl_ossl_init -#define curlssl_cleanup Curl_ossl_cleanup -#define curlssl_connect Curl_ossl_connect -#define curlssl_connect_nonblocking Curl_ossl_connect_nonblocking -#define curlssl_session_free(x) Curl_ossl_session_free(x) -#define curlssl_close_all Curl_ossl_close_all -#define curlssl_close Curl_ossl_close -#define curlssl_shutdown(x,y) Curl_ossl_shutdown(x,y) -#define curlssl_set_engine(x,y) Curl_ossl_set_engine(x,y) -#define curlssl_set_engine_default(x) Curl_ossl_set_engine_default(x) -#define curlssl_engines_list(x) Curl_ossl_engines_list(x) -#define curlssl_version Curl_ossl_version -#define curlssl_check_cxn Curl_ossl_check_cxn -#define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y) -#define curlssl_random(x,y,z) Curl_ossl_random(x,y,z) -#define curlssl_md5sum(a,b,c,d) Curl_ossl_md5sum(a,b,c,d) -#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) -#define curlssl_sha256sum(a,b,c,d) Curl_ossl_sha256sum(a,b,c,d) -#endif -#define curlssl_cert_status_request() Curl_ossl_cert_status_request() - -#define DEFAULT_CIPHER_SELECTION \ - "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH" +extern const struct Curl_ssl Curl_ssl_openssl; #endif /* USE_OPENSSL */ #endif /* HEADER_CURL_SSLUSE_H */ diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c index e5346ce..df29fa9 100644 --- a/lib/vtls/polarssl.c +++ b/lib/vtls/polarssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. * Copyright (C) 2010 - 2011, Hoi-Ho Chan, * * This software is licensed as described in the file COPYING, which @@ -30,7 +30,6 @@ #include "curl_setup.h" #ifdef USE_POLARSSL - #include #include #include @@ -70,6 +69,19 @@ #define PUB_DER_MAX_BYTES (RSA_PUB_DER_MAX_BYTES > ECP_PUB_DER_MAX_BYTES ? \ RSA_PUB_DER_MAX_BYTES : ECP_PUB_DER_MAX_BYTES) +struct ssl_backend_data { + ctr_drbg_context ctr_drbg; + entropy_context entropy; + ssl_context ssl; + int server_fd; + x509_crt cacert; + x509_crt clicert; + x509_crl crl; + rsa_context rsa; +}; + +#define BACKEND connssl->backend + /* apply threading? */ #if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) #define THREADING_SUPPORT @@ -140,6 +152,68 @@ static void polarssl_debug(void *context, int level, const char *line) static Curl_recv polarssl_recv; static Curl_send polarssl_send; +static CURLcode polarssl_version_from_curl(int *polarver, long ssl_version) +{ + switch(ssl_version) { + case CURL_SSLVERSION_TLSv1_0: + *polarver = SSL_MINOR_VERSION_1; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_1: + *polarver = SSL_MINOR_VERSION_2; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_2: + *polarver = SSL_MINOR_VERSION_3; + return CURLE_OK; + case CURL_SSLVERSION_TLSv1_3: + break; + } + return CURLE_SSL_CONNECT_ERROR; +} + +static CURLcode +set_ssl_version_min_max(struct connectdata *conn, int sockindex) +{ + struct Curl_easy *data = conn->data; + struct ssl_connect_data* connssl = &conn->ssl[sockindex]; + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + int ssl_min_ver = SSL_MINOR_VERSION_1; + int ssl_max_ver = SSL_MINOR_VERSION_1; + CURLcode result = CURLE_OK; + + switch(ssl_version) { + case CURL_SSLVERSION_DEFAULT: + case CURL_SSLVERSION_TLSv1: + ssl_version = CURL_SSLVERSION_TLSv1_0; + ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2; + break; + } + + switch(ssl_version_max) { + case CURL_SSLVERSION_MAX_NONE: + ssl_version_max = ssl_version << 16; + break; + case CURL_SSLVERSION_MAX_DEFAULT: + ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2; + break; + } + + result = polarssl_version_from_curl(&ssl_min_ver, ssl_version); + if(result) { + failf(data, "unsupported min version passed via CURLOPT_SSLVERSION"); + return result; + } + result = polarssl_version_from_curl(&ssl_max_ver, ssl_version_max >> 16); + if(result) { + failf(data, "unsupported max version passed via CURLOPT_SSLVERSION"); + return result; + } + + ssl_set_min_version(&BACKEND->ssl, SSL_MAJOR_VERSION_3, ssl_min_ver); + ssl_set_max_version(&BACKEND->ssl, SSL_MAJOR_VERSION_3, ssl_max_ver); + + return result; +} static CURLcode polarssl_connect_step1(struct connectdata *conn, @@ -153,7 +227,7 @@ polarssl_connect_step1(struct connectdata *conn, const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; int ret = -1; char errorbuf[128]; - errorbuf[0]=0; + errorbuf[0] = 0; /* PolarSSL only supports SSLv3 and TLSv1 */ if(SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv2) { @@ -164,16 +238,16 @@ polarssl_connect_step1(struct connectdata *conn, #ifdef THREADING_SUPPORT entropy_init_mutex(&entropy); - if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func_mutex, &entropy, + if((ret = ctr_drbg_init(&BACKEND->ctr_drbg, entropy_func_mutex, &entropy, NULL, 0)) != 0) { error_strerror(ret, errorbuf, sizeof(errorbuf)); failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n", -ret, errorbuf); } #else - entropy_init(&connssl->entropy); + entropy_init(&BACKEND->entropy); - if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func, &connssl->entropy, + if((ret = ctr_drbg_init(&BACKEND->ctr_drbg, entropy_func, &BACKEND->entropy, NULL, 0)) != 0) { error_strerror(ret, errorbuf, sizeof(errorbuf)); failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n", @@ -182,10 +256,10 @@ polarssl_connect_step1(struct connectdata *conn, #endif /* THREADING_SUPPORT */ /* Load the trusted CA */ - memset(&connssl->cacert, 0, sizeof(x509_crt)); + memset(&BACKEND->cacert, 0, sizeof(x509_crt)); if(SSL_CONN_CONFIG(CAfile)) { - ret = x509_crt_parse_file(&connssl->cacert, + ret = x509_crt_parse_file(&BACKEND->cacert, SSL_CONN_CONFIG(CAfile)); if(ret<0) { @@ -199,7 +273,7 @@ polarssl_connect_step1(struct connectdata *conn, } if(capath) { - ret = x509_crt_parse_path(&connssl->cacert, capath); + ret = x509_crt_parse_path(&BACKEND->cacert, capath); if(ret<0) { error_strerror(ret, errorbuf, sizeof(errorbuf)); @@ -212,10 +286,10 @@ polarssl_connect_step1(struct connectdata *conn, } /* Load the client certificate */ - memset(&connssl->clicert, 0, sizeof(x509_crt)); + memset(&BACKEND->clicert, 0, sizeof(x509_crt)); if(SSL_SET_OPTION(cert)) { - ret = x509_crt_parse_file(&connssl->clicert, + ret = x509_crt_parse_file(&BACKEND->clicert, SSL_SET_OPTION(cert)); if(ret) { @@ -236,9 +310,9 @@ polarssl_connect_step1(struct connectdata *conn, if(ret == 0 && !pk_can_do(&pk, POLARSSL_PK_RSA)) ret = POLARSSL_ERR_PK_TYPE_MISMATCH; if(ret == 0) - rsa_copy(&connssl->rsa, pk_rsa(pk)); + rsa_copy(&BACKEND->rsa, pk_rsa(pk)); else - rsa_free(&connssl->rsa); + rsa_free(&BACKEND->rsa); pk_free(&pk); if(ret) { @@ -251,10 +325,10 @@ polarssl_connect_step1(struct connectdata *conn, } /* Load the CRL */ - memset(&connssl->crl, 0, sizeof(x509_crl)); + memset(&BACKEND->crl, 0, sizeof(x509_crl)); if(SSL_SET_OPTION(CRLfile)) { - ret = x509_crl_parse_file(&connssl->crl, + ret = x509_crl_parse_file(&BACKEND->crl, SSL_SET_OPTION(CRLfile)); if(ret) { @@ -268,7 +342,7 @@ polarssl_connect_step1(struct connectdata *conn, infof(data, "PolarSSL: Connecting to %s:%d\n", hostname, port); - if(ssl_init(&connssl->ssl)) { + if(ssl_init(&BACKEND->ssl)) { failf(data, "PolarSSL: ssl_init failed"); return CURLE_SSL_CONNECT_ERROR; } @@ -276,63 +350,49 @@ polarssl_connect_step1(struct connectdata *conn, switch(SSL_CONN_CONFIG(version)) { case CURL_SSLVERSION_DEFAULT: case CURL_SSLVERSION_TLSv1: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, + ssl_set_min_version(&BACKEND->ssl, SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1); break; case CURL_SSLVERSION_SSLv3: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, + ssl_set_min_version(&BACKEND->ssl, SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, + ssl_set_max_version(&BACKEND->ssl, SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0); infof(data, "PolarSSL: Forced min. SSL Version to be SSLv3\n"); break; case CURL_SSLVERSION_TLSv1_0: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_1); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_1); - infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.0\n"); - break; case CURL_SSLVERSION_TLSv1_1: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_2); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_2); - infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.1\n"); - break; case CURL_SSLVERSION_TLSv1_2: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_3); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_3); - infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.2\n"); - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "PolarSSL: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + { + CURLcode result = set_ssl_version_min_max(conn, sockindex); + if(result != CURLE_OK) + return result; + break; + } default: failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); return CURLE_SSL_CONNECT_ERROR; } - ssl_set_endpoint(&connssl->ssl, SSL_IS_CLIENT); - ssl_set_authmode(&connssl->ssl, SSL_VERIFY_OPTIONAL); + ssl_set_endpoint(&BACKEND->ssl, SSL_IS_CLIENT); + ssl_set_authmode(&BACKEND->ssl, SSL_VERIFY_OPTIONAL); - ssl_set_rng(&connssl->ssl, ctr_drbg_random, - &connssl->ctr_drbg); - ssl_set_bio(&connssl->ssl, + ssl_set_rng(&BACKEND->ssl, ctr_drbg_random, + &BACKEND->ctr_drbg); + ssl_set_bio(&BACKEND->ssl, net_recv, &conn->sock[sockindex], net_send, &conn->sock[sockindex]); - ssl_set_ciphersuites(&connssl->ssl, ssl_list_ciphersuites()); + ssl_set_ciphersuites(&BACKEND->ssl, ssl_list_ciphersuites()); /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { void *old_session = NULL; Curl_ssl_sessionid_lock(conn); if(!Curl_ssl_getsessionid(conn, &old_session, NULL, sockindex)) { - ret = ssl_set_session(&connssl->ssl, old_session); + ret = ssl_set_session(&BACKEND->ssl, old_session); if(ret) { Curl_ssl_sessionid_unlock(conn); failf(data, "ssl_set_session returned -0x%x", -ret); @@ -343,15 +403,15 @@ polarssl_connect_step1(struct connectdata *conn, Curl_ssl_sessionid_unlock(conn); } - ssl_set_ca_chain(&connssl->ssl, - &connssl->cacert, - &connssl->crl, + ssl_set_ca_chain(&BACKEND->ssl, + &BACKEND->cacert, + &BACKEND->crl, hostname); - ssl_set_own_cert_rsa(&connssl->ssl, - &connssl->clicert, &connssl->rsa); + ssl_set_own_cert_rsa(&BACKEND->ssl, + &BACKEND->clicert, &BACKEND->rsa); - if(ssl_set_hostname(&connssl->ssl, hostname)) { + if(ssl_set_hostname(&BACKEND->ssl, hostname)) { /* ssl_set_hostname() sets the name to use in CN/SAN checks *and* the name to set in the SNI extension. So even if curl connects to a host specified as an IP address, this function must be used. */ @@ -376,12 +436,12 @@ polarssl_connect_step1(struct connectdata *conn, protocols[cur] = NULL; - ssl_set_alpn_protocols(&connssl->ssl, protocols); + ssl_set_alpn_protocols(&BACKEND->ssl, protocols); } #endif #ifdef POLARSSL_DEBUG - ssl_set_dbg(&connssl->ssl, polarssl_debug, data); + ssl_set_dbg(&BACKEND->ssl, polarssl_debug, data); #endif connssl->connecting_state = ssl_connect_2; @@ -408,7 +468,7 @@ polarssl_connect_step2(struct connectdata *conn, conn->recv[sockindex] = polarssl_recv; conn->send[sockindex] = polarssl_send; - ret = ssl_handshake(&connssl->ssl); + ret = ssl_handshake(&BACKEND->ssl); switch(ret) { case 0: @@ -430,9 +490,9 @@ polarssl_connect_step2(struct connectdata *conn, } infof(data, "PolarSSL: Handshake complete, cipher is %s\n", - ssl_get_ciphersuite(&conn->ssl[sockindex].ssl) ); + ssl_get_ciphersuite(&BACKEND->ssl) ); - ret = ssl_get_verify_result(&conn->ssl[sockindex].ssl); + ret = ssl_get_verify_result(&BACKEND->ssl); if(ret && SSL_CONN_CONFIG(verifypeer)) { if(ret & BADCERT_EXPIRED) @@ -452,12 +512,12 @@ polarssl_connect_step2(struct connectdata *conn, return CURLE_PEER_FAILED_VERIFICATION; } - if(ssl_get_peer_cert(&(connssl->ssl))) { + if(ssl_get_peer_cert(&(BACKEND->ssl))) { /* If the session was resumed, there will be no peer certs */ memset(buffer, 0, sizeof(buffer)); if(x509_crt_info(buffer, sizeof(buffer), (char *)"* ", - ssl_get_peer_cert(&(connssl->ssl))) != -1) + ssl_get_peer_cert(&(BACKEND->ssl))) != -1) infof(data, "Dumping cert info:\n%s\n", buffer); } @@ -469,7 +529,7 @@ polarssl_connect_step2(struct connectdata *conn, unsigned char pubkey[PUB_DER_MAX_BYTES]; const x509_crt *peercert; - peercert = ssl_get_peer_cert(&connssl->ssl); + peercert = ssl_get_peer_cert(&BACKEND->ssl); if(!peercert || !peercert->raw.p || !peercert->raw.len) { failf(data, "Failed due to missing peer certificate"); @@ -518,7 +578,7 @@ polarssl_connect_step2(struct connectdata *conn, #ifdef HAS_ALPN if(conn->bits.tls_enable_alpn) { - const char *next_protocol = ssl_get_alpn_protocol(&connssl->ssl); + const char *next_protocol = ssl_get_alpn_protocol(&BACKEND->ssl); if(next_protocol != NULL) { infof(data, "ALPN, server accepted to use %s\n", next_protocol); @@ -555,7 +615,7 @@ polarssl_connect_step3(struct connectdata *conn, DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { int ret; ssl_session *our_ssl_sessionid; void *old_ssl_sessionid = NULL; @@ -564,9 +624,9 @@ polarssl_connect_step3(struct connectdata *conn, if(!our_ssl_sessionid) return CURLE_OUT_OF_MEMORY; - ssl_session_init(our_ssl_sessionid); + memset(our_ssl_sessionid, 0, sizeof(ssl_session)); - ret = ssl_get_session(&connssl->ssl, our_ssl_sessionid); + ret = ssl_get_session(&BACKEND->ssl, our_ssl_sessionid); if(ret) { failf(data, "ssl_get_session returned -0x%x", -ret); return CURLE_SSL_CONNECT_ERROR; @@ -597,9 +657,10 @@ static ssize_t polarssl_send(struct connectdata *conn, size_t len, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; int ret = -1; - ret = ssl_write(&conn->ssl[sockindex].ssl, + ret = ssl_write(&BACKEND->ssl, (unsigned char *)mem, len); if(ret < 0) { @@ -611,13 +672,14 @@ static ssize_t polarssl_send(struct connectdata *conn, return ret; } -void Curl_polarssl_close(struct connectdata *conn, int sockindex) +static void Curl_polarssl_close(struct connectdata *conn, int sockindex) { - rsa_free(&conn->ssl[sockindex].rsa); - x509_crt_free(&conn->ssl[sockindex].clicert); - x509_crt_free(&conn->ssl[sockindex].cacert); - x509_crl_free(&conn->ssl[sockindex].crl); - ssl_free(&conn->ssl[sockindex].ssl); + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + rsa_free(&BACKEND->rsa); + x509_crt_free(&BACKEND->clicert); + x509_crt_free(&BACKEND->cacert); + x509_crl_free(&BACKEND->crl); + ssl_free(&BACKEND->ssl); } static ssize_t polarssl_recv(struct connectdata *conn, @@ -626,11 +688,12 @@ static ssize_t polarssl_recv(struct connectdata *conn, size_t buffersize, CURLcode *curlcode) { + struct ssl_connect_data *connssl = &conn->ssl[num]; int ret = -1; ssize_t len = -1; memset(buf, 0, buffersize); - ret = ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, buffersize); + ret = ssl_read(&BACKEND->ssl, (unsigned char *)buf, buffersize); if(ret <= 0) { if(ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY) @@ -646,7 +709,7 @@ static ssize_t polarssl_recv(struct connectdata *conn, return len; } -void Curl_polarssl_session_free(void *ptr) +static void Curl_polarssl_session_free(void *ptr) { ssl_session_free(ptr); free(ptr); @@ -655,7 +718,7 @@ void Curl_polarssl_session_free(void *ptr) /* 1.3.10 was the first rebranded version. All new releases (in 1.3 branch and higher) will be mbed TLS branded.. */ -size_t Curl_polarssl_version(char *buffer, size_t size) +static size_t Curl_polarssl_version(char *buffer, size_t size) { unsigned int version = version_get_number(); return snprintf(buffer, size, "%s/%d.%d.%d", @@ -714,9 +777,9 @@ polarssl_connect_common(struct connectdata *conn, if(connssl->connecting_state == ssl_connect_2_reading || connssl->connecting_state == ssl_connect_2_writing) { - curl_socket_t writefd = ssl_connect_2_writing== + curl_socket_t writefd = ssl_connect_2_writing == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== + curl_socket_t readfd = ssl_connect_2_reading == connssl->connecting_state?sockfd:CURL_SOCKET_BAD; what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, @@ -777,18 +840,14 @@ polarssl_connect_common(struct connectdata *conn, return CURLE_OK; } -CURLcode -Curl_polarssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) +static CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { return polarssl_connect_common(conn, sockindex, TRUE, done); } -CURLcode -Curl_polarssl_connect(struct connectdata *conn, - int sockindex) +static CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex) { CURLcode result; bool done = FALSE; @@ -806,20 +865,73 @@ Curl_polarssl_connect(struct connectdata *conn, * return 0 error initializing SSL * return 1 SSL initialized successfully */ -int Curl_polarssl_init(void) +static int Curl_polarssl_init(void) { return Curl_polarsslthreadlock_thread_setup(); } -void Curl_polarssl_cleanup(void) +static void Curl_polarssl_cleanup(void) { (void)Curl_polarsslthreadlock_thread_cleanup(); } +static bool Curl_polarssl_data_pending(const struct connectdata *conn, + int sockindex) +{ + const struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + return ssl_get_bytes_avail(&BACKEND->ssl) != 0; +} -int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex) +static void Curl_polarssl_sha256sum(const unsigned char *input, + size_t inputlen, + unsigned char *sha256sum, + size_t sha256len UNUSED_PARAM) { - return ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0; + (void)sha256len; + sha256(input, inputlen, sha256sum, 0); } +static void *Curl_polarssl_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return &BACKEND->ssl; +} + +const struct Curl_ssl Curl_ssl_polarssl = { + { CURLSSLBACKEND_POLARSSL, "polarssl" }, /* info */ + + 1, /* have_ca_path */ + 0, /* have_certinfo */ + 1, /* have_pinnedpubkey */ + 0, /* have_ssl_ctx */ + 0, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_polarssl_init, /* init */ + Curl_polarssl_cleanup, /* cleanup */ + Curl_polarssl_version, /* version */ + Curl_none_check_cxn, /* check_cxn */ + Curl_none_shutdown, /* shutdown */ + Curl_polarssl_data_pending, /* data_pending */ + /* This might cause libcurl to use a weeker random! + * TODO: use Polarssl's CTR-DRBG or HMAC-DRBG + */ + Curl_none_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_polarssl_connect, /* connect */ + Curl_polarssl_connect_nonblocking, /* connect_nonblocking */ + Curl_polarssl_get_internals, /* get_internals */ + Curl_polarssl_close, /* close_one */ + Curl_none_close_all, /* close_all */ + Curl_polarssl_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_none_md5sum, /* md5sum */ + Curl_polarssl_sha256sum /* sha256sum */ +}; + #endif /* USE_POLARSSL */ diff --git a/lib/vtls/polarssl.h b/lib/vtls/polarssl.h index 47af7b4..23c3636 100644 --- a/lib/vtls/polarssl.h +++ b/lib/vtls/polarssl.h @@ -26,57 +26,7 @@ #ifdef USE_POLARSSL -#include - -/* Called on first use PolarSSL, setup threading if supported */ -int Curl_polarssl_init(void); -void Curl_polarssl_cleanup(void); -int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex); - - -CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - - /* close a SSL connection */ -void Curl_polarssl_close(struct connectdata *conn, int sockindex); - -void Curl_polarssl_session_free(void *ptr); -size_t Curl_polarssl_version(char *buffer, size_t size); -int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex); - -/* Set the API backend definition to PolarSSL */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_POLARSSL - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backends supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for PolarSSL */ -#define curlssl_init() Curl_polarssl_init() -#define curlssl_cleanup() Curl_polarssl_cleanup() -#define curlssl_connect Curl_polarssl_connect -#define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking -#define curlssl_session_free(x) Curl_polarssl_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_polarssl_close -#define curlssl_shutdown(x,y) 0 -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_polarssl_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) Curl_polarssl_data_pending(x, y) -#define curlssl_sha256sum(a,b,c,d) sha256(a,b,c,0) - -/* This might cause libcurl to use a weeker random! - TODO: implement proper use of Polarssl's CTR-DRBG or HMAC-DRBG and use that -*/ -#define curlssl_random(x,y,z) ((void)x, (void)y, (void)z, CURLE_NOT_BUILT_IN) +extern const struct Curl_ssl Curl_ssl_polarssl; #endif /* USE_POLARSSL */ #endif /* HEADER_CURL_POLARSSL_H */ diff --git a/lib/vtls/polarssl_threadlock.c b/lib/vtls/polarssl_threadlock.c index b1eb7b7..dd5fbd7 100644 --- a/lib/vtls/polarssl_threadlock.c +++ b/lib/vtls/polarssl_threadlock.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2013-2016, Daniel Stenberg, , et al. + * Copyright (C) 2013-2017, Daniel Stenberg, , et al. * Copyright (C) 2010, 2011, Hoi-Ho Chan, * * This software is licensed as described in the file COPYING, which @@ -114,7 +114,7 @@ int Curl_polarsslthreadlock_lock_function(int n) } #elif defined(HAVE_PROCESS_H) if(n < NUMT) { - ret = (WaitForSingleObject(mutex_buf[n], INFINITE)==WAIT_FAILED?1:0); + ret = (WaitForSingleObject(mutex_buf[n], INFINITE) == WAIT_FAILED?1:0); if(ret) { DEBUGF(fprintf(stderr, "Error: polarsslthreadlock_lock_function failed\n")); diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index bd92399..b8afe46 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -7,7 +7,7 @@ * * Copyright (C) 2012 - 2016, Marc Hoersken, * Copyright (C) 2012, Mark Salisbury, - * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -46,6 +46,8 @@ # error "Can't compile SCHANNEL support without SSPI." #endif +#include +#include #include "curl_sspi.h" #include "schannel.h" #include "vtls.h" @@ -74,14 +76,102 @@ # define HAS_ALPN 1 #endif +#ifndef UNISP_NAME_A +#define UNISP_NAME_A "Microsoft Unified Security Protocol Provider" +#endif + +#ifndef UNISP_NAME_W +#define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider" +#endif + +#ifndef UNISP_NAME +#ifdef UNICODE +#define UNISP_NAME UNISP_NAME_W +#else +#define UNISP_NAME UNISP_NAME_A +#endif +#endif + +#ifndef SP_PROT_SSL2_CLIENT +#define SP_PROT_SSL2_CLIENT 0x00000008 +#endif + +#ifndef SP_PROT_SSL3_CLIENT +#define SP_PROT_SSL3_CLIENT 0x00000008 +#endif + +#ifndef SP_PROT_TLS1_CLIENT +#define SP_PROT_TLS1_CLIENT 0x00000080 +#endif + +#ifndef SP_PROT_TLS1_0_CLIENT +#define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT +#endif + +#ifndef SP_PROT_TLS1_1_CLIENT +#define SP_PROT_TLS1_1_CLIENT 0x00000200 +#endif + +#ifndef SP_PROT_TLS1_2_CLIENT +#define SP_PROT_TLS1_2_CLIENT 0x00000800 +#endif + +#ifndef SECBUFFER_ALERT +#define SECBUFFER_ALERT 17 +#endif + +/* Both schannel buffer sizes must be > 0 */ +#define CURL_SCHANNEL_BUFFER_INIT_SIZE 4096 +#define CURL_SCHANNEL_BUFFER_FREE_SIZE 1024 + /* Uncomment to force verbose output * #define infof(x, y, ...) printf(y, __VA_ARGS__) * #define failf(x, y, ...) printf(y, __VA_ARGS__) */ +#ifndef CALG_SHA_256 +# define CALG_SHA_256 0x0000800c +#endif + +/* Structs to store Schannel handles */ +struct curl_schannel_cred { + CredHandle cred_handle; + TimeStamp time_stamp; + int refcount; +}; + +struct curl_schannel_ctxt { + CtxtHandle ctxt_handle; + TimeStamp time_stamp; +}; + +struct ssl_backend_data { + struct curl_schannel_cred *cred; + struct curl_schannel_ctxt *ctxt; + SecPkgContext_StreamSizes stream_sizes; + size_t encdata_length, decdata_length; + size_t encdata_offset, decdata_offset; + unsigned char *encdata_buffer, *decdata_buffer; + /* encdata_is_incomplete: if encdata contains only a partial record that + can't be decrypted without another Curl_read_plain (that is, status is + SEC_E_INCOMPLETE_MESSAGE) then set this true. after Curl_read_plain writes + more bytes into encdata then set this back to false. */ + bool encdata_is_incomplete; + unsigned long req_flags, ret_flags; + CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */ + bool recv_sspi_close_notify; /* true if connection closed by close_notify */ + bool recv_connection_closed; /* true if connection closed, regardless how */ + bool use_alpn; /* true if ALPN is used for this connection */ +}; + +#define BACKEND connssl->backend + static Curl_recv schannel_recv; static Curl_send schannel_send; +static CURLcode pkp_pin_peer_pubkey(struct connectdata *conn, int sockindex, + const char *pinnedpubkey); + #ifdef _WIN32_WCE static CURLcode verify_certificate(struct connectdata *conn, int sockindex); #endif @@ -103,6 +193,41 @@ static void InitSecBufferDesc(SecBufferDesc *desc, SecBuffer *BufArr, } static CURLcode +set_ssl_version_min_max(SCHANNEL_CRED *schannel_cred, struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + long ssl_version = SSL_CONN_CONFIG(version); + long ssl_version_max = SSL_CONN_CONFIG(version_max); + long i = ssl_version; + + switch(ssl_version_max) { + case CURL_SSLVERSION_MAX_NONE: + ssl_version_max = ssl_version << 16; + break; + case CURL_SSLVERSION_MAX_DEFAULT: + ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2; + break; + } + for(; i <= (ssl_version_max >> 16); ++i) { + switch(i) { + case CURL_SSLVERSION_TLSv1_0: + schannel_cred->grbitEnabledProtocols |= SP_PROT_TLS1_0_CLIENT; + break; + case CURL_SSLVERSION_TLSv1_1: + schannel_cred->grbitEnabledProtocols |= SP_PROT_TLS1_1_CLIENT; + break; + case CURL_SSLVERSION_TLSv1_2: + schannel_cred->grbitEnabledProtocols |= SP_PROT_TLS1_2_CLIENT; + break; + case CURL_SSLVERSION_TLSv1_3: + failf(data, "Schannel: TLS 1.3 is not yet supported"); + return CURLE_SSL_CONNECT_ERROR; + } + } + return CURLE_OK; +} + +static CURLcode schannel_connect_step1(struct connectdata *conn, int sockindex) { ssize_t written = -1; @@ -124,7 +249,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) #endif TCHAR *host_name; CURLcode result; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : + char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n", @@ -141,33 +266,33 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) #ifdef HAS_ALPN /* ALPN is only supported on Windows 8.1 / Server 2012 R2 and above. Also it doesn't seem to be supported for Wine, see curl bug #983. */ - connssl->use_alpn = conn->bits.tls_enable_alpn && + BACKEND->use_alpn = conn->bits.tls_enable_alpn && !GetProcAddress(GetModuleHandleA("ntdll"), "wine_get_version") && Curl_verify_windows_version(6, 3, PLATFORM_WINNT, VERSION_GREATER_THAN_EQUAL); #else - connssl->use_alpn = false; + BACKEND->use_alpn = false; #endif - connssl->cred = NULL; + BACKEND->cred = NULL; /* check for an existing re-usable credential handle */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { Curl_ssl_sessionid_lock(conn); if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)) { - connssl->cred = old_cred; + BACKEND->cred = old_cred; infof(data, "schannel: re-using existing credential handle\n"); /* increment the reference counter of the credential/session handle */ - connssl->cred->refcount++; + BACKEND->cred->refcount++; infof(data, "schannel: incremented credential handle refcount = %d\n", - connssl->cred->refcount); + BACKEND->cred->refcount); } Curl_ssl_sessionid_unlock(conn); } - if(!connssl->cred) { + if(!BACKEND->cred) { /* setup Schannel API options */ memset(&schannel_cred, 0, sizeof(schannel_cred)); schannel_cred.dwVersion = SCHANNEL_CRED_VERSION; @@ -216,17 +341,15 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) SP_PROT_TLS1_2_CLIENT; break; case CURL_SSLVERSION_TLSv1_0: - schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT; - break; case CURL_SSLVERSION_TLSv1_1: - schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_1_CLIENT; - break; case CURL_SSLVERSION_TLSv1_2: - schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT; - break; case CURL_SSLVERSION_TLSv1_3: - failf(data, "Schannel: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; + { + result = set_ssl_version_min_max(&schannel_cred, conn); + if(result != CURLE_OK) + return result; + break; + } case CURL_SSLVERSION_SSLv3: schannel_cred.grbitEnabledProtocols = SP_PROT_SSL3_CLIENT; break; @@ -239,14 +362,14 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) } /* allocate memory for the re-usable credential handle */ - connssl->cred = (struct curl_schannel_cred *) + BACKEND->cred = (struct curl_schannel_cred *) malloc(sizeof(struct curl_schannel_cred)); - if(!connssl->cred) { + if(!BACKEND->cred) { failf(data, "schannel: unable to allocate memory"); return CURLE_OUT_OF_MEMORY; } - memset(connssl->cred, 0, sizeof(struct curl_schannel_cred)); - connssl->cred->refcount = 1; + memset(BACKEND->cred, 0, sizeof(struct curl_schannel_cred)); + BACKEND->cred->refcount = 1; /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx */ @@ -254,8 +377,8 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &schannel_cred, NULL, NULL, - &connssl->cred->cred_handle, - &connssl->cred->time_stamp); + &BACKEND->cred->cred_handle, + &BACKEND->cred->time_stamp); if(sspi_status != SEC_E_OK) { if(sspi_status == SEC_E_WRONG_PRINCIPAL) @@ -264,7 +387,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) else failf(data, "schannel: AcquireCredentialsHandle failed: %s", Curl_sspi_strerror(conn, sspi_status)); - Curl_safefree(connssl->cred); + Curl_safefree(BACKEND->cred); return CURLE_SSL_CONNECT_ERROR; } } @@ -279,7 +402,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) } #ifdef HAS_ALPN - if(connssl->use_alpn) { + if(BACKEND->use_alpn) { int cur = 0; int list_start_index = 0; unsigned int *extension_len = NULL; @@ -337,18 +460,18 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) InitSecBufferDesc(&outbuf_desc, &outbuf, 1); /* setup request flags */ - connssl->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT | + BACKEND->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT | ISC_REQ_CONFIDENTIALITY | ISC_REQ_ALLOCATE_MEMORY | ISC_REQ_STREAM; /* allocate memory for the security context handle */ - connssl->ctxt = (struct curl_schannel_ctxt *) + BACKEND->ctxt = (struct curl_schannel_ctxt *) malloc(sizeof(struct curl_schannel_ctxt)); - if(!connssl->ctxt) { + if(!BACKEND->ctxt) { failf(data, "schannel: unable to allocate memory"); return CURLE_OUT_OF_MEMORY; } - memset(connssl->ctxt, 0, sizeof(struct curl_schannel_ctxt)); + memset(BACKEND->ctxt, 0, sizeof(struct curl_schannel_ctxt)); host_name = Curl_convert_UTF8_to_tchar(hostname); if(!host_name) @@ -362,10 +485,10 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) us problems with inbuf regardless. https://github.com/curl/curl/issues/983 */ sspi_status = s_pSecFn->InitializeSecurityContext( - &connssl->cred->cred_handle, NULL, host_name, connssl->req_flags, 0, 0, - (connssl->use_alpn ? &inbuf_desc : NULL), - 0, &connssl->ctxt->ctxt_handle, - &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp); + &BACKEND->cred->cred_handle, NULL, host_name, BACKEND->req_flags, 0, 0, + (BACKEND->use_alpn ? &inbuf_desc : NULL), + 0, &BACKEND->ctxt->ctxt_handle, + &outbuf_desc, &BACKEND->ret_flags, &BACKEND->ctxt->time_stamp); Curl_unicodefree(host_name); @@ -376,7 +499,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) else failf(data, "schannel: initial InitializeSecurityContext failed: %s", Curl_sspi_strerror(conn, sspi_status)); - Curl_safefree(connssl->ctxt); + Curl_safefree(BACKEND->ctxt); return CURLE_SSL_CONNECT_ERROR; } @@ -396,9 +519,10 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) infof(data, "schannel: sent initial handshake data: " "sent %zd bytes\n", written); - connssl->recv_unrecoverable_err = CURLE_OK; - connssl->recv_sspi_close_notify = false; - connssl->recv_connection_closed = false; + BACKEND->recv_unrecoverable_err = CURLE_OK; + BACKEND->recv_sspi_close_notify = false; + BACKEND->recv_connection_closed = false; + BACKEND->encdata_is_incomplete = false; /* continue to second handshake step */ connssl->connecting_state = ssl_connect_2; @@ -423,46 +547,48 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) TCHAR *host_name; CURLcode result; bool doread; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : + char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; + const char *pubkey_ptr; doread = (connssl->connecting_state != ssl_connect_2_writing) ? TRUE : FALSE; infof(data, "schannel: SSL/TLS connection with %s port %hu (step 2/3)\n", hostname, conn->remote_port); - if(!connssl->cred || !connssl->ctxt) + if(!BACKEND->cred || !BACKEND->ctxt) return CURLE_SSL_CONNECT_ERROR; /* buffer to store previously received and decrypted data */ - if(connssl->decdata_buffer == NULL) { - connssl->decdata_offset = 0; - connssl->decdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE; - connssl->decdata_buffer = malloc(connssl->decdata_length); - if(connssl->decdata_buffer == NULL) { + if(BACKEND->decdata_buffer == NULL) { + BACKEND->decdata_offset = 0; + BACKEND->decdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE; + BACKEND->decdata_buffer = malloc(BACKEND->decdata_length); + if(BACKEND->decdata_buffer == NULL) { failf(data, "schannel: unable to allocate memory"); return CURLE_OUT_OF_MEMORY; } } /* buffer to store previously received and encrypted data */ - if(connssl->encdata_buffer == NULL) { - connssl->encdata_offset = 0; - connssl->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE; - connssl->encdata_buffer = malloc(connssl->encdata_length); - if(connssl->encdata_buffer == NULL) { + if(BACKEND->encdata_buffer == NULL) { + BACKEND->encdata_is_incomplete = false; + BACKEND->encdata_offset = 0; + BACKEND->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE; + BACKEND->encdata_buffer = malloc(BACKEND->encdata_length); + if(BACKEND->encdata_buffer == NULL) { failf(data, "schannel: unable to allocate memory"); return CURLE_OUT_OF_MEMORY; } } /* if we need a bigger buffer to read a full message, increase buffer now */ - if(connssl->encdata_length - connssl->encdata_offset < + if(BACKEND->encdata_length - BACKEND->encdata_offset < CURL_SCHANNEL_BUFFER_FREE_SIZE) { /* increase internal encrypted data buffer */ - reallocated_length = connssl->encdata_offset + + reallocated_length = BACKEND->encdata_offset + CURL_SCHANNEL_BUFFER_FREE_SIZE; - reallocated_buffer = realloc(connssl->encdata_buffer, + reallocated_buffer = realloc(BACKEND->encdata_buffer, reallocated_length); if(reallocated_buffer == NULL) { @@ -470,8 +596,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) return CURLE_OUT_OF_MEMORY; } else { - connssl->encdata_buffer = reallocated_buffer; - connssl->encdata_length = reallocated_length; + BACKEND->encdata_buffer = reallocated_buffer; + BACKEND->encdata_length = reallocated_length; } } @@ -479,10 +605,10 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) if(doread) { /* read encrypted handshake data from socket */ result = Curl_read_plain(conn->sock[sockindex], - (char *) (connssl->encdata_buffer + - connssl->encdata_offset), - connssl->encdata_length - - connssl->encdata_offset, + (char *) (BACKEND->encdata_buffer + + BACKEND->encdata_offset), + BACKEND->encdata_length - + BACKEND->encdata_offset, &nread); if(result == CURLE_AGAIN) { if(connssl->connecting_state != ssl_connect_2_writing) @@ -498,15 +624,17 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) } /* increase encrypted data buffer offset */ - connssl->encdata_offset += nread; + BACKEND->encdata_offset += nread; + BACKEND->encdata_is_incomplete = false; + infof(data, "schannel: encrypted data got %zd\n", nread); } infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); + BACKEND->encdata_offset, BACKEND->encdata_length); /* setup input buffers */ - InitSecBuffer(&inbuf[0], SECBUFFER_TOKEN, malloc(connssl->encdata_offset), - curlx_uztoul(connssl->encdata_offset)); + InitSecBuffer(&inbuf[0], SECBUFFER_TOKEN, malloc(BACKEND->encdata_offset), + curlx_uztoul(BACKEND->encdata_offset)); InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0); InitSecBufferDesc(&inbuf_desc, inbuf, 2); @@ -522,8 +650,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) } /* copy received handshake data into input buffer */ - memcpy(inbuf[0].pvBuffer, connssl->encdata_buffer, - connssl->encdata_offset); + memcpy(inbuf[0].pvBuffer, BACKEND->encdata_buffer, + BACKEND->encdata_offset); host_name = Curl_convert_UTF8_to_tchar(hostname); if(!host_name) @@ -532,9 +660,9 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx */ sspi_status = s_pSecFn->InitializeSecurityContext( - &connssl->cred->cred_handle, &connssl->ctxt->ctxt_handle, - host_name, connssl->req_flags, 0, 0, &inbuf_desc, 0, NULL, - &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp); + &BACKEND->cred->cred_handle, &BACKEND->ctxt->ctxt_handle, + host_name, BACKEND->req_flags, 0, 0, &inbuf_desc, 0, NULL, + &outbuf_desc, &BACKEND->ret_flags, &BACKEND->ctxt->time_stamp); Curl_unicodefree(host_name); @@ -543,6 +671,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) /* check if the handshake was incomplete */ if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) { + BACKEND->encdata_is_incomplete = true; connssl->connecting_state = ssl_connect_2_reading; infof(data, "schannel: received incomplete message, need more data\n"); return CURLE_OK; @@ -552,8 +681,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) the handshake without one. This will allow connections to servers which request a client certificate but do not require it. */ if(sspi_status == SEC_I_INCOMPLETE_CREDENTIALS && - !(connssl->req_flags & ISC_REQ_USE_SUPPLIED_CREDS)) { - connssl->req_flags |= ISC_REQ_USE_SUPPLIED_CREDS; + !(BACKEND->req_flags & ISC_REQ_USE_SUPPLIED_CREDS)) { + BACKEND->req_flags |= ISC_REQ_USE_SUPPLIED_CREDS; connssl->connecting_state = ssl_connect_2_writing; infof(data, "schannel: a client certificate has been requested\n"); return CURLE_OK; @@ -592,7 +721,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) else failf(data, "schannel: next InitializeSecurityContext failed: %s", Curl_sspi_strerror(conn, sspi_status)); - return CURLE_SSL_CONNECT_ERROR; + return sspi_status == SEC_E_UNTRUSTED_ROOT ? + CURLE_SSL_CACERT : CURLE_SSL_CONNECT_ERROR; } /* check if there was additional remaining encrypted data */ @@ -610,11 +740,11 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) */ /* check if the remaining data is less than the total amount and therefore begins after the already processed data */ - if(connssl->encdata_offset > inbuf[1].cbBuffer) { - memmove(connssl->encdata_buffer, - (connssl->encdata_buffer + connssl->encdata_offset) - + if(BACKEND->encdata_offset > inbuf[1].cbBuffer) { + memmove(BACKEND->encdata_buffer, + (BACKEND->encdata_buffer + BACKEND->encdata_offset) - inbuf[1].cbBuffer, inbuf[1].cbBuffer); - connssl->encdata_offset = inbuf[1].cbBuffer; + BACKEND->encdata_offset = inbuf[1].cbBuffer; if(sspi_status == SEC_I_CONTINUE_NEEDED) { doread = FALSE; continue; @@ -622,7 +752,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) } } else { - connssl->encdata_offset = 0; + BACKEND->encdata_offset = 0; } break; } @@ -639,6 +769,17 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) infof(data, "schannel: SSL/TLS handshake complete\n"); } + pubkey_ptr = SSL_IS_PROXY() ? + data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : + data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; + if(pubkey_ptr) { + result = pkp_pin_peer_pubkey(conn, sockindex, pubkey_ptr); + if(result) { + failf(data, "SSL: public key does not match pinned public key!"); + return result; + } + } + #ifdef _WIN32_WCE /* Windows CE doesn't do any server certificate validation. We have to do it manually. */ @@ -657,8 +798,10 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) struct ssl_connect_data *connssl = &conn->ssl[sockindex]; SECURITY_STATUS sspi_status = SEC_E_OK; CERT_CONTEXT *ccert_context = NULL; +#ifndef CURL_DISABLE_VERBOSE_STRINGS const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; +#endif #ifdef HAS_ALPN SecPkgContext_ApplicationProtocol alpn_result; #endif @@ -668,27 +811,27 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) infof(data, "schannel: SSL/TLS connection with %s port %hu (step 3/3)\n", hostname, conn->remote_port); - if(!connssl->cred) + if(!BACKEND->cred) return CURLE_SSL_CONNECT_ERROR; /* check if the required context attributes are met */ - if(connssl->ret_flags != connssl->req_flags) { - if(!(connssl->ret_flags & ISC_RET_SEQUENCE_DETECT)) + if(BACKEND->ret_flags != BACKEND->req_flags) { + if(!(BACKEND->ret_flags & ISC_RET_SEQUENCE_DETECT)) failf(data, "schannel: failed to setup sequence detection"); - if(!(connssl->ret_flags & ISC_RET_REPLAY_DETECT)) + if(!(BACKEND->ret_flags & ISC_RET_REPLAY_DETECT)) failf(data, "schannel: failed to setup replay detection"); - if(!(connssl->ret_flags & ISC_RET_CONFIDENTIALITY)) + if(!(BACKEND->ret_flags & ISC_RET_CONFIDENTIALITY)) failf(data, "schannel: failed to setup confidentiality"); - if(!(connssl->ret_flags & ISC_RET_ALLOCATED_MEMORY)) + if(!(BACKEND->ret_flags & ISC_RET_ALLOCATED_MEMORY)) failf(data, "schannel: failed to setup memory allocation"); - if(!(connssl->ret_flags & ISC_RET_STREAM)) + if(!(BACKEND->ret_flags & ISC_RET_STREAM)) failf(data, "schannel: failed to setup stream orientation"); return CURLE_SSL_CONNECT_ERROR; } #ifdef HAS_ALPN - if(connssl->use_alpn) { - sspi_status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle, + if(BACKEND->use_alpn) { + sspi_status = s_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle, SECPKG_ATTR_APPLICATION_PROTOCOL, &alpn_result); if(sspi_status != SEC_E_OK) { @@ -722,7 +865,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) #endif /* save the current session data for possible re-use */ - if(data->set.general_ssl.sessionid) { + if(SSL_SET_OPTION(primary.sessionid)) { bool incache; struct curl_schannel_cred *old_cred = NULL; @@ -730,7 +873,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) incache = !(Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)); if(incache) { - if(old_cred != connssl->cred) { + if(old_cred != BACKEND->cred) { infof(data, "schannel: old credential handle is stale, removing\n"); /* we're not taking old_cred ownership here, no refcount++ is needed */ Curl_ssl_delsessionid(conn, (void *)old_cred); @@ -738,7 +881,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) } } if(!incache) { - result = Curl_ssl_addsessionid(conn, (void *)connssl->cred, + result = Curl_ssl_addsessionid(conn, (void *)BACKEND->cred, sizeof(struct curl_schannel_cred), sockindex); if(result) { @@ -748,7 +891,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) } else { /* this cred session is now also referenced by sessionid cache */ - connssl->cred->refcount++; + BACKEND->cred->refcount++; infof(data, "schannel: stored credential handle in session cache\n"); } } @@ -756,7 +899,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) } if(data->set.ssl.certinfo) { - sspi_status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle, + sspi_status = s_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle, SECPKG_ATTR_REMOTE_CERT_CONTEXT, &ccert_context); if((sspi_status != SEC_E_OK) || (ccert_context == NULL)) { @@ -910,11 +1053,11 @@ schannel_send(struct connectdata *conn, int sockindex, CURLcode result; /* check if the maximum stream sizes were queried */ - if(connssl->stream_sizes.cbMaximumMessage == 0) { + if(BACKEND->stream_sizes.cbMaximumMessage == 0) { sspi_status = s_pSecFn->QueryContextAttributes( - &connssl->ctxt->ctxt_handle, + &BACKEND->ctxt->ctxt_handle, SECPKG_ATTR_STREAM_SIZES, - &connssl->stream_sizes); + &BACKEND->stream_sizes); if(sspi_status != SEC_E_OK) { *err = CURLE_SEND_ERROR; return -1; @@ -922,14 +1065,13 @@ schannel_send(struct connectdata *conn, int sockindex, } /* check if the buffer is longer than the maximum message length */ - if(len > connssl->stream_sizes.cbMaximumMessage) { - *err = CURLE_SEND_ERROR; - return -1; + if(len > BACKEND->stream_sizes.cbMaximumMessage) { + len = BACKEND->stream_sizes.cbMaximumMessage; } /* calculate the complete message length and allocate a buffer for it */ - data_len = connssl->stream_sizes.cbHeader + len + - connssl->stream_sizes.cbTrailer; + data_len = BACKEND->stream_sizes.cbHeader + len + + BACKEND->stream_sizes.cbTrailer; data = (unsigned char *) malloc(data_len); if(data == NULL) { *err = CURLE_OUT_OF_MEMORY; @@ -938,12 +1080,12 @@ schannel_send(struct connectdata *conn, int sockindex, /* setup output buffers (header, data, trailer, empty) */ InitSecBuffer(&outbuf[0], SECBUFFER_STREAM_HEADER, - data, connssl->stream_sizes.cbHeader); + data, BACKEND->stream_sizes.cbHeader); InitSecBuffer(&outbuf[1], SECBUFFER_DATA, - data + connssl->stream_sizes.cbHeader, curlx_uztoul(len)); + data + BACKEND->stream_sizes.cbHeader, curlx_uztoul(len)); InitSecBuffer(&outbuf[2], SECBUFFER_STREAM_TRAILER, - data + connssl->stream_sizes.cbHeader + len, - connssl->stream_sizes.cbTrailer); + data + BACKEND->stream_sizes.cbHeader + len, + BACKEND->stream_sizes.cbTrailer); InitSecBuffer(&outbuf[3], SECBUFFER_EMPTY, NULL, 0); InitSecBufferDesc(&outbuf_desc, outbuf, 4); @@ -951,7 +1093,7 @@ schannel_send(struct connectdata *conn, int sockindex, memcpy(outbuf[1].pvBuffer, buf, len); /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375390.aspx */ - sspi_status = s_pSecFn->EncryptMessage(&connssl->ctxt->ctxt_handle, 0, + sspi_status = s_pSecFn->EncryptMessage(&BACKEND->ctxt->ctxt_handle, 0, &outbuf_desc, 0); /* check if the message was encrypted */ @@ -1061,7 +1203,7 @@ schannel_recv(struct connectdata *conn, int sockindex, size_t min_encdata_length = len + CURL_SCHANNEL_BUFFER_FREE_SIZE; /**************************************************************************** - * Don't return or set connssl->recv_unrecoverable_err unless in the cleanup. + * Don't return or set BACKEND->recv_unrecoverable_err unless in the cleanup. * The pattern for return error is set *err, optional infof, goto cleanup. * * Our priority is to always return as much decrypted data to the caller as @@ -1073,16 +1215,16 @@ schannel_recv(struct connectdata *conn, int sockindex, infof(data, "schannel: client wants to read %zu bytes\n", len); *err = CURLE_OK; - if(len && len <= connssl->decdata_offset) { + if(len && len <= BACKEND->decdata_offset) { infof(data, "schannel: enough decrypted data is already available\n"); goto cleanup; } - else if(connssl->recv_unrecoverable_err) { - *err = connssl->recv_unrecoverable_err; + else if(BACKEND->recv_unrecoverable_err) { + *err = BACKEND->recv_unrecoverable_err; infof(data, "schannel: an unrecoverable error occurred in a prior call\n"); goto cleanup; } - else if(connssl->recv_sspi_close_notify) { + else if(BACKEND->recv_sspi_close_notify) { /* once a server has indicated shutdown there is no more encrypted data */ infof(data, "schannel: server indicated shutdown in a prior call\n"); goto cleanup; @@ -1094,17 +1236,17 @@ schannel_recv(struct connectdata *conn, int sockindex, */ ; /* do nothing */ } - else if(!connssl->recv_connection_closed) { + else if(!BACKEND->recv_connection_closed) { /* increase enc buffer in order to fit the requested amount of data */ - size = connssl->encdata_length - connssl->encdata_offset; + size = BACKEND->encdata_length - BACKEND->encdata_offset; if(size < CURL_SCHANNEL_BUFFER_FREE_SIZE || - connssl->encdata_length < min_encdata_length) { - reallocated_length = connssl->encdata_offset + + BACKEND->encdata_length < min_encdata_length) { + reallocated_length = BACKEND->encdata_offset + CURL_SCHANNEL_BUFFER_FREE_SIZE; if(reallocated_length < min_encdata_length) { reallocated_length = min_encdata_length; } - reallocated_buffer = realloc(connssl->encdata_buffer, + reallocated_buffer = realloc(BACKEND->encdata_buffer, reallocated_length); if(reallocated_buffer == NULL) { *err = CURLE_OUT_OF_MEMORY; @@ -1112,20 +1254,20 @@ schannel_recv(struct connectdata *conn, int sockindex, goto cleanup; } - connssl->encdata_buffer = reallocated_buffer; - connssl->encdata_length = reallocated_length; - size = connssl->encdata_length - connssl->encdata_offset; + BACKEND->encdata_buffer = reallocated_buffer; + BACKEND->encdata_length = reallocated_length; + size = BACKEND->encdata_length - BACKEND->encdata_offset; infof(data, "schannel: encdata_buffer resized %zu\n", - connssl->encdata_length); + BACKEND->encdata_length); } infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); + BACKEND->encdata_offset, BACKEND->encdata_length); /* read encrypted data from socket */ *err = Curl_read_plain(conn->sock[sockindex], - (char *)(connssl->encdata_buffer + - connssl->encdata_offset), + (char *)(BACKEND->encdata_buffer + + BACKEND->encdata_offset), size, &nread); if(*err) { nread = -1; @@ -1137,25 +1279,26 @@ schannel_recv(struct connectdata *conn, int sockindex, infof(data, "schannel: Curl_read_plain returned error %d\n", *err); } else if(nread == 0) { - connssl->recv_connection_closed = true; + BACKEND->recv_connection_closed = true; infof(data, "schannel: server closed the connection\n"); } else if(nread > 0) { - connssl->encdata_offset += (size_t)nread; + BACKEND->encdata_offset += (size_t)nread; + BACKEND->encdata_is_incomplete = false; infof(data, "schannel: encrypted data got %zd\n", nread); } } infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); + BACKEND->encdata_offset, BACKEND->encdata_length); /* decrypt loop */ - while(connssl->encdata_offset > 0 && sspi_status == SEC_E_OK && - (!len || connssl->decdata_offset < len || - connssl->recv_connection_closed)) { + while(BACKEND->encdata_offset > 0 && sspi_status == SEC_E_OK && + (!len || BACKEND->decdata_offset < len || + BACKEND->recv_connection_closed)) { /* prepare data buffer for DecryptMessage call */ - InitSecBuffer(&inbuf[0], SECBUFFER_DATA, connssl->encdata_buffer, - curlx_uztoul(connssl->encdata_offset)); + InitSecBuffer(&inbuf[0], SECBUFFER_DATA, BACKEND->encdata_buffer, + curlx_uztoul(BACKEND->encdata_offset)); /* we need 3 more empty input buffers for possible output */ InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0); @@ -1165,7 +1308,7 @@ schannel_recv(struct connectdata *conn, int sockindex, /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375348.aspx */ - sspi_status = s_pSecFn->DecryptMessage(&connssl->ctxt->ctxt_handle, + sspi_status = s_pSecFn->DecryptMessage(&BACKEND->ctxt->ctxt_handle, &inbuf_desc, 0, NULL); /* check if everything went fine (server may want to renegotiate @@ -1181,36 +1324,36 @@ schannel_recv(struct connectdata *conn, int sockindex, /* increase buffer in order to fit the received amount of data */ size = inbuf[1].cbBuffer > CURL_SCHANNEL_BUFFER_FREE_SIZE ? inbuf[1].cbBuffer : CURL_SCHANNEL_BUFFER_FREE_SIZE; - if(connssl->decdata_length - connssl->decdata_offset < size || - connssl->decdata_length < len) { + if(BACKEND->decdata_length - BACKEND->decdata_offset < size || + BACKEND->decdata_length < len) { /* increase internal decrypted data buffer */ - reallocated_length = connssl->decdata_offset + size; + reallocated_length = BACKEND->decdata_offset + size; /* make sure that the requested amount of data fits */ if(reallocated_length < len) { reallocated_length = len; } - reallocated_buffer = realloc(connssl->decdata_buffer, + reallocated_buffer = realloc(BACKEND->decdata_buffer, reallocated_length); if(reallocated_buffer == NULL) { *err = CURLE_OUT_OF_MEMORY; failf(data, "schannel: unable to re-allocate memory"); goto cleanup; } - connssl->decdata_buffer = reallocated_buffer; - connssl->decdata_length = reallocated_length; + BACKEND->decdata_buffer = reallocated_buffer; + BACKEND->decdata_length = reallocated_length; } /* copy decrypted data to internal buffer */ size = inbuf[1].cbBuffer; if(size) { - memcpy(connssl->decdata_buffer + connssl->decdata_offset, + memcpy(BACKEND->decdata_buffer + BACKEND->decdata_offset, inbuf[1].pvBuffer, size); - connssl->decdata_offset += size; + BACKEND->decdata_offset += size; } infof(data, "schannel: decrypted data added: %zu\n", size); infof(data, "schannel: decrypted data cached: offset %zu length %zu\n", - connssl->decdata_offset, connssl->decdata_length); + BACKEND->decdata_offset, BACKEND->decdata_length); } /* check for remaining encrypted data */ @@ -1221,21 +1364,21 @@ schannel_recv(struct connectdata *conn, int sockindex, /* check if the remaining data is less than the total amount * and therefore begins after the already processed data */ - if(connssl->encdata_offset > inbuf[3].cbBuffer) { + if(BACKEND->encdata_offset > inbuf[3].cbBuffer) { /* move remaining encrypted data forward to the beginning of buffer */ - memmove(connssl->encdata_buffer, - (connssl->encdata_buffer + connssl->encdata_offset) - + memmove(BACKEND->encdata_buffer, + (BACKEND->encdata_buffer + BACKEND->encdata_offset) - inbuf[3].cbBuffer, inbuf[3].cbBuffer); - connssl->encdata_offset = inbuf[3].cbBuffer; + BACKEND->encdata_offset = inbuf[3].cbBuffer; } infof(data, "schannel: encrypted data cached: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); + BACKEND->encdata_offset, BACKEND->encdata_length); } else { /* reset encrypted buffer offset, because there is no data remaining */ - connssl->encdata_offset = 0; + BACKEND->encdata_offset = 0; } /* check if server wants to renegotiate the connection context */ @@ -1245,7 +1388,7 @@ schannel_recv(struct connectdata *conn, int sockindex, infof(data, "schannel: can't renogotiate, an error is pending\n"); goto cleanup; } - if(connssl->encdata_offset) { + if(BACKEND->encdata_offset) { *err = CURLE_RECV_ERROR; infof(data, "schannel: can't renogotiate, " "encrypted data available\n"); @@ -1269,15 +1412,16 @@ schannel_recv(struct connectdata *conn, int sockindex, else if(sspi_status == SEC_I_CONTEXT_EXPIRED) { /* In Windows 2000 SEC_I_CONTEXT_EXPIRED (close_notify) is not returned so we have to work around that in cleanup. */ - connssl->recv_sspi_close_notify = true; - if(!connssl->recv_connection_closed) { - connssl->recv_connection_closed = true; + BACKEND->recv_sspi_close_notify = true; + if(!BACKEND->recv_connection_closed) { + BACKEND->recv_connection_closed = true; infof(data, "schannel: server closed the connection\n"); } goto cleanup; } } else if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) { + BACKEND->encdata_is_incomplete = true; if(!*err) *err = CURLE_AGAIN; infof(data, "schannel: failed to decrypt data, need more data\n"); @@ -1292,10 +1436,10 @@ schannel_recv(struct connectdata *conn, int sockindex, } infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); + BACKEND->encdata_offset, BACKEND->encdata_length); infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n", - connssl->decdata_offset, connssl->decdata_length); + BACKEND->decdata_offset, BACKEND->decdata_length); cleanup: /* Warning- there is no guarantee the encdata state is valid at this point */ @@ -1309,13 +1453,13 @@ cleanup: return close_notify. In that case if the connection was closed we assume it was graceful (close_notify) since there doesn't seem to be a way to tell. */ - if(len && !connssl->decdata_offset && connssl->recv_connection_closed && - !connssl->recv_sspi_close_notify) { + if(len && !BACKEND->decdata_offset && BACKEND->recv_connection_closed && + !BACKEND->recv_sspi_close_notify) { bool isWin2k = Curl_verify_windows_version(5, 0, PLATFORM_WINNT, VERSION_EQUAL); if(isWin2k && sspi_status == SEC_E_OK) - connssl->recv_sspi_close_notify = true; + BACKEND->recv_sspi_close_notify = true; else { *err = CURLE_RECV_ERROR; infof(data, "schannel: server closed abruptly (missing close_notify)\n"); @@ -1324,23 +1468,23 @@ cleanup: /* Any error other than CURLE_AGAIN is an unrecoverable error. */ if(*err && *err != CURLE_AGAIN) - connssl->recv_unrecoverable_err = *err; + BACKEND->recv_unrecoverable_err = *err; - size = len < connssl->decdata_offset ? len : connssl->decdata_offset; + size = len < BACKEND->decdata_offset ? len : BACKEND->decdata_offset; if(size) { - memcpy(buf, connssl->decdata_buffer, size); - memmove(connssl->decdata_buffer, connssl->decdata_buffer + size, - connssl->decdata_offset - size); - connssl->decdata_offset -= size; + memcpy(buf, BACKEND->decdata_buffer, size); + memmove(BACKEND->decdata_buffer, BACKEND->decdata_buffer + size, + BACKEND->decdata_offset - size); + BACKEND->decdata_offset -= size; infof(data, "schannel: decrypted data returned %zu\n", size); infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n", - connssl->decdata_offset, connssl->decdata_length); + BACKEND->decdata_offset, BACKEND->decdata_length); *err = CURLE_OK; return (ssize_t)size; } - if(!*err && !connssl->recv_connection_closed) + if(!*err && !BACKEND->recv_connection_closed) *err = CURLE_AGAIN; /* It's debatable what to return when !len. We could return whatever error we @@ -1352,15 +1496,13 @@ cleanup: return *err ? -1 : 0; } -CURLcode -Curl_schannel_connect_nonblocking(struct connectdata *conn, int sockindex, - bool *done) +static CURLcode Curl_schannel_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { return schannel_connect_common(conn, sockindex, TRUE, done); } -CURLcode -Curl_schannel_connect(struct connectdata *conn, int sockindex) +static CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex) { CURLcode result; bool done = FALSE; @@ -1374,38 +1516,51 @@ Curl_schannel_connect(struct connectdata *conn, int sockindex) return CURLE_OK; } -bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex) +static bool Curl_schannel_data_pending(const struct connectdata *conn, + int sockindex) { const struct ssl_connect_data *connssl = &conn->ssl[sockindex]; if(connssl->use) /* SSL/TLS is in use */ - return (connssl->encdata_offset > 0 || - connssl->decdata_offset > 0) ? TRUE : FALSE; + return (BACKEND->decdata_offset > 0 || + (BACKEND->encdata_offset > 0 && !BACKEND->encdata_is_incomplete)); else return FALSE; } -void Curl_schannel_close(struct connectdata *conn, int sockindex) +static void Curl_schannel_close(struct connectdata *conn, int sockindex) { if(conn->ssl[sockindex].use) /* if the SSL/TLS channel hasn't been shut down yet, do that now. */ Curl_ssl_shutdown(conn, sockindex); } -int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) +static void Curl_schannel_session_free(void *ptr) +{ + /* this is expected to be called under sessionid lock */ + struct curl_schannel_cred *cred = ptr; + + cred->refcount--; + if(cred->refcount == 0) { + s_pSecFn->FreeCredentialsHandle(&cred->cred_handle); + Curl_safefree(cred); + } +} + +static int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) { /* See https://msdn.microsoft.com/en-us/library/windows/desktop/aa380138.aspx * Shutting Down an Schannel Connection */ struct Curl_easy *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : + char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu\n", hostname, conn->remote_port); - if(connssl->cred && connssl->ctxt) { + if(BACKEND->cred && BACKEND->ctxt) { SecBufferDesc BuffDesc; SecBuffer Buffer; SECURITY_STATUS sspi_status; @@ -1418,7 +1573,7 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) InitSecBuffer(&Buffer, SECBUFFER_TOKEN, &dwshut, sizeof(dwshut)); InitSecBufferDesc(&BuffDesc, &Buffer, 1); - sspi_status = s_pSecFn->ApplyControlToken(&connssl->ctxt->ctxt_handle, + sspi_status = s_pSecFn->ApplyControlToken(&BACKEND->ctxt->ctxt_handle, &BuffDesc); if(sspi_status != SEC_E_OK) @@ -1434,18 +1589,18 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) InitSecBufferDesc(&outbuf_desc, &outbuf, 1); sspi_status = s_pSecFn->InitializeSecurityContext( - &connssl->cred->cred_handle, - &connssl->ctxt->ctxt_handle, + &BACKEND->cred->cred_handle, + &BACKEND->ctxt->ctxt_handle, host_name, - connssl->req_flags, + BACKEND->req_flags, 0, 0, NULL, 0, - &connssl->ctxt->ctxt_handle, + &BACKEND->ctxt->ctxt_handle, &outbuf_desc, - &connssl->ret_flags, - &connssl->ctxt->time_stamp); + &BACKEND->ret_flags, + &BACKEND->ctxt->time_stamp); Curl_unicodefree(host_name); @@ -1464,70 +1619,62 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) } /* free SSPI Schannel API security context handle */ - if(connssl->ctxt) { + if(BACKEND->ctxt) { infof(data, "schannel: clear security context handle\n"); - s_pSecFn->DeleteSecurityContext(&connssl->ctxt->ctxt_handle); - Curl_safefree(connssl->ctxt); + s_pSecFn->DeleteSecurityContext(&BACKEND->ctxt->ctxt_handle); + Curl_safefree(BACKEND->ctxt); } /* free SSPI Schannel API credential handle */ - if(connssl->cred) { + if(BACKEND->cred) { Curl_ssl_sessionid_lock(conn); - Curl_schannel_session_free(connssl->cred); + Curl_schannel_session_free(BACKEND->cred); Curl_ssl_sessionid_unlock(conn); - connssl->cred = NULL; + BACKEND->cred = NULL; } /* free internal buffer for received encrypted data */ - if(connssl->encdata_buffer != NULL) { - Curl_safefree(connssl->encdata_buffer); - connssl->encdata_length = 0; - connssl->encdata_offset = 0; + if(BACKEND->encdata_buffer != NULL) { + Curl_safefree(BACKEND->encdata_buffer); + BACKEND->encdata_length = 0; + BACKEND->encdata_offset = 0; + BACKEND->encdata_is_incomplete = false; } /* free internal buffer for received decrypted data */ - if(connssl->decdata_buffer != NULL) { - Curl_safefree(connssl->decdata_buffer); - connssl->decdata_length = 0; - connssl->decdata_offset = 0; + if(BACKEND->decdata_buffer != NULL) { + Curl_safefree(BACKEND->decdata_buffer); + BACKEND->decdata_length = 0; + BACKEND->decdata_offset = 0; } return CURLE_OK; } -void Curl_schannel_session_free(void *ptr) -{ - /* this is expected to be called under sessionid lock */ - struct curl_schannel_cred *cred = ptr; - - cred->refcount--; - if(cred->refcount == 0) { - s_pSecFn->FreeCredentialsHandle(&cred->cred_handle); - Curl_safefree(cred); - } -} - -int Curl_schannel_init(void) +static int Curl_schannel_init(void) { return (Curl_sspi_global_init() == CURLE_OK ? 1 : 0); } -void Curl_schannel_cleanup(void) +static void Curl_schannel_cleanup(void) { Curl_sspi_global_cleanup(); } -size_t Curl_schannel_version(char *buffer, size_t size) +static size_t Curl_schannel_version(char *buffer, size_t size) { size = snprintf(buffer, size, "WinSSL"); return size; } -CURLcode Curl_schannel_random(unsigned char *entropy, size_t length) +static CURLcode Curl_schannel_random(struct Curl_easy *data UNUSED_PARAM, + unsigned char *entropy, size_t length) { HCRYPTPROV hCryptProv = 0; + (void)data; + if(!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) return CURLE_FAILED_INIT; @@ -1541,6 +1688,68 @@ CURLcode Curl_schannel_random(unsigned char *entropy, size_t length) return CURLE_OK; } +static CURLcode pkp_pin_peer_pubkey(struct connectdata *conn, int sockindex, + const char *pinnedpubkey) +{ + SECURITY_STATUS status; + struct Curl_easy *data = conn->data; + struct ssl_connect_data *connssl = &conn->ssl[sockindex]; + CERT_CONTEXT *pCertContextServer = NULL; + const char *x509_der; + DWORD x509_der_len; + curl_X509certificate x509_parsed; + curl_asn1Element *pubkey; + + /* Result is returned to caller */ + CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; + + /* if a path wasn't specified, don't pin */ + if(!pinnedpubkey) + return CURLE_OK; + + do { + status = s_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle, + SECPKG_ATTR_REMOTE_CERT_CONTEXT, + &pCertContextServer); + + if((status != SEC_E_OK) || (pCertContextServer == NULL)) { + failf(data, "schannel: Failed to read remote certificate context: %s", + Curl_sspi_strerror(conn, status)); + break; /* failed */ + } + + + if(!(((pCertContextServer->dwCertEncodingType & X509_ASN_ENCODING) != 0) && + (pCertContextServer->cbCertEncoded > 0))) + break; + + x509_der = (const char *)pCertContextServer->pbCertEncoded; + x509_der_len = pCertContextServer->cbCertEncoded; + memset(&x509_parsed, 0, sizeof x509_parsed); + if(Curl_parseX509(&x509_parsed, x509_der, x509_der + x509_der_len)) + break; + + pubkey = &x509_parsed.subjectPublicKeyInfo; + if(!pubkey->header || pubkey->end <= pubkey->header) { + failf(data, "SSL: failed retrieving public key from server certificate"); + break; + } + + result = Curl_pin_peer_pubkey(data, + pinnedpubkey, + (const unsigned char *)pubkey->header, + (size_t)(pubkey->end - pubkey->header)); + if(result) { + failf(data, "SSL: public key does not match pinned public key!"); + } + } while(0); + + if(pCertContextServer) + CertFreeCertificateContext(pCertContextServer); + + return result; +} + #ifdef _WIN32_WCE static CURLcode verify_certificate(struct connectdata *conn, int sockindex) { @@ -1554,7 +1763,7 @@ static CURLcode verify_certificate(struct connectdata *conn, int sockindex) conn->http_proxy.host.name : conn->host.name; - status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle, + status = s_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle, SECPKG_ATTR_REMOTE_CERT_CONTEXT, &pCertContextServer); @@ -1681,4 +1890,112 @@ static CURLcode verify_certificate(struct connectdata *conn, int sockindex) } #endif /* _WIN32_WCE */ +static void Curl_schannel_checksum(const unsigned char *input, + size_t inputlen, + unsigned char *checksum, + size_t checksumlen, + DWORD provType, + const unsigned int algId) +{ + HCRYPTPROV hProv = 0; + HCRYPTHASH hHash = 0; + DWORD cbHashSize = 0; + DWORD dwHashSizeLen = (DWORD)sizeof(cbHashSize); + DWORD dwChecksumLen = (DWORD)checksumlen; + + /* since this can fail in multiple ways, zero memory first so we never + * return old data + */ + memset(checksum, 0, checksumlen); + + if(!CryptAcquireContext(&hProv, NULL, NULL, provType, + CRYPT_VERIFYCONTEXT)) + return; /* failed */ + + do { + if(!CryptCreateHash(hProv, algId, 0, 0, &hHash)) + break; /* failed */ + + if(!CryptHashData(hHash, (const BYTE*)input, (DWORD)inputlen, 0)) + break; /* failed */ + + /* get hash size */ + if(!CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE *)&cbHashSize, + &dwHashSizeLen, 0)) + break; /* failed */ + + /* check hash size */ + if(checksumlen < cbHashSize) + break; /* failed */ + + if(CryptGetHashParam(hHash, HP_HASHVAL, checksum, &dwChecksumLen, 0)) + break; /* failed */ + } while(0); + + if(hHash) + CryptDestroyHash(hHash); + + if(hProv) + CryptReleaseContext(hProv, 0); +} + +static CURLcode Curl_schannel_md5sum(unsigned char *input, + size_t inputlen, + unsigned char *md5sum, + size_t md5len) +{ + Curl_schannel_checksum(input, inputlen, md5sum, md5len, + PROV_RSA_FULL, CALG_MD5); + return CURLE_OK; +} + +static void Curl_schannel_sha256sum(const unsigned char *input, + size_t inputlen, + unsigned char *sha256sum, + size_t sha256len) +{ + Curl_schannel_checksum(input, inputlen, sha256sum, sha256len, + PROV_RSA_AES, CALG_SHA_256); +} + +static void *Curl_schannel_get_internals(struct ssl_connect_data *connssl, + CURLINFO info UNUSED_PARAM) +{ + (void)info; + return &BACKEND->ctxt->ctxt_handle; +} + +const struct Curl_ssl Curl_ssl_schannel = { + { CURLSSLBACKEND_SCHANNEL, "schannel" }, /* info */ + + 0, /* have_ca_path */ + 1, /* have_certinfo */ + 1, /* have_pinnedpubkey */ + 0, /* have_ssl_ctx */ + 0, /* support_https_proxy */ + + sizeof(struct ssl_backend_data), + + Curl_schannel_init, /* init */ + Curl_schannel_cleanup, /* cleanup */ + Curl_schannel_version, /* version */ + Curl_none_check_cxn, /* check_cxn */ + Curl_schannel_shutdown, /* shutdown */ + Curl_schannel_data_pending, /* data_pending */ + Curl_schannel_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_schannel_connect, /* connect */ + Curl_schannel_connect_nonblocking, /* connect_nonblocking */ + Curl_schannel_get_internals, /* get_internals */ + Curl_schannel_close, /* close_one */ + Curl_none_close_all, /* close_all */ + Curl_schannel_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_schannel_md5sum, /* md5sum */ + Curl_schannel_sha256sum /* sha256sum */ +}; + #endif /* USE_SCHANNEL */ diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h index 8627c63..932103d 100644 --- a/lib/vtls/schannel.h +++ b/lib/vtls/schannel.h @@ -28,94 +28,7 @@ #include "urldata.h" -#ifndef UNISP_NAME_A -#define UNISP_NAME_A "Microsoft Unified Security Protocol Provider" -#endif - -#ifndef UNISP_NAME_W -#define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider" -#endif - -#ifndef UNISP_NAME -#ifdef UNICODE -#define UNISP_NAME UNISP_NAME_W -#else -#define UNISP_NAME UNISP_NAME_A -#endif -#endif - -#ifndef SP_PROT_SSL2_CLIENT -#define SP_PROT_SSL2_CLIENT 0x00000008 -#endif - -#ifndef SP_PROT_SSL3_CLIENT -#define SP_PROT_SSL3_CLIENT 0x00000008 -#endif - -#ifndef SP_PROT_TLS1_CLIENT -#define SP_PROT_TLS1_CLIENT 0x00000080 -#endif - -#ifndef SP_PROT_TLS1_0_CLIENT -#define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT -#endif - -#ifndef SP_PROT_TLS1_1_CLIENT -#define SP_PROT_TLS1_1_CLIENT 0x00000200 -#endif - -#ifndef SP_PROT_TLS1_2_CLIENT -#define SP_PROT_TLS1_2_CLIENT 0x00000800 -#endif - -#ifndef SECBUFFER_ALERT -#define SECBUFFER_ALERT 17 -#endif - -/* Both schannel buffer sizes must be > 0 */ -#define CURL_SCHANNEL_BUFFER_INIT_SIZE 4096 -#define CURL_SCHANNEL_BUFFER_FREE_SIZE 1024 - - -CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_schannel_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex); -void Curl_schannel_close(struct connectdata *conn, int sockindex); -int Curl_schannel_shutdown(struct connectdata *conn, int sockindex); -void Curl_schannel_session_free(void *ptr); - -int Curl_schannel_init(void); -void Curl_schannel_cleanup(void); -size_t Curl_schannel_version(char *buffer, size_t size); - -CURLcode Curl_schannel_random(unsigned char *entropy, size_t length); - -/* Set the API backend definition to Schannel */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* API setup for Schannel */ -#define curlssl_init Curl_schannel_init -#define curlssl_cleanup Curl_schannel_cleanup -#define curlssl_connect Curl_schannel_connect -#define curlssl_connect_nonblocking Curl_schannel_connect_nonblocking -#define curlssl_session_free Curl_schannel_session_free -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_schannel_close -#define curlssl_shutdown Curl_schannel_shutdown -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_schannel_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending Curl_schannel_data_pending -#define curlssl_random(x,y,z) ((void)x, Curl_schannel_random(y,z)) +extern const struct Curl_ssl Curl_ssl_schannel; #endif /* USE_SCHANNEL */ #endif /* HEADER_CURL_SCHANNEL_H */ diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index f40a977..def1d30 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -28,17 +28,9 @@ to any specific SSL-layer. Curl_ssl_ - prefix for generic ones - Curl_ossl_ - prefix for OpenSSL ones - Curl_gtls_ - prefix for GnuTLS ones - Curl_nss_ - prefix for NSS ones - Curl_gskit_ - prefix for GSKit ones - Curl_polarssl_ - prefix for PolarSSL ones - Curl_cyassl_ - prefix for CyaSSL ones - Curl_schannel_ - prefix for Schannel SSPI ones - Curl_darwinssl_ - prefix for SecureTransport (Darwin) ones - - Note that this source code uses curlssl_* functions, and they are all - defines/macros #defined by the lib-specific header files. + + Note that this source code uses the functions of the configured SSL + backend via the global Curl_ssl instance. "SSL/TLS Strong Encryption: An Introduction" https://httpd.apache.org/docs/2.0/ssl/ssl_intro.html @@ -95,11 +87,15 @@ Curl_ssl_config_matches(struct ssl_primary_config* data, struct ssl_primary_config* needle) { if((data->version == needle->version) && + (data->version_max == needle->version_max) && (data->verifypeer == needle->verifypeer) && (data->verifyhost == needle->verifyhost) && + (data->verifystatus == needle->verifystatus) && Curl_safe_strcasecompare(data->CApath, needle->CApath) && Curl_safe_strcasecompare(data->CAfile, needle->CAfile) && Curl_safe_strcasecompare(data->clientcert, needle->clientcert) && + Curl_safe_strcasecompare(data->random_file, needle->random_file) && + Curl_safe_strcasecompare(data->egdsocket, needle->egdsocket) && Curl_safe_strcasecompare(data->cipher_list, needle->cipher_list)) return TRUE; @@ -110,38 +106,51 @@ bool Curl_clone_primary_ssl_config(struct ssl_primary_config *source, struct ssl_primary_config *dest) { - dest->verifyhost = source->verifyhost; - dest->verifypeer = source->verifypeer; dest->version = source->version; + dest->version_max = source->version_max; + dest->verifypeer = source->verifypeer; + dest->verifyhost = source->verifyhost; + dest->verifystatus = source->verifystatus; + dest->sessionid = source->sessionid; - CLONE_STRING(CAfile); CLONE_STRING(CApath); - CLONE_STRING(cipher_list); - CLONE_STRING(egdsocket); - CLONE_STRING(random_file); + CLONE_STRING(CAfile); CLONE_STRING(clientcert); + CLONE_STRING(random_file); + CLONE_STRING(egdsocket); + CLONE_STRING(cipher_list); + return TRUE; } void Curl_free_primary_ssl_config(struct ssl_primary_config* sslc) { - Curl_safefree(sslc->CAfile); Curl_safefree(sslc->CApath); - Curl_safefree(sslc->cipher_list); - Curl_safefree(sslc->egdsocket); - Curl_safefree(sslc->random_file); + Curl_safefree(sslc->CAfile); Curl_safefree(sslc->clientcert); + Curl_safefree(sslc->random_file); + Curl_safefree(sslc->egdsocket); + Curl_safefree(sslc->cipher_list); } +#ifdef USE_SSL +static int multissl_init(const struct Curl_ssl *backend); +#endif + int Curl_ssl_backend(void) { - return (int)CURL_SSL_BACKEND; +#ifdef USE_SSL + multissl_init(NULL); + return Curl_ssl->info.id; +#else + return (int)CURLSSLBACKEND_NONE; +#endif } #ifdef USE_SSL /* "global" init done? */ -static bool init_ssl=FALSE; +static bool init_ssl = FALSE; /** * Global SSL init @@ -156,7 +165,7 @@ int Curl_ssl_init(void) return 1; init_ssl = TRUE; /* never again */ - return curlssl_init(); + return Curl_ssl->init(); } @@ -165,7 +174,7 @@ void Curl_ssl_cleanup(void) { if(init_ssl) { /* only cleanup if we did a previous init */ - curlssl_cleanup(); + Curl_ssl->cleanup(); init_ssl = FALSE; } } @@ -173,11 +182,24 @@ void Curl_ssl_cleanup(void) static bool ssl_prefs_check(struct Curl_easy *data) { /* check for CURLOPT_SSLVERSION invalid parameter value */ - if((data->set.ssl.primary.version < 0) - || (data->set.ssl.primary.version >= CURL_SSLVERSION_LAST)) { + const long sslver = data->set.ssl.primary.version; + if((sslver < 0) || (sslver >= CURL_SSLVERSION_LAST)) { failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION"); return FALSE; } + + switch(data->set.ssl.primary.version_max) { + case CURL_SSLVERSION_MAX_NONE: + case CURL_SSLVERSION_MAX_DEFAULT: + break; + + default: + if((data->set.ssl.primary.version_max >> 16) < sslver) { + failf(data, "CURL_SSLVERSION_MAX incompatible with CURL_SSLVERSION"); + return FALSE; + } + } + return TRUE; } @@ -187,12 +209,20 @@ ssl_connect_init_proxy(struct connectdata *conn, int sockindex) DEBUGASSERT(conn->bits.proxy_ssl_connected[sockindex]); if(ssl_connection_complete == conn->ssl[sockindex].state && !conn->proxy_ssl[sockindex].use) { -#if defined(HTTPS_PROXY_SUPPORT) + struct ssl_backend_data *pbdata; + + if(!Curl_ssl->support_https_proxy) + return CURLE_NOT_BUILT_IN; + + /* The pointers to the ssl backend data, which is opaque here, are swapped + rather than move the contents. */ + pbdata = conn->proxy_ssl[sockindex].backend; conn->proxy_ssl[sockindex] = conn->ssl[sockindex]; + memset(&conn->ssl[sockindex], 0, sizeof(conn->ssl[sockindex])); -#else - return CURLE_NOT_BUILT_IN; -#endif + memset(pbdata, 0, Curl_ssl->sizeof_ssl_backend_data); + + conn->ssl[sockindex].backend = pbdata; } return CURLE_OK; } @@ -215,7 +245,7 @@ Curl_ssl_connect(struct connectdata *conn, int sockindex) conn->ssl[sockindex].use = TRUE; conn->ssl[sockindex].state = ssl_connection_negotiating; - result = curlssl_connect(conn, sockindex); + result = Curl_ssl->connect(conn, sockindex); if(!result) Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */ @@ -239,12 +269,7 @@ Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex, /* mark this is being ssl requested from here on. */ conn->ssl[sockindex].use = TRUE; -#ifdef curlssl_connect_nonblocking - result = curlssl_connect_nonblocking(conn, sockindex, done); -#else - *done = TRUE; /* fallback to BLOCKING */ - result = curlssl_connect(conn, sockindex); -#endif /* non-blocking connect support */ + result = Curl_ssl->connect_nonblocking(conn, sockindex, done); if(!result && *done) Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */ return result; @@ -293,9 +318,9 @@ bool Curl_ssl_getsessionid(struct connectdata *conn, int port = isProxy ? (int)conn->port : conn->remote_port; *ssl_sessionid = NULL; - DEBUGASSERT(data->set.general_ssl.sessionid); + DEBUGASSERT(SSL_SET_OPTION(primary.sessionid)); - if(!data->set.general_ssl.sessionid) + if(!SSL_SET_OPTION(primary.sessionid)) /* session ID re-use is disabled */ return TRUE; @@ -343,7 +368,7 @@ void Curl_ssl_kill_session(struct curl_ssl_session *session) /* defensive check */ /* free the ID the SSL-layer specific way */ - curlssl_session_free(session->sessionid); + Curl_ssl->session_free(session->sessionid); session->sessionid = NULL; session->age = 0; /* fresh */ @@ -361,7 +386,7 @@ void Curl_ssl_kill_session(struct curl_ssl_session *session) void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid) { size_t i; - struct Curl_easy *data=conn->data; + struct Curl_easy *data = conn->data; for(i = 0; i < data->set.general_ssl.max_ssl_sessions; i++) { struct curl_ssl_session *check = &data->state.session[i]; @@ -385,9 +410,9 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn, int sockindex) { size_t i; - struct Curl_easy *data=conn->data; /* the mother of all structs */ + struct Curl_easy *data = conn->data; /* the mother of all structs */ struct curl_ssl_session *store = &data->state.session[0]; - long oldest_age=data->state.session[0].age; /* zero if unused */ + long oldest_age = data->state.session[0].age; /* zero if unused */ char *clone_host; char *clone_conn_to_host; int conn_to_port; @@ -397,7 +422,7 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn, &conn->proxy_ssl_config : &conn->ssl_config; - DEBUGASSERT(data->set.general_ssl.sessionid); + DEBUGASSERT(SSL_SET_OPTION(primary.sessionid)); clone_host = strdup(isProxy ? conn->http_proxy.host.name : conn->host.name); if(!clone_host) @@ -481,7 +506,7 @@ void Curl_ssl_close_all(struct Curl_easy *data) Curl_safefree(data->state.session); } - curlssl_close_all(data); + Curl_ssl->close_all(data); } #if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \ @@ -500,7 +525,7 @@ int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks, socks[0] = conn->sock[FIRSTSOCKET]; return GETSOCK_WRITESOCK(0); } - else if(connssl->connecting_state == ssl_connect_2_reading) { + if(connssl->connecting_state == ssl_connect_2_reading) { /* read mode */ socks[0] = conn->sock[FIRSTSOCKET]; return GETSOCK_READSOCK(0); @@ -524,12 +549,12 @@ int Curl_ssl_getsock(struct connectdata *conn, void Curl_ssl_close(struct connectdata *conn, int sockindex) { DEBUGASSERT((sockindex <= 1) && (sockindex >= -1)); - curlssl_close(conn, sockindex); + Curl_ssl->close_one(conn, sockindex); } CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex) { - if(curlssl_shutdown(conn, sockindex)) + if(Curl_ssl->shutdown(conn, sockindex)) return CURLE_SSL_SHUTDOWN_FAILED; conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */ @@ -545,20 +570,20 @@ CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex) */ CURLcode Curl_ssl_set_engine(struct Curl_easy *data, const char *engine) { - return curlssl_set_engine(data, engine); + return Curl_ssl->set_engine(data, engine); } /* Selects the default SSL crypto engine */ CURLcode Curl_ssl_set_engine_default(struct Curl_easy *data) { - return curlssl_set_engine_default(data); + return Curl_ssl->set_engine_default(data); } /* Return list of OpenSSL crypto engine names. */ struct curl_slist *Curl_ssl_engines_list(struct Curl_easy *data) { - return curlssl_engines_list(data); + return Curl_ssl->engines_list(data); } /* @@ -584,9 +609,15 @@ CURLcode Curl_ssl_initsessions(struct Curl_easy *data, size_t amount) return CURLE_OK; } +static size_t Curl_multissl_version(char *buffer, size_t size); + size_t Curl_ssl_version(char *buffer, size_t size) { - return curlssl_version(buffer, size); +#ifdef CURL_WITH_MULTI_SSL + return Curl_multissl_version(buffer, size); +#else + return Curl_ssl->version(buffer, size); +#endif } /* @@ -599,13 +630,13 @@ size_t Curl_ssl_version(char *buffer, size_t size) */ int Curl_ssl_check_cxn(struct connectdata *conn) { - return curlssl_check_cxn(conn); + return Curl_ssl->check_cxn(conn); } bool Curl_ssl_data_pending(const struct connectdata *conn, int connindex) { - return curlssl_data_pending(conn, connindex); + return Curl_ssl->data_pending(conn, connindex); } void Curl_ssl_free_certinfo(struct Curl_easy *data) @@ -615,7 +646,7 @@ void Curl_ssl_free_certinfo(struct Curl_easy *data) if(ci->num_of_certs) { /* free all individual lists used */ - for(i=0; inum_of_certs; i++) { + for(i = 0; inum_of_certs; i++) { curl_slist_free_all(ci->certinfo[i]); ci->certinfo[i] = NULL; } @@ -669,7 +700,7 @@ CURLcode Curl_ssl_push_certinfo_len(struct Curl_easy *data, snprintf(output, outlen, "%s:", label); /* memcpy the value (it might not be zero terminated) */ - memcpy(&output[labellen+1], value, valuelen); + memcpy(&output[labellen + 1], value, valuelen); /* zero terminate the output */ output[labellen + 1 + valuelen] = 0; @@ -703,7 +734,7 @@ CURLcode Curl_ssl_random(struct Curl_easy *data, unsigned char *entropy, size_t length) { - return curlssl_random(data, entropy, length); + return Curl_ssl->random(data, entropy, length); } /* @@ -778,12 +809,10 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, size_t size, pem_len; CURLcode pem_read; CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; -#ifdef curlssl_sha256sum CURLcode encode; size_t encodedlen, pinkeylen; char *encoded, *pinkeycopy, *begin_pos, *end_pos; unsigned char *sha256sumdigest = NULL; -#endif /* if a path wasn't specified, don't pin */ if(!pinnedpubkey) @@ -793,15 +822,20 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, /* only do this if pinnedpubkey starts with "sha256//", length 8 */ if(strncmp(pinnedpubkey, "sha256//", 8) == 0) { -#ifdef curlssl_sha256sum + if(!Curl_ssl->sha256sum) { + /* without sha256 support, this cannot match */ + return result; + } + /* compute sha256sum of public key */ - sha256sumdigest = malloc(SHA256_DIGEST_LENGTH); + sha256sumdigest = malloc(CURL_SHA256_DIGEST_LENGTH); if(!sha256sumdigest) return CURLE_OUT_OF_MEMORY; - curlssl_sha256sum(pubkey, pubkeylen, - sha256sumdigest, SHA256_DIGEST_LENGTH); + Curl_ssl->sha256sum(pubkey, pubkeylen, + sha256sumdigest, CURL_SHA256_DIGEST_LENGTH); encode = Curl_base64_encode(data, (char *)sha256sumdigest, - SHA256_DIGEST_LENGTH, &encoded, &encodedlen); + CURL_SHA256_DIGEST_LENGTH, &encoded, + &encodedlen); Curl_safefree(sha256sumdigest); if(encode) @@ -846,10 +880,6 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, } while(end_pos && begin_pos); Curl_safefree(encoded); Curl_safefree(pinkeycopy); -#else - /* without sha256 support, this cannot match */ - (void)data; -#endif return result; } @@ -925,45 +955,375 @@ CURLcode Curl_ssl_md5sum(unsigned char *tmp, /* input */ unsigned char *md5sum, /* output */ size_t md5len) { -#ifdef curlssl_md5sum - curlssl_md5sum(tmp, tmplen, md5sum, md5len); -#else + return Curl_ssl->md5sum(tmp, tmplen, md5sum, md5len); +} +#endif + +/* + * Check whether the SSL backend supports the status_request extension. + */ +bool Curl_ssl_cert_status_request(void) +{ + return Curl_ssl->cert_status_request(); +} + +/* + * Check whether the SSL backend supports false start. + */ +bool Curl_ssl_false_start(void) +{ + return Curl_ssl->false_start(); +} + +/* + * Default implementations for unsupported functions. + */ + +int Curl_none_init(void) +{ + return 1; +} + +void Curl_none_cleanup(void) +{ } + +int Curl_none_shutdown(struct connectdata *conn UNUSED_PARAM, + int sockindex UNUSED_PARAM) +{ + (void)conn; + (void)sockindex; + return 0; +} + +int Curl_none_check_cxn(struct connectdata *conn UNUSED_PARAM) +{ + (void)conn; + return -1; +} + +CURLcode Curl_none_random(struct Curl_easy *data UNUSED_PARAM, + unsigned char *entropy UNUSED_PARAM, + size_t length UNUSED_PARAM) +{ + (void)data; + (void)entropy; + (void)length; + return CURLE_NOT_BUILT_IN; +} + +void Curl_none_close_all(struct Curl_easy *data UNUSED_PARAM) +{ + (void)data; +} + +void Curl_none_session_free(void *ptr UNUSED_PARAM) +{ + (void)ptr; +} + +bool Curl_none_data_pending(const struct connectdata *conn UNUSED_PARAM, + int connindex UNUSED_PARAM) +{ + (void)conn; + (void)connindex; + return 0; +} + +bool Curl_none_cert_status_request(void) +{ + return FALSE; +} + +CURLcode Curl_none_set_engine(struct Curl_easy *data UNUSED_PARAM, + const char *engine UNUSED_PARAM) +{ + (void)data; + (void)engine; + return CURLE_NOT_BUILT_IN; +} + +CURLcode Curl_none_set_engine_default(struct Curl_easy *data UNUSED_PARAM) +{ + (void)data; + return CURLE_NOT_BUILT_IN; +} + +struct curl_slist *Curl_none_engines_list(struct Curl_easy *data UNUSED_PARAM) +{ + (void)data; + return (struct curl_slist *)NULL; +} + +bool Curl_none_false_start(void) +{ + return FALSE; +} + +#ifndef CURL_DISABLE_CRYPTO_AUTH +CURLcode Curl_none_md5sum(unsigned char *input, size_t inputlen, + unsigned char *md5sum, size_t md5len UNUSED_PARAM) +{ MD5_context *MD5pw; - (void) md5len; + (void)md5len; MD5pw = Curl_MD5_init(Curl_DIGEST_MD5); if(!MD5pw) return CURLE_OUT_OF_MEMORY; - Curl_MD5_update(MD5pw, tmp, curlx_uztoui(tmplen)); + Curl_MD5_update(MD5pw, input, curlx_uztoui(inputlen)); Curl_MD5_final(MD5pw, md5sum); -#endif return CURLE_OK; } +#else +CURLcode Curl_none_md5sum(unsigned char *input UNUSED_PARAM, + size_t inputlen UNUSED_PARAM, + unsigned char *md5sum UNUSED_PARAM, + size_t md5len UNUSED_PARAM) +{ + (void)input; + (void)inputlen; + (void)md5sum; + (void)md5len; + return CURLE_NOT_BUILT_IN; +} #endif -/* - * Check whether the SSL backend supports the status_request extension. - */ -bool Curl_ssl_cert_status_request(void) +static int Curl_multissl_init(void) +{ + if(multissl_init(NULL)) + return 1; + return Curl_ssl->init(); +} + +static CURLcode Curl_multissl_connect(struct connectdata *conn, int sockindex) +{ + if(multissl_init(NULL)) + return CURLE_FAILED_INIT; + return Curl_ssl->connect(conn, sockindex); +} + +static CURLcode Curl_multissl_connect_nonblocking(struct connectdata *conn, + int sockindex, bool *done) { -#ifdef curlssl_cert_status_request - return curlssl_cert_status_request(); + if(multissl_init(NULL)) + return CURLE_FAILED_INIT; + return Curl_ssl->connect_nonblocking(conn, sockindex, done); +} + +static void *Curl_multissl_get_internals(struct ssl_connect_data *connssl, + CURLINFO info) +{ + if(multissl_init(NULL)) + return NULL; + return Curl_ssl->get_internals(connssl, info); +} + +static void Curl_multissl_close(struct connectdata *conn, int sockindex) +{ + if(multissl_init(NULL)) + return; + Curl_ssl->close_one(conn, sockindex); +} + +static const struct Curl_ssl Curl_ssl_multi = { + { CURLSSLBACKEND_NONE, "multi" }, /* info */ + + 0, /* have_ca_path */ + 0, /* have_certinfo */ + 0, /* have_pinnedpubkey */ + 0, /* have_ssl_ctx */ + 0, /* support_https_proxy */ + + (size_t)-1, /* something insanely large to be on the safe side */ + + Curl_multissl_init, /* init */ + Curl_none_cleanup, /* cleanup */ + Curl_multissl_version, /* version */ + Curl_none_check_cxn, /* check_cxn */ + Curl_none_shutdown, /* shutdown */ + Curl_none_data_pending, /* data_pending */ + Curl_none_random, /* random */ + Curl_none_cert_status_request, /* cert_status_request */ + Curl_multissl_connect, /* connect */ + Curl_multissl_connect_nonblocking, /* connect_nonblocking */ + Curl_multissl_get_internals, /* get_internals */ + Curl_multissl_close, /* close_one */ + Curl_none_close_all, /* close_all */ + Curl_none_session_free, /* session_free */ + Curl_none_set_engine, /* set_engine */ + Curl_none_set_engine_default, /* set_engine_default */ + Curl_none_engines_list, /* engines_list */ + Curl_none_false_start, /* false_start */ + Curl_none_md5sum, /* md5sum */ + NULL /* sha256sum */ +}; + +const struct Curl_ssl *Curl_ssl = +#if defined(CURL_WITH_MULTI_SSL) + &Curl_ssl_multi; +#elif defined(USE_AXTLS) + &Curl_ssl_axtls; +#elif defined(USE_CYASSL) + &Curl_ssl_cyassl; +#elif defined(USE_DARWINSSL) + &Curl_ssl_darwinssl; +#elif defined(USE_GNUTLS) + &Curl_ssl_gnutls; +#elif defined(USE_GSKIT) + &Curl_ssl_gskit; +#elif defined(USE_MBEDTLS) + &Curl_ssl_mbedtls; +#elif defined(USE_NSS) + &Curl_ssl_nss; +#elif defined(USE_OPENSSL) + &Curl_ssl_openssl; +#elif defined(USE_POLARSSL) + &Curl_ssl_polarssl; +#elif defined(USE_SCHANNEL) + &Curl_ssl_schannel; #else - return FALSE; +#error "Missing struct Curl_ssl for selected SSL backend" +#endif + +static const struct Curl_ssl *available_backends[] = { +#if defined(USE_AXTLS) + &Curl_ssl_axtls, #endif +#if defined(USE_CYASSL) + &Curl_ssl_cyassl, +#endif +#if defined(USE_DARWINSSL) + &Curl_ssl_darwinssl, +#endif +#if defined(USE_GNUTLS) + &Curl_ssl_gnutls, +#endif +#if defined(USE_GSKIT) + &Curl_ssl_gskit, +#endif +#if defined(USE_MBEDTLS) + &Curl_ssl_mbedtls, +#endif +#if defined(USE_NSS) + &Curl_ssl_nss, +#endif +#if defined(USE_OPENSSL) + &Curl_ssl_openssl, +#endif +#if defined(USE_POLARSSL) + &Curl_ssl_polarssl, +#endif +#if defined(USE_SCHANNEL) + &Curl_ssl_schannel, +#endif + NULL +}; + +static size_t Curl_multissl_version(char *buffer, size_t size) +{ + static const struct Curl_ssl *selected; + static char backends[200]; + static size_t total; + const struct Curl_ssl *current; + + current = Curl_ssl == &Curl_ssl_multi ? available_backends[0] : Curl_ssl; + + if(current != selected) { + char *p = backends; + int i; + + selected = current; + + for(i = 0; available_backends[i]; i++) { + if(i) + *(p++) = ' '; + if(selected != available_backends[i]) + *(p++) = '('; + p += available_backends[i]->version(p, backends + sizeof(backends) - p); + if(selected != available_backends[i]) + *(p++) = ')'; + } + *p = '\0'; + total = p - backends; + } + + if(size < total) + memcpy(buffer, backends, total + 1); + else { + memcpy(buffer, backends, size - 1); + buffer[size - 1] = '\0'; + } + + return total; } -/* - * Check whether the SSL backend supports false start. - */ -bool Curl_ssl_false_start(void) +static int multissl_init(const struct Curl_ssl *backend) { -#ifdef curlssl_false_start - return curlssl_false_start(); -#else - return FALSE; + const char *env; + char *env_tmp; + int i; + + if(Curl_ssl != &Curl_ssl_multi) + return 1; + + if(backend) { + Curl_ssl = backend; + return 0; + } + + if(!available_backends[0]) + return 1; + + env = env_tmp = curl_getenv("CURL_SSL_BACKEND"); +#ifdef CURL_DEFAULT_SSL_BACKEND + if(!env) + env = CURL_DEFAULT_SSL_BACKEND; #endif + if(env) { + for(i = 0; available_backends[i]; i++) { + if(strcasecompare(env, available_backends[i]->info.name)) { + Curl_ssl = available_backends[i]; + curl_free(env_tmp); + return 0; + } + } + } + + /* Fall back to first available backend */ + Curl_ssl = available_backends[0]; + curl_free(env_tmp); + return 0; +} + +CURLsslset curl_global_sslset(curl_sslbackend id, const char *name, + const curl_ssl_backend ***avail) +{ + int i; + + if(Curl_ssl != &Curl_ssl_multi) + return id == Curl_ssl->info.id ? CURLSSLSET_OK : CURLSSLSET_TOO_LATE; + + for(i = 0; available_backends[i]; i++) { + if(available_backends[i]->info.id == id || + (name && strcasecompare(available_backends[i]->info.name, name))) { + multissl_init(available_backends[i]); + return CURLSSLSET_OK; + } + } + + if(avail) + *avail = (const curl_ssl_backend **)&available_backends; + return CURLSSLSET_UNKNOWN_BACKEND; +} + +#else /* USE_SSL */ +CURLsslset curl_global_sslset(curl_sslbackend id, const char *name, + const curl_ssl_backend ***avail) +{ + (void)id; + (void)name; + (void)avail; + return CURLSSLSET_NO_BACKENDS; } -#endif /* USE_SSL */ +#endif /* !USE_SSL */ diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h index 2aabeda..c5f9d4a 100644 --- a/lib/vtls/vtls.h +++ b/lib/vtls/vtls.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,6 +23,80 @@ ***************************************************************************/ #include "curl_setup.h" +struct connectdata; +struct ssl_connect_data; + +struct Curl_ssl { + /* + * This *must* be the first entry to allow returning the list of available + * backends in curl_global_sslset(). + */ + curl_ssl_backend info; + + unsigned have_ca_path:1; /* supports CAPATH */ + unsigned have_certinfo:1; /* supports CURLOPT_CERTINFO */ + unsigned have_pinnedpubkey:1; /* supports CURLOPT_PINNEDPUBLICKEY */ + unsigned have_ssl_ctx:1; /* supports CURLOPT_SSL_CTX_* */ + + unsigned support_https_proxy:1; /* supports access via HTTPS proxies */ + + size_t sizeof_ssl_backend_data; + + int (*init)(void); + void (*cleanup)(void); + + size_t (*version)(char *buffer, size_t size); + int (*check_cxn)(struct connectdata *cxn); + int (*shutdown)(struct connectdata *conn, int sockindex); + bool (*data_pending)(const struct connectdata *conn, + int connindex); + + /* return 0 if a find random is filled in */ + CURLcode (*random)(struct Curl_easy *data, unsigned char *entropy, + size_t length); + bool (*cert_status_request)(void); + + CURLcode (*connect)(struct connectdata *conn, int sockindex); + CURLcode (*connect_nonblocking)(struct connectdata *conn, int sockindex, + bool *done); + void *(*get_internals)(struct ssl_connect_data *connssl, CURLINFO info); + void (*close_one)(struct connectdata *conn, int sockindex); + void (*close_all)(struct Curl_easy *data); + void (*session_free)(void *ptr); + + CURLcode (*set_engine)(struct Curl_easy *data, const char *engine); + CURLcode (*set_engine_default)(struct Curl_easy *data); + struct curl_slist *(*engines_list)(struct Curl_easy *data); + + bool (*false_start)(void); + + CURLcode (*md5sum)(unsigned char *input, size_t inputlen, + unsigned char *md5sum, size_t md5sumlen); + void (*sha256sum)(const unsigned char *input, size_t inputlen, + unsigned char *sha256sum, size_t sha256sumlen); +}; + +#ifdef USE_SSL +extern const struct Curl_ssl *Curl_ssl; +#endif + +int Curl_none_init(void); +void Curl_none_cleanup(void); +int Curl_none_shutdown(struct connectdata *conn, int sockindex); +int Curl_none_check_cxn(struct connectdata *conn); +CURLcode Curl_none_random(struct Curl_easy *data, unsigned char *entropy, + size_t length); +void Curl_none_close_all(struct Curl_easy *data); +void Curl_none_session_free(void *ptr); +bool Curl_none_data_pending(const struct connectdata *conn, int connindex); +bool Curl_none_cert_status_request(void); +CURLcode Curl_none_set_engine(struct Curl_easy *data, const char *engine); +CURLcode Curl_none_set_engine_default(struct Curl_easy *data); +struct curl_slist *Curl_none_engines_list(struct Curl_easy *data); +bool Curl_none_false_start(void); +CURLcode Curl_none_md5sum(unsigned char *input, size_t inputlen, + unsigned char *md5sum, size_t md5len); + #include "openssl.h" /* OpenSSL versions */ #include "gtls.h" /* GnuTLS versions */ #include "nssg.h" /* NSS versions */ @@ -42,8 +116,8 @@ #define MD5_DIGEST_LENGTH 16 /* fixed size */ #endif -#ifndef SHA256_DIGEST_LENGTH -#define SHA256_DIGEST_LENGTH 32 /* fixed size */ +#ifndef CURL_SHA256_DIGEST_LENGTH +#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */ #endif /* see https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 */ @@ -172,8 +246,6 @@ bool Curl_ssl_false_start(void); #define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */ #else -/* Set the API backend definition to none */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_NONE /* When SSL support is not present, just define away these function calls */ #define Curl_ssl_init() 1 diff --git a/lib/warnless.c b/lib/warnless.c index 0c4472e..05d9038 100644 --- a/lib/warnless.c +++ b/lib/warnless.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -69,36 +69,36 @@ # error "SIZEOF_INT not defined" #endif -#if (CURL_SIZEOF_LONG == 2) +#if (SIZEOF_LONG == 2) # define CURL_MASK_SLONG 0x7FFFL # define CURL_MASK_ULONG 0xFFFFUL -#elif (CURL_SIZEOF_LONG == 4) +#elif (SIZEOF_LONG == 4) # define CURL_MASK_SLONG 0x7FFFFFFFL # define CURL_MASK_ULONG 0xFFFFFFFFUL -#elif (CURL_SIZEOF_LONG == 8) +#elif (SIZEOF_LONG == 8) # define CURL_MASK_SLONG 0x7FFFFFFFFFFFFFFFL # define CURL_MASK_ULONG 0xFFFFFFFFFFFFFFFFUL -#elif (CURL_SIZEOF_LONG == 16) +#elif (SIZEOF_LONG == 16) # define CURL_MASK_SLONG 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFL # define CURL_MASK_ULONG 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUL #else -# error "CURL_SIZEOF_LONG not defined" +# error "SIZEOF_LONG not defined" #endif -#if (CURL_SIZEOF_CURL_OFF_T == 2) +#if (SIZEOF_CURL_OFF_T == 2) # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFF) # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFF) -#elif (CURL_SIZEOF_CURL_OFF_T == 4) +#elif (SIZEOF_CURL_OFF_T == 4) # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFF) # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFF) -#elif (CURL_SIZEOF_CURL_OFF_T == 8) +#elif (SIZEOF_CURL_OFF_T == 8) # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFF) -#elif (CURL_SIZEOF_CURL_OFF_T == 16) +#elif (SIZEOF_CURL_OFF_T == 16) # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) #else -# error "CURL_SIZEOF_CURL_OFF_T not defined" +# error "SIZEOF_CURL_OFF_T not defined" #endif #if (SIZEOF_SIZE_T == SIZEOF_SHORT) @@ -107,10 +107,10 @@ #elif (SIZEOF_SIZE_T == SIZEOF_INT) # define CURL_MASK_SSIZE_T CURL_MASK_SINT # define CURL_MASK_USIZE_T CURL_MASK_UINT -#elif (SIZEOF_SIZE_T == CURL_SIZEOF_LONG) +#elif (SIZEOF_SIZE_T == SIZEOF_LONG) # define CURL_MASK_SSIZE_T CURL_MASK_SLONG # define CURL_MASK_USIZE_T CURL_MASK_ULONG -#elif (SIZEOF_SIZE_T == CURL_SIZEOF_CURL_OFF_T) +#elif (SIZEOF_SIZE_T == SIZEOF_CURL_OFF_T) # define CURL_MASK_SSIZE_T CURL_MASK_SCOFFT # define CURL_MASK_USIZE_T CURL_MASK_UCOFFT #else @@ -183,12 +183,15 @@ curl_off_t curlx_uztoso(size_t uznum) #ifdef __INTEL_COMPILER # pragma warning(push) # pragma warning(disable:810) /* conversion may lose significant bits */ +#elif defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4310) /* cast truncates constant value */ #endif DEBUGASSERT(uznum <= (size_t) CURL_MASK_SCOFFT); return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT); -#ifdef __INTEL_COMPILER +#if defined(__INTEL_COMPILER) || defined(_MSC_VER) # pragma warning(pop) #endif } @@ -223,7 +226,7 @@ unsigned long curlx_uztoul(size_t uznum) # pragma warning(disable:810) /* conversion may lose significant bits */ #endif -#if (CURL_SIZEOF_LONG < SIZEOF_SIZE_T) +#if (SIZEOF_LONG < SIZEOF_SIZE_T) DEBUGASSERT(uznum <= (size_t) CURL_MASK_ULONG); #endif return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG); @@ -266,7 +269,7 @@ int curlx_sltosi(long slnum) #endif DEBUGASSERT(slnum >= 0); -#if (SIZEOF_INT < CURL_SIZEOF_LONG) +#if (SIZEOF_INT < SIZEOF_LONG) DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_SINT); #endif return (int)(slnum & (long) CURL_MASK_SINT); @@ -288,7 +291,7 @@ unsigned int curlx_sltoui(long slnum) #endif DEBUGASSERT(slnum >= 0); -#if (SIZEOF_INT < CURL_SIZEOF_LONG) +#if (SIZEOF_INT < SIZEOF_LONG) DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_UINT); #endif return (unsigned int)(slnum & (long) CURL_MASK_UINT); diff --git a/lib/warnless.h b/lib/warnless.h index ab6d299..efd552a 100644 --- a/lib/warnless.h +++ b/lib/warnless.h @@ -26,6 +26,11 @@ #include /* for curl_socket_t */ #endif +#define CURLX_POINTER_TO_INTEGER_CAST(p) \ + ((char *)(p) - (char *)NULL) +#define CURLX_INTEGER_TO_POINTER_CAST(i) \ + ((void *)((char *)NULL + (i))) + unsigned short curlx_ultous(unsigned long ulnum); unsigned char curlx_ultouc(unsigned long ulnum); diff --git a/lib/wildcard.c b/lib/wildcard.c index dbbe45f..af45c79 100644 --- a/lib/wildcard.c +++ b/lib/wildcard.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -32,13 +32,9 @@ CURLcode Curl_wildcard_init(struct WildcardData *wc) { - DEBUGASSERT(wc->filelist == NULL); - /* now allocate only wc->filelist, everything else - will be allocated if it is needed. */ - wc->filelist = Curl_llist_alloc(Curl_fileinfo_dtor); - if(!wc->filelist) {; - return CURLE_OUT_OF_MEMORY; - } + Curl_llist_init(&wc->filelist, Curl_fileinfo_dtor); + wc->state = CURLWC_INIT; + return CURLE_OK; } @@ -54,10 +50,8 @@ void Curl_wildcard_dtor(struct WildcardData *wc) } DEBUGASSERT(wc->tmp == NULL); - if(wc->filelist) { - Curl_llist_destroy(wc->filelist, NULL); - wc->filelist = NULL; - } + Curl_llist_destroy(&wc->filelist, NULL); + free(wc->path); wc->path = NULL; diff --git a/lib/wildcard.h b/lib/wildcard.h index 7f61cd1..8a5e4b7 100644 --- a/lib/wildcard.h +++ b/lib/wildcard.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -24,9 +24,12 @@ #include +#include "llist.h" + /* list of wildcard process states */ typedef enum { - CURLWC_INIT = 0, + CURLWC_CLEAR = 0, + CURLWC_INIT = 1, CURLWC_MATCHING, /* library is trying to get list of addresses for downloading */ CURLWC_DOWNLOADING, @@ -44,7 +47,7 @@ struct WildcardData { curl_wildcard_states state; char *path; /* path to the directory, where we trying wildcard-match */ char *pattern; /* wildcard pattern */ - struct curl_llist *filelist; /* llist with struct Curl_fileinfo */ + struct curl_llist filelist; /* llist with struct Curl_fileinfo */ void *tmp; /* pointer to protocol specific temporary data */ curl_wildcard_tmp_dtor tmp_dtor; void *customptr; /* for CURLOPT_CHUNK_DATA pointer */ diff --git a/lib/x509asn1.c b/lib/x509asn1.c index c4bc7c1..bba2023 100644 --- a/lib/x509asn1.c +++ b/lib/x509asn1.c @@ -466,6 +466,7 @@ static const char *GTime2str(const char *beg, const char *end) break; case 2: sec1 = fracp[-2]; + /* FALLTHROUGH */ case 1: sec2 = fracp[-1]; break; diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4 new file mode 100644 index 0000000..6484f03 --- /dev/null +++ b/m4/ax_code_coverage.m4 @@ -0,0 +1,264 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CODE_COVERAGE() +# +# DESCRIPTION +# +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included +# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every +# build target (program or library) which should be built with code +# coverage support. Also defines CODE_COVERAGE_RULES which should be +# substituted in your Makefile; and $enable_code_coverage which can be +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined +# and substituted, and corresponds to the value of the +# --enable-code-coverage option, which defaults to being disabled. +# +# Test also for gcov program and create GCOV variable that could be +# substituted. +# +# Note that all optimization flags in CFLAGS must be disabled when code +# coverage is enabled. +# +# Usage example: +# +# configure.ac: +# +# AX_CODE_COVERAGE +# +# Makefile.am: +# +# @CODE_COVERAGE_RULES@ +# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... +# +# This results in a "check-code-coverage" rule being added to any +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module +# has been configured with --enable-code-coverage). Running `make +# check-code-coverage` in that directory will run the module's test suite +# (`make check`) and build a code coverage report detailing the code which +# was touched, then print the URI for the report. +# +# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined +# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of +# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is +# deprecated. They have the same value. +# +# This code was derived from Makefile.decl in GLib, originally licenced +# under LGPLv2.1+. +# +# LICENSE +# +# Copyright (c) 2012, 2016 Philip Withnall +# Copyright (c) 2012 Xan Lopez +# Copyright (c) 2012 Christian Persch +# Copyright (c) 2012 Paolo Borelli +# Copyright (c) 2012 Dan Winship +# Copyright (c) 2015 Bastien ROUCARIES +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or (at +# your option) any later version. +# +# This library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . + +#serial 25 + +AC_DEFUN([AX_CODE_COVERAGE],[ + dnl Check for --enable-code-coverage + AC_REQUIRE([AC_PROG_SED]) + + # allow to override gcov location + AC_ARG_WITH([gcov], + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) + + AC_MSG_CHECKING([whether to build with code coverage support]) + AC_ARG_ENABLE([code-coverage], + AS_HELP_STRING([--enable-code-coverage], + [Whether to enable code coverage support]),, + enable_code_coverage=no) + + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) + AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) + AC_MSG_RESULT($enable_code_coverage) + + AS_IF([ test "$enable_code_coverage" = "yes" ], [ + # check for gcov + AC_CHECK_TOOL([GCOV], + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], + [:]) + AS_IF([test "X$GCOV" = "X:"], + [AC_MSG_ERROR([gcov is needed to do coverage])]) + AC_SUBST([GCOV]) + + dnl Check if gcc is being used + AS_IF([ test "$GCC" = "no" ], [ + AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) + ]) + + AC_CHECK_PROG([LCOV], [lcov], [lcov]) + AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) + + AS_IF([ test -z "$LCOV" ], [ + AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed]) + ]) + + AS_IF([ test -z "$GENHTML" ], [ + AC_MSG_ERROR([Could not find genhtml from the lcov package]) + ]) + + dnl Build the code coverage flags + dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LIBS="-lgcov" + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" + + AC_SUBST([CODE_COVERAGE_CPPFLAGS]) + AC_SUBST([CODE_COVERAGE_CFLAGS]) + AC_SUBST([CODE_COVERAGE_CXXFLAGS]) + AC_SUBST([CODE_COVERAGE_LIBS]) + AC_SUBST([CODE_COVERAGE_LDFLAGS]) + + [CODE_COVERAGE_RULES_CHECK=' + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +'] + [CODE_COVERAGE_RULES_CAPTURE=' + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +'] + [CODE_COVERAGE_RULES_CLEAN=' +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +'] + ], [ + [CODE_COVERAGE_RULES_CHECK=' + @echo "Need to reconfigure with --enable-code-coverage" +'] + CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" + CODE_COVERAGE_RULES_CLEAN='' + ]) + +[CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +CODE_COVERAGE_IGNORE_PATTERN ?= + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +'"$CODE_COVERAGE_RULES_CLEAN"' + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +'] + + AC_SUBST([CODE_COVERAGE_RULES]) + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) +]) diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 3219baf..422946e 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -84,7 +84,16 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [ if test "$curl_cv_have_def___clang__" = "yes"; then AC_MSG_RESULT([yes]) compiler_id="CLANG" - clangver=`$CC -dumpversion` + fullclangver=`$CC -v 2>&1 | grep version` + clangver=`echo $fullclangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*)/\1/'` + if test -z "$clangver"; then + if echo $fullclangver | grep "Apple LLVM version " >/dev/null; then + dnl Starting with XCode 7 / clang 3.7, Apple clang won't tell its upstream version + clangver="3.7" + else + clangver=`echo $fullclangver | "$SED" 's/.*version \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*/\1/'` + fi + fi clangvhi=`echo $clangver | cut -d . -f1` clangvlo=`echo $clangver | cut -d . -f2` compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null` @@ -158,7 +167,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [ flags_dbg_all="$flags_dbg_all -gvms" flags_dbg_yes="-g" flags_dbg_off="" - flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" + flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast" flags_opt_yes="-O2" flags_opt_off="-O0" CURL_CHECK_DEF([_WIN32], [], [silent]) @@ -577,8 +586,11 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [ # GNU_C) # - dnl Placeholder - tmp_CFLAGS="$tmp_CFLAGS" + dnl turn implicit-function-declaration warning into error, + dnl at least gcc 2.95 and later support this + if test "$compiler_num" -ge "295"; then + tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration" + fi ;; # HP_UX_C) @@ -878,6 +890,44 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ if test "$compiler_num" -ge "101"; then tmp_CFLAGS="$tmp_CFLAGS -Wunused" fi + # + dnl Only clang 2.8 or later + if test "$compiler_num" -ge "208"; then + tmp_CFLAGS="$tmp_CFLAGS -Wvla" + fi + # + dnl Only clang 2.9 or later + if test "$compiler_num" -ge "209"; then + tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow" + fi + # + dnl Only clang 3.2 or later + if test "$compiler_num" -ge "302"; then + case $host_os in + cygwin* | mingw*) + dnl skip missing-variable-declarations warnings for cygwin and + dnl mingw because the libtool wrapper executable causes them + ;; + *) + tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations" + ;; + esac + fi + # + dnl Only clang 3.6 or later + if test "$compiler_num" -ge "306"; then + tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion" + fi + # + dnl Only clang 3.9 or later + if test "$compiler_num" -ge "309"; then + tmp_CFLAGS="$tmp_CFLAGS -Wcomma" + # avoid the varargs warning, fixed in 4.0 + # https://bugs.llvm.org/show_bug.cgi?id=29140 + if test "$compiler_num" -lt "400"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs" + fi + fi fi ;; # @@ -989,6 +1039,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ fi fi # + dnl Only gcc 4.6 or later + if test "$compiler_num" -ge "406"; then + tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion" + fi + # fi # dnl Do not issue warnings for code in system include paths. diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 index 69b9a14..6dcd0f1 100644 --- a/m4/curl-confopts.m4 +++ b/m4/curl-confopts.m4 @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -37,13 +37,13 @@ AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver]) AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]), OPT_THRES=$enableval) case "$OPT_THRES" in - yes) - dnl --enable-threaded-resolver option used - want_thres="yes" + no) + dnl --disable-threaded-resolver option used + want_thres="no" ;; *) dnl configure option not specified - want_thres="no" + want_thres="yes" ;; esac AC_MSG_RESULT([$want_thres]) @@ -346,10 +346,6 @@ AC_DEFUN([CURL_CHECK_OPTION_RT], [ AC_MSG_RESULT([no]) ;; esac - dnl TODO: may require mutual exclusion - if test "$dontwant_rt" = "yes" && test "$want_thres" = "yes" ; then - AC_MSG_ERROR([options --disable-rt and --enable-thread-resolver are mutually exclusive, at most one can be selected.]) - fi ]) @@ -520,8 +516,8 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [ fi fi # - CPPFLAGS="$ares_CPPFLAGS $clean_CPPFLAGS" - LDFLAGS="$ares_LDFLAGS $clean_LDFLAGS" + CPPFLAGS="$clean_CPPFLAGS $ares_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS" LIBS="$ares_LIBS $clean_LIBS" # if test "$embedded_ares" != "yes"; then diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4 index 20c3126..d558278 100644 --- a/m4/curl-openssl.m4 +++ b/m4/curl-openssl.m4 @@ -29,7 +29,7 @@ dnl ------------------------------------------------- dnl Find out OpenSSL headers API version, as reported dnl by OPENSSL_VERSION_NUMBER. No runtime checks dnl allowed here for cross-compilation support. -dnl HAVE_OPENSSL_API_HEADERS is defined as apprpriate +dnl HAVE_OPENSSL_API_HEADERS is defined as appropriate dnl only for systems which actually run the configure dnl script. Config files generated manually or in any dnl other way shall not define this. @@ -66,6 +66,7 @@ AC_DEFUN([CURL_CHECK_OPENSSL_API_HEADERS], [ ;; esac case $tst_api in + 0x111) tst_show="1.1.1" ;; 0x110) tst_show="1.1.0" ;; 0x102) tst_show="1.0.2" ;; 0x101) tst_show="1.0.1" ;; @@ -102,7 +103,7 @@ dnl Find out OpenSSL library API version, performing dnl only link tests in order to avoid getting fooled dnl by mismatched OpenSSL headers. No runtime checks dnl allowed here for cross-compilation support. -dnl HAVE_OPENSSL_API_LIBRARY is defined as apprpriate +dnl HAVE_OPENSSL_API_LIBRARY is defined as appropriate dnl only for systems which actually run the configure dnl script. Config files generated manually or in any dnl other way shall not define this. @@ -122,6 +123,13 @@ AC_DEFUN([CURL_CHECK_OPENSSL_API_LIBRARY], [ # AC_MSG_CHECKING([for OpenSSL library version]) if test "$tst_api" = "unknown"; then + AC_LINK_IFELSE([ + AC_LANG_FUNC_LINK_TRY([ERR_clear_last_mark]) + ],[ + tst_api="0x111" + ]) + fi + if test "$tst_api" = "unknown"; then case $host in *-*-vms*) AC_LINK_IFELSE([ @@ -217,6 +225,7 @@ AC_DEFUN([CURL_CHECK_OPENSSL_API_LIBRARY], [ ]) fi case $tst_api in + 0x111) tst_show="1.1.1" ;; 0x110) tst_show="1.1.0" ;; 0x102) tst_show="1.0.2" ;; 0x101) tst_show="1.0.1" ;; diff --git a/m4/curl-override.m4 b/m4/curl-override.m4 index a35d3b2..b27cb61 100644 --- a/m4/curl-override.m4 +++ b/m4/curl-override.m4 @@ -21,7 +21,7 @@ dnl ------------------------------------------------- dnl This is done to prevent compiler warning dnl 'function declaration isn't a prototype' dnl in function main. This requires at least -dnl a c89 compiler and does not suport K&R. +dnl a c89 compiler and does not support K&R. m4_define([AC_LANG_PROGRAM(C)], [$1 diff --git a/m4/xc-lt-iface.m4 b/m4/xc-lt-iface.m4 index 82aaafa..ec903f5 100644 --- a/m4/xc-lt-iface.m4 +++ b/m4/xc-lt-iface.m4 @@ -112,7 +112,7 @@ esac # of non-PIC compiled objects will fail with following linker error # "relocation R_X86_64_32 can not be used when making a shared object" # is to build PIC objects even for static libraries. This behavior may -# be overriden using 'configure --disable-shared --without-pic'. +# be overridden using 'configure --disable-shared --without-pic'. # if test "x$xc_lt_want_with_pic" = 'xdefault'; then @@ -171,7 +171,7 @@ dnl _XC_CHECK_LT_BUILD_LIBRARIES dnl ------------------------------------------------- dnl Private macro. dnl -dnl Checks wether libtool shared and static libraries +dnl Checks whether libtool shared and static libraries dnl are finally built depending on user input, default dnl behavior and knowledge that libtool has about host dnl characteristics. @@ -306,7 +306,7 @@ dnl _XC_CHECK_LT_BUILD_WITH_PIC dnl ------------------------------------------------- dnl Private macro. dnl -dnl Checks wether libtool shared and static libraries +dnl Checks whether libtool shared and static libraries dnl would be built with PIC depending on user input, dnl default behavior and knowledge that libtool has dnl about host characteristics. @@ -317,7 +317,7 @@ dnl xc_lt_build_static_with_pic m4_define([_XC_CHECK_LT_BUILD_WITH_PIC], [dnl # -# Find out wether libtool libraries would be built wit PIC +# Find out whether libtool libraries would be built wit PIC # case "x$pic_mode" in @%:@ (((( @@ -352,7 +352,7 @@ dnl _XC_CHECK_LT_BUILD_SINGLE_VERSION dnl ------------------------------------------------- dnl Private macro. dnl -dnl Checks wether a libtool shared or static library +dnl Checks whether a libtool shared or static library dnl is finally built exclusively without the other. dnl Results stored in following shell variables: dnl xc_lt_build_shared_only diff --git a/m4/zz40-xc-ovr.m4 b/m4/zz40-xc-ovr.m4 index 0e3b1cb..3d6e695 100644 --- a/m4/zz40-xc-ovr.m4 +++ b/m4/zz40-xc-ovr.m4 @@ -2,7 +2,7 @@ # # zz40-xc-ovr.m4 # -# Copyright (c) 2013 Daniel Stenberg +# Copyright (c) 2013 - 2018 Daniel Stenberg # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -18,9 +18,6 @@ # #--------------------------------------------------------------------------- -# serial 1 - - dnl The funny name of this file is intentional in order to make it dnl sort alphabetically after any libtool, autoconf or automake dnl provided .m4 macro file that might get copied into this same @@ -398,9 +395,10 @@ if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then # When both counting methods give the same result we do not want to # chose one over the other, and consider auto-detection not possible. if test -z "$PATH_SEPARATOR"; then - # Stop dead until user provides 'PATH_SEPARATOR' definition. - echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2 - exit 1 + # User should provide the correct 'PATH_SEPARATOR' definition. + # Until then, guess that it is colon! + echo "$xc_msg_warn path separator not determined, guessing colon" >&2 + PATH_SEPARATOR=':' fi else # Separator with the greater directory count is the auto-detected one. diff --git a/m4/zz50-xc-ovr.m4 b/m4/zz50-xc-ovr.m4 index 7e9ae59..de0c843 100644 --- a/m4/zz50-xc-ovr.m4 +++ b/m4/zz50-xc-ovr.m4 @@ -31,7 +31,7 @@ dnl file may override those provided in other files. dnl Override some language related macros dnl ------------------------------------------------- dnl This is done to prevent Libtool 1.5.X from doing -dnl unnecesary C++, Fortran and Java tests when only +dnl unnecessary C++, Fortran and Java tests when only dnl using C language and reduce resulting configure dnl script by nearly 300 Kb. diff --git a/maketgz b/maketgz index a68a9e9..b740173 100755 --- a/maketgz +++ b/maketgz @@ -50,6 +50,13 @@ if test -z "$patch"; then exit fi +# +# As a precaution, remove all *.dist files that may be lying around, to reduce +# the risk of old leftovers getting shipped. The root 'Makefile.dist' is the +# exception. +echo "removing all old *.dist files" +find . -name "*.dist" -a ! -name Makefile.dist -exec rm {} \; + numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"` HEADER=include/curl/curlver.h @@ -67,8 +74,8 @@ if test -z "$only"; then PLIST="$PLIST$ext" fi -# requires a date command that knows -u for UTC time zone -datestamp=`LC_TIME=C date -u` +# requires a date command that knows + for format +datestamp=`date +"%F"` # Replace version number in header file: sed -i -e 's/^#define LIBCURL_VERSION .*/#define LIBCURL_VERSION "'$libversion'"/g' \ @@ -133,6 +140,17 @@ fi ############################################################################ # +# Modify the man pages to display the version number and date. +# + +echo "update man pages" +./scripts/updatemanpages.pl $version + +# make the generated file newer than the man page +touch src/tool_hugehelp.c + +############################################################################ +# # Update the IDE files echo "make vc-ide" make -s vc-ide @@ -160,12 +178,12 @@ gzip -dc $targz | bzip2 --best > $bzip2 ############################################################################ # -# Now make an lzma archive from the tar.gz original +# Now make an xz archive from the tar.gz original # -lzma="curl-$version.tar.lzma" -echo "Generating $lzma" -gzip -dc $targz | lzma --best - > $lzma +xz="curl-$version.tar.xz" +echo "Generating $xz" +gzip -dc $targz | xz -6e - > $xz ############################################################################ # @@ -191,7 +209,7 @@ makezip echo "------------------" echo "maketgz report:" echo "" -ls -l $targz $bzip2 $zip $lzma +ls -l $targz $bzip2 $zip $xz echo "Run this:" -echo "gpg -b -a $targz && gpg -b -a $bzip2 && gpg -b -a $zip && gpg -b -a $lzma" +echo "gpg -b -a $targz && gpg -b -a $bzip2 && gpg -b -a $zip && gpg -b -a $xz" diff --git a/packages/AIX/Makefile.in b/packages/AIX/Makefile.in index 0c98cbe..7cc1b24 100644 --- a/packages/AIX/Makefile.in +++ b/packages/AIX/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/AIX ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -210,6 +210,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -235,7 +241,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -249,7 +257,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -261,6 +272,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -306,6 +318,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -318,6 +331,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -400,9 +414,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/AIX/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/AIX/Makefile + $(AUTOMAKE) --foreign packages/AIX/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/AIX/RPM/Makefile.in b/packages/AIX/RPM/Makefile.in index 9fd169a..e12ef9c 100644 --- a/packages/AIX/RPM/Makefile.in +++ b/packages/AIX/RPM/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/AIX/RPM ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = curl.spec CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -150,6 +150,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -175,7 +181,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -189,7 +197,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -201,6 +212,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -246,6 +258,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -258,6 +271,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -339,9 +353,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/AIX/RPM/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/AIX/RPM/Makefile + $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/AIX/RPM/curl.spec.in b/packages/AIX/RPM/curl.spec.in index c64a0b7..634fc71 100644 --- a/packages/AIX/RPM/curl.spec.in +++ b/packages/AIX/RPM/curl.spec.in @@ -36,7 +36,7 @@ Note: this version is compiled without SSL support. %endif %package devel -Summary: Development files for the curl libary +Summary: Development files for the curl library Group: Development/Libraries %if %{SSL} == 1 Requires: openssl >= 0.9.5 diff --git a/packages/Android/Android.mk b/packages/Android/Android.mk index 301ab9e..72f5e23 100644 --- a/packages/Android/Android.mk +++ b/packages/Android/Android.mk @@ -59,9 +59,8 @@ common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-exte include $(CLEAR_VARS) include $(LOCAL_PATH)/lib/Makefile.inc CURL_HEADERS := \ - curlbuild.h \ curl.h \ - curlrules.h \ + system.h \ curlver.h \ easy.h \ mprintf.h \ diff --git a/packages/EPM/Makefile.in b/packages/EPM/Makefile.in index eec71c1..53f0228 100644 --- a/packages/EPM/Makefile.in +++ b/packages/EPM/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/EPM ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = curl.list CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -150,6 +150,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -175,7 +181,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -189,7 +197,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -201,6 +212,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -246,6 +258,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -258,6 +271,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ diff --git a/packages/EPM/curl.list.in b/packages/EPM/curl.list.in index 00f05fb..3a2028b 100644 --- a/packages/EPM/curl.list.in +++ b/packages/EPM/curl.list.in @@ -16,7 +16,7 @@ $datarootdir=@datarootdir@ %vendor Daniel Stenberg, %license ${srcdir}/MITX.txt %readme ${srcdir}/README -%description Curl is a command line tool for transfering data specified +%description Curl is a command line tool for transferring data specified %description with URL syntax %version @VERSION@ %packager Giuseppe "Cowo" Corbelli diff --git a/packages/Linux/Makefile.in b/packages/Linux/Makefile.in index 363d430..c8f46a9 100644 --- a/packages/Linux/Makefile.in +++ b/packages/Linux/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/Linux ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -210,6 +210,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -235,7 +241,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -249,7 +257,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -261,6 +272,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -306,6 +318,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -318,6 +331,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -399,9 +413,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Linux/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/Linux/Makefile + $(AUTOMAKE) --foreign packages/Linux/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/Linux/RPM/Makefile.in b/packages/Linux/RPM/Makefile.in index b6f76f8..773a8c6 100644 --- a/packages/Linux/RPM/Makefile.in +++ b/packages/Linux/RPM/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/Linux/RPM ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = curl.spec curl-ssl.spec CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -151,6 +151,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -176,7 +182,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -190,7 +198,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -202,6 +213,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -247,6 +259,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -259,6 +272,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -340,9 +354,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Linux/RPM/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/Linux/RPM/Makefile + $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/Makefile.in b/packages/Makefile.in index 77a0084..eb3764b 100644 --- a/packages/Makefile.in +++ b/packages/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -210,6 +210,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -235,7 +241,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -249,7 +257,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -261,6 +272,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -306,6 +318,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -318,6 +331,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -431,9 +445,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/Makefile + $(AUTOMAKE) --foreign packages/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/OS400/README.OS400 b/packages/OS400/README.OS400 index 92eff4e..c766a1f 100644 --- a/packages/OS400/README.OS400 +++ b/packages/OS400/README.OS400 @@ -113,6 +113,7 @@ options: CURLOPT_RANDOM_FILE CURLOPT_RANGE CURLOPT_REFERER + CURLOPT_REQUEST_TARGET CURLOPT_RTSP_SESSION_UID CURLOPT_RTSP_STREAM_URI CURLOPT_RTSP_TRANSPORT @@ -182,8 +183,8 @@ CCSID. CURLINFO_COOKIELIST Lists returned should be released with curl_slist_free_all() after use. Option CURLINFO_CERTINFO is followed by a struct curl_certinfo * * and a -CCSID. Returned structures sould be free'ed using curl_certinfo_free_all() after -use. +CCSID. Returned structures should be free'ed using curl_certinfo_free_all() +after use. Other options are processed like in curl_easy_getinfo(). _ curl_pushheader_bynum_cssid() and curl_pushheader_byname_ccsid() @@ -241,7 +242,8 @@ _ If data compression has to be supported, ZLIB development environment must be installed. _ Likewise, if SCP and SFTP protocols have to be compiled in, LIBSSH2 developent environment must be installed. -_ Install the curl source directory in IFS. +_ Install the curl source directory in IFS. Do NOT install it in the + installation target directory (which defaults to /curl). _ Enter shell (QSH) _ Change current directory to the curl installation directory _ Change current directory to ./packages/OS400 @@ -276,7 +278,7 @@ _ CURL.INC member in file H. This defines everything needed by an ILE/RPG program using libcurl. _ LIBxxx modules and programs. Although the test environment is not supported on OS/400, the libcurl test programs are compiled for manual tests. -_ IFS directory /curl/include/curl containg the C header files for IFS source +_ IFS directory /curl/include/curl containing the C header files for IFS source C/C++ compilation and curl.inc.rpgle for IFS source ILE/RPG compilation. diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c index c5ac3d3..0ca6d68 100644 --- a/packages/OS400/ccsidcurl.c +++ b/packages/OS400/ccsidcurl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -36,6 +36,7 @@ #include "slist.h" #include "urldata.h" #include "url.h" +#include "setopt.h" #include "getinfo.h" #include "ccsidcurl.h" @@ -797,7 +798,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost, unsigned int contentccsid; unsigned int nameccsid; - /* A single curl_formadd() call cannot be splitted in several calls to deal + /* A single curl_formadd() call cannot be split in several calls to deal with all parameters: the original parameters are thus copied to a local curl_forms array and converted to ASCII when needed. CURLFORM_PTRNAME is processed as if it were CURLFORM_COPYNAME. @@ -1124,7 +1125,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) if(testwarn) { testwarn = 0; - if((int) STRING_LASTZEROTERMINATED != (int) STRING_UNIX_SOCKET_PATH + 1 || + if((int) STRING_LASTZEROTERMINATED != (int) STRING_TARGET + 1 || (int) STRING_LAST != (int) STRING_COPYPOSTFIELDS + 1) curl_mfprintf(stderr, "*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n"); @@ -1184,6 +1185,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) case CURLOPT_RANDOM_FILE: case CURLOPT_RANGE: case CURLOPT_REFERER: + case CURLOPT_REQUEST_TARGET: case CURLOPT_RTSP_SESSION_ID: case CURLOPT_RTSP_STREAM_URI: case CURLOPT_RTSP_TRANSPORT: @@ -1287,7 +1289,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) case CURLOPT_ERRORBUFFER: /* This is an output buffer. */ default: - result = Curl_setopt(data, tag, arg); + result = Curl_vsetopt(data, tag, arg); break; } diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in index c6224a7..a21ee9b 100644 --- a/packages/OS400/curl.inc.in +++ b/packages/OS400/curl.inc.in @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -129,6 +129,8 @@ d c X'00100000' d CURL_VERSION_HTTPS_PROXY... d c X'00200000' + d CURL_VERSION_MULTI_SSL... + d c X'00400000' * d CURL_HTTPPOST_FILENAME... d c X'00000001' @@ -262,6 +264,16 @@ d c 6 d CURL_SSLVERSION_TLSv1_3... d c 7 + d CURL_SSLVERSION_MAX_DEFAULT... + d c X'00010000' + d CURL_SSLVERSION_MAX_TLSv1_0... + d c X'00040000' + d CURL_SSLVERSION_MAX_TLSv1_1... + d c X'00050000' + d CURL_SSLVERSION_MAX_TLSv1_2... + d c X'00060000' + d CURL_SSLVERSION_MAX_TLSv1_3... + d c X'00070000' * d CURL_TLSAUTH_NONE... d c 0 @@ -1300,6 +1312,24 @@ d c 10263 d CURLOPT_ABSTRACT_UNIX_SOCKET... d c 10264 + d CURLOPT_SUPPRESS_CONNECT_HEADERS... + d c 00265 + d CURLOPT_REQUEST_TARGET... + d c 10266 + d CURLOPT_SOCKS5_AUTH... + d c 00267 + d CURLOPT_SSH_COMPRESSION... + d c 00268 + d CURLOPT_MIMEPOST... + d c 10269 + d CURLOPT_TIMEVALUE_LARGE... + d c 30270 + d CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS... + d c 00271 + d CURLOPT_RESOLVER_START_FUNCTION... + d c 20272 + d CURLOPT_RESOLVER_START_DATA... + d c 10273 * /if not defined(CURL_NO_OLDIES) d CURLOPT_FILE c 10001 @@ -1938,6 +1968,9 @@ d curl_closesocket_callback... d s * based(######ptr######) procptr * + d curl_resolver_start_callback... + d s * based(######ptr######) procptr + * ************************************************************************** * Prototypes ************************************************************************** diff --git a/packages/OS400/make-include.sh b/packages/OS400/make-include.sh index ad72cf4..3c50d2d 100644 --- a/packages/OS400/make-include.sh +++ b/packages/OS400/make-include.sh @@ -8,15 +8,6 @@ SCRIPTDIR=`dirname "${0}"` cd "${TOPDIR}/include" -# Produce the curlbuild.h header file if not yet in distribution (CVS). - -if action_needed curl/curlbuild.h -then if action_needed curl/curlbuild.h curl/curlbuild.h.dist - then cp -p curl/curlbuild.h.dist curl/curlbuild.h - fi -fi - - # Create the OS/400 source program file for the header files. SRCPF="${LIBIFSNAME}/H.FILE" diff --git a/packages/OS400/makefile.sh b/packages/OS400/makefile.sh index 141d877..7c6bcd7 100644 --- a/packages/OS400/makefile.sh +++ b/packages/OS400/makefile.sh @@ -31,10 +31,11 @@ fi for TEXT in "${TOPDIR}/COPYING" "${SCRIPTDIR}/README.OS400" \ "${TOPDIR}/CHANGES" "${TOPDIR}/docs/THANKS" "${TOPDIR}/docs/FAQ" \ - "${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS" \ + "${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS.md" \ "${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS" \ - "${TOPDIR}/docs/HISTORY" + "${TOPDIR}/docs/HISTORY.md" do MEMBER="`basename \"${TEXT}\" .OS400`" + MEMBER="`basename \"${MEMBER}\" .md`" MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR" if action_needed "${MEMBER}" "${TEXT}" diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c index 89837bd..8ae635e 100644 --- a/packages/OS400/os400sys.c +++ b/packages/OS400/os400sys.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,7 +23,7 @@ /* OS/400 additional support. */ -#include "curlbuild.h" +#include #include "config-os400.h" /* Not curl_setup.h: we only need some defines. */ #include diff --git a/packages/Solaris/Makefile.in b/packages/Solaris/Makefile.in index 29ff622..0c3e1c0 100644 --- a/packages/Solaris/Makefile.in +++ b/packages/Solaris/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/Solaris ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -113,8 +114,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -153,6 +153,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -178,7 +184,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -192,7 +200,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -204,6 +215,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -249,6 +261,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -261,6 +274,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -346,9 +360,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Solaris/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Solaris/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/Solaris/Makefile + $(AUTOMAKE) --foreign packages/Solaris/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/Symbian/group/libcurl.mmp b/packages/Symbian/group/libcurl.mmp index 6388bbd..ba70de3 100644 --- a/packages/Symbian/group/libcurl.mmp +++ b/packages/Symbian/group/libcurl.mmp @@ -31,7 +31,7 @@ SOURCE \ http_negotiate.c inet_pton.c strtoofft.c strerror.c amigaos.c \ hostasyn.c hostip4.c hostip6.c hostsyn.c inet_ntop.c parsedate.c \ select.c vtls/gtls.c vtls/vtls.c tftp.c splay.c strdup.c socks.c \ - ssh.c vtls/nss.c strcase.c curl_addrinfo.c socks_gssapi.c \ + ssh.c vtls/nss.c strcase.c curl_addrinfo.c socks_gssapi.c \ socks_sspi.c curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c \ pop3.c smtp.c pingpong.c rtsp.c curl_threads.c warnless.c hmac.c \ vtls/polarssl.c curl_rtmp.c openldap.c curl_gethostname.c gopher.c \ @@ -39,7 +39,7 @@ SOURCE \ asyn-ares.c asyn-thread.c curl_gssapi.c http_ntlm.c curl_ntlm_wb.c \ curl_ntlm_core.c curl_sasl.c vtls/schannel.c curl_multibyte.c \ vtls/darwinssl.c conncache.c curl_sasl_sspi.c smb.c curl_endian.c \ - curl_des.c system_win32.c \ + curl_des.c curl_range.c system_win32.c sha256.c \ vauth/vauth.c vauth/cleartext.c vauth/cram.c vauth/digest.c \ vauth/digest_sspi.c vauth/krb5_gssapi.c vauth/krb5_sspi.c \ vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c vauth/spnego_gssapi.c \ diff --git a/packages/Symbian/readme.txt b/packages/Symbian/readme.txt index 57b899f..d6312fb 100644 --- a/packages/Symbian/readme.txt +++ b/packages/Symbian/readme.txt @@ -70,7 +70,7 @@ P.I.P.S. causes a USER:87 panic if certain timeouts much longer than half an hour are selected. LDAP, SCP or SFTP methods are not supported due to lack of support for -the dependent libaries on Symbian. +the dependent libraries on Symbian. gzip and deflate decompression is supported when the appropriate macro is uncommented in the libcurl.mmp file. diff --git a/packages/Win32/Makefile.in b/packages/Win32/Makefile.in index 2a701ca..114284f 100644 --- a/packages/Win32/Makefile.in +++ b/packages/Win32/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/Win32 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -210,6 +210,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -235,7 +241,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -249,7 +257,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -261,6 +272,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -306,6 +318,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -318,6 +331,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -400,9 +414,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Win32/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/Win32/Makefile + $(AUTOMAKE) --foreign packages/Win32/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/Win32/README b/packages/Win32/README index eb5d0a6..b37b575 100644 --- a/packages/Win32/README +++ b/packages/Win32/README @@ -20,7 +20,7 @@ marker, you'll want to rejoin the pieces to be all on one line in the batch file). Call any of these batch files - after compiling the curl binaries - with a single parameter specifying the name of the archive file to be created. -It is implicitely assumed that all of the binary files (curl.exe, libcurl.a, +It is implicitly assumed that all of the binary files (curl.exe, libcurl.a, etc) have previously been copied to the main directory of the curl source package (the directory where the main README resides), because that is where they should end up in the zip archive. The archive should *not* be built with diff --git a/packages/Win32/cygwin/Makefile.in b/packages/Win32/cygwin/Makefile.in index 3ec4369..09bfcbf 100644 --- a/packages/Win32/cygwin/Makefile.in +++ b/packages/Win32/cygwin/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/Win32/cygwin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -150,6 +150,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -175,7 +181,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -189,7 +197,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -201,6 +212,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -246,6 +258,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -258,6 +271,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -356,9 +370,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Win32/cygwin/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/Win32/cygwin/Makefile + $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/Win32/cygwin/README b/packages/Win32/cygwin/README index 60bb5e1..9a61341 100644 --- a/packages/Win32/cygwin/README +++ b/packages/Win32/cygwin/README @@ -40,7 +40,7 @@ Build Instructions (to recompile from the cygwin source tarball): (**) LibTool 1.4.2 had a bug related to cygwin's use of ".exe" extensions, such that "make install" blew up at curl.exe. See this URL for details: - http://mail.gnu.org/pipermail/libtool/2001-September/005549.html + https://lists.gnu.org/archive/html/libtool/2001-09/msg00101.html The copy of ltmain.sh that is distributed with curl includes this patch. As of curl 7.9.1, the official source compiles (under Cygwin) and tests diff --git a/packages/vms/Makefile.in b/packages/vms/Makefile.in index fad423c..293a937 100644 --- a/packages/vms/Makefile.in +++ b/packages/vms/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/vms ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -150,6 +150,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -175,7 +181,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -189,7 +197,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -201,6 +212,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -246,6 +258,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -258,6 +271,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -375,9 +389,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/vms/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/vms/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu packages/vms/Makefile + $(AUTOMAKE) --foreign packages/vms/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/packages/vms/clean_gnv_curl.com b/packages/vms/clean_gnv_curl.com index 24ecb11..67b9d9d 100644 --- a/packages/vms/clean_gnv_curl.com +++ b/packages/vms/clean_gnv_curl.com @@ -11,7 +11,7 @@ $! $! This should be run with no parameters after the gnv_curl_configure.sh $! script is run. $! -$! Paramter P1: REALCLEAN +$! Parameter P1: REALCLEAN $! This removes all build products and brings the environment back to $! the point where the gnv_curl_configure.sh procedure needs to be run again. $! @@ -105,9 +105,6 @@ $! $ file = "lcl_root:[...]*.lai" $ if f$search(file) .nes. "" then delete 'file';* $! -$ file = "lcl_root:[.include.curl]curlbuild.h_old" -$ if f$search(file) .nes. "" then delete 'file';* -$! $ file = "lcl_root:[.packages.vms]curl-*_original_src.bck" $ if f$search(file) .nes. "" then delete 'file';* $! @@ -166,9 +163,6 @@ $! $ file = "lcl_root:[]config.h" $ if f$search(file) .nes. "" then delete 'file';* $! -$ file = "lcl_root:[.include.curl]curlbuild.h" -$ if f$search(file) .nes. "" then delete 'file';* -$! $ file = "lcl_root:[.src]config.h" $ if f$search(file) .nes. "" then delete 'file';* $! diff --git a/packages/vms/config_h.com b/packages/vms/config_h.com index 2a5503f..0f1fa0f 100644 --- a/packages/vms/config_h.com +++ b/packages/vms/config_h.com @@ -1382,7 +1382,7 @@ $! search/out 'tfile1' "$_''keyterm'" $ severity = '$severity' $ endif $! -$! Unix compatability routines +$! Unix compatibility routines $!--------------------------------------------- $ if severity .ne. 1 $ then diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt index 83534c0..3420aae 100644 --- a/packages/vms/curl_gnv_build_steps.txt +++ b/packages/vms/curl_gnv_build_steps.txt @@ -235,7 +235,7 @@ branding the PCSI kit based on who is making the kit. Since at this time curl does not need this alias procedure, the steps to automatically build it are not included here. - While newer versions of PCSI can support ODS-5 filenames, not all verions + While newer versions of PCSI can support ODS-5 filenames, not all versions of PCSI on systems that have ODS-5 filenames do. So as a post install step, the PCSI kit built by these steps does a rename to the correct case as a post install step. diff --git a/packages/vms/generate_vax_transfer.com b/packages/vms/generate_vax_transfer.com index 115db8a..92391f9 100644 --- a/packages/vms/generate_vax_transfer.com +++ b/packages/vms/generate_vax_transfer.com @@ -219,7 +219,7 @@ $deck ; The first for upper case which matches the tradition method of generating ; VAX transfer vectors. ; -; The second is the exact case for compatibilty with open source C programs +; The second is the exact case for compatibility with open source C programs ; that expect exact case symbols in images. These are separated because a ; previous kit had only upper case symbols. ; diff --git a/packages/vms/gnv_link_curl.com b/packages/vms/gnv_link_curl.com index add4be9..64b0aa8 100644 --- a/packages/vms/gnv_link_curl.com +++ b/packages/vms/gnv_link_curl.com @@ -262,7 +262,7 @@ version or a compatible later version. For Alpha and IA64 platforms, see the url below to register to get the download URL. The kit will be HP 1.4-467 or later. - http://h71000.www7.hp.com/openvms/products/ssl/ssl.html + https://h41379.www4.hpe.com/openvms/products/ssl/ssl.html For VAX, use the same registration, but remove the kit name from any of the download URLs provided and put in CPQ-VAXVMS-SSL-V0101-B-1.PCSI-DCX_VAXEXE diff --git a/packages/vms/pcsi_gnv_curl_file_list.txt b/packages/vms/pcsi_gnv_curl_file_list.txt index ab5b633..07539b2 100644 --- a/packages/vms/pcsi_gnv_curl_file_list.txt +++ b/packages/vms/pcsi_gnv_curl_file_list.txt @@ -58,8 +58,7 @@ [gnv.usr.bin]curl-config. [gnv.usr.bin]gnv$curl.exe [gnv.usr.include.curl]curl.h -[gnv.usr.include.curl]curlbuild.h -[gnv.usr.include.curl]curlrules.h +[gnv.usr.include.curl]system.h [gnv.usr.include.curl]curlver.h [gnv.usr.include.curl]easy.h [gnv.usr.include.curl]mprintf.h diff --git a/packages/vms/readme b/packages/vms/readme index 5f116a5..ddfac74 100644 --- a/packages/vms/readme +++ b/packages/vms/readme @@ -218,7 +218,7 @@ allow interrupted downloads to be continued. The libcurl file module still does not understand VMS file types and requires -the input files to be in STREAM_LF to work propery. +the input files to be in STREAM_LF to work property. The test suites are not supported as of 7.11.0. diff --git a/packages/vms/stage_curl_install.com b/packages/vms/stage_curl_install.com index 0dccdd6..84540d7 100644 --- a/packages/vms/stage_curl_install.com +++ b/packages/vms/stage_curl_install.com @@ -11,8 +11,6 @@ $! [usr.bin]curl-config. $! [usr.lib]gnv$libcurl.exe $! [usr.bin]curl. hard link for [usr.bin]gnv$curl.exe $! [usr.include.curl]curl.h -$! [usr.include.curl]curlbuild.h -$! [usr.include.curl]curlrules.h $! [usr.include.curl]curlver.h $! [usr.include.curl]easy.h $! [usr.include.curl]mprintf.h @@ -132,10 +130,8 @@ $! $ if remove_files .eq. 0 $ then $ copy [--.include.curl]curl.h 'new_gnu'[usr.include.curl]curl.h -$ copy [--.include.curl]curlbuild.h - - 'new_gnu'[usr.include.curl]curlbuild.h -$ copy [--.include.curl]curlrules.h - - 'new_gnu'[usr.include.curl]curlrules.h +$ copy [--.include.curl]system.h - + 'new_gnu'[usr.include.curl]system.h $ copy [--.include.curl]curlver.h - 'new_gnu'[usr.include.curl]curlver.h $ copy [--.include.curl]easy.h - diff --git a/projects/README b/projects/README index fee7304..99b1d7a 100644 --- a/projects/README +++ b/projects/README @@ -4,7 +4,7 @@ Building via IDE Project Files This document describes how to compile, build and install curl and libcurl from sources using an IDE based development tool such as Visual Studio. - Project files are currently available for Visual C++ v6.0 to v14.0. The + Project files are currently available for Visual C++ v6.0 to v15.0. The following directory structure has been used to cater for this: somedirectory\ @@ -74,9 +74,6 @@ Building with Visual C++ If you require support for Internationalized Domain Names via Windows IDN then you will need either: - * Microsoft Internationalized Domain Name (IDN) Mitigation APIs: - https://www.microsoft.com/en-us/download/details.aspx?id=734 - * Microsoft Windows SDK Update for Windows Vista: https://www.microsoft.com/en-us/download/details.aspx?id=23719 @@ -108,7 +105,7 @@ Running DLL based configurations ... where 'Path to DLL` is the configuration specific path. For example the following configurations in Visual Studio 2010 might be: - + DLL Debug - DLL OpenSSL (Win32): PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32; C:\Windows;C:\Windows\System32\Wbem @@ -133,7 +130,7 @@ Notes ===== The following keywords have been used in the directory hierarchy: - + - The platform (For example: Windows) - The IDE (For example: VC6, VC10, BCC5) - The platform architecture (For example: Win32, Win64) @@ -142,12 +139,12 @@ Notes If you are using the source code from the git repository, rather than a release archive or nightly build, you will need to generate the project - files. Please run "generate -help" for usage details. + files. Please run "generate -help" for usage details. Should you wish to help out with some of the items on the TODO list, or find bugs in the project files that need correcting, and would like to submit updated files back then please note that, whilst the solution files - can be edited directly, the templates for the project files (which are + can be edited directly, the templates for the project files (which are stored in the git repositoty) will need to be modified rather than the generated project files that Visual Studio uses. diff --git a/projects/Windows/VC10/lib/libcurl.vcxproj b/projects/Windows/VC10/lib/libcurl.vcxproj index 974f70a..be20724 100644 --- a/projects/Windows/VC10/lib/libcurl.vcxproj +++ b/projects/Windows/VC10/lib/libcurl.vcxproj @@ -1,2575 +1,2588 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} - libcurl - - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - DynamicLibrary - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)lib\ - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} + libcurl + + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + StaticLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)lib\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC10/src/curl.vcxproj b/projects/Windows/VC10/src/curl.vcxproj index 7f7da00..63445a5 100644 --- a/projects/Windows/VC10/src/curl.vcxproj +++ b/projects/Windows/VC10/src/curl.vcxproj @@ -1,2730 +1,2730 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {5228E9CE-A216-422F-A5E6-58E95E2DD71D} - curl - - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - ..\..\..\..\build\Win32\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - ..\..\..\..\build\Win64\VC10\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {5228E9CE-A216-422F-A5E6-58E95E2DD71D} + curl + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + ..\..\..\..\build\Win32\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + ..\..\..\..\build\Win64\VC10\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC10\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC11/lib/libcurl.vcxproj b/projects/Windows/VC11/lib/libcurl.vcxproj index 9fc6ada..4b8250e 100644 --- a/projects/Windows/VC11/lib/libcurl.vcxproj +++ b/projects/Windows/VC11/lib/libcurl.vcxproj @@ -1,2631 +1,2644 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} - libcurl - - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)lib\ - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} + libcurl + + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + DynamicLibrary + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)lib\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC11/src/curl.vcxproj b/projects/Windows/VC11/src/curl.vcxproj index bd57533..83846a6 100644 --- a/projects/Windows/VC11/src/curl.vcxproj +++ b/projects/Windows/VC11/src/curl.vcxproj @@ -1,2786 +1,2786 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {5228E9CE-A216-422F-A5E6-58E95E2DD71D} - curl - - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - ..\..\..\..\build\Win32\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - ..\..\..\..\build\Win64\VC11\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {5228E9CE-A216-422F-A5E6-58E95E2DD71D} + curl + + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + Application + false + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + ..\..\..\..\build\Win32\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + ..\..\..\..\build\Win64\VC11\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC11\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC12/lib/libcurl.vcxproj b/projects/Windows/VC12/lib/libcurl.vcxproj index 2b30619..2257fe4 100644 --- a/projects/Windows/VC12/lib/libcurl.vcxproj +++ b/projects/Windows/VC12/lib/libcurl.vcxproj @@ -1,2631 +1,2644 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} - libcurl - - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - StaticLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - DynamicLibrary - false - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)lib\ - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} + libcurl + + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + StaticLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + DynamicLibrary + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)lib\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC12/src/curl.vcxproj b/projects/Windows/VC12/src/curl.vcxproj index 7ab9663..2870c53 100644 --- a/projects/Windows/VC12/src/curl.vcxproj +++ b/projects/Windows/VC12/src/curl.vcxproj @@ -1,2786 +1,2786 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {5228E9CE-A216-422F-A5E6-58E95E2DD71D} - curl - - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - Application - false - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - ..\..\..\..\build\Win32\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - ..\..\..\..\build\Win64\VC12\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {5228E9CE-A216-422F-A5E6-58E95E2DD71D} + curl + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + ..\..\..\..\build\Win32\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + ..\..\..\..\build\Win64\VC12\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC12\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC14/lib/libcurl.vcxproj b/projects/Windows/VC14/lib/libcurl.vcxproj index edeef6b..481b761 100644 --- a/projects/Windows/VC14/lib/libcurl.vcxproj +++ b/projects/Windows/VC14/lib/libcurl.vcxproj @@ -1,2631 +1,2644 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} - libcurl - - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - StaticLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - DynamicLibrary - false - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)lib\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)lib\ - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\wolfssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - Win32 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) - $(IntDir)$(TargetFileName).intermediate.manifest - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - X64 - $(OutDir)$(ProjectName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) - $(TargetDir)$(TargetName).lib - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX86 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) - NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - $(OutDir)$(TargetName)$(TargetExt) - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} + libcurl + + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + DynamicLibrary + false + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)lib\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC14/src/curl.vcxproj b/projects/Windows/VC14/src/curl.vcxproj index 6960a7b..f0a871a 100644 --- a/projects/Windows/VC14/src/curl.vcxproj +++ b/projects/Windows/VC14/src/curl.vcxproj @@ -1,2786 +1,2786 @@ - - - - - DLL Debug - DLL wolfSSL - Win32 - - - DLL Debug - DLL wolfSSL - x64 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Debug - DLL OpenSSL - Win32 - - - DLL Debug - DLL OpenSSL - x64 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Debug - DLL Windows SSPI - Win32 - - - DLL Debug - DLL Windows SSPI - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - DLL wolfSSL - Win32 - - - DLL Release - DLL wolfSSL - x64 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - DLL Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - DLL Release - DLL OpenSSL - Win32 - - - DLL Release - DLL OpenSSL - x64 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - DLL Release - DLL Windows SSPI - DLL WinIDN - x64 - - - DLL Release - DLL Windows SSPI - Win32 - - - DLL Release - DLL Windows SSPI - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Debug - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Debug - DLL OpenSSL - Win32 - - - LIB Debug - DLL OpenSSL - x64 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Debug - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Debug - DLL Windows SSPI - Win32 - - - LIB Debug - DLL Windows SSPI - x64 - - - LIB Debug - LIB wolfSSL - Win32 - - - LIB Debug - LIB wolfSSL - x64 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Debug - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Debug - LIB OpenSSL - Win32 - - - LIB Debug - LIB OpenSSL - x64 - - - LIB Debug - Win32 - - - LIB Debug - x64 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - Win32 - - - LIB Release - DLL OpenSSL - DLL LibSSH2 - x64 - - - LIB Release - DLL OpenSSL - Win32 - - - LIB Release - DLL OpenSSL - x64 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - Win32 - - - LIB Release - DLL Windows SSPI - DLL WinIDN - x64 - - - LIB Release - DLL Windows SSPI - Win32 - - - LIB Release - DLL Windows SSPI - x64 - - - LIB Release - LIB wolfSSL - Win32 - - - LIB Release - LIB wolfSSL - x64 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - Win32 - - - LIB Release - LIB OpenSSL - LIB LibSSH2 - x64 - - - LIB Release - LIB OpenSSL - Win32 - - - LIB Release - LIB OpenSSL - x64 - - - LIB Release - Win32 - - - LIB Release - x64 - - - - {5228E9CE-A216-422F-A5E6-58E95E2DD71D} - curl - - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - Application - false - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - ..\..\..\..\build\Win32\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - ..\..\..\..\build\Win64\VC14\$(Configuration)\ - $(OutDir)src\ - $(OutDir)src\ - false - false - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName)d - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - $(ProjectName) - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - true - $(TargetDir)$(TargetName).pdb - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - true - $(TargetDir)$(TargetName).pdb - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - Disabled - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - Level4 - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - true - $(TargetDir)$(TargetName).pdb - Console - MachineX64 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX86 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - X64 - $(TargetDir)$(TargetName).tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level4 - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) - Console - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {5228E9CE-A216-422F-A5E6-58E95E2DD71D} + curl + + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + ..\..\..\..\build\Win32\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + ..\..\..\..\build\Win64\VC14\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC14\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC15/curl-all.sln b/projects/Windows/VC15/curl-all.sln new file mode 100644 index 0000000..e563cae --- /dev/null +++ b/projects/Windows/VC15/curl-all.sln @@ -0,0 +1,298 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl", "src\curl.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}" + ProjectSection(ProjectDependencies) = postProject + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} = {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "lib\libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32 + DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64 + DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32 + DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64 + DLL Debug - DLL wolfSSL|Win32 = DLL Debug - DLL wolfSSL|Win32 + DLL Debug - DLL wolfSSL|x64 = DLL Debug - DLL wolfSSL|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32 + DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64 + DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32 + DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64 + DLL Release - DLL wolfSSL|Win32 = DLL Release - DLL wolfSSL|Win32 + DLL Release - DLL wolfSSL|x64 = DLL Release - DLL wolfSSL|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 + LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32 + LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64 + LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32 + LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64 + LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32 + LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64 + LIB Debug - LIB wolfSSL|Win32 = LIB Debug - LIB wolfSSL|Win32 + LIB Debug - LIB wolfSSL|x64 = LIB Debug - LIB wolfSSL|x64 + LIB Debug|Win32 = LIB Debug|Win32 + LIB Debug|x64 = LIB Debug|x64 + LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32 + LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64 + LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32 + LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64 + LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32 + LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64 + LIB Release - LIB wolfSSL|Win32 = LIB Release - LIB wolfSSL|Win32 + LIB Release - LIB wolfSSL|x64 = LIB Release - LIB wolfSSL|x64 + LIB Release|Win32 = LIB Release|Win32 + LIB Release|x64 = LIB Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|Win32.ActiveCfg = DLL Debug - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|Win32.Build.0 = DLL Debug - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|x64.ActiveCfg = DLL Debug - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|x64.Build.0 = DLL Debug - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|Win32.ActiveCfg = DLL Release - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|Win32.Build.0 = DLL Release - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|x64.ActiveCfg = DLL Release - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|x64.Build.0 = DLL Release - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|Win32.ActiveCfg = LIB Debug - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|Win32.Build.0 = LIB Debug - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|x64.ActiveCfg = LIB Debug - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|x64.Build.0 = LIB Debug - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|Win32.ActiveCfg = LIB Release - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|Win32.Build.0 = LIB Release - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|x64.ActiveCfg = LIB Release - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|x64.Build.0 = LIB Release - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|Win32.ActiveCfg = DLL Debug - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|Win32.Build.0 = DLL Debug - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|x64.ActiveCfg = DLL Debug - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|x64.Build.0 = DLL Debug - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|Win32.ActiveCfg = DLL Release - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|Win32.Build.0 = DLL Release - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|x64.ActiveCfg = DLL Release - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|x64.Build.0 = DLL Release - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|Win32.ActiveCfg = LIB Debug - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|Win32.Build.0 = LIB Debug - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|x64.ActiveCfg = LIB Debug - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|x64.Build.0 = LIB Debug - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|Win32.ActiveCfg = LIB Release - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|Win32.Build.0 = LIB Release - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|x64.ActiveCfg = LIB Release - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|x64.Build.0 = LIB Release - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/projects/Windows/VC15/lib/libcurl.sln b/projects/Windows/VC15/lib/libcurl.sln new file mode 100644 index 0000000..595bdb2 --- /dev/null +++ b/projects/Windows/VC15/lib/libcurl.sln @@ -0,0 +1,181 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32 + DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64 + DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32 + DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64 + DLL Debug - DLL wolfSSL|Win32 = DLL Debug - DLL wolfSSL|Win32 + DLL Debug - DLL wolfSSL|x64 = DLL Debug - DLL wolfSSL|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32 + DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64 + DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32 + DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64 + DLL Release - DLL wolfSSL|Win32 = DLL Release - DLL wolfSSL|Win32 + DLL Release - DLL wolfSSL|x64 = DLL Release - DLL wolfSSL|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 + LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32 + LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64 + LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32 + LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64 + LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32 + LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64 + LIB Debug - LIB wolfSSL|Win32 = LIB Debug - LIB wolfSSL|Win32 + LIB Debug - LIB wolfSSL|x64 = LIB Debug - LIB wolfSSL|x64 + LIB Debug|Win32 = LIB Debug|Win32 + LIB Debug|x64 = LIB Debug|x64 + LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32 + LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64 + LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32 + LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64 + LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32 + LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64 + LIB Release - LIB wolfSSL|Win32 = LIB Release - LIB wolfSSL|Win32 + LIB Release - LIB wolfSSL|x64 = LIB Release - LIB wolfSSL|x64 + LIB Release|Win32 = LIB Release|Win32 + LIB Release|x64 = LIB Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|Win32.ActiveCfg = DLL Debug - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|Win32.Build.0 = DLL Debug - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|x64.ActiveCfg = DLL Debug - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug - DLL wolfSSL|x64.Build.0 = DLL Debug - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|Win32.ActiveCfg = DLL Release - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|Win32.Build.0 = DLL Release - DLL wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|x64.ActiveCfg = DLL Release - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release - DLL wolfSSL|x64.Build.0 = DLL Release - DLL wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.DLL Release|x64.Build.0 = DLL Release|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|Win32.ActiveCfg = LIB Debug - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|Win32.Build.0 = LIB Debug - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|x64.ActiveCfg = LIB Debug - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug - LIB wolfSSL|x64.Build.0 = LIB Debug - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|Win32.Build.0 = LIB Debug|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.ActiveCfg = LIB Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Debug|x64.Build.0 = LIB Debug|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|Win32.ActiveCfg = LIB Release - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|Win32.Build.0 = LIB Release - LIB wolfSSL|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|x64.ActiveCfg = LIB Release - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release - LIB wolfSSL|x64.Build.0 = LIB Release - LIB wolfSSL|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.ActiveCfg = LIB Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|Win32.Build.0 = LIB Release|Win32 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.ActiveCfg = LIB Release|x64 + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.LIB Release|x64.Build.0 = LIB Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/projects/Windows/VC15/lib/libcurl.vcxproj b/projects/Windows/VC15/lib/libcurl.vcxproj new file mode 100644 index 0000000..5a67af9 --- /dev/null +++ b/projects/Windows/VC15/lib/libcurl.vcxproj @@ -0,0 +1,2644 @@ + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB} + libcurl + + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + StaticLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + DynamicLibrary + false + MultiByte + v141 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)lib\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)lib\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;WOLFSSL_DLL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\wolfssl\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\wolfssl;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_CYASSL;HAVE_CYASSL_OPTIONS_H;HAVE_CYASSL_ERROR_SSL_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + %(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories) + $(IntDir)$(TargetFileName).intermediate.manifest + $(TargetDir)$(TargetName).lib + MachineX86 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + X64 + $(OutDir)$(ProjectName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories) + $(TargetDir)$(TargetName).lib + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + _DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WINDOWS_SSPI;USE_SCHANNEL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX86 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories) + NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + $(OutDir)$(TargetName)$(TargetExt) + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC15/lib/libcurl.vcxproj.filters b/projects/Windows/VC15/lib/libcurl.vcxproj.filters new file mode 100644 index 0000000..4d6341d --- /dev/null +++ b/projects/Windows/VC15/lib/libcurl.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + \ No newline at end of file diff --git a/projects/Windows/VC15/src/curl.sln b/projects/Windows/VC15/src/curl.sln new file mode 100644 index 0000000..2af0959 --- /dev/null +++ b/projects/Windows/VC15/src/curl.sln @@ -0,0 +1,181 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl", "curl.vcxproj", "{5228E9CE-A216-422F-A5E6-58E95E2DD71D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + DLL Debug - DLL OpenSSL|Win32 = DLL Debug - DLL OpenSSL|Win32 + DLL Debug - DLL OpenSSL|x64 = DLL Debug - DLL OpenSSL|x64 + DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + DLL Debug - DLL Windows SSPI|Win32 = DLL Debug - DLL Windows SSPI|Win32 + DLL Debug - DLL Windows SSPI|x64 = DLL Debug - DLL Windows SSPI|x64 + DLL Debug - DLL wolfSSL|Win32 = DLL Debug - DLL wolfSSL|Win32 + DLL Debug - DLL wolfSSL|x64 = DLL Debug - DLL wolfSSL|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + DLL Release - DLL OpenSSL - DLL LibSSH2|x64 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + DLL Release - DLL OpenSSL|Win32 = DLL Release - DLL OpenSSL|Win32 + DLL Release - DLL OpenSSL|x64 = DLL Release - DLL OpenSSL|x64 + DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + DLL Release - DLL Windows SSPI - DLL WinIDN|x64 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + DLL Release - DLL Windows SSPI|Win32 = DLL Release - DLL Windows SSPI|Win32 + DLL Release - DLL Windows SSPI|x64 = DLL Release - DLL Windows SSPI|x64 + DLL Release - DLL wolfSSL|Win32 = DLL Release - DLL wolfSSL|Win32 + DLL Release - DLL wolfSSL|x64 = DLL Release - DLL wolfSSL|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 + LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + LIB Debug - DLL OpenSSL|Win32 = LIB Debug - DLL OpenSSL|Win32 + LIB Debug - DLL OpenSSL|x64 = LIB Debug - DLL OpenSSL|x64 + LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + LIB Debug - DLL Windows SSPI|Win32 = LIB Debug - DLL Windows SSPI|Win32 + LIB Debug - DLL Windows SSPI|x64 = LIB Debug - DLL Windows SSPI|x64 + LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + LIB Debug - LIB OpenSSL|Win32 = LIB Debug - LIB OpenSSL|Win32 + LIB Debug - LIB OpenSSL|x64 = LIB Debug - LIB OpenSSL|x64 + LIB Debug - LIB wolfSSL|Win32 = LIB Debug - LIB wolfSSL|Win32 + LIB Debug - LIB wolfSSL|x64 = LIB Debug - LIB wolfSSL|x64 + LIB Debug|Win32 = LIB Debug|Win32 + LIB Debug|x64 = LIB Debug|x64 + LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + LIB Release - DLL OpenSSL - DLL LibSSH2|x64 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + LIB Release - DLL OpenSSL|Win32 = LIB Release - DLL OpenSSL|Win32 + LIB Release - DLL OpenSSL|x64 = LIB Release - DLL OpenSSL|x64 + LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + LIB Release - DLL Windows SSPI - DLL WinIDN|x64 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + LIB Release - DLL Windows SSPI|Win32 = LIB Release - DLL Windows SSPI|Win32 + LIB Release - DLL Windows SSPI|x64 = LIB Release - DLL Windows SSPI|x64 + LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + LIB Release - LIB OpenSSL - LIB LibSSH2|x64 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + LIB Release - LIB OpenSSL|Win32 = LIB Release - LIB OpenSSL|Win32 + LIB Release - LIB OpenSSL|x64 = LIB Release - LIB OpenSSL|x64 + LIB Release - LIB wolfSSL|Win32 = LIB Release - LIB wolfSSL|Win32 + LIB Release - LIB wolfSSL|x64 = LIB Release - LIB wolfSSL|x64 + LIB Release|Win32 = LIB Release|Win32 + LIB Release|x64 = LIB Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.ActiveCfg = DLL Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|Win32.Build.0 = DLL Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.ActiveCfg = DLL Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL OpenSSL|x64.Build.0 = DLL Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.ActiveCfg = DLL Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|Win32.Build.0 = DLL Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.ActiveCfg = DLL Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL Windows SSPI|x64.Build.0 = DLL Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|Win32.ActiveCfg = DLL Debug - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|Win32.Build.0 = DLL Debug - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|x64.ActiveCfg = DLL Debug - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug - DLL wolfSSL|x64.Build.0 = DLL Debug - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = DLL Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.ActiveCfg = DLL Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|Win32.Build.0 = DLL Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.ActiveCfg = DLL Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL OpenSSL|x64.Build.0 = DLL Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = DLL Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.ActiveCfg = DLL Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|Win32.Build.0 = DLL Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.ActiveCfg = DLL Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL Windows SSPI|x64.Build.0 = DLL Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|Win32.ActiveCfg = DLL Release - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|Win32.Build.0 = DLL Release - DLL wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|x64.ActiveCfg = DLL Release - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release - DLL wolfSSL|x64.Build.0 = DLL Release - DLL wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.DLL Release|x64.Build.0 = DLL Release|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Debug - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.ActiveCfg = LIB Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|Win32.Build.0 = LIB Debug - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.ActiveCfg = LIB Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL OpenSSL|x64.Build.0 = LIB Debug - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Debug - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.ActiveCfg = LIB Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|Win32.Build.0 = LIB Debug - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.ActiveCfg = LIB Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - DLL Windows SSPI|x64.Build.0 = LIB Debug - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Debug - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.ActiveCfg = LIB Debug - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|Win32.Build.0 = LIB Debug - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.ActiveCfg = LIB Debug - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB OpenSSL|x64.Build.0 = LIB Debug - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|Win32.ActiveCfg = LIB Debug - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|Win32.Build.0 = LIB Debug - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|x64.ActiveCfg = LIB Debug - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug - LIB wolfSSL|x64.Build.0 = LIB Debug - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.ActiveCfg = LIB Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|Win32.Build.0 = LIB Debug|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.ActiveCfg = LIB Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Debug|x64.Build.0 = LIB Debug|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|Win32.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.ActiveCfg = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL - DLL LibSSH2|x64.Build.0 = LIB Release - DLL OpenSSL - DLL LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.ActiveCfg = LIB Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|Win32.Build.0 = LIB Release - DLL OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.ActiveCfg = LIB Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL OpenSSL|x64.Build.0 = LIB Release - DLL OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|Win32.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.ActiveCfg = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI - DLL WinIDN|x64.Build.0 = LIB Release - DLL Windows SSPI - DLL WinIDN|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.ActiveCfg = LIB Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|Win32.Build.0 = LIB Release - DLL Windows SSPI|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.ActiveCfg = LIB Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - DLL Windows SSPI|x64.Build.0 = LIB Release - DLL Windows SSPI|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|Win32.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.ActiveCfg = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL - LIB LibSSH2|x64.Build.0 = LIB Release - LIB OpenSSL - LIB LibSSH2|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.ActiveCfg = LIB Release - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|Win32.Build.0 = LIB Release - LIB OpenSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.ActiveCfg = LIB Release - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB OpenSSL|x64.Build.0 = LIB Release - LIB OpenSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|Win32.ActiveCfg = LIB Release - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|Win32.Build.0 = LIB Release - LIB wolfSSL|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|x64.ActiveCfg = LIB Release - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release - LIB wolfSSL|x64.Build.0 = LIB Release - LIB wolfSSL|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.ActiveCfg = LIB Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|Win32.Build.0 = LIB Release|Win32 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.ActiveCfg = LIB Release|x64 + {5228E9CE-A216-422F-A5E6-58E95E2DD71D}.LIB Release|x64.Build.0 = LIB Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/projects/Windows/VC15/src/curl.vcxproj b/projects/Windows/VC15/src/curl.vcxproj new file mode 100644 index 0000000..57aa1d9 --- /dev/null +++ b/projects/Windows/VC15/src/curl.vcxproj @@ -0,0 +1,2786 @@ + + + + + DLL Debug - DLL wolfSSL + Win32 + + + DLL Debug - DLL wolfSSL + x64 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Debug - DLL OpenSSL + Win32 + + + DLL Debug - DLL OpenSSL + x64 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Debug - DLL Windows SSPI + Win32 + + + DLL Debug - DLL Windows SSPI + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release - DLL wolfSSL + Win32 + + + DLL Release - DLL wolfSSL + x64 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + DLL Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + DLL Release - DLL OpenSSL + Win32 + + + DLL Release - DLL OpenSSL + x64 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + DLL Release - DLL Windows SSPI - DLL WinIDN + x64 + + + DLL Release - DLL Windows SSPI + Win32 + + + DLL Release - DLL Windows SSPI + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Debug - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Debug - DLL OpenSSL + Win32 + + + LIB Debug - DLL OpenSSL + x64 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Debug - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Debug - DLL Windows SSPI + Win32 + + + LIB Debug - DLL Windows SSPI + x64 + + + LIB Debug - LIB wolfSSL + Win32 + + + LIB Debug - LIB wolfSSL + x64 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Debug - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Debug - LIB OpenSSL + Win32 + + + LIB Debug - LIB OpenSSL + x64 + + + LIB Debug + Win32 + + + LIB Debug + x64 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + Win32 + + + LIB Release - DLL OpenSSL - DLL LibSSH2 + x64 + + + LIB Release - DLL OpenSSL + Win32 + + + LIB Release - DLL OpenSSL + x64 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + Win32 + + + LIB Release - DLL Windows SSPI - DLL WinIDN + x64 + + + LIB Release - DLL Windows SSPI + Win32 + + + LIB Release - DLL Windows SSPI + x64 + + + LIB Release - LIB wolfSSL + Win32 + + + LIB Release - LIB wolfSSL + x64 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + Win32 + + + LIB Release - LIB OpenSSL - LIB LibSSH2 + x64 + + + LIB Release - LIB OpenSSL + Win32 + + + LIB Release - LIB OpenSSL + x64 + + + LIB Release + Win32 + + + LIB Release + x64 + + + + {5228E9CE-A216-422F-A5E6-58E95E2DD71D} + curl + + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + Application + false + MultiByte + v141 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + ..\..\..\..\build\Win32\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + ..\..\..\..\build\Win64\VC15\$(Configuration)\ + $(OutDir)src\ + $(OutDir)src\ + false + false + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + $(ProjectName) + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC15\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + true + $(TargetDir)$(TargetName).pdb + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC15\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + true + $(TargetDir)$(TargetName).pdb + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\wolfssl\build\Win32\VC15\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;wolfssl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\wolfssl\build\Win64\VC15\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC15\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC15\LIB Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC15\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC15\LIB Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + Disabled + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;DEBUGBUILD;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurld.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + true + $(TargetDir)$(TargetName).pdb + Console + MachineX64 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win32\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX86 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + X64 + $(TargetDir)$(TargetName).tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\..\include;..\..\..\..\lib;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Level4 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + ..\..\..\..\include;%(AdditionalIncludeDirectories) + + + ws2_32.lib;wldap32.lib;crypt32.lib;normaliz.lib;libcurl.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName)$(TargetExt) + ..\..\..\..\build\Win64\VC15\$(Configuration);%(AdditionalLibraryDirectories) + Console + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC15/src/curl.vcxproj.filters b/projects/Windows/VC15/src/curl.vcxproj.filters new file mode 100644 index 0000000..4d6341d --- /dev/null +++ b/projects/Windows/VC15/src/curl.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + \ No newline at end of file diff --git a/projects/Windows/VC6/curl-all.dsw b/projects/Windows/VC6/curl-all.dsw index a718e59..bd0e96e 100644 --- a/projects/Windows/VC6/curl-all.dsw +++ b/projects/Windows/VC6/curl-all.dsw @@ -1,44 +1,44 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "libcurl"=".\lib\libcurl.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "curl"=".\src\curl.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libcurl - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libcurl"=".\lib\libcurl.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "curl"=".\src\curl.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libcurl + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/projects/Windows/VC6/lib/libcurl.dsp b/projects/Windows/VC6/lib/libcurl.dsp index 88ac2b3..3658044 100644 --- a/projects/Windows/VC6/lib/libcurl.dsp +++ b/projects/Windows/VC6/lib/libcurl.dsp @@ -1,1705 +1,1757 @@ -# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=libcurl - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "libcurl.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "libcurl.mak" CFG="libcurl - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Debug DLL OpenSSL" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Debug DLL Windows SSPI" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Release DLL OpenSSL" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Release DLL Windows SSPI" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Debug DLL OpenSSL" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Debug DLL Windows SSPI" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Debug LIB OpenSSL" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Release DLL OpenSSL" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Release DLL Windows SSPI" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Release LIB OpenSSL" (based on "Win32 (x86) Static Library") -!MESSAGE "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" - -!IF "$(CFG)" == "libcurl - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\libcurld.dll" /pdbtype:con /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\libcurld.dll" /pdbtype:con /fixed:no - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\libcurld.dll" /pdbtype:con /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\libcurld.dll" /pdbtype:con /fixed:no - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\libcurld.dll" /pdbtype:con /fixed:no -# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\libcurld.dll" /pdbtype:con /fixed:no - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no /release - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release - -!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\lib" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release -# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug\libcurld.lib" /machine:I386 -# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug\libcurld.lib" /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\libcurld.lib" /machine:I386 -# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\libcurld.lib" /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\libcurld.lib" /machine:I386 -# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\libcurld.lib" /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\libcurld.lib" /machine:I386 -# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\libcurld.lib" /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\libcurld.lib" /machine:I386 -# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\libcurld.lib" /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug LIB OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\libcurld.lib" /machine:I386 -# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\libcurld.lib" /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\libcurld.lib" /machine:I386 -# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\libcurld.lib" /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /machine:I386 -# ADD LIB32 /nologo /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /machine:I386 -# ADD LIB32 /nologo /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /machine:I386 -# ADD LIB32 /nologo /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /machine:I386 -# ADD LIB32 /nologo /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /machine:I386 -# ADD LIB32 /nologo /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release LIB OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /machine:I386 -# ADD LIB32 /nologo /machine:I386 - -!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /machine:I386 -# ADD LIB32 /nologo /machine:I386 - -!ENDIF - -# Begin Target - -# Name "libcurl - Win32 DLL Debug" -# Name "libcurl - Win32 DLL Debug DLL OpenSSL" -# Name "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" -# Name "libcurl - Win32 DLL Debug DLL Windows SSPI" -# Name "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" -# Name "libcurl - Win32 DLL Release" -# Name "libcurl - Win32 DLL Release DLL OpenSSL" -# Name "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" -# Name "libcurl - Win32 DLL Release DLL Windows SSPI" -# Name "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" -# Name "libcurl - Win32 LIB Debug" -# Name "libcurl - Win32 LIB Debug DLL OpenSSL" -# Name "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" -# Name "libcurl - Win32 LIB Debug DLL Windows SSPI" -# Name "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" -# Name "libcurl - Win32 LIB Debug LIB OpenSSL" -# Name "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" -# Name "libcurl - Win32 LIB Release" -# Name "libcurl - Win32 LIB Release DLL OpenSSL" -# Name "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" -# Name "libcurl - Win32 LIB Release DLL Windows SSPI" -# Name "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" -# Name "libcurl - Win32 LIB Release LIB OpenSSL" -# Name "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\..\lib\amigaos.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\asyn-ares.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\asyn-thread.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\base64.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\conncache.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\connect.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\content_encoding.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\cookie.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_addrinfo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_des.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_endian.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_fnmatch.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_gethostname.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_gssapi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_memrchr.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_multibyte.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_ntlm_core.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_ntlm_wb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_rtmp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_sasl.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_sspi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_threads.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\dict.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\dotdot.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\easy.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\escape.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\file.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\fileinfo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\formdata.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\ftp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\ftplistparser.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\getenv.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\getinfo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\gopher.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hash.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hmac.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostasyn.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostcheck.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostip4.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostip6.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostip.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostsyn.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http2.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_chunks.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_digest.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_negotiate.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_ntlm.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_proxy.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\idn_win32.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\if2ip.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\imap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\inet_ntop.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\inet_pton.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\krb5.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\ldap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\llist.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\md4.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\md5.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\memdebug.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\mprintf.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\multi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\netrc.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\non-ascii.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\nonblock.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\openldap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\parsedate.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\pingpong.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\pipeline.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\pop3.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\progress.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\rand.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\rtsp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\security.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\select.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\sendf.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\share.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\slist.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\smb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\smtp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\socks.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\socks_gssapi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\socks_sspi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\speedcheck.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\splay.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\ssh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strcase.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strdup.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strerror.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strtok.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strtoofft.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\system_win32.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\telnet.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\tftp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\timeval.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\transfer.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\url.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\version.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\warnless.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\wildcard.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\x509asn1.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\cleartext.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\cram.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\digest.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\digest_sspi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\krb5_gssapi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\krb5_sspi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\ntlm.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\ntlm_sspi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\oauth2.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\spnego_gssapi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\spnego_sspi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\vauth.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\axtls.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\cyassl.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\darwinssl.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\gskit.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\gtls.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\mbedtls.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\nss.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\openssl.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\polarssl.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\polarssl_threadlock.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\schannel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\vtls.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\..\lib\amigaos.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\arpa_telnet.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\asyn.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\config-win32.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\conncache.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\connect.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\content_encoding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\cookie.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_addrinfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_base64.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_des.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_endian.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_fnmatch.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_gethostname.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_gssapi.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_hmac.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_ldap.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_md4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_md5.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_memory.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_memrchr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_multibyte.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_ntlm_core.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_ntlm_wb.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_printf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_rtmp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_sasl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_sec.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_setup.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_setup_once.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_sspi.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_threads.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curlx.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\dict.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\dotdot.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\easyif.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\escape.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\file.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\fileinfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\formdata.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\ftp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\ftplistparser.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\getinfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\gopher.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hash.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostcheck.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\hostip.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http2.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_chunks.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_digest.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_negotiate.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_ntlm.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\http_proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\if2ip.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\imap.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\inet_ntop.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\inet_pton.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\llist.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\memdebug.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\multihandle.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\multiif.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\netrc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\non-ascii.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\nonblock.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\parsedate.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\pingpong.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\pipeline.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\pop3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\progress.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\rand.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\rtsp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\select.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\sendf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\setup-vms.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\share.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\sigpipe.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\slist.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\smb.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\smtp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\sockaddr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\socks.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\speedcheck.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\splay.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\ssh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strcase.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strdup.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strerror.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strtok.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strtoofft.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\system_win32.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\telnet.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\tftp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\timeval.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\transfer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\urldata.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\url.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\warnless.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\wildcard.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\x509asn1.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\digest.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\ntlm.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vauth\vauth.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\axtls.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\cyassl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\darwinssl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\gskit.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\gtls.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\mbedtls.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\nssg.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\openssl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\polarssl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\polarssl_threadlock.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\schannel.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\vtls\vtls.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\..\lib\libcurl.rc -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libcurl - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libcurl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libcurl.mak" CFG="libcurl - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Debug DLL OpenSSL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Debug DLL Windows SSPI" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Release DLL OpenSSL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Release DLL Windows SSPI" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Debug DLL OpenSSL" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Debug DLL Windows SSPI" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Debug LIB OpenSSL" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Release DLL OpenSSL" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Release DLL Windows SSPI" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Release LIB OpenSSL" (based on "Win32 (x86) Static Library") +!MESSAGE "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "libcurl - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\libcurld.dll" /pdbtype:con /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\libcurld.dll" /pdbtype:con /fixed:no + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\libcurld.dll" /pdbtype:con /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\libcurld.dll" /pdbtype:con /fixed:no + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\libcurld.dll" /pdbtype:con /fixed:no +# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\libcurld.dll" /pdbtype:con /fixed:no + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no /release + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release + +!ELSEIF "$(CFG)" == "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\lib" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release +# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug\libcurld.lib" /machine:I386 +# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug\libcurld.lib" /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\libcurld.lib" /machine:I386 +# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\libcurld.lib" /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\libcurld.lib" /machine:I386 +# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\libcurld.lib" /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\libcurld.lib" /machine:I386 +# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\libcurld.lib" /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\libcurld.lib" /machine:I386 +# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\libcurld.lib" /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug LIB OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\libcurld.lib" /machine:I386 +# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\libcurld.lib" /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\libcurld.lib" /machine:I386 +# ADD LIB32 /nologo /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\libcurld.lib" /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /machine:I386 +# ADD LIB32 /nologo /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /machine:I386 +# ADD LIB32 /nologo /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /machine:I386 +# ADD LIB32 /nologo /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /FD /EHsc /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /machine:I386 +# ADD LIB32 /nologo /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_WINDOWS_SSPI" /D "USE_SCHANNEL" /D "USE_WIN32_IDN" /D "WANT_IDN_PROTOTYPES" /FD /EHsc /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /machine:I386 +# ADD LIB32 /nologo /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release LIB OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /machine:I386 +# ADD LIB32 /nologo /machine:I386 + +!ELSEIF "$(CFG)" == "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /machine:I386 +# ADD LIB32 /nologo /machine:I386 + +!ENDIF + +# Begin Target + +# Name "libcurl - Win32 DLL Debug" +# Name "libcurl - Win32 DLL Debug DLL OpenSSL" +# Name "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" +# Name "libcurl - Win32 DLL Debug DLL Windows SSPI" +# Name "libcurl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" +# Name "libcurl - Win32 DLL Release" +# Name "libcurl - Win32 DLL Release DLL OpenSSL" +# Name "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" +# Name "libcurl - Win32 DLL Release DLL Windows SSPI" +# Name "libcurl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" +# Name "libcurl - Win32 LIB Debug" +# Name "libcurl - Win32 LIB Debug DLL OpenSSL" +# Name "libcurl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" +# Name "libcurl - Win32 LIB Debug DLL Windows SSPI" +# Name "libcurl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" +# Name "libcurl - Win32 LIB Debug LIB OpenSSL" +# Name "libcurl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" +# Name "libcurl - Win32 LIB Release" +# Name "libcurl - Win32 LIB Release DLL OpenSSL" +# Name "libcurl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" +# Name "libcurl - Win32 LIB Release DLL Windows SSPI" +# Name "libcurl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" +# Name "libcurl - Win32 LIB Release LIB OpenSSL" +# Name "libcurl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\lib\amigaos.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\asyn-ares.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\asyn-thread.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\base64.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\conncache.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\connect.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\content_encoding.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\cookie.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_addrinfo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ctype.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_des.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_endian.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_fnmatch.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_gethostname.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_gssapi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_memrchr.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_multibyte.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ntlm_core.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ntlm_wb.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_path.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_range.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_rtmp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_sasl.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_sspi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_threads.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\dict.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\dotdot.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\easy.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\escape.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\file.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\fileinfo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\formdata.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ftp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ftplistparser.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\getenv.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\getinfo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\gopher.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hash.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hmac.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostasyn.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostcheck.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostip4.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostip6.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostip.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostsyn.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http2.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_chunks.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_digest.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_negotiate.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_ntlm.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_proxy.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\idn_win32.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\if2ip.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\imap.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\inet_ntop.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\inet_pton.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\krb5.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ldap.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\llist.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\md4.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\md5.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\memdebug.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\mime.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\mprintf.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\multi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\netrc.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\non-ascii.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\nonblock.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\openldap.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\parsedate.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\pingpong.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\pipeline.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\pop3.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\progress.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\rand.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\rtsp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\security.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\select.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\sendf.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\setopt.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\sha256.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\share.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\slist.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\smb.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\smtp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\socks.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\socks_gssapi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\socks_sspi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\speedcheck.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\splay.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ssh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ssh-libssh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strcase.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strdup.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strerror.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strtok.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strtoofft.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\system_win32.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\telnet.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\tftp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\timeval.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\transfer.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\url.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\version.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\warnless.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\wildcard.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\x509asn1.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\cleartext.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\cram.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\digest.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\digest_sspi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\krb5_gssapi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\krb5_sspi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\ntlm.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\ntlm_sspi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\oauth2.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\spnego_gssapi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\spnego_sspi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\vauth.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\axtls.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\cyassl.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\darwinssl.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\gskit.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\gtls.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\mbedtls.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\nss.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\openssl.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\polarssl.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\polarssl_threadlock.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\schannel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\vtls.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\lib\amigaos.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\arpa_telnet.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\asyn.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\config-win32.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\conncache.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\connect.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\content_encoding.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\cookie.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_addrinfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_base64.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ctype.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_des.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_endian.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_fnmatch.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_gethostname.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_gssapi.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_hmac.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ldap.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_md4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_md5.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_memory.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_memrchr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_multibyte.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ntlm_core.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ntlm_wb.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_path.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_printf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_range.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_rtmp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_sasl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_sec.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_setup.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_setup_once.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_sha256.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_sspi.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_threads.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curlx.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\dict.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\dotdot.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\easyif.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\escape.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\file.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\fileinfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\formdata.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ftp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ftplistparser.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\getinfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\gopher.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hash.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostcheck.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\hostip.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http2.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_chunks.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_digest.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_negotiate.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_ntlm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\http_proxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\if2ip.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\imap.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\inet_ntop.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\inet_pton.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\llist.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\memdebug.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\mime.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\multihandle.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\multiif.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\netrc.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\non-ascii.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\nonblock.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\parsedate.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\pingpong.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\pipeline.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\pop3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\progress.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\rand.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\rtsp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\select.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\sendf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\setopt.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\setup-vms.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\share.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\sigpipe.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\slist.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\smb.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\smtp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\sockaddr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\socks.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\speedcheck.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\splay.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\ssh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strcase.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strdup.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strerror.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strtok.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strtoofft.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\system_win32.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\telnet.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\tftp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\timeval.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\transfer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\urldata.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\url.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\warnless.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\wildcard.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\x509asn1.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\digest.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\ntlm.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vauth\vauth.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\axtls.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\cyassl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\darwinssl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\gskit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\gtls.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\mbedtls.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\nssg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\openssl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\polarssl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\polarssl_threadlock.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\schannel.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\vtls\vtls.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\lib\libcurl.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/projects/Windows/VC6/lib/libcurl.dsw b/projects/Windows/VC6/lib/libcurl.dsw index e07624d..b4a187f 100644 --- a/projects/Windows/VC6/lib/libcurl.dsw +++ b/projects/Windows/VC6/lib/libcurl.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "libcurl"=".\libcurl.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libcurl"=".\libcurl.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/projects/Windows/VC6/src/curl.dsp b/projects/Windows/VC6/src/curl.dsp index bdd7b94..1740328 100644 --- a/projects/Windows/VC6/src/curl.dsp +++ b/projects/Windows/VC6/src/curl.dsp @@ -1,1058 +1,1058 @@ -# Microsoft Developer Studio Project File - Name="curl" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=curl - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "curl.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "curl.mak" CFG="curl - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "curl - Win32 DLL Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Debug DLL OpenSSL" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Debug DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Release" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Release DLL OpenSSL" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Release DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Debug DLL OpenSSL" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Debug DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Debug LIB OpenSSL" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Release" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Release DLL OpenSSL" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Release DLL Windows SSPI" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Release LIB OpenSSL" (based on "Win32 (x86) Console Application") -!MESSAGE "curl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "curl - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\src" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\src" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "NDEBUG" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" /fixed:no -# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\src" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug\curl.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no -# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug LIB OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /fixed:no -# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no -# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\src" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "NDEBUG" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL Windows SSPI" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" /fixed:no -# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" /fixed:no -# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Release LIB OpenSSL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /fixed:no -# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /fixed:no - -!ELSEIF "$(CFG)" == "curl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" -# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\src" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" -# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\src" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no -# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no - -!ENDIF - -# Begin Target - -# Name "curl - Win32 DLL Debug" -# Name "curl - Win32 DLL Debug DLL OpenSSL" -# Name "curl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" -# Name "curl - Win32 DLL Debug DLL Windows SSPI" -# Name "curl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" -# Name "curl - Win32 DLL Release" -# Name "curl - Win32 DLL Release DLL OpenSSL" -# Name "curl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" -# Name "curl - Win32 DLL Release DLL Windows SSPI" -# Name "curl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" -# Name "curl - Win32 LIB Debug" -# Name "curl - Win32 LIB Debug DLL OpenSSL" -# Name "curl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" -# Name "curl - Win32 LIB Debug DLL Windows SSPI" -# Name "curl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" -# Name "curl - Win32 LIB Debug LIB OpenSSL" -# Name "curl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" -# Name "curl - Win32 LIB Release" -# Name "curl - Win32 LIB Release DLL OpenSSL" -# Name "curl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" -# Name "curl - Win32 LIB Release DLL Windows SSPI" -# Name "curl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" -# Name "curl - Win32 LIB Release LIB OpenSSL" -# Name "curl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\..\lib\nonblock.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strtoofft.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\warnless.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\slist_wc.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_binmode.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_bname.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_dbg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_hdr.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_prg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_rea.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_see.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_wrt.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cfgable.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_convert.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_dirhie.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_doswin.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_easysrc.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_formparse.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_getparam.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_getpass.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_help.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_helpers.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_homedir.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_hugehelp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_libinfo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_main.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_metalink.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_mfiles.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_msgs.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_operate.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_operhlp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_panykey.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_paramhlp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_parsecfg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_setopt.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_sleep.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_strdup.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_urlglob.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_util.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_vms.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_writeenv.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_writeout.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_xattr.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\..\lib\config-win32.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\curl_setup.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\nonblock.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\strtoofft.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\lib\warnless.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\slist_wc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_binmode.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_bname.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_dbg.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_hdr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_prg.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_rea.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_see.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cb_wrt.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_cfgable.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_convert.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_dirhie.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_doswin.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_easysrc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_formparse.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_getparam.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_getpass.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_helpers.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_help.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_homedir.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_hugehelp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_libinfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_main.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_metalink.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_mfiles.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_msgs.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_operate.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_operhlp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_panykey.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_paramhlp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_parsecfg.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_sdecls.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_setopt.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_setup.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_sleep.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_strdup.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_urlglob.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_util.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_version.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_vms.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_writeenv.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_writeout.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\tool_xattr.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\..\src\curl.rc -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="curl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=curl - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "curl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "curl.mak" CFG="curl - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "curl - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Debug DLL OpenSSL" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Debug DLL Windows SSPI" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Release DLL OpenSSL" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Release DLL Windows SSPI" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Debug DLL OpenSSL" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Debug DLL Windows SSPI" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Debug LIB OpenSSL" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Release" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Release DLL OpenSSL" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Release DLL Windows SSPI" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Release LIB OpenSSL" (based on "Win32 (x86) Console Application") +!MESSAGE "curl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "curl - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\src" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\src" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "NDEBUG" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL OpenSSL" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" /fixed:no +# ADD LINK32 wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\DLL Release - DLL Windows SSPI - DLL WinIDN" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\src" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug\curl.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no +# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurld.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL Windows SSPI - DLL WinIDN" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug LIB OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /fixed:no +# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_DEBUG" /D "_CONSOLE" /D "DEBUGBUILD" /D "CURL_STATICLIB" /FD /EHsc /GZ /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no +# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\src" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "_CONSOLE" /D "NDEBUG" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL Windows SSPI" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" /fixed:no +# ADD LINK32 advapi32.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" /fixed:no +# ADD LINK32 advapi32.lib normaliz.lib wldap32.lib ws2_32.lib crypt32.lib libcurl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL Windows SSPI - DLL WinIDN" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Release LIB OpenSSL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /fixed:no +# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /fixed:no + +!ELSEIF "$(CFG)" == "curl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" +# PROP BASE Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\src" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2" +# PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\src" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\src" /D "NDEBUG" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\..\..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no +# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no + +!ENDIF + +# Begin Target + +# Name "curl - Win32 DLL Debug" +# Name "curl - Win32 DLL Debug DLL OpenSSL" +# Name "curl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2" +# Name "curl - Win32 DLL Debug DLL Windows SSPI" +# Name "curl - Win32 DLL Debug DLL Windows SSPI DLL WinIDN" +# Name "curl - Win32 DLL Release" +# Name "curl - Win32 DLL Release DLL OpenSSL" +# Name "curl - Win32 DLL Release DLL OpenSSL DLL LibSSH2" +# Name "curl - Win32 DLL Release DLL Windows SSPI" +# Name "curl - Win32 DLL Release DLL Windows SSPI DLL WinIDN" +# Name "curl - Win32 LIB Debug" +# Name "curl - Win32 LIB Debug DLL OpenSSL" +# Name "curl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2" +# Name "curl - Win32 LIB Debug DLL Windows SSPI" +# Name "curl - Win32 LIB Debug DLL Windows SSPI DLL WinIDN" +# Name "curl - Win32 LIB Debug LIB OpenSSL" +# Name "curl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2" +# Name "curl - Win32 LIB Release" +# Name "curl - Win32 LIB Release DLL OpenSSL" +# Name "curl - Win32 LIB Release DLL OpenSSL DLL LibSSH2" +# Name "curl - Win32 LIB Release DLL Windows SSPI" +# Name "curl - Win32 LIB Release DLL Windows SSPI DLL WinIDN" +# Name "curl - Win32 LIB Release LIB OpenSSL" +# Name "curl - Win32 LIB Release LIB OpenSSL LIB LibSSH2" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ctype.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\nonblock.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strtoofft.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\warnless.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\slist_wc.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_binmode.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_bname.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_dbg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_hdr.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_prg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_rea.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_see.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_wrt.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cfgable.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_convert.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_dirhie.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_doswin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_easysrc.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_filetime.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_formparse.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_getparam.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_getpass.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_help.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_helpers.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_homedir.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_hugehelp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_libinfo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_main.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_metalink.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_msgs.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_operate.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_operhlp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_panykey.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_paramhlp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_parsecfg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_setopt.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_sleep.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_strdup.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_urlglob.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_util.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_vms.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_writeout.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_xattr.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\lib\config-win32.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_ctype.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\curl_setup.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\nonblock.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\strtoofft.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\lib\warnless.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\slist_wc.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_binmode.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_bname.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_dbg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_hdr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_prg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_rea.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_see.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cb_wrt.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_cfgable.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_convert.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_dirhie.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_doswin.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_easysrc.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_filetime.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_formparse.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_getparam.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_getpass.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_helpers.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_help.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_homedir.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_hugehelp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_libinfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_main.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_metalink.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_msgs.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_operate.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_operhlp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_panykey.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_paramhlp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_parsecfg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_sdecls.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_setopt.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_setup.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_sleep.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_strdup.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_urlglob.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_util.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_version.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_vms.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_writeout.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\src\tool_xattr.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\src\curl.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/projects/Windows/VC6/src/curl.dsw b/projects/Windows/VC6/src/curl.dsw index a7adbce..ba204a3 100644 --- a/projects/Windows/VC6/src/curl.dsw +++ b/projects/Windows/VC6/src/curl.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "curl"=".\curl.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "curl"=".\curl.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/projects/Windows/VC7.1/lib/libcurl.vcproj b/projects/Windows/VC7.1/lib/libcurl.vcproj index 3c52fed..8f34e1c 100644 --- a/projects/Windows/VC7.1/lib/libcurl.vcproj +++ b/projects/Windows/VC7.1/lib/libcurl.vcproj @@ -1,2017 +1,2056 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC7.1/src/curl.vcproj b/projects/Windows/VC7.1/src/curl.vcproj index b9aeca7..e9ca471 100644 --- a/projects/Windows/VC7.1/src/curl.vcproj +++ b/projects/Windows/VC7.1/src/curl.vcproj @@ -1,1652 +1,1652 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC7/lib/libcurl.vcproj b/projects/Windows/VC7/lib/libcurl.vcproj index ac1d1ef..fbc19d8 100644 --- a/projects/Windows/VC7/lib/libcurl.vcproj +++ b/projects/Windows/VC7/lib/libcurl.vcproj @@ -1,1871 +1,1910 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC7/src/curl.vcproj b/projects/Windows/VC7/src/curl.vcproj index 4975ac5..c7c40cf 100644 --- a/projects/Windows/VC7/src/curl.vcproj +++ b/projects/Windows/VC7/src/curl.vcproj @@ -1,1506 +1,1506 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC8/lib/libcurl.vcproj b/projects/Windows/VC8/lib/libcurl.vcproj index 92ade2d..79c6ee3 100644 --- a/projects/Windows/VC8/lib/libcurl.vcproj +++ b/projects/Windows/VC8/lib/libcurl.vcproj @@ -1,4619 +1,4671 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC8/src/curl.vcproj b/projects/Windows/VC8/src/curl.vcproj index 800ad64..98f32b1 100644 --- a/projects/Windows/VC8/src/curl.vcproj +++ b/projects/Windows/VC8/src/curl.vcproj @@ -1,4463 +1,4463 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC9/lib/libcurl.vcproj b/projects/Windows/VC9/lib/libcurl.vcproj index 1c4f9df..76b83a7 100644 --- a/projects/Windows/VC9/lib/libcurl.vcproj +++ b/projects/Windows/VC9/lib/libcurl.vcproj @@ -1,4560 +1,4612 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/Windows/VC9/src/curl.vcproj b/projects/Windows/VC9/src/curl.vcproj index acd8166..7c91970 100644 --- a/projects/Windows/VC9/src/curl.vcproj +++ b/projects/Windows/VC9/src/curl.vcproj @@ -1,4320 +1,4320 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/build-openssl.bat b/projects/build-openssl.bat index 0773e07..21709b7 100644 --- a/projects/build-openssl.bat +++ b/projects/build-openssl.bat @@ -6,7 +6,7 @@ rem * / __| | | | |_) | | rem * | (__| |_| | _ <| |___ rem * \___|\___/|_| \_\_____| rem * -rem * Copyright (C) 2012 - 2016, Steve Holme, . +rem * Copyright (C) 2012 - 2018, Steve Holme, . rem * rem * This software is licensed as described in the file COPYING, which rem * you should have received as part of this distribution. The terms @@ -33,6 +33,16 @@ rem *************************************************************************** rem Ensure we have the required arguments if /i "%~1" == "" goto syntax + rem Calculate the program files directory + if defined PROGRAMFILES ( + set "PF=%PROGRAMFILES%" + set OS_PLATFORM=x86 + ) + if defined PROGRAMFILES(x86) ( + set "PF=%PROGRAMFILES(x86)%" + set OS_PLATFORM=x64 + ) + :parseArgs if "%~1" == "" goto prerequisites @@ -72,6 +82,19 @@ rem *************************************************************************** set VC_VER=14.0 set VC_DESC=VC14 set "VC_PATH=Microsoft Visual Studio 14.0\VC" + ) else if /i "%~1" == "vc15" ( + set VC_VER=15.0 + set VC_DESC=VC15 + + rem Determine the VC15 path based on the installed edition in decending + rem order (Enterprise, then Professional and finally Community) + if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" ( + set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC" + ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" ( + set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC" + ) else ( + set "VC_PATH=Microsoft Visual Studio\2017\Community\VC" + ) ) else if /i "%~1%" == "x86" ( set BUILD_PLATFORM=x86 ) else if /i "%~1%" == "x64" ( @@ -97,23 +120,12 @@ rem *************************************************************************** shift & goto parseArgs :prerequisites - rem Compiler and platform are required parameters. + rem Compiler is a required parameter if not defined VC_VER goto syntax - if not defined BUILD_PLATFORM goto syntax rem Default the start directory if one isn't specified if not defined START_DIR set START_DIR=..\..\openssl - rem Calculate the program files directory - if defined PROGRAMFILES ( - set "PF=%PROGRAMFILES%" - set OS_PLATFORM=x86 - ) - if defined PROGRAMFILES(x86) ( - set "PF=%PROGRAMFILES(x86)%" - set OS_PLATFORM=x64 - ) - rem Check we have a program files directory if not defined PF goto nopf @@ -138,6 +150,9 @@ rem *************************************************************************** rem Check the start directory exists if not exist "%START_DIR%" goto noopenssl + rem Check that OpenSSL is not unsupported version 1.1.0 + if not exist "%START_DIR%\ms\do_ms.bat" goto unsupported + :configure if "%BUILD_PLATFORM%" == "" ( if "%VC_VER%" == "6.0" ( @@ -163,23 +178,28 @@ rem *************************************************************************** if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64 if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64 if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64 + if "%VC_VER%" == "15.0" set VCVARS_PLATFORM=amd64 ) :start echo. + set SAVED_PATH=%CD% + if "%VC_VER%" == "6.0" ( call "%PF%\%VC_PATH%\bin\vcvars32" ) else if "%VC_VER%" == "7.0" ( call "%PF%\%VC_PATH%\bin\vcvars32" ) else if "%VC_VER%" == "7.1" ( call "%PF%\%VC_PATH%\bin\vcvars32" + ) else if "%VC_VER%" == "15.0" ( + call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM% ) else ( call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM% ) echo. - set SAVED_PATH=%CD% - if defined START_DIR CD %START_DIR% + cd %SAVED_PATH% + cd %START_DIR% goto %BUILD_PLATFORM% :x64 @@ -199,12 +219,22 @@ rem *************************************************************************** nmake -f ms\ntdll.mak rem Move the output directories - move out32.dbg "%OUTDIR%\LIB Debug" - move out32dll.dbg "%OUTDIR%\DLL Debug" + if exist "%OUTDIR%\LIB Debug" ( + copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul + rd out32.dbg /s /q + ) else ( + move out32.dbg "%OUTDIR%\LIB Debug" 1>nul + ) + if exist "%OUTDIR%\DLL Debug" ( + copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul + rd out32dll.dbg /s /q + ) else ( + move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul + ) rem Move the PDB files - move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" - move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" + move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul + move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul rem Remove the intermediate directories rd tmp32.dbg /s /q @@ -220,14 +250,24 @@ rem *************************************************************************** call ms\do_win64a nmake -f ms\nt.mak nmake -f ms\ntdll.mak - + rem Move the output directories - move out32 "%OUTDIR%\LIB Release" - move out32dll "%OUTDIR%\DLL Release" + if exist "%OUTDIR%\LIB Release" ( + copy /y out32\* "%OUTDIR%\LIB Release" 1>nul + rd out32 /s /q + ) else ( + move out32 "%OUTDIR%\LIB Release" 1>nul + ) + if exist "%OUTDIR%\DLL Release" ( + copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul + rd out32dll /s /q + ) else ( + move out32dll "%OUTDIR%\DLL Release" 1>nul + ) rem Move the PDB files - move tmp32\lib.pdb "%OUTDIR%\LIB Release" - move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" + move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul + move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul rem Remove the intermediate directories rd tmp32 /s /q @@ -252,12 +292,22 @@ rem *************************************************************************** nmake -f ms\ntdll.mak rem Move the output directories - move out32.dbg "%OUTDIR%\LIB Debug" - move out32dll.dbg "%OUTDIR%\DLL Debug" + if exist "%OUTDIR%\LIB Debug" ( + copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul + rd out32.dbg /s /q + ) else ( + move out32.dbg "%OUTDIR%\LIB Debug" 1>nul + ) + if exist "%OUTDIR%\DLL Debug" ( + copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul + rd out32dll.dbg /s /q + ) else ( + move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul + ) rem Move the PDB files - move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" - move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" + move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul + move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul rem Remove the intermediate directories rd tmp32.dbg /s /q @@ -273,14 +323,24 @@ rem *************************************************************************** call ms\do_ms nmake -f ms\nt.mak nmake -f ms\ntdll.mak - + rem Move the output directories - move out32 "%OUTDIR%\LIB Release" - move out32dll "%OUTDIR%\DLL Release" + if exist "%OUTDIR%\LIB Release" ( + copy /y out32\* "%OUTDIR%\LIB Release" 1>nul + rd out32 /s /q + ) else ( + move out32 "%OUTDIR%\LIB Release" 1>nul + ) + if exist "%OUTDIR%\DLL Release" ( + copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul + rd out32dll /s /q + ) else ( + move out32dll "%OUTDIR%\DLL Release" 1>nul + ) rem Move the PDB files - move tmp32\lib.pdb "%OUTDIR%\LIB Release" - move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" + move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul + move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul rem Remove the intermediate directories rd tmp32 /s /q @@ -291,7 +351,7 @@ rem *************************************************************************** :syntax rem Display the help echo. - echo Usage: build-openssl ^ ^ [configuration] [directory] + echo Usage: build-openssl ^ [platform] [configuration] [directory] echo. echo Compiler: echo. @@ -304,6 +364,7 @@ rem *************************************************************************** echo vc11 - Use Visual Studio 2012 echo vc12 - Use Visual Studio 2013 echo vc14 - Use Visual Studio 2015 + echo vc15 - Use Visual Studio 2017 echo. echo Platform: echo. @@ -355,6 +416,14 @@ rem *************************************************************************** echo Error: Cannot locate OpenSSL source directory goto error +:unsupported + echo. + echo Error: Unsupported OpenSSL version. + echo The pre-generated project files and this build script only support the + echo LTS version of OpenSSL ^(v1.0.2^). The next version of this build script + echo will support OpenSSL v1.1.0. + goto error + :error if "%OS%" == "Windows_NT" endlocal exit /B 1 diff --git a/projects/build-wolfssl.bat b/projects/build-wolfssl.bat index 849357f..e5cf153 100644 --- a/projects/build-wolfssl.bat +++ b/projects/build-wolfssl.bat @@ -6,7 +6,7 @@ rem * / __| | | | |_) | | rem * | (__| |_| | _ <| |___ rem * \___|\___/|_| \_\_____| rem * -rem * Copyright (C) 2012 - 2015, Steve Holme, . +rem * Copyright (C) 2012 - 2018, Steve Holme, . rem * Copyright (C) 2015, Jay Satiro, . rem * rem * This software is licensed as described in the file COPYING, which @@ -35,6 +35,16 @@ rem *************************************************************************** rem Ensure we have the required arguments if /i "%~1" == "" goto syntax + rem Calculate the program files directory + if defined PROGRAMFILES ( + set "PF=%PROGRAMFILES%" + set OS_PLATFORM=x86 + ) + if defined PROGRAMFILES(x86) ( + set "PF=%PROGRAMFILES(x86)%" + set OS_PLATFORM=x64 + ) + :parseArgs if "%~1" == "" goto prerequisites @@ -58,6 +68,20 @@ rem *************************************************************************** set VC_DESC=VC14 set VC_TOOLSET=v140 set "VC_PATH=Microsoft Visual Studio 14.0\VC" + ) else if /i "%~1" == "vc15" ( + set VC_VER=15.0 + set VC_DESC=VC15 + set VC_TOOLSET=v141 + + rem Determine the VC15 path based on the installed edition in decending + rem order (Enterprise, then Professional and finally Community) + if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" ( + set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC" + ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" ( + set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC" + ) else ( + set "VC_PATH=Microsoft Visual Studio\2017\Community\VC" + ) ) else if /i "%~1" == "x86" ( set BUILD_PLATFORM=x86 ) else if /i "%~1" == "x64" ( @@ -83,23 +107,12 @@ rem *************************************************************************** shift & goto parseArgs :prerequisites - rem Compiler and platform are required parameters. + rem Compiler is a required parameter if not defined VC_VER goto syntax - if not defined BUILD_PLATFORM goto syntax rem Default the start directory if one isn't specified if not defined START_DIR set START_DIR=..\..\wolfssl - rem Calculate the program files directory - if defined PROGRAMFILES ( - set "PF=%PROGRAMFILES%" - set OS_PLATFORM=x86 - ) - if defined PROGRAMFILES(x86) ( - set "PF=%PROGRAMFILES(x86)%" - set OS_PLATFORM=x64 - ) - rem Check we have a program files directory if not defined PF goto nopf @@ -119,14 +132,21 @@ rem *************************************************************************** if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64 if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64 if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64 + if "%VC_VER%" == "15.0" set VCVARS_PLATFORM=amd64 ) :start echo. - call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM% + set SAVED_PATH=%CD% + + if "%VC_VER%" == "15.0" ( + call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM% + ) else ( + call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM% + ) echo. - set SAVED_PATH=%CD% + cd %SAVED_PATH% cd %START_DIR% goto %BUILD_PLATFORM% @@ -279,7 +299,7 @@ rem *************************************************************************** :syntax rem Display the help echo. - echo Usage: build-wolfssl ^ ^ [configuration] [directory] + echo Usage: build-wolfssl ^ [platform] [configuration] [directory] echo. echo Compiler: echo. @@ -287,6 +307,7 @@ rem *************************************************************************** echo vc11 - Use Visual Studio 2012 echo vc12 - Use Visual Studio 2013 echo vc14 - Use Visual Studio 2015 + echo vc15 - Use Visual Studio 2017 echo. echo Platform: echo. diff --git a/projects/checksrc.bat b/projects/checksrc.bat index 5c83aab..3c38f50 100644 --- a/projects/checksrc.bat +++ b/projects/checksrc.bat @@ -104,7 +104,7 @@ rem *************************************************************************** rem Check the lib directory if exist %SRC_DIR%\lib ( for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" "%%i" - for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" -Wcurl_config.h.cmake "%%i" + for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" -Wcurl_config.h.cmake -Wcurl_config.h.in -Wcurl_config.h "%%i" ) rem Check the lib\vauth directory diff --git a/projects/generate.bat b/projects/generate.bat new file mode 100644 index 0000000..d1fc608 --- /dev/null +++ b/projects/generate.bat @@ -0,0 +1,460 @@ +@echo off +rem *************************************************************************** +rem * _ _ ____ _ +rem * Project ___| | | | _ \| | +rem * / __| | | | |_) | | +rem * | (__| |_| | _ <| |___ +rem * \___|\___/|_| \_\_____| +rem * +rem * Copyright (C) 2014 - 2017, Steve Holme, . +rem * +rem * This software is licensed as described in the file COPYING, which +rem * you should have received as part of this distribution. The terms +rem * are also available at https://curl.haxx.se/docs/copyright.html. +rem * +rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell +rem * copies of the Software, and permit persons to whom the Software is +rem * furnished to do so, under the terms of the COPYING file. +rem * +rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +rem * KIND, either express or implied. +rem * +rem *************************************************************************** + +:begin + rem Check we are running on a Windows NT derived OS + if not "%OS%" == "Windows_NT" goto nodos + + rem Set our variables + setlocal ENABLEEXTENSIONS + set VERSION=ALL + set MODE=GENERATE + + rem Check we are not running on a network drive + if "%~d0."=="\\." goto nonetdrv + + rem Switch to this batch file's directory + cd /d "%~0\.." 1>NUL 2>&1 + + rem Check we are running from a curl git repository + if not exist ..\GIT-INFO goto norepo + +:parseArgs + if "%~1" == "" goto start + + if /i "%~1" == "pre" ( + set VERSION=PRE + ) else if /i "%~1" == "vc6" ( + set VERSION=VC6 + ) else if /i "%~1" == "vc7" ( + set VERSION=VC7 + ) else if /i "%~1" == "vc7.1" ( + set VERSION=VC7.1 + ) else if /i "%~1" == "vc8" ( + set VERSION=VC8 + ) else if /i "%~1" == "vc9" ( + set VERSION=VC9 + ) else if /i "%~1" == "vc10" ( + set VERSION=VC10 + ) else if /i "%~1" == "vc11" ( + set VERSION=VC11 + ) else if /i "%~1" == "vc12" ( + set VERSION=VC12 + ) else if /i "%~1" == "vc14" ( + set VERSION=VC14 + ) else if /i "%~1" == "vc15" ( + set VERSION=VC15 + ) else if /i "%~1" == "-clean" ( + set MODE=CLEAN + ) else if /i "%~1" == "-?" ( + goto syntax + ) else if /i "%~1" == "-h" ( + goto syntax + ) else if /i "%~1" == "-help" ( + goto syntax + ) else ( + goto unknown + ) + + shift & goto parseArgs + +:start + if exist ..\buildconf.bat ( + if "%MODE%" == "GENERATE" ( + call ..\buildconf + ) else if "%VERSION%" == "PRE" ( + call ..\buildconf -clean + ) else if "%VERSION%" == "ALL" ( + call ..\buildconf -clean + ) + ) + if "%VERSION%" == "PRE" goto success + if "%VERSION%" == "VC6" goto vc6 + if "%VERSION%" == "VC7" goto vc7 + if "%VERSION%" == "VC7.1" goto vc71 + if "%VERSION%" == "VC8" goto vc8 + if "%VERSION%" == "VC9" goto vc9 + if "%VERSION%" == "VC10" goto vc10 + if "%VERSION%" == "VC11" goto vc11 + if "%VERSION%" == "VC12" goto vc12 + if "%VERSION%" == "VC14" goto vc14 + if "%VERSION%" == "VC15" goto vc15 + +:vc6 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC6 project files + call :generate dsp Windows\VC6\src\curl.tmpl Windows\VC6\src\curl.dsp + call :generate dsp Windows\VC6\lib\libcurl.tmpl Windows\VC6\lib\libcurl.dsp + ) else ( + echo Removing VC6 project files + call :clean Windows\VC6\src\curl.dsp + call :clean Windows\VC6\lib\libcurl.dsp + ) + + if not "%VERSION%" == "ALL" goto success + +:vc7 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC7 project files + call :generate vcproj1 Windows\VC7\src\curl.tmpl Windows\VC7\src\curl.vcproj + call :generate vcproj1 Windows\VC7\lib\libcurl.tmpl Windows\VC7\lib\libcurl.vcproj + ) else ( + echo Removing VC7 project files + call :clean Windows\VC7\src\curl.vcproj + call :clean Windows\VC7\lib\libcurl.vcproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc71 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC7.1 project files + call :generate vcproj1 Windows\VC7.1\src\curl.tmpl Windows\VC7.1\src\curl.vcproj + call :generate vcproj1 Windows\VC7.1\lib\libcurl.tmpl Windows\VC7.1\lib\libcurl.vcproj + ) else ( + echo Removing VC7.1 project files + call :clean Windows\VC7.1\src\curl.vcproj + call :clean Windows\VC7.1\lib\libcurl.vcproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc8 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC8 project files + call :generate vcproj2 Windows\VC8\src\curl.tmpl Windows\VC8\src\curl.vcproj + call :generate vcproj2 Windows\VC8\lib\libcurl.tmpl Windows\VC8\lib\libcurl.vcproj + ) else ( + echo Removing VC8 project files + call :clean Windows\VC8\src\curl.vcproj + call :clean Windows\VC8\lib\libcurl.vcproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc9 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC9 project files + call :generate vcproj2 Windows\VC9\src\curl.tmpl Windows\VC9\src\curl.vcproj + call :generate vcproj2 Windows\VC9\lib\libcurl.tmpl Windows\VC9\lib\libcurl.vcproj + ) else ( + echo Removing VC9 project files + call :clean Windows\VC9\src\curl.vcproj + call :clean Windows\VC9\lib\libcurl.vcproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc10 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC10 project files + call :generate vcxproj Windows\VC10\src\curl.tmpl Windows\VC10\src\curl.vcxproj + call :generate vcxproj Windows\VC10\lib\libcurl.tmpl Windows\VC10\lib\libcurl.vcxproj + ) else ( + echo Removing VC10 project files + call :clean Windows\VC10\src\curl.vcxproj + call :clean Windows\VC10\lib\libcurl.vcxproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc11 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC11 project files + call :generate vcxproj Windows\VC11\src\curl.tmpl Windows\VC11\src\curl.vcxproj + call :generate vcxproj Windows\VC11\lib\libcurl.tmpl Windows\VC11\lib\libcurl.vcxproj + ) else ( + echo Removing VC11 project files + call :clean Windows\VC11\src\curl.vcxproj + call :clean Windows\VC11\lib\libcurl.vcxproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc12 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC12 project files + call :generate vcxproj Windows\VC12\src\curl.tmpl Windows\VC12\src\curl.vcxproj + call :generate vcxproj Windows\VC12\lib\libcurl.tmpl Windows\VC12\lib\libcurl.vcxproj + ) else ( + echo Removing VC12 project files + call :clean Windows\VC12\src\curl.vcxproj + call :clean Windows\VC12\lib\libcurl.vcxproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc14 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC14 project files + call :generate vcxproj Windows\VC14\src\curl.tmpl Windows\VC14\src\curl.vcxproj + call :generate vcxproj Windows\VC14\lib\libcurl.tmpl Windows\VC14\lib\libcurl.vcxproj + ) else ( + echo Removing VC14 project files + call :clean Windows\VC14\src\curl.vcxproj + call :clean Windows\VC14\lib\libcurl.vcxproj + ) + + if not "%VERSION%" == "ALL" goto success + +:vc15 + echo. + + if "%MODE%" == "GENERATE" ( + echo Generating VC15 project files + call :generate vcxproj Windows\VC15\src\curl.tmpl Windows\VC15\src\curl.vcxproj + call :generate vcxproj Windows\VC15\lib\libcurl.tmpl Windows\VC15\lib\libcurl.vcxproj + ) else ( + echo Removing VC15 project files + call :clean Windows\VC15\src\curl.vcxproj + call :clean Windows\VC15\lib\libcurl.vcxproj + ) + + goto success + +rem Main generate function. +rem +rem %1 - Project Type (dsp for VC6, vcproj1 for VC7 and VC7.1, vcproj2 for VC8 and VC9 +rem or vcxproj for VC10, VC11, VC12, VC14 and VC15) +rem %2 - Input template file +rem %3 - Output project file +rem +:generate + if not exist %2 ( + echo. + echo Error: Cannot open %2 + exit /B + ) + + if exist %3 ( + del %3 + ) + + echo * %CD%\%3 + for /f "usebackq delims=" %%i in (`"findstr /n ^^ %2"`) do ( + set "var=%%i" + setlocal enabledelayedexpansion + set "var=!var:*:=!" + + if "!var!" == "CURL_SRC_C_FILES" ( + for /f "delims=" %%c in ('dir /b ..\src\*.c') do call :element %1 src "%%c" %3 + ) else if "!var!" == "CURL_SRC_H_FILES" ( + for /f "delims=" %%h in ('dir /b ..\src\*.h') do call :element %1 src "%%h" %3 + ) else if "!var!" == "CURL_SRC_RC_FILES" ( + for /f "delims=" %%r in ('dir /b ..\src\*.rc') do call :element %1 src "%%r" %3 + ) else if "!var!" == "CURL_SRC_X_C_FILES" ( + call :element %1 lib "strtoofft.c" %3 + call :element %1 lib "nonblock.c" %3 + call :element %1 lib "warnless.c" %3 + call :element %1 lib "curl_ctype.c" %3 + ) else if "!var!" == "CURL_SRC_X_H_FILES" ( + call :element %1 lib "config-win32.h" %3 + call :element %1 lib "curl_setup.h" %3 + call :element %1 lib "strtoofft.h" %3 + call :element %1 lib "nonblock.h" %3 + call :element %1 lib "warnless.h" %3 + call :element %1 lib "curl_ctype.h" %3 + ) else if "!var!" == "CURL_LIB_C_FILES" ( + for /f "delims=" %%c in ('dir /b ..\lib\*.c') do call :element %1 lib "%%c" %3 + ) else if "!var!" == "CURL_LIB_H_FILES" ( + for /f "delims=" %%h in ('dir /b ..\include\curl\*.h') do call :element %1 include\curl "%%h" %3 + for /f "delims=" %%h in ('dir /b ..\lib\*.h') do call :element %1 lib "%%h" %3 + ) else if "!var!" == "CURL_LIB_RC_FILES" ( + for /f "delims=" %%r in ('dir /b ..\lib\*.rc') do call :element %1 lib "%%r" %3 + ) else if "!var!" == "CURL_LIB_VAUTH_C_FILES" ( + for /f "delims=" %%c in ('dir /b ..\lib\vauth\*.c') do call :element %1 lib\vauth "%%c" %3 + ) else if "!var!" == "CURL_LIB_VAUTH_H_FILES" ( + for /f "delims=" %%h in ('dir /b ..\lib\vauth\*.h') do call :element %1 lib\vauth "%%h" %3 + ) else if "!var!" == "CURL_LIB_VTLS_C_FILES" ( + for /f "delims=" %%c in ('dir /b ..\lib\vtls\*.c') do call :element %1 lib\vtls "%%c" %3 + ) else if "!var!" == "CURL_LIB_VTLS_H_FILES" ( + for /f "delims=" %%h in ('dir /b ..\lib\vtls\*.h') do call :element %1 lib\vtls "%%h" %3 + ) else ( + echo.!var!>> %3 + ) + + endlocal + ) + exit /B + +rem Generates a single file xml element. +rem +rem %1 - Project Type (dsp for VC6, vcproj1 for VC7 and VC7.1, vcproj2 for VC8 and VC9 +rem or vcxproj for VC10, VC11, VC12, VC14 and VC15) +rem %2 - Directory (src, lib, lib\vauth or lib\vtls) +rem %3 - Source filename +rem %4 - Output project file +rem +:element + set "SPACES= " + if "%2" == "lib\vauth" ( + set "TABS= " + ) else if "%2" == "lib\vtls" ( + set "TABS= " + ) else ( + set "TABS= " + ) + + call :extension %3 ext + + if "%1" == "dsp" ( + echo # Begin Source File>> %4 + echo.>> %4 + echo SOURCE=..\..\..\..\%2\%~3>> %4 + echo # End Source File>> %4 + ) else if "%1" == "vcproj1" ( + echo %TABS%^> %4 + echo %TABS% RelativePath="..\..\..\..\%2\%~3"^>>> %4 + echo %TABS%^>> %4 + ) else if "%1" == "vcproj2" ( + echo %TABS%^> %4 + echo %TABS% RelativePath="..\..\..\..\%2\%~3">> %4 + echo %TABS%^>>> %4 + echo %TABS%^>> %4 + ) else if "%1" == "vcxproj" ( + if "%ext%" == "c" ( + echo %SPACES%^>> %4 + ) else if "%ext%" == "h" ( + echo %SPACES%^>> %4 + ) else if "%ext%" == "rc" ( + echo %SPACES%^>> %4 + ) + ) + + exit /B + +rem Returns the extension for a given filename. +rem +rem %1 - The filename +rem %2 - The return value +rem +:extension + set fname=%~1 + set ename= +:loop1 + if "%fname%"=="" ( + set %2= + exit /B + ) + + if not "%fname:~-1%"=="." ( + set ename=%fname:~-1%%ename% + set fname=%fname:~0,-1% + goto loop1 + ) + + set %2=%ename% + exit /B + +rem Removes the given project file. +rem +rem %1 - The filename +rem +:clean + echo * %CD%\%1 + + if exist %1 ( + del %1 + ) + + exit /B + +:syntax + rem Display the help + echo. + echo Usage: generate [what] [-clean] + echo. + echo What to generate: + echo. + echo pre - Prerequisites only + echo vc6 - Use Visual Studio 6 + echo vc7 - Use Visual Studio .NET + echo vc7.1 - Use Visual Studio .NET 2003 + echo vc8 - Use Visual Studio 2005 + echo vc9 - Use Visual Studio 2008 + echo vc10 - Use Visual Studio 2010 + echo vc11 - Use Visual Studio 2012 + echo vc12 - Use Visual Studio 2013 + echo vc14 - Use Visual Studio 2015 + echo vc15 - Use Visual Studio 2017 + echo. + echo -clean - Removes the project files + goto error + +:unknown + echo. + echo Error: Unknown argument '%1' + goto error + +:nodos + echo. + echo Error: Only a Windows NT based Operating System is supported + goto error + +:nonetdrv + echo. + echo Error: This batch file cannot run from a network drive + goto error + +:norepo + echo. + echo Error: This batch file should only be used from a curl git repository + goto error + +:seterr + rem Set the caller's errorlevel. + rem %1[opt]: Errorlevel as integer. + rem If %1 is empty the errorlevel will be set to 0. + rem If %1 is not empty and not an integer the errorlevel will be set to 1. + setlocal + set EXITCODE=%~1 + if not defined EXITCODE set EXITCODE=0 + echo %EXITCODE%|findstr /r "[^0-9\-]" 1>NUL 2>&1 + if %ERRORLEVEL% EQU 0 set EXITCODE=1 + exit /b %EXITCODE% + +:error + if "%OS%" == "Windows_NT" endlocal + exit /B 1 + +:success + endlocal + exit /B 0 diff --git a/projects/wolfssl_options.h b/projects/wolfssl_options.h new file mode 100644 index 0000000..f6af47c --- /dev/null +++ b/projects/wolfssl_options.h @@ -0,0 +1,224 @@ +/* +By default wolfSSL has a very conservative configuration that can result in +connections to servers failing due to certificate or algorithm problems. +To remedy this issue for libcurl I've generated this options file that +build-wolfssl will copy to the wolfSSL include directories and will result in +maximum compatibility. + +These are the configure options that were used to build wolfSSL v3.11.0 in +mingw and generate the options in this file: + +C_EXTRA_FLAGS="\ + -Wno-attributes \ + -Wno-unused-but-set-variable \ + -DFP_MAX_BITS=16384 \ + -DTFM_TIMING_RESISTANT \ + -DWOLFSSL_STATIC_DH \ + -DWOLFSSL_STATIC_RSA \ + " \ +./configure --prefix=/usr/local \ + --disable-jobserver \ + --enable-aesgcm \ + --enable-alpn \ + --enable-certgen \ + --enable-des3 \ + --enable-dh \ + --enable-dsa \ + --enable-ecc \ + --enable-eccshamir \ + --enable-fastmath \ + --enable-opensslextra \ + --enable-ripemd \ + --enable-sessioncerts \ + --enable-sha512 \ + --enable-sni \ + --enable-sslv3 \ + --enable-supportedcurves \ + --enable-testcert \ + > config.out 2>&1 + +Two generated options HAVE_THREAD_LS and _POSIX_THREADS were removed since they +are inapplicable for our Visual Studio build. Currently thread local storage is +only used by the Fixed Point cache ECC which we're not enabling. However even +if we later may decide to enable the cache it will fallback on mutexes when +thread local storage is not available. wolfSSL is using __declspec(thread) to +create the thread local storage and that could be a problem for LoadLibrary. + +Regarding the options that were added via C_EXTRA_FLAGS: + +FP_MAX_BITS=16384 +http://www.yassl.com/forums/topic423-cacertorgs-ca-cert-verify-failed-but-withdisablefastmath-it-works.html +"Since root.crt uses a 4096-bit RSA key, you'll need to increase the fastmath +buffer size. You can do this using the define: +FP_MAX_BITS and setting it to 8192." + +TFM_TIMING_RESISTANT +https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-2-building-wolfssl.html +From section 2.4.5 Increasing Performance, USE_FAST_MATH: +"Because the stack memory usage can be larger when using fastmath, we recommend +defining TFM_TIMING_RESISTANT as well when using this option." + +WOLFSSL_STATIC_DH: Allow TLS_ECDH_ ciphers +WOLFSSL_STATIC_RSA: Allow TLS_RSA_ ciphers +https://github.com/wolfSSL/wolfssl/blob/v3.6.6/README.md#note-1 +Static key cipher suites are deprecated and disabled by default since v3.6.6. +*/ + +/* wolfssl options.h + * generated from configure options + * + * Copyright (C) 2006-2015 wolfSSL Inc. + * + * This file is part of wolfSSL. (formerly known as CyaSSL) + * + */ + +#ifndef WOLFSSL_OPTIONS_H +#define WOLFSSL_OPTIONS_H + + +#ifdef __cplusplus +extern "C" { +#endif + +#undef FP_MAX_BITS +#define FP_MAX_BITS 16384 + +#undef TFM_TIMING_RESISTANT +#define TFM_TIMING_RESISTANT + +#undef WOLFSSL_STATIC_DH +#define WOLFSSL_STATIC_DH + +#undef WOLFSSL_STATIC_RSA +#define WOLFSSL_STATIC_RSA + +#undef OPENSSL_EXTRA +#define OPENSSL_EXTRA + +/* +The commented out defines below are the equivalent of --enable-tls13. +Uncomment them to build wolfSSL with TLS 1.3 support as of v3.11.1-tls13-beta. +This is for experimenting only, afaict TLS 1.3 support doesn't appear to be +functioning correctly yet. https://github.com/wolfSSL/wolfssl/pull/943 + +#undef WC_RSA_PSS +#define WC_RSA_PSS + +#undef WOLFSSL_TLS13 +#define WOLFSSL_TLS13 + +#undef HAVE_TLS_EXTENSIONS +#define HAVE_TLS_EXTENSIONS + +#undef HAVE_FFDHE_2048 +#define HAVE_FFDHE_2048 + +#undef HAVE_HKDF +#define HAVE_HKDF +*/ + +#undef TFM_TIMING_RESISTANT +#define TFM_TIMING_RESISTANT + +#undef ECC_TIMING_RESISTANT +#define ECC_TIMING_RESISTANT + +#undef WC_RSA_BLINDING +#define WC_RSA_BLINDING + +#undef HAVE_AESGCM +#define HAVE_AESGCM + +#undef WOLFSSL_RIPEMD +#define WOLFSSL_RIPEMD + +#undef WOLFSSL_SHA512 +#define WOLFSSL_SHA512 + +#undef WOLFSSL_SHA384 +#define WOLFSSL_SHA384 + +#undef SESSION_CERTS +#define SESSION_CERTS + +#undef WOLFSSL_CERT_GEN +#define WOLFSSL_CERT_GEN + +#undef HAVE_ECC +#define HAVE_ECC + +#undef TFM_ECC256 +#define TFM_ECC256 + +#undef ECC_SHAMIR +#define ECC_SHAMIR + +#undef WOLFSSL_ALLOW_SSLV3 +#define WOLFSSL_ALLOW_SSLV3 + +#undef NO_RC4 +#define NO_RC4 + +#undef NO_HC128 +#define NO_HC128 + +#undef NO_RABBIT +#define NO_RABBIT + +#undef HAVE_POLY1305 +#define HAVE_POLY1305 + +#undef HAVE_ONE_TIME_AUTH +#define HAVE_ONE_TIME_AUTH + +#undef HAVE_CHACHA +#define HAVE_CHACHA + +#undef HAVE_HASHDRBG +#define HAVE_HASHDRBG + +#undef HAVE_TLS_EXTENSIONS +#define HAVE_TLS_EXTENSIONS + +#undef HAVE_SNI +#define HAVE_SNI + +#undef HAVE_TLS_EXTENSIONS +#define HAVE_TLS_EXTENSIONS + +#undef HAVE_ALPN +#define HAVE_ALPN + +#undef HAVE_TLS_EXTENSIONS +#define HAVE_TLS_EXTENSIONS + +#undef HAVE_SUPPORTED_CURVES +#define HAVE_SUPPORTED_CURVES + +#undef HAVE_EXTENDED_MASTER +#define HAVE_EXTENDED_MASTER + +#undef WOLFSSL_TEST_CERT +#define WOLFSSL_TEST_CERT + +#undef NO_PSK +#define NO_PSK + +#undef NO_MD4 +#define NO_MD4 + +#undef USE_FAST_MATH +#define USE_FAST_MATH + +#undef WC_NO_ASYNC_THREADING +#define WC_NO_ASYNC_THREADING + + +#ifdef __cplusplus +} +#endif + + +#endif /* WOLFSSL_OPTIONS_H */ + diff --git a/projects/wolfssl_override.props b/projects/wolfssl_override.props new file mode 100644 index 0000000..e37d0b7 --- /dev/null +++ b/projects/wolfssl_override.props @@ -0,0 +1,40 @@ + + + + + + %(PreprocessorDefinitions); + + $(SolutionDir)\wolfssl\options.h;%(ForcedIncludeFiles); + + _UNICODE;UNICODE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(UndefinePreprocessorDefinitions); + + + _UNICODE;UNICODE;%(UndefinePreprocessorDefinitions); + + + + + + + + + + diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 2571641..5b68636 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -89,7 +89,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = scripts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -150,6 +150,12 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -175,7 +181,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -189,7 +197,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -201,6 +212,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -246,6 +258,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -258,6 +271,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -361,9 +375,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu scripts/Makefile + $(AUTOMAKE) --foreign scripts/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff --git a/scripts/coverage.sh b/scripts/coverage.sh new file mode 100755 index 0000000..86cd7a1 --- /dev/null +++ b/scripts/coverage.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +./buildconf +mkdir -p cvr +cd cvr +../configure --disable-shared --enable-debug --enable-maintainer-mode --enable-code-coverage +make -sj +# the regular test run +make TFLAGS=-n test-nonflaky +# make all allocs/file operations fail +#make TFLAGS=-n test-torture +# do everything event-based +make TFLAGS=-n test-event +lcov -d . -c -o cov.lcov +genhtml cov.lcov --output-directory coverage --title "curl code coverage" +tar -cjf curl-coverage.tar.bz2 coverage diff --git a/scripts/updatemanpages.pl b/scripts/updatemanpages.pl new file mode 100755 index 0000000..e144bad --- /dev/null +++ b/scripts/updatemanpages.pl @@ -0,0 +1,355 @@ +#!/usr/bin/env perl +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +# Update man pages. + +use strict; +use warnings; +use Tie::File; + +# Data from the command line. + +my $curlver = $ARGV[0]; +my $curldate = $ARGV[1]; + +# Directories and extensions. + +my @dirlist = ("docs/", "docs/libcurl/", "docs/libcurl/opts/", "tests/"); +my @extlist = (".1", ".3"); +my @excludelist = ("mk-ca-bundle.1", "template.3"); + +# Subroutines + +sub printargs{ + # Print arguments and exit. + + print "usage: updatemanpages.pl \n"; + exit; +} + +sub getthline{ + # Process file looking for .TH section. + + my $filename = shift; + my $file_handle; + my $file_line; + + # Open the file. + + open($file_handle, $filename); + + # Look for the .TH section, process it into an array, + # modify it and write to file. + + tie(my @file_data, 'Tie::File', $filename); + foreach my $file_data_line(@file_data) { + if($file_data_line =~ /^.TH/) { + $file_line = $file_data_line; + last; + } + } + + # Close the file. + + close($file_handle); + return $file_line; +} + +sub extractth{ + # Extract .TH section as an array. + + my $input = shift; + + # Split the line into an array. + + my @tharray; + my $inputsize = length($input); + my $inputcurrent = ""; + my $quotemode = 0; + + for(my $inputseek = 0; $inputseek < $inputsize; $inputseek++) { + + if(substr($input, $inputseek, 1) eq " " && $quotemode eq 0) { + push(@tharray, $inputcurrent); + $inputcurrent = ""; + next; + } + + $inputcurrent = $inputcurrent . substr($input, $inputseek, 1); + + if(substr($input, $inputseek, 1) eq "\"") { + if($quotemode eq 0) { + $quotemode = 1; + } + else { + $quotemode = 0; + } + } + } + + if($inputcurrent ne "") { + push(@tharray, $inputcurrent); + } + + return @tharray; +} + +sub getdate{ + # Get the date from the .TH section. + + my $filename = shift; + my $thline; + my @tharray; + my $date = ""; + + $thline = getthline($filename); + + # Return nothing if there is no .TH section found. + + if(!$thline || $thline eq "") { + return ""; + } + + @tharray = extractth($thline); + + # Remove the quotes at the start and end. + + $date = substr($tharray[3], 1, -1); + return $date; +} + +sub processth{ + # Process .TH section. + + my $input = shift; + my $date = shift; + + # Split the line into an array. + + my @tharray = extractth($input); + + # Alter the date. + + my $itemdate = "\""; + $itemdate .= $date; + $itemdate .= "\""; + $tharray[3] = $itemdate; + + # Alter the item version. + + my $itemver = $tharray[4]; + my $itemname = ""; + + for(my $itemnameseek = 1; + $itemnameseek < length($itemver); + $itemnameseek++) { + if(substr($itemver, $itemnameseek, 1) eq " " || + substr($itemver, $itemnameseek, 1) eq "\"") { + last; + } + $itemname .= substr($itemver, $itemnameseek, 1); + } + + $itemver = "\""; + $itemver .= $itemname; + $itemver .= " "; + $itemver .= $curlver; + $itemver .= "\""; + + $tharray[4] = $itemver; + + my $thoutput = ""; + + foreach my $thvalue (@tharray) { + $thoutput .= $thvalue; + $thoutput .= " "; + } + $thoutput =~ s/\s+$//; + $thoutput .= "\n"; + + # Return updated string. + + return $thoutput; +} + +sub processfile{ + # Process file looking for .TH section. + + my $filename = shift; + my $date = shift; + my $file_handle; + my $file_dist_handle; + my $filename_dist; + + # Open a handle for the original file and a second file handle + # for the dist file. + + $filename_dist = $filename . ".dist"; + + open($file_handle, $filename); + open($file_dist_handle, ">" . $filename_dist); + + # Look for the .TH section, process it into an array, + # modify it and write to file. + + tie(my @file_data, 'Tie::File', $filename); + foreach my $file_data_line (@file_data) { + if($file_data_line =~ /^.TH/) { + my $file_dist_line = processth($file_data_line, $date); + print $file_dist_handle $file_dist_line . "\n"; + } + else { + print $file_dist_handle $file_data_line . "\n"; + } + } + + # Close the file. + + close($file_handle); + close($file_dist_handle); +} + +# Check that $curlver is set, otherwise print arguments and exit. + +if(!$curlver) { + printargs(); +} + +# check to see that the git command works, it requires git 2.6 something +my $gitcheck = `git log -1 --date="format:%B %d, %Y" $dirlist[0] 2>/dev/null`; +if(length($gitcheck) < 1) { + print "git version too old or $dirlist[0] is a bad argument\n"; + exit; +} + +# Look in each directory. + +my $dir_handle; + +foreach my $dirname (@dirlist) { + foreach my $extname (@extlist) { + # Go through the directory looking for files ending with + # the current extension. + + opendir($dir_handle, $dirname); + my @filelist = grep(/.$extname$/i, readdir($dir_handle)); + + foreach my $file (@filelist) { + # Skip if file is in exclude list. + + if(grep(/^$file$/, @excludelist)) { + next; + } + + # Load the file and get the date. + + my $filedate; + + # Check if dist version exists and load date from that + # file if it does. + + if(-e ($dirname . $file . ".dist")) { + $filedate = getdate(($dirname . $file . ".dist")); + } + else { + $filedate = getdate(($dirname . $file)); + } + + # Skip if value is empty. + + if(!$filedate || $filedate eq "") { + next; + } + + # Check the man page in the git repository. + + my $repodata = `LC_TIME=C git log -1 --date="format:%B %d, %Y" \\ + --since="$filedate" $dirname$file | grep ^Date:`; + + # If there is output then update the man page + # with the new date/version. + + # Process the file if there is output. + + if($repodata) { + my $thisdate; + if(!$curldate) { + if($repodata =~ /^Date: +(.*)/) { + $thisdate = $1; + } + else { + print STDERR "Warning: " . ($dirname . $file) . ": found no " . + "date\n"; + } + } + else { + $thisdate = $curldate; + } + processfile(($dirname . $file), $thisdate); + print $dirname . $file . " page updated to $thisdate\n"; + } + } + closedir($dir_handle); + } +} + +__END__ + +=pod + +=head1 updatemanpages.pl + +Updates the man pages with the version number and optional date. If the date +isn't provided, the last modified date from git is used. + +=head2 USAGE + +updatemanpages.pl version [date] + +=head3 version + +Specifies version (required) + +=head3 date + +Specifies date (optional) + +=head2 SETTINGS + +=head3 @dirlist + +Specifies the list of directories to look for files in. + +=head3 @extlist + +Specifies the list of files with extensions to process. + +=head3 @excludelist + +Specifies the list of files to not process. + +=head2 NOTES + +This script is used during maketgz. + +=cut diff --git a/scripts/zsh.pl b/scripts/zsh.pl index f0d8c19..1257190 100755 --- a/scripts/zsh.pl +++ b/scripts/zsh.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Generate ZSH completion @@ -54,10 +54,11 @@ sub parse_main_opts { $option .= '}' if defined $short; $option .= '\'[' . trim($desc) . ']\'' if defined $desc; - $option .= ":$arg" if defined $arg; + $option .= ":'$arg'" if defined $arg; $option .= ':_files' - if defined $arg and ($arg eq 'FILE' || $arg eq 'DIR'); + if defined $arg and ($arg eq '' || $arg eq '' + || $arg eq ''); push @list, $option; } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9bbeb60..30c525c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,6 @@ set(EXE_NAME curl) if(USE_MANUAL) - find_package(Perl REQUIRED) # Use the C locale to ensure that only ASCII characters appear in the # embedded text. NROFF and MANOPT are set in the parent CMakeLists.txt add_custom_command( @@ -9,18 +8,19 @@ if(USE_MANUAL) COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" > tool_hugehelp.c COMMAND ${CMAKE_COMMAND} -E echo "#ifndef HAVE_LIBZ" >> tool_hugehelp.c COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT} - "${CURL_SOURCE_DIR}/docs/curl.1" | - "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" + "${CURL_BINARY_DIR}/docs/curl.1" | + "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" "${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c COMMAND ${CMAKE_COMMAND} -E echo "#else" >> tool_hugehelp.c COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT} - "${CURL_SOURCE_DIR}/docs/curl.1" | - "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c + "${CURL_BINARY_DIR}/docs/curl.1" | + "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c "${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c COMMAND ${CMAKE_COMMAND} -E echo "#endif /* HAVE_LIBZ */" >> tool_hugehelp.c DEPENDS "${CURL_SOURCE_DIR}/docs/MANUAL" - "${CURL_SOURCE_DIR}/docs/curl.1" + generate-curl.1 + "${CURL_BINARY_DIR}/docs/curl.1" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h" VERBATIM) @@ -40,7 +40,7 @@ transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc. include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake) if(MSVC) - list(APPEND CURL_SOURCE curl.rc) + list(APPEND CURL_FILES curl.rc) endif() # CURL_FILES comes from Makefile.inc @@ -56,7 +56,7 @@ source_group("curl header files" FILES ${CURL_HFILES}) include_directories( ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h" ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" - ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h" + ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h" # This is needed as tool_hugehelp.c is generated in the binary dir ${CURL_SOURCE_DIR}/src # To be able to reach "tool_hugehelp.h" ) @@ -76,4 +76,15 @@ set_target_properties(${EXE_NAME} PROPERTIES #INCLUDE(ModuleInstall OPTIONAL) -install(TARGETS ${EXE_NAME} DESTINATION bin) +install(TARGETS ${EXE_NAME} EXPORT curl-target DESTINATION bin) +export(TARGETS ${EXE_NAME} + APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake + NAMESPACE CURL:: +) + +install(EXPORT curl-target + FILE curl-target.cmake + NAMESPACE CURL:: + DESTINATION ${CURL_INSTALL_CMAKE_DIR} +) + diff --git a/src/Makefile.am b/src/Makefile.am index 19bab68..bfcd877 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,17 +29,13 @@ AUTOMAKE_OPTIONS = foreign nostdinc # being currently built and tested are searched before the library which # might possibly already be installed in the system. # -# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h -# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h # $(top_srcdir)/include is for libcurl's external include files # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file # $(top_builddir)/src is for curl's generated src/curl_config.h file # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files # $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files -AM_CPPFLAGS = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ +AM_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_builddir)/lib \ -I$(top_builddir)/src \ -I$(top_srcdir)/lib \ @@ -47,6 +43,8 @@ AM_CPPFLAGS = -I$(top_builddir)/include/curl \ bin_PROGRAMS = curl +SUBDIRS = ../docs + if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif @@ -70,7 +68,10 @@ endif curl_LDFLAGS = @LIBMETALINK_LDFLAGS@ curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS) -curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la + +@CODE_COVERAGE_RULES@ +curl_LDFLAGS += $(CODE_COVERAGE_LDFLAGS) +CFLAGS += $(CODE_COVERAGE_CFLAGS) # if unit tests are enabled, build a static library to link them with if BUILD_UNITTESTS @@ -82,7 +83,6 @@ libcurltool_la_LDFLAGS = -static $(LINKFLAGS) libcurltool_la_SOURCES = $(curl_SOURCES) endif -BUILT_SOURCES = tool_hugehelp.c CLEANFILES = tool_hugehelp.c # Use the C locale to ensure that only ASCII characters appear in the # embedded text. @@ -93,7 +93,8 @@ EXTRA_DIST = mkhelp.pl makefile.dj Makefile.b32 \ macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \ curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt -MANPAGE=$(top_builddir)/docs/curl.1 +# Use absolute directory to disable VPATH +MANPAGE=$(abs_top_builddir)/docs/curl.1 README=$(top_srcdir)/docs/MANUAL MKHELP=$(top_srcdir)/src/mkhelp.pl HUGE=tool_hugehelp.c @@ -102,12 +103,12 @@ if USE_MANUAL # Here are the stuff to create a built-in manual $(MANPAGE): - cd $(top_builddir)/docs && make curl.1 + cd $(top_builddir)/docs && $(MAKE) if HAVE_LIBZ # This generates the tool_hugehelp.c file in both uncompressed and -# compressed formats -$(HUGE): $(README) $(MANPAGE) mkhelp.pl +# compressed formats. +$(HUGE): $(MANPAGE) $(README) $(MKHELP) echo '#include "tool_setup.h"' > $(HUGE) echo '#ifndef HAVE_LIBZ' >> $(HUGE) $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE) @@ -116,7 +117,7 @@ $(HUGE): $(README) $(MANPAGE) mkhelp.pl echo '#endif /* HAVE_LIBZ */' >> $(HUGE) else # HAVE_LIBZ # This generates the tool_hugehelp.c file uncompressed only -$(HUGE): $(README) $(MANPAGE) mkhelp.pl +$(HUGE): $(MANPAGE) $(README) $(MKHELP) echo '#include "tool_setup.h"' > $(HUGE) $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE) endif diff --git a/src/Makefile.in b/src/Makefile.in index bd25887..7c0b994 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -102,7 +102,8 @@ bin_PROGRAMS = curl$(EXEEXT) @USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ @@ -123,8 +124,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ - $(top_builddir)/include/curl/curlbuild.h +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -133,25 +133,25 @@ am__libcurltool_la_SOURCES_DIST = slist_wc.c tool_binmode.c \ tool_bname.c tool_cb_dbg.c tool_cb_hdr.c tool_cb_prg.c \ tool_cb_rea.c tool_cb_see.c tool_cb_wrt.c tool_cfgable.c \ tool_convert.c tool_dirhie.c tool_doswin.c tool_easysrc.c \ - tool_formparse.c tool_getparam.c tool_getpass.c tool_help.c \ - tool_helpers.c tool_homedir.c tool_hugehelp.c tool_libinfo.c \ - tool_main.c tool_metalink.c tool_mfiles.c tool_msgs.c \ - tool_operate.c tool_operhlp.c tool_panykey.c tool_paramhlp.c \ - tool_parsecfg.c tool_strdup.c tool_setopt.c tool_sleep.c \ - tool_urlglob.c tool_util.c tool_vms.c tool_writeenv.c \ + tool_filetime.c tool_formparse.c tool_getparam.c \ + tool_getpass.c tool_help.c tool_helpers.c tool_homedir.c \ + tool_hugehelp.c tool_libinfo.c tool_main.c tool_metalink.c \ + tool_msgs.c tool_operate.c tool_operhlp.c tool_panykey.c \ + tool_paramhlp.c tool_parsecfg.c tool_strdup.c tool_setopt.c \ + tool_sleep.c tool_urlglob.c tool_util.c tool_vms.c \ tool_writeout.c tool_xattr.c ../lib/strtoofft.c \ - ../lib/nonblock.c ../lib/warnless.c slist_wc.h tool_binmode.h \ - tool_bname.h tool_cb_dbg.h tool_cb_hdr.h tool_cb_prg.h \ - tool_cb_rea.h tool_cb_see.h tool_cb_wrt.h tool_cfgable.h \ - tool_convert.h tool_dirhie.h tool_doswin.h tool_easysrc.h \ - tool_formparse.h tool_getparam.h tool_getpass.h tool_help.h \ - tool_helpers.h tool_homedir.h tool_hugehelp.h tool_libinfo.h \ - tool_main.h tool_metalink.h tool_mfiles.h tool_msgs.h \ - tool_operate.h tool_operhlp.h tool_panykey.h tool_paramhlp.h \ - tool_parsecfg.h tool_sdecls.h tool_setopt.h tool_setup.h \ - tool_sleep.h tool_strdup.h tool_urlglob.h tool_util.h \ - tool_version.h tool_vms.h tool_writeenv.h tool_writeout.h \ - tool_xattr.h + ../lib/nonblock.c ../lib/warnless.c ../lib/curl_ctype.c \ + slist_wc.h tool_binmode.h tool_bname.h tool_cb_dbg.h \ + tool_cb_hdr.h tool_cb_prg.h tool_cb_rea.h tool_cb_see.h \ + tool_cb_wrt.h tool_cfgable.h tool_convert.h tool_dirhie.h \ + tool_doswin.h tool_easysrc.h tool_filetime.h tool_formparse.h \ + tool_getparam.h tool_getpass.h tool_help.h tool_helpers.h \ + tool_homedir.h tool_hugehelp.h tool_libinfo.h tool_main.h \ + tool_metalink.h tool_msgs.h tool_operate.h tool_operhlp.h \ + tool_panykey.h tool_paramhlp.h tool_parsecfg.h tool_sdecls.h \ + tool_setopt.h tool_setup.h tool_sleep.h tool_strdup.h \ + tool_urlglob.h tool_util.h tool_version.h tool_vms.h \ + tool_writeout.h tool_xattr.h am__objects_1 = libcurltool_la-slist_wc.lo \ libcurltool_la-tool_binmode.lo libcurltool_la-tool_bname.lo \ libcurltool_la-tool_cb_dbg.lo libcurltool_la-tool_cb_hdr.lo \ @@ -159,25 +159,25 @@ am__objects_1 = libcurltool_la-slist_wc.lo \ libcurltool_la-tool_cb_see.lo libcurltool_la-tool_cb_wrt.lo \ libcurltool_la-tool_cfgable.lo libcurltool_la-tool_convert.lo \ libcurltool_la-tool_dirhie.lo libcurltool_la-tool_doswin.lo \ - libcurltool_la-tool_easysrc.lo \ + libcurltool_la-tool_easysrc.lo libcurltool_la-tool_filetime.lo \ libcurltool_la-tool_formparse.lo \ libcurltool_la-tool_getparam.lo libcurltool_la-tool_getpass.lo \ libcurltool_la-tool_help.lo libcurltool_la-tool_helpers.lo \ libcurltool_la-tool_homedir.lo libcurltool_la-tool_hugehelp.lo \ libcurltool_la-tool_libinfo.lo libcurltool_la-tool_main.lo \ - libcurltool_la-tool_metalink.lo libcurltool_la-tool_mfiles.lo \ - libcurltool_la-tool_msgs.lo libcurltool_la-tool_operate.lo \ - libcurltool_la-tool_operhlp.lo libcurltool_la-tool_panykey.lo \ - libcurltool_la-tool_paramhlp.lo \ + libcurltool_la-tool_metalink.lo libcurltool_la-tool_msgs.lo \ + libcurltool_la-tool_operate.lo libcurltool_la-tool_operhlp.lo \ + libcurltool_la-tool_panykey.lo libcurltool_la-tool_paramhlp.lo \ libcurltool_la-tool_parsecfg.lo libcurltool_la-tool_strdup.lo \ libcurltool_la-tool_setopt.lo libcurltool_la-tool_sleep.lo \ libcurltool_la-tool_urlglob.lo libcurltool_la-tool_util.lo \ - libcurltool_la-tool_vms.lo libcurltool_la-tool_writeenv.lo \ - libcurltool_la-tool_writeout.lo libcurltool_la-tool_xattr.lo + libcurltool_la-tool_vms.lo libcurltool_la-tool_writeout.lo \ + libcurltool_la-tool_xattr.lo am__dirstamp = $(am__leading_dot)dirstamp am__objects_2 = ../lib/libcurltool_la-strtoofft.lo \ ../lib/libcurltool_la-nonblock.lo \ - ../lib/libcurltool_la-warnless.lo + ../lib/libcurltool_la-warnless.lo \ + ../lib/libcurltool_la-curl_ctype.lo am__objects_3 = am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3) am__objects_5 = $(am__objects_4) @@ -201,24 +201,29 @@ am__objects_6 = curl-slist_wc.$(OBJEXT) curl-tool_binmode.$(OBJEXT) \ curl-tool_cb_wrt.$(OBJEXT) curl-tool_cfgable.$(OBJEXT) \ curl-tool_convert.$(OBJEXT) curl-tool_dirhie.$(OBJEXT) \ curl-tool_doswin.$(OBJEXT) curl-tool_easysrc.$(OBJEXT) \ - curl-tool_formparse.$(OBJEXT) curl-tool_getparam.$(OBJEXT) \ - curl-tool_getpass.$(OBJEXT) curl-tool_help.$(OBJEXT) \ - curl-tool_helpers.$(OBJEXT) curl-tool_homedir.$(OBJEXT) \ - curl-tool_hugehelp.$(OBJEXT) curl-tool_libinfo.$(OBJEXT) \ - curl-tool_main.$(OBJEXT) curl-tool_metalink.$(OBJEXT) \ - curl-tool_mfiles.$(OBJEXT) curl-tool_msgs.$(OBJEXT) \ + curl-tool_filetime.$(OBJEXT) curl-tool_formparse.$(OBJEXT) \ + curl-tool_getparam.$(OBJEXT) curl-tool_getpass.$(OBJEXT) \ + curl-tool_help.$(OBJEXT) curl-tool_helpers.$(OBJEXT) \ + curl-tool_homedir.$(OBJEXT) curl-tool_hugehelp.$(OBJEXT) \ + curl-tool_libinfo.$(OBJEXT) curl-tool_main.$(OBJEXT) \ + curl-tool_metalink.$(OBJEXT) curl-tool_msgs.$(OBJEXT) \ curl-tool_operate.$(OBJEXT) curl-tool_operhlp.$(OBJEXT) \ curl-tool_panykey.$(OBJEXT) curl-tool_paramhlp.$(OBJEXT) \ curl-tool_parsecfg.$(OBJEXT) curl-tool_strdup.$(OBJEXT) \ curl-tool_setopt.$(OBJEXT) curl-tool_sleep.$(OBJEXT) \ curl-tool_urlglob.$(OBJEXT) curl-tool_util.$(OBJEXT) \ - curl-tool_vms.$(OBJEXT) curl-tool_writeenv.$(OBJEXT) \ - curl-tool_writeout.$(OBJEXT) curl-tool_xattr.$(OBJEXT) + curl-tool_vms.$(OBJEXT) curl-tool_writeout.$(OBJEXT) \ + curl-tool_xattr.$(OBJEXT) am__objects_7 = ../lib/curl-strtoofft.$(OBJEXT) \ - ../lib/curl-nonblock.$(OBJEXT) ../lib/curl-warnless.$(OBJEXT) + ../lib/curl-nonblock.$(OBJEXT) ../lib/curl-warnless.$(OBJEXT) \ + ../lib/curl-curl_ctype.$(OBJEXT) am__objects_8 = $(am__objects_6) $(am__objects_7) $(am__objects_3) am_curl_OBJECTS = $(am__objects_8) curl_OBJECTS = $(am_curl_OBJECTS) +@USE_EXPLICIT_LIB_DEPS_FALSE@curl_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_FALSE@ $(top_builddir)/lib/libcurl.la +@USE_EXPLICIT_LIB_DEPS_TRUE@curl_DEPENDENCIES = \ +@USE_EXPLICIT_LIB_DEPS_TRUE@ $(top_builddir)/lib/libcurl.la curl_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(curl_LDFLAGS) $(LDFLAGS) -o $@ @@ -258,11 +263,27 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcurltool_la_SOURCES) $(curl_SOURCES) DIST_SOURCES = $(am__libcurltool_la_SOURCES_DIST) $(curl_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -282,9 +303,35 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -299,8 +346,14 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ # This might hold -Werror -CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@ +CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@ $(CODE_COVERAGE_CFLAGS) CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -326,7 +379,9 @@ CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -340,7 +395,10 @@ ENABLE_SHARED = @ENABLE_SHARED@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -352,6 +410,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ @@ -401,6 +460,7 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ SSL_ENABLED = @SSL_ENABLED@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ @@ -413,6 +473,7 @@ USE_DARWINSSL = @USE_DARWINSSL@ USE_GNUTLS = @USE_GNUTLS@ USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ USE_LIBSSH2 = @USE_LIBSSH2@ USE_MBEDTLS = @USE_MBEDTLS@ USE_NGHTTP2 = @USE_NGHTTP2@ @@ -510,30 +571,30 @@ AUTOMAKE_OPTIONS = foreign nostdinc # being currently built and tested are searched before the library which # might possibly already be installed in the system. # -# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h -# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h # $(top_srcdir)/include is for libcurl's external include files # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file # $(top_builddir)/src is for curl's generated src/curl_config.h file # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files # $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files -AM_CPPFLAGS = -I$(top_builddir)/include/curl -I$(top_builddir)/include \ - -I$(top_srcdir)/include -I$(top_builddir)/lib \ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/lib \ -I$(top_builddir)/src -I$(top_srcdir)/lib -I$(top_srcdir)/src \ $(am__append_1) +SUBDIRS = ../docs # libcurl has sources that provide functions named curlx_* that aren't part of # the official API, but we re-use the code here to avoid duplication. CURLX_CFILES = \ ../lib/strtoofft.c \ ../lib/nonblock.c \ - ../lib/warnless.c + ../lib/warnless.c \ + ../lib/curl_ctype.c CURLX_HFILES = \ ../lib/curl_setup.h \ ../lib/strtoofft.h \ ../lib/nonblock.h \ - ../lib/warnless.h + ../lib/warnless.h \ + ../lib/curl_ctype.h CURL_CFILES = \ slist_wc.c \ @@ -550,6 +611,7 @@ CURL_CFILES = \ tool_dirhie.c \ tool_doswin.c \ tool_easysrc.c \ + tool_filetime.c \ tool_formparse.c \ tool_getparam.c \ tool_getpass.c \ @@ -560,7 +622,6 @@ CURL_CFILES = \ tool_libinfo.c \ tool_main.c \ tool_metalink.c \ - tool_mfiles.c \ tool_msgs.c \ tool_operate.c \ tool_operhlp.c \ @@ -573,7 +634,6 @@ CURL_CFILES = \ tool_urlglob.c \ tool_util.c \ tool_vms.c \ - tool_writeenv.c \ tool_writeout.c \ tool_xattr.c @@ -592,6 +652,7 @@ CURL_HFILES = \ tool_dirhie.h \ tool_doswin.h \ tool_easysrc.h \ + tool_filetime.h \ tool_formparse.h \ tool_getparam.h \ tool_getpass.h \ @@ -602,7 +663,6 @@ CURL_HFILES = \ tool_libinfo.h \ tool_main.h \ tool_metalink.h \ - tool_mfiles.h \ tool_msgs.h \ tool_operate.h \ tool_operhlp.h \ @@ -618,7 +678,6 @@ CURL_HFILES = \ tool_util.h \ tool_version.h \ tool_vms.h \ - tool_writeenv.h \ tool_writeout.h \ tool_xattr.h @@ -631,9 +690,8 @@ CURL_FILES = $(CURL_CFILES) $(CURLX_CFILES) $(CURL_HFILES) curl_SOURCES = $(CURL_FILES) @USE_EXPLICIT_LIB_DEPS_FALSE@curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@ @USE_EXPLICIT_LIB_DEPS_TRUE@curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@ -curl_LDFLAGS = @LIBMETALINK_LDFLAGS@ +curl_LDFLAGS = @LIBMETALINK_LDFLAGS@ $(CODE_COVERAGE_LDFLAGS) curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS) -curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la # if unit tests are enabled, build a static library to link them with @BUILD_UNITTESTS_TRUE@noinst_LTLIBRARIES = libcurltool.la @@ -643,19 +701,19 @@ curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @BUILD_UNITTESTS_TRUE@libcurltool_la_CFLAGS = @BUILD_UNITTESTS_TRUE@libcurltool_la_LDFLAGS = -static $(LINKFLAGS) @BUILD_UNITTESTS_TRUE@libcurltool_la_SOURCES = $(curl_SOURCES) -BUILT_SOURCES = tool_hugehelp.c CLEANFILES = tool_hugehelp.c EXTRA_DIST = mkhelp.pl makefile.dj Makefile.b32 \ Makefile.m32 macos/curl.mcp.xml.sit.hqx macos/MACINSTALL.TXT \ macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \ curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt -MANPAGE = $(top_builddir)/docs/curl.1 + +# Use absolute directory to disable VPATH +MANPAGE = $(abs_top_builddir)/docs/curl.1 README = $(top_srcdir)/docs/MANUAL MKHELP = $(top_srcdir)/src/mkhelp.pl HUGE = tool_hugehelp.c -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am +all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -712,6 +770,8 @@ clean-noinstLTLIBRARIES: ../lib/$(DEPDIR)/$(am__dirstamp) ../lib/libcurltool_la-warnless.lo: ../lib/$(am__dirstamp) \ ../lib/$(DEPDIR)/$(am__dirstamp) +../lib/libcurltool_la-curl_ctype.lo: ../lib/$(am__dirstamp) \ + ../lib/$(DEPDIR)/$(am__dirstamp) libcurltool.la: $(libcurltool_la_OBJECTS) $(libcurltool_la_DEPENDENCIES) $(EXTRA_libcurltool_la_DEPENDENCIES) $(AM_V_CCLD)$(libcurltool_la_LINK) $(am_libcurltool_la_rpath) $(libcurltool_la_OBJECTS) $(libcurltool_la_LIBADD) $(LIBS) @@ -770,6 +830,8 @@ clean-binPROGRAMS: ../lib/$(DEPDIR)/$(am__dirstamp) ../lib/curl-warnless.$(OBJEXT): ../lib/$(am__dirstamp) \ ../lib/$(DEPDIR)/$(am__dirstamp) +../lib/curl-curl_ctype.$(OBJEXT): ../lib/$(am__dirstamp) \ + ../lib/$(DEPDIR)/$(am__dirstamp) curl$(EXEEXT): $(curl_OBJECTS) $(curl_DEPENDENCIES) $(EXTRA_curl_DEPENDENCIES) @rm -f curl$(EXEEXT) @@ -783,9 +845,11 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/curl-curl_ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/curl-nonblock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/curl-strtoofft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/curl-warnless.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/libcurltool_la-curl_ctype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/libcurltool_la-nonblock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/libcurltool_la-strtoofft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@../lib/$(DEPDIR)/libcurltool_la-warnless.Plo@am__quote@ @@ -803,6 +867,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_dirhie.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_doswin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_easysrc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_filetime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_formparse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_getparam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_getpass.Po@am__quote@ @@ -813,7 +878,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_libinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_metalink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_mfiles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_msgs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_operate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_operhlp.Po@am__quote@ @@ -826,7 +890,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_urlglob.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_vms.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_writeenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_writeout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_xattr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-slist_wc.Plo@am__quote@ @@ -843,6 +906,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_dirhie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_doswin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_easysrc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_filetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_formparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_getparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_getpass.Plo@am__quote@ @@ -853,7 +917,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_libinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_metalink.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_mfiles.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_msgs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_operate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_operhlp.Plo@am__quote@ @@ -866,7 +929,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_urlglob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_vms.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_writeenv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_writeout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_xattr.Plo@am__quote@ @@ -992,6 +1054,13 @@ libcurltool_la-tool_easysrc.lo: tool_easysrc.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_easysrc.lo `test -f 'tool_easysrc.c' || echo '$(srcdir)/'`tool_easysrc.c +libcurltool_la-tool_filetime.lo: tool_filetime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_filetime.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_filetime.Tpo -c -o libcurltool_la-tool_filetime.lo `test -f 'tool_filetime.c' || echo '$(srcdir)/'`tool_filetime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_filetime.Tpo $(DEPDIR)/libcurltool_la-tool_filetime.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_filetime.c' object='libcurltool_la-tool_filetime.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_filetime.lo `test -f 'tool_filetime.c' || echo '$(srcdir)/'`tool_filetime.c + libcurltool_la-tool_formparse.lo: tool_formparse.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_formparse.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_formparse.Tpo -c -o libcurltool_la-tool_formparse.lo `test -f 'tool_formparse.c' || echo '$(srcdir)/'`tool_formparse.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_formparse.Tpo $(DEPDIR)/libcurltool_la-tool_formparse.Plo @@ -1062,13 +1131,6 @@ libcurltool_la-tool_metalink.lo: tool_metalink.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_metalink.lo `test -f 'tool_metalink.c' || echo '$(srcdir)/'`tool_metalink.c -libcurltool_la-tool_mfiles.lo: tool_mfiles.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_mfiles.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_mfiles.Tpo -c -o libcurltool_la-tool_mfiles.lo `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_mfiles.Tpo $(DEPDIR)/libcurltool_la-tool_mfiles.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_mfiles.c' object='libcurltool_la-tool_mfiles.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_mfiles.lo `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c - libcurltool_la-tool_msgs.lo: tool_msgs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_msgs.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_msgs.Tpo -c -o libcurltool_la-tool_msgs.lo `test -f 'tool_msgs.c' || echo '$(srcdir)/'`tool_msgs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_msgs.Tpo $(DEPDIR)/libcurltool_la-tool_msgs.Plo @@ -1153,13 +1215,6 @@ libcurltool_la-tool_vms.lo: tool_vms.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_vms.lo `test -f 'tool_vms.c' || echo '$(srcdir)/'`tool_vms.c -libcurltool_la-tool_writeenv.lo: tool_writeenv.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_writeenv.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_writeenv.Tpo -c -o libcurltool_la-tool_writeenv.lo `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_writeenv.Tpo $(DEPDIR)/libcurltool_la-tool_writeenv.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_writeenv.c' object='libcurltool_la-tool_writeenv.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_writeenv.lo `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c - libcurltool_la-tool_writeout.lo: tool_writeout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_writeout.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_writeout.Tpo -c -o libcurltool_la-tool_writeout.lo `test -f 'tool_writeout.c' || echo '$(srcdir)/'`tool_writeout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_writeout.Tpo $(DEPDIR)/libcurltool_la-tool_writeout.Plo @@ -1195,6 +1250,13 @@ libcurltool_la-tool_xattr.lo: tool_xattr.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o ../lib/libcurltool_la-warnless.lo `test -f '../lib/warnless.c' || echo '$(srcdir)/'`../lib/warnless.c +../lib/libcurltool_la-curl_ctype.lo: ../lib/curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT ../lib/libcurltool_la-curl_ctype.lo -MD -MP -MF ../lib/$(DEPDIR)/libcurltool_la-curl_ctype.Tpo -c -o ../lib/libcurltool_la-curl_ctype.lo `test -f '../lib/curl_ctype.c' || echo '$(srcdir)/'`../lib/curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lib/$(DEPDIR)/libcurltool_la-curl_ctype.Tpo ../lib/$(DEPDIR)/libcurltool_la-curl_ctype.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lib/curl_ctype.c' object='../lib/libcurltool_la-curl_ctype.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o ../lib/libcurltool_la-curl_ctype.lo `test -f '../lib/curl_ctype.c' || echo '$(srcdir)/'`../lib/curl_ctype.c + curl-slist_wc.o: slist_wc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-slist_wc.o -MD -MP -MF $(DEPDIR)/curl-slist_wc.Tpo -c -o curl-slist_wc.o `test -f 'slist_wc.c' || echo '$(srcdir)/'`slist_wc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-slist_wc.Tpo $(DEPDIR)/curl-slist_wc.Po @@ -1391,6 +1453,20 @@ curl-tool_easysrc.obj: tool_easysrc.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_easysrc.obj `if test -f 'tool_easysrc.c'; then $(CYGPATH_W) 'tool_easysrc.c'; else $(CYGPATH_W) '$(srcdir)/tool_easysrc.c'; fi` +curl-tool_filetime.o: tool_filetime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_filetime.o -MD -MP -MF $(DEPDIR)/curl-tool_filetime.Tpo -c -o curl-tool_filetime.o `test -f 'tool_filetime.c' || echo '$(srcdir)/'`tool_filetime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_filetime.Tpo $(DEPDIR)/curl-tool_filetime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_filetime.c' object='curl-tool_filetime.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_filetime.o `test -f 'tool_filetime.c' || echo '$(srcdir)/'`tool_filetime.c + +curl-tool_filetime.obj: tool_filetime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_filetime.obj -MD -MP -MF $(DEPDIR)/curl-tool_filetime.Tpo -c -o curl-tool_filetime.obj `if test -f 'tool_filetime.c'; then $(CYGPATH_W) 'tool_filetime.c'; else $(CYGPATH_W) '$(srcdir)/tool_filetime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_filetime.Tpo $(DEPDIR)/curl-tool_filetime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_filetime.c' object='curl-tool_filetime.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_filetime.obj `if test -f 'tool_filetime.c'; then $(CYGPATH_W) 'tool_filetime.c'; else $(CYGPATH_W) '$(srcdir)/tool_filetime.c'; fi` + curl-tool_formparse.o: tool_formparse.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_formparse.o -MD -MP -MF $(DEPDIR)/curl-tool_formparse.Tpo -c -o curl-tool_formparse.o `test -f 'tool_formparse.c' || echo '$(srcdir)/'`tool_formparse.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_formparse.Tpo $(DEPDIR)/curl-tool_formparse.Po @@ -1531,20 +1607,6 @@ curl-tool_metalink.obj: tool_metalink.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_metalink.obj `if test -f 'tool_metalink.c'; then $(CYGPATH_W) 'tool_metalink.c'; else $(CYGPATH_W) '$(srcdir)/tool_metalink.c'; fi` -curl-tool_mfiles.o: tool_mfiles.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_mfiles.o -MD -MP -MF $(DEPDIR)/curl-tool_mfiles.Tpo -c -o curl-tool_mfiles.o `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_mfiles.Tpo $(DEPDIR)/curl-tool_mfiles.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_mfiles.c' object='curl-tool_mfiles.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_mfiles.o `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c - -curl-tool_mfiles.obj: tool_mfiles.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_mfiles.obj -MD -MP -MF $(DEPDIR)/curl-tool_mfiles.Tpo -c -o curl-tool_mfiles.obj `if test -f 'tool_mfiles.c'; then $(CYGPATH_W) 'tool_mfiles.c'; else $(CYGPATH_W) '$(srcdir)/tool_mfiles.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_mfiles.Tpo $(DEPDIR)/curl-tool_mfiles.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_mfiles.c' object='curl-tool_mfiles.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_mfiles.obj `if test -f 'tool_mfiles.c'; then $(CYGPATH_W) 'tool_mfiles.c'; else $(CYGPATH_W) '$(srcdir)/tool_mfiles.c'; fi` - curl-tool_msgs.o: tool_msgs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_msgs.o -MD -MP -MF $(DEPDIR)/curl-tool_msgs.Tpo -c -o curl-tool_msgs.o `test -f 'tool_msgs.c' || echo '$(srcdir)/'`tool_msgs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_msgs.Tpo $(DEPDIR)/curl-tool_msgs.Po @@ -1713,20 +1775,6 @@ curl-tool_vms.obj: tool_vms.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_vms.obj `if test -f 'tool_vms.c'; then $(CYGPATH_W) 'tool_vms.c'; else $(CYGPATH_W) '$(srcdir)/tool_vms.c'; fi` -curl-tool_writeenv.o: tool_writeenv.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_writeenv.o -MD -MP -MF $(DEPDIR)/curl-tool_writeenv.Tpo -c -o curl-tool_writeenv.o `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_writeenv.Tpo $(DEPDIR)/curl-tool_writeenv.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_writeenv.c' object='curl-tool_writeenv.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_writeenv.o `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c - -curl-tool_writeenv.obj: tool_writeenv.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_writeenv.obj -MD -MP -MF $(DEPDIR)/curl-tool_writeenv.Tpo -c -o curl-tool_writeenv.obj `if test -f 'tool_writeenv.c'; then $(CYGPATH_W) 'tool_writeenv.c'; else $(CYGPATH_W) '$(srcdir)/tool_writeenv.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_writeenv.Tpo $(DEPDIR)/curl-tool_writeenv.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool_writeenv.c' object='curl-tool_writeenv.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_writeenv.obj `if test -f 'tool_writeenv.c'; then $(CYGPATH_W) 'tool_writeenv.c'; else $(CYGPATH_W) '$(srcdir)/tool_writeenv.c'; fi` - curl-tool_writeout.o: tool_writeout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_writeout.o -MD -MP -MF $(DEPDIR)/curl-tool_writeout.Tpo -c -o curl-tool_writeout.o `test -f 'tool_writeout.c' || echo '$(srcdir)/'`tool_writeout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_writeout.Tpo $(DEPDIR)/curl-tool_writeout.Po @@ -1797,6 +1845,20 @@ curl-tool_xattr.obj: tool_xattr.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lib/curl-warnless.obj `if test -f '../lib/warnless.c'; then $(CYGPATH_W) '../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../lib/warnless.c'; fi` +../lib/curl-curl_ctype.o: ../lib/curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lib/curl-curl_ctype.o -MD -MP -MF ../lib/$(DEPDIR)/curl-curl_ctype.Tpo -c -o ../lib/curl-curl_ctype.o `test -f '../lib/curl_ctype.c' || echo '$(srcdir)/'`../lib/curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lib/$(DEPDIR)/curl-curl_ctype.Tpo ../lib/$(DEPDIR)/curl-curl_ctype.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lib/curl_ctype.c' object='../lib/curl-curl_ctype.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lib/curl-curl_ctype.o `test -f '../lib/curl_ctype.c' || echo '$(srcdir)/'`../lib/curl_ctype.c + +../lib/curl-curl_ctype.obj: ../lib/curl_ctype.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../lib/curl-curl_ctype.obj -MD -MP -MF ../lib/$(DEPDIR)/curl-curl_ctype.Tpo -c -o ../lib/curl-curl_ctype.obj `if test -f '../lib/curl_ctype.c'; then $(CYGPATH_W) '../lib/curl_ctype.c'; else $(CYGPATH_W) '$(srcdir)/../lib/curl_ctype.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../lib/$(DEPDIR)/curl-curl_ctype.Tpo ../lib/$(DEPDIR)/curl-curl_ctype.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../lib/curl_ctype.c' object='../lib/curl-curl_ctype.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../lib/curl-curl_ctype.obj `if test -f '../lib/curl_ctype.c'; then $(CYGPATH_W) '../lib/curl_ctype.c'; else $(CYGPATH_W) '$(srcdir)/../lib/curl_ctype.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -1804,14 +1866,61 @@ clean-libtool: -rm -rf .libs _libs -rm -rf ../lib/.libs ../lib/_libs +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am +tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ @@ -1824,7 +1933,7 @@ tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $$unique; \ fi; \ fi -ctags: ctags-am +ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) @@ -1837,7 +1946,7 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am +cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ @@ -1886,25 +1995,49 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am +check: check-recursive @CURLDEBUG_FALSE@all-local: all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ @@ -1929,94 +2062,94 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am +clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ../lib/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ../lib/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS -.MAKE: all check install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + check check-am clean clean-binPROGRAMS clean-generic \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS .PRECIOUS: Makefile @@ -2024,14 +2157,16 @@ uninstall-am: uninstall-binPROGRAMS # remove targets if the command fails .DELETE_ON_ERROR: +@CODE_COVERAGE_RULES@ + # Here are the stuff to create a built-in manual @USE_MANUAL_TRUE@$(MANPAGE): -@USE_MANUAL_TRUE@ cd $(top_builddir)/docs && make curl.1 +@USE_MANUAL_TRUE@ cd $(top_builddir)/docs && $(MAKE) # This generates the tool_hugehelp.c file in both uncompressed and -# compressed formats -@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@$(HUGE): $(README) $(MANPAGE) mkhelp.pl +# compressed formats. +@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@$(HUGE): $(MANPAGE) $(README) $(MKHELP) @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ echo '#include "tool_setup.h"' > $(HUGE) @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ echo '#ifndef HAVE_LIBZ' >> $(HUGE) @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE) @@ -2039,7 +2174,7 @@ uninstall-am: uninstall-binPROGRAMS @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE) @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@ echo '#endif /* HAVE_LIBZ */' >> $(HUGE) # This generates the tool_hugehelp.c file uncompressed only -@HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@$(HUGE): $(README) $(MANPAGE) mkhelp.pl +@HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@$(HUGE): $(MANPAGE) $(README) $(MKHELP) @HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@ echo '#include "tool_setup.h"' > $(HUGE) @HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE) diff --git a/src/Makefile.inc b/src/Makefile.inc index 2196ffa..e0506c7 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -12,13 +12,15 @@ CURLX_CFILES = \ ../lib/strtoofft.c \ ../lib/nonblock.c \ - ../lib/warnless.c + ../lib/warnless.c \ + ../lib/curl_ctype.c CURLX_HFILES = \ ../lib/curl_setup.h \ ../lib/strtoofft.h \ ../lib/nonblock.h \ - ../lib/warnless.h + ../lib/warnless.h \ + ../lib/curl_ctype.h CURL_CFILES = \ slist_wc.c \ @@ -35,6 +37,7 @@ CURL_CFILES = \ tool_dirhie.c \ tool_doswin.c \ tool_easysrc.c \ + tool_filetime.c \ tool_formparse.c \ tool_getparam.c \ tool_getpass.c \ @@ -45,7 +48,6 @@ CURL_CFILES = \ tool_libinfo.c \ tool_main.c \ tool_metalink.c \ - tool_mfiles.c \ tool_msgs.c \ tool_operate.c \ tool_operhlp.c \ @@ -58,7 +60,6 @@ CURL_CFILES = \ tool_urlglob.c \ tool_util.c \ tool_vms.c \ - tool_writeenv.c \ tool_writeout.c \ tool_xattr.c @@ -77,6 +78,7 @@ CURL_HFILES = \ tool_dirhie.h \ tool_doswin.h \ tool_easysrc.h \ + tool_filetime.h \ tool_formparse.h \ tool_getparam.h \ tool_getpass.h \ @@ -87,7 +89,6 @@ CURL_HFILES = \ tool_libinfo.h \ tool_main.h \ tool_metalink.h \ - tool_mfiles.h \ tool_msgs.h \ tool_operate.h \ tool_operhlp.h \ @@ -103,7 +104,6 @@ CURL_HFILES = \ tool_util.h \ tool_version.h \ tool_vms.h \ - tool_writeenv.h \ tool_writeout.h \ tool_xattr.h diff --git a/src/Makefile.m32 b/src/Makefile.m32 index 40852e5..700cccf 100644 --- a/src/Makefile.m32 +++ b/src/Makefile.m32 @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1999 - 2015, Daniel Stenberg, , et al. +# Copyright (C) 1999 - 2017, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -22,8 +22,9 @@ ########################################################################### # -## Makefile for building curl.exe with MingW (GCC-3.2 or later) -## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4) +## Makefile for building curl.exe with MingW (GCC-3.2 or later or LLVM/Clang) +## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4), +## brotli (1.0.1) ## ## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...] ## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-sspi-winidn @@ -38,6 +39,10 @@ ifndef ZLIB_PATH ZLIB_PATH = ../../zlib-1.2.8 endif +# Edit the path below to point to the base of your Brotli sources. +ifndef BROTLI_PATH +BROTLI_PATH = ../../brotli-1.0.1 +endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH OPENSSL_PATH = ../../openssl-1.0.2a @@ -62,9 +67,9 @@ endif ifndef LIBXML2_PATH LIBXML2_PATH = ../../libxml2-2.9.2 endif -# Edit the path below to point to the base of your libidn package. -ifndef LIBIDN_PATH -LIBIDN_PATH = ../../libidn-1.32 +# Edit the path below to point to the base of your libidn2 package. +ifndef LIBIDN2_PATH +LIBIDN2_PATH = ../../libidn2-2.0.3 endif # Edit the path below to point to the base of your MS IDN package. # Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1 @@ -88,12 +93,19 @@ ifndef LIBCARES_PATH LIBCARES_PATH = $(PROOT)/ares endif -CC = $(CROSSPREFIX)gcc -CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall +ifeq ($(CURL_CC),) +CURL_CC := $(CROSSPREFIX)gcc +endif +ifeq ($(CURL_AR),) +CURL_AR := $(CROSSPREFIX)ar +endif + +CC = $(CURL_CC) +CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall -W CFLAGS += -fno-strict-aliasing # comment LDFLAGS below to keep debug info LDFLAGS = $(CURL_LDFLAG_EXTRAS) $(CURL_LDFLAG_EXTRAS_EXE) -s -AR = $(CROSSPREFIX)ar +AR = $(CURL_AR) RC = $(CROSSPREFIX)windres RCFLAGS = --include-dir=$(PROOT)/include -O COFF STRIP = $(CROSSPREFIX)strip -g @@ -168,9 +180,7 @@ ZLIB = 1 endif ifeq ($(findstring -ssh2,$(CFG)),-ssh2) SSH2 = 1 -ifneq ($(findstring -winssl,$(CFG)),-winssl) SSL = 1 -endif ZLIB = 1 endif ifeq ($(findstring -ssl,$(CFG)),-ssl) @@ -179,8 +189,11 @@ endif ifeq ($(findstring -zlib,$(CFG)),-zlib) ZLIB = 1 endif -ifeq ($(findstring -idn,$(CFG)),-idn) -IDN = 1 +ifeq ($(findstring -brotli,$(CFG)),-brotli) +BROTLI = 1 +endif +ifeq ($(findstring -idn2,$(CFG)),-idn2) +IDN2 = 1 endif ifeq ($(findstring -winidn,$(CFG)),-winidn) WINIDN = 1 @@ -206,6 +219,11 @@ NGHTTP2 = 1 endif INCLUDES = -I. -I../include -I../lib +ifdef SSL + ifdef WINSSL + CFLAGS += -DCURL_WITH_MULTI_SSL + endif +endif ifdef DYN curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll @@ -274,19 +292,29 @@ ifdef SSL INCLUDES += -I"$(OPENSSL_INCLUDE)" CFLAGS += -DUSE_OPENSSL curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS) -else +endif ifdef WINSSL + CFLAGS += -DUSE_SCHANNEL curl_LDADD += -lcrypt32 endif -endif ifdef ZLIB INCLUDES += -I"$(ZLIB_PATH)" CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H curl_LDADD += -L"$(ZLIB_PATH)" -lz endif -ifdef IDN - CFLAGS += -DUSE_LIBIDN - curl_LDADD += -L"$(LIBIDN_PATH)/lib" -lidn +ifdef BROTLI + INCLUDES += -I"$(BROTLI_PATH)/include" + CFLAGS += -DHAVE_BROTLI + curl_LDADD += -L"$(BROTLI_PATH)/lib" + ifdef BROTLI_LIBS + curl_LDADD += $(BROTLI_LIBS) + else + curl_LDADD += -lbrotlidec + endif +endif +ifdef IDN2 + CFLAGS += -DUSE_LIBIDN2 + curl_LDADD += -L"$(LIBIDN2_PATH)/lib" -lidn2 else ifdef WINIDN CFLAGS += -DUSE_WIN32_IDN @@ -307,9 +335,6 @@ ifdef METALINK endif ifdef SSPI CFLAGS += -DUSE_WINDOWS_SSPI - ifdef WINSSL - CFLAGS += -DUSE_SCHANNEL - endif endif ifdef IPV6 CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501 diff --git a/src/Makefile.netware b/src/Makefile.netware index a927da5..ebe6500 100644 --- a/src/Makefile.netware +++ b/src/Makefile.netware @@ -106,7 +106,7 @@ DESCR = curl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - https://curl.haxx.se MTSAFE = YES STACK = 64000 SCREEN = $(TARGET) commandline utility -# Comment the line below if you dont want to load protected automatically. +# Comment the line below if you don't want to load protected automatically. # LDRING = 3 # Uncomment the next line to enable linking with POSIX semantics. @@ -178,7 +178,7 @@ endif CFLAGS += -align 4 else # PRELUDE = $(NDK_CLIB)/imports/clibpre.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # to avoid the __init_* / __deinit_* whoes don't use prelude from NDK PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" CFLAGS += -align 1 @@ -201,7 +201,7 @@ else endif else # PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # to avoid the __init_* / __deinit_* whoes don't use prelude from NDK # http://www.gknw.net/development/mk_nlm/gcc_pre.zip PRELUDE = $(NDK_ROOT)/pre/prelude.o CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h diff --git a/src/Makefile.vc10 b/src/Makefile.vc10 deleted file mode 100644 index 24abbdb..0000000 --- a/src/Makefile.vc10 +++ /dev/null @@ -1,550 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-users. - -############################################################# -# -## Makefile for building curl.exe with MSVC10 -## Use: nmake -f makefile.vc10 [release | debug] [CFG=release-ssl] -## (default is release) -## "nmake -f makefile.vc10 CFG=release-ssl" statically links OpenSSL -## into curl.exe producing a standalone SSL-enabled executable. -## -# -############################################################# - -PROGRAM_NAME = curl.exe - -# ------------------------------------------- -# Verify that current subdir is curl's 'src' -# ------------------------------------------- - -!IF ! EXIST(.\tool_main.c) -! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory. -! MESSAGE Change to curl's 'src' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC10 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -######################################################## -## Nothing more to do below this line! - -ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)" -ZLIB_LIBS = zlib.lib -ZLIB_IMP_LIBS = zdll.lib - -SSL_CFLAGS = /DUSE_OPENSSL -SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32" -SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll" -SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib - -WINSSL_CFLAGS = /DUSE_SCHANNEL -#WINSSL_LIBS = gdi32.lib user32.lib - -!IFDEF USE_IDN -WINLIBS = $(WINLIBS) normaliz.lib -!ENDIF - -# Runtime library configuration -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - -## Release -CCR = cl.exe $(RTLIB) /O2 /DNDEBUG -LINKR = link.exe /incremental:no /libpath:"../lib" -RCR = rc.exe /dDEBUGBUILD=0 - -## Debug -CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1 -LINKD = link.exe /incremental:yes /debug /libpath:"../lib" -RCD = rc.exe /dDEBUGBUILD=1 - -CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE) -RESFLAGS = /i../include - -# This manifest thing is for VC8, enabled by the maketgz script that -# builds the VC8 version of this makefile. Left commented out in the VC10 -# version! -#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1 - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -RELEASE_OBJS= \ - nonblockr.obj \ - strcaser.obj \ - strtoofftr.obj \ - warnless.obj \ - slist_wc.obj \ - tool_binmoder.obj \ - tool_bnamer.obj \ - tool_cb_dbgr.obj \ - tool_cb_hdrr.obj \ - tool_cb_prgr.obj \ - tool_cb_rear.obj \ - tool_cb_seer.obj \ - tool_cb_wrtr.obj \ - tool_cfgabler.obj \ - tool_convertr.obj \ - tool_dirhier.obj \ - tool_doswinr.obj \ - tool_easysrcr.obj \ - tool_formparser.obj \ - tool_getparamr.obj \ - tool_getpassr.obj \ - tool_helpr.obj \ - tool_helpersr.obj \ - tool_homedirr.obj \ - tool_hugehelpr.obj \ - tool_libinfor.obj \ - tool_mainr.obj \ - tool_metalinkr.obj \ - tool_mfilesr.obj \ - tool_msgsr.obj \ - tool_operater.obj \ - tool_operhlpr.obj \ - tool_panykeyr.obj \ - tool_paramhlpr.obj \ - tool_parsecfgr.obj \ - tool_setoptr.obj \ - tool_sleepr.obj \ - tool_urlglobr.obj \ - tool_utilr.obj \ - tool_vmsr.obj \ - tool_writeenvr.obj \ - tool_writeoutr.obj \ - tool_xattrr.obj \ - curlr.res - -DEBUG_OBJS= \ - nonblockd.obj \ - strcased.obj \ - strtoofftd.obj \ - warnlessd.obj \ - slist_wcd.obj \ - tool_binmoded.obj \ - tool_bnamed.obj \ - tool_cb_dbgd.obj \ - tool_cb_hdrd.obj \ - tool_cb_prgd.obj \ - tool_cb_read.obj \ - tool_cb_seed.obj \ - tool_cb_wrtd.obj \ - tool_cfgabled.obj \ - tool_convertd.obj \ - tool_dirhied.obj \ - tool_doswind.obj \ - tool_easysrcd.obj \ - tool_formparsed.obj \ - tool_getparamd.obj \ - tool_getpassd.obj \ - tool_helpd.obj \ - tool_helpersd.obj \ - tool_homedird.obj \ - tool_hugehelpd.obj \ - tool_libinfod.obj \ - tool_maind.obj \ - tool_metalinkd.obj \ - tool_mfilesd.obj \ - tool_msgsd.obj \ - tool_operated.obj \ - tool_operhlpd.obj \ - tool_panykeyd.obj \ - tool_paramhlpd.obj \ - tool_parsecfgd.obj \ - tool_setoptd.obj \ - tool_sleepd.obj \ - tool_urlglobd.obj \ - tool_utild.obj \ - tool_vmsd.obj \ - tool_writeenvd.obj \ - tool_writeoutd.obj \ - tool_xattrd.obj \ - curld.res - -################################################# -# If CFG not specified, use static libs - -CFLAGS = $(CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) - -################################################# -# release dynamic library - -!IF "$(CFG)" == "release-dll" -LINKLIBS = $(LIBCURL_IMP_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) -!ENDIF - -################################################# -# release static library with zlib - -!IF "$(CFG)" == "release-zlib" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl - -!IF "$(CFG)" == "release-ssl" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl - -!IF "$(CFG)" == "release-dll-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl and zlib - -!IF "$(CFG)" == "release-ssl-zlib" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with winssl and zlib - -!IF "$(CFG)" == "release-winssl-zlib" -CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl - -!IF "$(CFG)" == "release-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic zlib - -!IF "$(CFG)" == "release-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic zlib - -!IF "$(CFG)" == "release-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -LINKLIBS = $(LINKLIBS) $(WINLIBS) -LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS) - -all : release - -release: $(RELEASE_OBJS) - $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS) - $(MANIFESTTOOL) - -debug: $(DEBUG_OBJS) - $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS) - $(MANIFESTTOOL) - -## Release -nonblockr.obj: ../lib/nonblock.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcaser.obj: ../lib/strcase.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftr.obj: ../lib/strtoofft.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnless.obj: ../lib/warnless.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wc.obj: slist_wc.c - $(CCR) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoder.obj: tool_binmode.c - $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamer.obj: tool_bname.c - $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgr.obj: tool_cb_dbg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrr.obj: tool_cb_hdr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgr.obj: tool_cb_prg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_rear.obj: tool_cb_rea.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seer.obj: tool_cb_see.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtr.obj: tool_cb_wrt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabler.obj: tool_cfgable.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertr.obj: tool_convert.c - $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhier.obj: tool_dirhie.c - $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswinr.obj: tool_doswin.c - $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcr.obj: tool_easysrc.c - $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparser.obj: tool_formparse.c - $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamr.obj: tool_getparam.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassr.obj: tool_getpass.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpr.obj: tool_help.c - $(CCR) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersr.obj: tool_helpers.c - $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedirr.obj: tool_homedir.c - $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpr.obj: tool_hugehelp.c - $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfor.obj: tool_libinfo.c - $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_mainr.obj: tool_main.c - $(CCR) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkr.obj: tool_metalink.c - $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesr.obj: tool_mfiles.c - $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsr.obj: tool_msgs.c - $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operater.obj: tool_operate.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpr.obj: tool_operhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyr.obj: tool_panykey.c - $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpr.obj: tool_paramhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgr.obj: tool_parsecfg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptr.obj: tool_setopt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepr.obj: tool_sleep.c - $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobr.obj: tool_urlglob.c - $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utilr.obj: tool_util.c - $(CCR) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsr.obj: tool_vms.c - $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvr.obj: tool_writeenv.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutr.obj: tool_writeout.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrr.obj: tool_xattr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c -curlr.res : curl.rc - $(RCR) $(RESFLAGS) /Fo"$@" curl.rc - -## Debug -nonblockd.obj: ../lib/nonblock.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcased.obj: ../lib/strcase.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftd.obj: ../lib/strtoofft.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnlessd.obj: ../lib/warnless.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wcd.obj: slist_wc.c - $(CCD) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoded.obj: tool_binmode.c - $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamed.obj: tool_bname.c - $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgd.obj: tool_cb_dbg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrd.obj: tool_cb_hdr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgd.obj: tool_cb_prg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_read.obj: tool_cb_rea.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seed.obj: tool_cb_see.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtd.obj: tool_cb_wrt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabled.obj: tool_cfgable.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertd.obj: tool_convert.c - $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhied.obj: tool_dirhie.c - $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswind.obj: tool_doswin.c - $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcd.obj: tool_easysrc.c - $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparsed.obj: tool_formparse.c - $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamd.obj: tool_getparam.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassd.obj: tool_getpass.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpd.obj: tool_help.c - $(CCD) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersd.obj: tool_helpers.c - $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedird.obj: tool_homedir.c - $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpd.obj: tool_hugehelp.c - $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfod.obj: tool_libinfo.c - $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_maind.obj: tool_main.c - $(CCD) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkd.obj: tool_metalink.c - $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesd.obj: tool_mfiles.c - $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsd.obj: tool_msgs.c - $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operated.obj: tool_operate.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpd.obj: tool_operhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyd.obj: tool_panykey.c - $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpd.obj: tool_paramhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgd.obj: tool_parsecfg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptd.obj: tool_setopt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepd.obj: tool_sleep.c - $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobd.obj: tool_urlglob.c - $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utild.obj: tool_util.c - $(CCD) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsd.obj: tool_vms.c - $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvd.obj: tool_writeenv.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutd.obj: tool_writeout.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrd.obj: tool_xattr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c -curld.res : curl.rc - $(RCD) $(RESFLAGS) /Fo"$@" curl.rc - -clean: - @-erase $(PROGRAM_NAME) 2> NUL - @-erase $(RELEASE_OBJS) 2> NUL - @-erase $(DEBUG_OBJS) 2> NUL - @-erase *.idb 2> NUL - @-erase *.pdb 2> NUL - @-erase *.pch 2> NUL - @-erase *.ilk 2> NUL diff --git a/src/Makefile.vc11 b/src/Makefile.vc11 deleted file mode 100644 index 6798b11..0000000 --- a/src/Makefile.vc11 +++ /dev/null @@ -1,550 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-users. - -############################################################# -# -## Makefile for building curl.exe with MSVC11 -## Use: nmake -f makefile.vc11 [release | debug] [CFG=release-ssl] -## (default is release) -## "nmake -f makefile.vc11 CFG=release-ssl" statically links OpenSSL -## into curl.exe producing a standalone SSL-enabled executable. -## -# -############################################################# - -PROGRAM_NAME = curl.exe - -# ------------------------------------------- -# Verify that current subdir is curl's 'src' -# ------------------------------------------- - -!IF ! EXIST(.\tool_main.c) -! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory. -! MESSAGE Change to curl's 'src' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC11 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -######################################################## -## Nothing more to do below this line! - -ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)" -ZLIB_LIBS = zlib.lib -ZLIB_IMP_LIBS = zdll.lib - -SSL_CFLAGS = /DUSE_OPENSSL -SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32" -SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll" -SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib - -WINSSL_CFLAGS = /DUSE_SCHANNEL -#WINSSL_LIBS = gdi32.lib user32.lib - -!IFDEF USE_IDN -WINLIBS = $(WINLIBS) normaliz.lib -!ENDIF - -# Runtime library configuration -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - -## Release -CCR = cl.exe $(RTLIB) /O2 /DNDEBUG -LINKR = link.exe /incremental:no /libpath:"../lib" -RCR = rc.exe /dDEBUGBUILD=0 - -## Debug -CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1 -LINKD = link.exe /incremental:yes /debug /libpath:"../lib" -RCD = rc.exe /dDEBUGBUILD=1 - -CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE) -RESFLAGS = /i../include - -# This manifest thing is for VC8, enabled by the maketgz script that -# builds the VC8 version of this makefile. Left commented out in the VC11 -# version! -#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1 - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -RELEASE_OBJS= \ - nonblockr.obj \ - strcaser.obj \ - strtoofftr.obj \ - warnless.obj \ - slist_wc.obj \ - tool_binmoder.obj \ - tool_bnamer.obj \ - tool_cb_dbgr.obj \ - tool_cb_hdrr.obj \ - tool_cb_prgr.obj \ - tool_cb_rear.obj \ - tool_cb_seer.obj \ - tool_cb_wrtr.obj \ - tool_cfgabler.obj \ - tool_convertr.obj \ - tool_dirhier.obj \ - tool_doswinr.obj \ - tool_easysrcr.obj \ - tool_formparser.obj \ - tool_getparamr.obj \ - tool_getpassr.obj \ - tool_helpr.obj \ - tool_helpersr.obj \ - tool_homedirr.obj \ - tool_hugehelpr.obj \ - tool_libinfor.obj \ - tool_mainr.obj \ - tool_metalinkr.obj \ - tool_mfilesr.obj \ - tool_msgsr.obj \ - tool_operater.obj \ - tool_operhlpr.obj \ - tool_panykeyr.obj \ - tool_paramhlpr.obj \ - tool_parsecfgr.obj \ - tool_setoptr.obj \ - tool_sleepr.obj \ - tool_urlglobr.obj \ - tool_utilr.obj \ - tool_vmsr.obj \ - tool_writeenvr.obj \ - tool_writeoutr.obj \ - tool_xattrr.obj \ - curlr.res - -DEBUG_OBJS= \ - nonblockd.obj \ - strcased.obj \ - strtoofftd.obj \ - warnlessd.obj \ - slist_wcd.obj \ - tool_binmoded.obj \ - tool_bnamed.obj \ - tool_cb_dbgd.obj \ - tool_cb_hdrd.obj \ - tool_cb_prgd.obj \ - tool_cb_read.obj \ - tool_cb_seed.obj \ - tool_cb_wrtd.obj \ - tool_cfgabled.obj \ - tool_convertd.obj \ - tool_dirhied.obj \ - tool_doswind.obj \ - tool_easysrcd.obj \ - tool_formparsed.obj \ - tool_getparamd.obj \ - tool_getpassd.obj \ - tool_helpd.obj \ - tool_helpersd.obj \ - tool_homedird.obj \ - tool_hugehelpd.obj \ - tool_libinfod.obj \ - tool_maind.obj \ - tool_metalinkd.obj \ - tool_mfilesd.obj \ - tool_msgsd.obj \ - tool_operated.obj \ - tool_operhlpd.obj \ - tool_panykeyd.obj \ - tool_paramhlpd.obj \ - tool_parsecfgd.obj \ - tool_setoptd.obj \ - tool_sleepd.obj \ - tool_urlglobd.obj \ - tool_utild.obj \ - tool_vmsd.obj \ - tool_writeenvd.obj \ - tool_writeoutd.obj \ - tool_xattrd.obj \ - curld.res - -################################################# -# If CFG not specified, use static libs - -CFLAGS = $(CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) - -################################################# -# release dynamic library - -!IF "$(CFG)" == "release-dll" -LINKLIBS = $(LIBCURL_IMP_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) -!ENDIF - -################################################# -# release static library with zlib - -!IF "$(CFG)" == "release-zlib" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl - -!IF "$(CFG)" == "release-ssl" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl - -!IF "$(CFG)" == "release-dll-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl and zlib - -!IF "$(CFG)" == "release-ssl-zlib" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with winssl and zlib - -!IF "$(CFG)" == "release-winssl-zlib" -CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl - -!IF "$(CFG)" == "release-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic zlib - -!IF "$(CFG)" == "release-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic zlib - -!IF "$(CFG)" == "release-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -LINKLIBS = $(LINKLIBS) $(WINLIBS) -LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS) - -all : release - -release: $(RELEASE_OBJS) - $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS) - $(MANIFESTTOOL) - -debug: $(DEBUG_OBJS) - $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS) - $(MANIFESTTOOL) - -## Release -nonblockr.obj: ../lib/nonblock.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcaser.obj: ../lib/strcase.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftr.obj: ../lib/strtoofft.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnless.obj: ../lib/warnless.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wc.obj: slist_wc.c - $(CCR) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoder.obj: tool_binmode.c - $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamer.obj: tool_bname.c - $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgr.obj: tool_cb_dbg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrr.obj: tool_cb_hdr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgr.obj: tool_cb_prg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_rear.obj: tool_cb_rea.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seer.obj: tool_cb_see.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtr.obj: tool_cb_wrt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabler.obj: tool_cfgable.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertr.obj: tool_convert.c - $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhier.obj: tool_dirhie.c - $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswinr.obj: tool_doswin.c - $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcr.obj: tool_easysrc.c - $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparser.obj: tool_formparse.c - $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamr.obj: tool_getparam.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassr.obj: tool_getpass.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpr.obj: tool_help.c - $(CCR) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersr.obj: tool_helpers.c - $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedirr.obj: tool_homedir.c - $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpr.obj: tool_hugehelp.c - $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfor.obj: tool_libinfo.c - $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_mainr.obj: tool_main.c - $(CCR) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkr.obj: tool_metalink.c - $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesr.obj: tool_mfiles.c - $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsr.obj: tool_msgs.c - $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operater.obj: tool_operate.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpr.obj: tool_operhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyr.obj: tool_panykey.c - $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpr.obj: tool_paramhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgr.obj: tool_parsecfg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptr.obj: tool_setopt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepr.obj: tool_sleep.c - $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobr.obj: tool_urlglob.c - $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utilr.obj: tool_util.c - $(CCR) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsr.obj: tool_vms.c - $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvr.obj: tool_writeenv.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutr.obj: tool_writeout.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrr.obj: tool_xattr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c -curlr.res : curl.rc - $(RCR) $(RESFLAGS) /Fo"$@" curl.rc - -## Debug -nonblockd.obj: ../lib/nonblock.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcased.obj: ../lib/strcase.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftd.obj: ../lib/strtoofft.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnlessd.obj: ../lib/warnless.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wcd.obj: slist_wc.c - $(CCD) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoded.obj: tool_binmode.c - $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamed.obj: tool_bname.c - $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgd.obj: tool_cb_dbg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrd.obj: tool_cb_hdr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgd.obj: tool_cb_prg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_read.obj: tool_cb_rea.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seed.obj: tool_cb_see.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtd.obj: tool_cb_wrt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabled.obj: tool_cfgable.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertd.obj: tool_convert.c - $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhied.obj: tool_dirhie.c - $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswind.obj: tool_doswin.c - $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcd.obj: tool_easysrc.c - $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparsed.obj: tool_formparse.c - $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamd.obj: tool_getparam.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassd.obj: tool_getpass.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpd.obj: tool_help.c - $(CCD) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersd.obj: tool_helpers.c - $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedird.obj: tool_homedir.c - $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpd.obj: tool_hugehelp.c - $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfod.obj: tool_libinfo.c - $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_maind.obj: tool_main.c - $(CCD) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkd.obj: tool_metalink.c - $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesd.obj: tool_mfiles.c - $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsd.obj: tool_msgs.c - $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operated.obj: tool_operate.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpd.obj: tool_operhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyd.obj: tool_panykey.c - $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpd.obj: tool_paramhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgd.obj: tool_parsecfg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptd.obj: tool_setopt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepd.obj: tool_sleep.c - $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobd.obj: tool_urlglob.c - $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utild.obj: tool_util.c - $(CCD) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsd.obj: tool_vms.c - $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvd.obj: tool_writeenv.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutd.obj: tool_writeout.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrd.obj: tool_xattr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c -curld.res : curl.rc - $(RCD) $(RESFLAGS) /Fo"$@" curl.rc - -clean: - @-erase $(PROGRAM_NAME) 2> NUL - @-erase $(RELEASE_OBJS) 2> NUL - @-erase $(DEBUG_OBJS) 2> NUL - @-erase *.idb 2> NUL - @-erase *.pdb 2> NUL - @-erase *.pch 2> NUL - @-erase *.ilk 2> NUL diff --git a/src/Makefile.vc12 b/src/Makefile.vc12 deleted file mode 100644 index d13234a..0000000 --- a/src/Makefile.vc12 +++ /dev/null @@ -1,550 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-users. - -############################################################# -# -## Makefile for building curl.exe with MSVC12 -## Use: nmake -f makefile.vc12 [release | debug] [CFG=release-ssl] -## (default is release) -## "nmake -f makefile.vc12 CFG=release-ssl" statically links OpenSSL -## into curl.exe producing a standalone SSL-enabled executable. -## -# -############################################################# - -PROGRAM_NAME = curl.exe - -# ------------------------------------------- -# Verify that current subdir is curl's 'src' -# ------------------------------------------- - -!IF ! EXIST(.\tool_main.c) -! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory. -! MESSAGE Change to curl's 'src' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC12 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -######################################################## -## Nothing more to do below this line! - -ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)" -ZLIB_LIBS = zlib.lib -ZLIB_IMP_LIBS = zdll.lib - -SSL_CFLAGS = /DUSE_OPENSSL -SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32" -SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll" -SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib - -WINSSL_CFLAGS = /DUSE_SCHANNEL -#WINSSL_LIBS = gdi32.lib user32.lib - -!IFDEF USE_IDN -WINLIBS = $(WINLIBS) normaliz.lib -!ENDIF - -# Runtime library configuration -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - -## Release -CCR = cl.exe $(RTLIB) /O2 /DNDEBUG -LINKR = link.exe /incremental:no /libpath:"../lib" -RCR = rc.exe /dDEBUGBUILD=0 - -## Debug -CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1 -LINKD = link.exe /incremental:yes /debug /libpath:"../lib" -RCD = rc.exe /dDEBUGBUILD=1 - -CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE) -RESFLAGS = /i../include - -# This manifest thing is for VC8, enabled by the maketgz script that -# builds the VC8 version of this makefile. Left commented out in the VC12 -# version! -#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1 - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -RELEASE_OBJS= \ - nonblockr.obj \ - strcaser.obj \ - strtoofftr.obj \ - warnless.obj \ - slist_wc.obj \ - tool_binmoder.obj \ - tool_bnamer.obj \ - tool_cb_dbgr.obj \ - tool_cb_hdrr.obj \ - tool_cb_prgr.obj \ - tool_cb_rear.obj \ - tool_cb_seer.obj \ - tool_cb_wrtr.obj \ - tool_cfgabler.obj \ - tool_convertr.obj \ - tool_dirhier.obj \ - tool_doswinr.obj \ - tool_easysrcr.obj \ - tool_formparser.obj \ - tool_getparamr.obj \ - tool_getpassr.obj \ - tool_helpr.obj \ - tool_helpersr.obj \ - tool_homedirr.obj \ - tool_hugehelpr.obj \ - tool_libinfor.obj \ - tool_mainr.obj \ - tool_metalinkr.obj \ - tool_mfilesr.obj \ - tool_msgsr.obj \ - tool_operater.obj \ - tool_operhlpr.obj \ - tool_panykeyr.obj \ - tool_paramhlpr.obj \ - tool_parsecfgr.obj \ - tool_setoptr.obj \ - tool_sleepr.obj \ - tool_urlglobr.obj \ - tool_utilr.obj \ - tool_vmsr.obj \ - tool_writeenvr.obj \ - tool_writeoutr.obj \ - tool_xattrr.obj \ - curlr.res - -DEBUG_OBJS= \ - nonblockd.obj \ - strcased.obj \ - strtoofftd.obj \ - warnlessd.obj \ - slist_wcd.obj \ - tool_binmoded.obj \ - tool_bnamed.obj \ - tool_cb_dbgd.obj \ - tool_cb_hdrd.obj \ - tool_cb_prgd.obj \ - tool_cb_read.obj \ - tool_cb_seed.obj \ - tool_cb_wrtd.obj \ - tool_cfgabled.obj \ - tool_convertd.obj \ - tool_dirhied.obj \ - tool_doswind.obj \ - tool_easysrcd.obj \ - tool_formparsed.obj \ - tool_getparamd.obj \ - tool_getpassd.obj \ - tool_helpd.obj \ - tool_helpersd.obj \ - tool_homedird.obj \ - tool_hugehelpd.obj \ - tool_libinfod.obj \ - tool_maind.obj \ - tool_metalinkd.obj \ - tool_mfilesd.obj \ - tool_msgsd.obj \ - tool_operated.obj \ - tool_operhlpd.obj \ - tool_panykeyd.obj \ - tool_paramhlpd.obj \ - tool_parsecfgd.obj \ - tool_setoptd.obj \ - tool_sleepd.obj \ - tool_urlglobd.obj \ - tool_utild.obj \ - tool_vmsd.obj \ - tool_writeenvd.obj \ - tool_writeoutd.obj \ - tool_xattrd.obj \ - curld.res - -################################################# -# If CFG not specified, use static libs - -CFLAGS = $(CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) - -################################################# -# release dynamic library - -!IF "$(CFG)" == "release-dll" -LINKLIBS = $(LIBCURL_IMP_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) -!ENDIF - -################################################# -# release static library with zlib - -!IF "$(CFG)" == "release-zlib" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl - -!IF "$(CFG)" == "release-ssl" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl - -!IF "$(CFG)" == "release-dll-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl and zlib - -!IF "$(CFG)" == "release-ssl-zlib" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with winssl and zlib - -!IF "$(CFG)" == "release-winssl-zlib" -CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl - -!IF "$(CFG)" == "release-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic zlib - -!IF "$(CFG)" == "release-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic zlib - -!IF "$(CFG)" == "release-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -LINKLIBS = $(LINKLIBS) $(WINLIBS) -LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS) - -all : release - -release: $(RELEASE_OBJS) - $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS) - $(MANIFESTTOOL) - -debug: $(DEBUG_OBJS) - $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS) - $(MANIFESTTOOL) - -## Release -nonblockr.obj: ../lib/nonblock.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcaser.obj: ../lib/strcase.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftr.obj: ../lib/strtoofft.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnless.obj: ../lib/warnless.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wc.obj: slist_wc.c - $(CCR) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoder.obj: tool_binmode.c - $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamer.obj: tool_bname.c - $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgr.obj: tool_cb_dbg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrr.obj: tool_cb_hdr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgr.obj: tool_cb_prg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_rear.obj: tool_cb_rea.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seer.obj: tool_cb_see.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtr.obj: tool_cb_wrt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabler.obj: tool_cfgable.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertr.obj: tool_convert.c - $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhier.obj: tool_dirhie.c - $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswinr.obj: tool_doswin.c - $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcr.obj: tool_easysrc.c - $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparser.obj: tool_formparse.c - $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamr.obj: tool_getparam.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassr.obj: tool_getpass.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpr.obj: tool_help.c - $(CCR) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersr.obj: tool_helpers.c - $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedirr.obj: tool_homedir.c - $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpr.obj: tool_hugehelp.c - $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfor.obj: tool_libinfo.c - $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_mainr.obj: tool_main.c - $(CCR) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkr.obj: tool_metalink.c - $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesr.obj: tool_mfiles.c - $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsr.obj: tool_msgs.c - $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operater.obj: tool_operate.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpr.obj: tool_operhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyr.obj: tool_panykey.c - $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpr.obj: tool_paramhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgr.obj: tool_parsecfg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptr.obj: tool_setopt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepr.obj: tool_sleep.c - $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobr.obj: tool_urlglob.c - $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utilr.obj: tool_util.c - $(CCR) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsr.obj: tool_vms.c - $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvr.obj: tool_writeenv.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutr.obj: tool_writeout.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrr.obj: tool_xattr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c -curlr.res : curl.rc - $(RCR) $(RESFLAGS) /Fo"$@" curl.rc - -## Debug -nonblockd.obj: ../lib/nonblock.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcased.obj: ../lib/strcase.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftd.obj: ../lib/strtoofft.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnlessd.obj: ../lib/warnless.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wcd.obj: slist_wc.c - $(CCD) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoded.obj: tool_binmode.c - $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamed.obj: tool_bname.c - $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgd.obj: tool_cb_dbg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrd.obj: tool_cb_hdr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgd.obj: tool_cb_prg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_read.obj: tool_cb_rea.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seed.obj: tool_cb_see.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtd.obj: tool_cb_wrt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabled.obj: tool_cfgable.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertd.obj: tool_convert.c - $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhied.obj: tool_dirhie.c - $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswind.obj: tool_doswin.c - $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcd.obj: tool_easysrc.c - $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparsed.obj: tool_formparse.c - $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamd.obj: tool_getparam.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassd.obj: tool_getpass.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpd.obj: tool_help.c - $(CCD) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersd.obj: tool_helpers.c - $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedird.obj: tool_homedir.c - $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpd.obj: tool_hugehelp.c - $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfod.obj: tool_libinfo.c - $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_maind.obj: tool_main.c - $(CCD) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkd.obj: tool_metalink.c - $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesd.obj: tool_mfiles.c - $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsd.obj: tool_msgs.c - $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operated.obj: tool_operate.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpd.obj: tool_operhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyd.obj: tool_panykey.c - $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpd.obj: tool_paramhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgd.obj: tool_parsecfg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptd.obj: tool_setopt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepd.obj: tool_sleep.c - $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobd.obj: tool_urlglob.c - $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utild.obj: tool_util.c - $(CCD) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsd.obj: tool_vms.c - $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvd.obj: tool_writeenv.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutd.obj: tool_writeout.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrd.obj: tool_xattr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c -curld.res : curl.rc - $(RCD) $(RESFLAGS) /Fo"$@" curl.rc - -clean: - @-erase $(PROGRAM_NAME) 2> NUL - @-erase $(RELEASE_OBJS) 2> NUL - @-erase $(DEBUG_OBJS) 2> NUL - @-erase *.idb 2> NUL - @-erase *.pdb 2> NUL - @-erase *.pch 2> NUL - @-erase *.ilk 2> NUL diff --git a/src/Makefile.vc14 b/src/Makefile.vc14 deleted file mode 100644 index 1742732..0000000 --- a/src/Makefile.vc14 +++ /dev/null @@ -1,550 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-users. - -############################################################# -# -## Makefile for building curl.exe with MSVC14 -## Use: nmake -f makefile.vc14 [release | debug] [CFG=release-ssl] -## (default is release) -## "nmake -f makefile.vc14 CFG=release-ssl" statically links OpenSSL -## into curl.exe producing a standalone SSL-enabled executable. -## -# -############################################################# - -PROGRAM_NAME = curl.exe - -# ------------------------------------------- -# Verify that current subdir is curl's 'src' -# ------------------------------------------- - -!IF ! EXIST(.\tool_main.c) -! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory. -! MESSAGE Change to curl's 'src' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC14 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -######################################################## -## Nothing more to do below this line! - -ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)" -ZLIB_LIBS = zlib.lib -ZLIB_IMP_LIBS = zdll.lib - -SSL_CFLAGS = /DUSE_OPENSSL -SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32" -SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll" -SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib - -WINSSL_CFLAGS = /DUSE_SCHANNEL -#WINSSL_LIBS = gdi32.lib user32.lib - -!IFDEF USE_IDN -WINLIBS = $(WINLIBS) normaliz.lib -!ENDIF - -# Runtime library configuration -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - -## Release -CCR = cl.exe $(RTLIB) /O2 /DNDEBUG -LINKR = link.exe /incremental:no /libpath:"../lib" -RCR = rc.exe /dDEBUGBUILD=0 - -## Debug -CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1 -LINKD = link.exe /incremental:yes /debug /libpath:"../lib" -RCD = rc.exe /dDEBUGBUILD=1 - -CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE) -RESFLAGS = /i../include - -# This manifest thing is for VC8, enabled by the maketgz script that -# builds the VC8 version of this makefile. Left commented out in the VC14 -# version! -#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1 - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -RELEASE_OBJS= \ - nonblockr.obj \ - strcaser.obj \ - strtoofftr.obj \ - warnless.obj \ - slist_wc.obj \ - tool_binmoder.obj \ - tool_bnamer.obj \ - tool_cb_dbgr.obj \ - tool_cb_hdrr.obj \ - tool_cb_prgr.obj \ - tool_cb_rear.obj \ - tool_cb_seer.obj \ - tool_cb_wrtr.obj \ - tool_cfgabler.obj \ - tool_convertr.obj \ - tool_dirhier.obj \ - tool_doswinr.obj \ - tool_easysrcr.obj \ - tool_formparser.obj \ - tool_getparamr.obj \ - tool_getpassr.obj \ - tool_helpr.obj \ - tool_helpersr.obj \ - tool_homedirr.obj \ - tool_hugehelpr.obj \ - tool_libinfor.obj \ - tool_mainr.obj \ - tool_metalinkr.obj \ - tool_mfilesr.obj \ - tool_msgsr.obj \ - tool_operater.obj \ - tool_operhlpr.obj \ - tool_panykeyr.obj \ - tool_paramhlpr.obj \ - tool_parsecfgr.obj \ - tool_setoptr.obj \ - tool_sleepr.obj \ - tool_urlglobr.obj \ - tool_utilr.obj \ - tool_vmsr.obj \ - tool_writeenvr.obj \ - tool_writeoutr.obj \ - tool_xattrr.obj \ - curlr.res - -DEBUG_OBJS= \ - nonblockd.obj \ - strcased.obj \ - strtoofftd.obj \ - warnlessd.obj \ - slist_wcd.obj \ - tool_binmoded.obj \ - tool_bnamed.obj \ - tool_cb_dbgd.obj \ - tool_cb_hdrd.obj \ - tool_cb_prgd.obj \ - tool_cb_read.obj \ - tool_cb_seed.obj \ - tool_cb_wrtd.obj \ - tool_cfgabled.obj \ - tool_convertd.obj \ - tool_dirhied.obj \ - tool_doswind.obj \ - tool_easysrcd.obj \ - tool_formparsed.obj \ - tool_getparamd.obj \ - tool_getpassd.obj \ - tool_helpd.obj \ - tool_helpersd.obj \ - tool_homedird.obj \ - tool_hugehelpd.obj \ - tool_libinfod.obj \ - tool_maind.obj \ - tool_metalinkd.obj \ - tool_mfilesd.obj \ - tool_msgsd.obj \ - tool_operated.obj \ - tool_operhlpd.obj \ - tool_panykeyd.obj \ - tool_paramhlpd.obj \ - tool_parsecfgd.obj \ - tool_setoptd.obj \ - tool_sleepd.obj \ - tool_urlglobd.obj \ - tool_utild.obj \ - tool_vmsd.obj \ - tool_writeenvd.obj \ - tool_writeoutd.obj \ - tool_xattrd.obj \ - curld.res - -################################################# -# If CFG not specified, use static libs - -CFLAGS = $(CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) - -################################################# -# release dynamic library - -!IF "$(CFG)" == "release-dll" -LINKLIBS = $(LIBCURL_IMP_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) -!ENDIF - -################################################# -# release static library with zlib - -!IF "$(CFG)" == "release-zlib" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl - -!IF "$(CFG)" == "release-ssl" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl - -!IF "$(CFG)" == "release-dll-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl and zlib - -!IF "$(CFG)" == "release-ssl-zlib" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with winssl and zlib - -!IF "$(CFG)" == "release-winssl-zlib" -CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl - -!IF "$(CFG)" == "release-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic zlib - -!IF "$(CFG)" == "release-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic zlib - -!IF "$(CFG)" == "release-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -LINKLIBS = $(LINKLIBS) $(WINLIBS) -LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS) - -all : release - -release: $(RELEASE_OBJS) - $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS) - $(MANIFESTTOOL) - -debug: $(DEBUG_OBJS) - $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS) - $(MANIFESTTOOL) - -## Release -nonblockr.obj: ../lib/nonblock.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcaser.obj: ../lib/strcase.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftr.obj: ../lib/strtoofft.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnless.obj: ../lib/warnless.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wc.obj: slist_wc.c - $(CCR) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoder.obj: tool_binmode.c - $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamer.obj: tool_bname.c - $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgr.obj: tool_cb_dbg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrr.obj: tool_cb_hdr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgr.obj: tool_cb_prg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_rear.obj: tool_cb_rea.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seer.obj: tool_cb_see.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtr.obj: tool_cb_wrt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabler.obj: tool_cfgable.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertr.obj: tool_convert.c - $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhier.obj: tool_dirhie.c - $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswinr.obj: tool_doswin.c - $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcr.obj: tool_easysrc.c - $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparser.obj: tool_formparse.c - $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamr.obj: tool_getparam.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassr.obj: tool_getpass.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpr.obj: tool_help.c - $(CCR) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersr.obj: tool_helpers.c - $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedirr.obj: tool_homedir.c - $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpr.obj: tool_hugehelp.c - $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfor.obj: tool_libinfo.c - $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_mainr.obj: tool_main.c - $(CCR) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkr.obj: tool_metalink.c - $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesr.obj: tool_mfiles.c - $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsr.obj: tool_msgs.c - $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operater.obj: tool_operate.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpr.obj: tool_operhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyr.obj: tool_panykey.c - $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpr.obj: tool_paramhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgr.obj: tool_parsecfg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptr.obj: tool_setopt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepr.obj: tool_sleep.c - $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobr.obj: tool_urlglob.c - $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utilr.obj: tool_util.c - $(CCR) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsr.obj: tool_vms.c - $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvr.obj: tool_writeenv.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutr.obj: tool_writeout.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrr.obj: tool_xattr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c -curlr.res : curl.rc - $(RCR) $(RESFLAGS) /Fo"$@" curl.rc - -## Debug -nonblockd.obj: ../lib/nonblock.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcased.obj: ../lib/strcase.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftd.obj: ../lib/strtoofft.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnlessd.obj: ../lib/warnless.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wcd.obj: slist_wc.c - $(CCD) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoded.obj: tool_binmode.c - $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamed.obj: tool_bname.c - $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgd.obj: tool_cb_dbg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrd.obj: tool_cb_hdr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgd.obj: tool_cb_prg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_read.obj: tool_cb_rea.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seed.obj: tool_cb_see.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtd.obj: tool_cb_wrt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabled.obj: tool_cfgable.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertd.obj: tool_convert.c - $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhied.obj: tool_dirhie.c - $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswind.obj: tool_doswin.c - $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcd.obj: tool_easysrc.c - $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparsed.obj: tool_formparse.c - $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamd.obj: tool_getparam.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassd.obj: tool_getpass.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpd.obj: tool_help.c - $(CCD) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersd.obj: tool_helpers.c - $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedird.obj: tool_homedir.c - $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpd.obj: tool_hugehelp.c - $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfod.obj: tool_libinfo.c - $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_maind.obj: tool_main.c - $(CCD) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkd.obj: tool_metalink.c - $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesd.obj: tool_mfiles.c - $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsd.obj: tool_msgs.c - $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operated.obj: tool_operate.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpd.obj: tool_operhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyd.obj: tool_panykey.c - $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpd.obj: tool_paramhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgd.obj: tool_parsecfg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptd.obj: tool_setopt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepd.obj: tool_sleep.c - $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobd.obj: tool_urlglob.c - $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utild.obj: tool_util.c - $(CCD) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsd.obj: tool_vms.c - $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvd.obj: tool_writeenv.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutd.obj: tool_writeout.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrd.obj: tool_xattr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c -curld.res : curl.rc - $(RCD) $(RESFLAGS) /Fo"$@" curl.rc - -clean: - @-erase $(PROGRAM_NAME) 2> NUL - @-erase $(RELEASE_OBJS) 2> NUL - @-erase $(DEBUG_OBJS) 2> NUL - @-erase *.idb 2> NUL - @-erase *.pdb 2> NUL - @-erase *.pch 2> NUL - @-erase *.ilk 2> NUL diff --git a/src/Makefile.vc7 b/src/Makefile.vc7 deleted file mode 100644 index e872aa9..0000000 --- a/src/Makefile.vc7 +++ /dev/null @@ -1,550 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-users. - -############################################################# -# -## Makefile for building curl.exe with MSVC7 -## Use: nmake -f makefile.vc6 [release | debug] [CFG=release-ssl] -## (default is release) -## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL -## into curl.exe producing a standalone SSL-enabled executable. -## -# -############################################################# - -PROGRAM_NAME = curl.exe - -# ------------------------------------------- -# Verify that current subdir is curl's 'src' -# ------------------------------------------- - -!IF ! EXIST(.\tool_main.c) -! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory. -! MESSAGE Change to curl's 'src' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC7 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -######################################################## -## Nothing more to do below this line! - -ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)" -ZLIB_LIBS = zlib.lib -ZLIB_IMP_LIBS = zdll.lib - -SSL_CFLAGS = /DUSE_OPENSSL -SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32" -SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll" -SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib - -WINSSL_CFLAGS = /DUSE_SCHANNEL -#WINSSL_LIBS = gdi32.lib user32.lib - -!IFDEF USE_IDN -WINLIBS = $(WINLIBS) normaliz.lib -!ENDIF - -# Runtime library configuration -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - -## Release -CCR = cl.exe $(RTLIB) /O2 /DNDEBUG -LINKR = link.exe /incremental:no /libpath:"../lib" -RCR = rc.exe /dDEBUGBUILD=0 - -## Debug -CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /GZ -LINKD = link.exe /incremental:yes /debug /libpath:"../lib" -RCD = rc.exe /dDEBUGBUILD=1 - -CFLAGS = /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE) -RESFLAGS = /i../include - -# This manifest thing is for VC8, enabled by the maketgz script that -# builds the VC8 version of this makefile. Left commented out in the VC7 -# version! -#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1 - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -RELEASE_OBJS= \ - nonblockr.obj \ - strcaser.obj \ - strtoofftr.obj \ - warnless.obj \ - slist_wc.obj \ - tool_binmoder.obj \ - tool_bnamer.obj \ - tool_cb_dbgr.obj \ - tool_cb_hdrr.obj \ - tool_cb_prgr.obj \ - tool_cb_rear.obj \ - tool_cb_seer.obj \ - tool_cb_wrtr.obj \ - tool_cfgabler.obj \ - tool_convertr.obj \ - tool_dirhier.obj \ - tool_doswinr.obj \ - tool_easysrcr.obj \ - tool_formparser.obj \ - tool_getparamr.obj \ - tool_getpassr.obj \ - tool_helpr.obj \ - tool_helpersr.obj \ - tool_homedirr.obj \ - tool_hugehelpr.obj \ - tool_libinfor.obj \ - tool_mainr.obj \ - tool_metalinkr.obj \ - tool_mfilesr.obj \ - tool_msgsr.obj \ - tool_operater.obj \ - tool_operhlpr.obj \ - tool_panykeyr.obj \ - tool_paramhlpr.obj \ - tool_parsecfgr.obj \ - tool_setoptr.obj \ - tool_sleepr.obj \ - tool_urlglobr.obj \ - tool_utilr.obj \ - tool_vmsr.obj \ - tool_writeenvr.obj \ - tool_writeoutr.obj \ - tool_xattrr.obj \ - curlr.res - -DEBUG_OBJS= \ - nonblockd.obj \ - strcased.obj \ - strtoofftd.obj \ - warnlessd.obj \ - slist_wcd.obj \ - tool_binmoded.obj \ - tool_bnamed.obj \ - tool_cb_dbgd.obj \ - tool_cb_hdrd.obj \ - tool_cb_prgd.obj \ - tool_cb_read.obj \ - tool_cb_seed.obj \ - tool_cb_wrtd.obj \ - tool_cfgabled.obj \ - tool_convertd.obj \ - tool_dirhied.obj \ - tool_doswind.obj \ - tool_easysrcd.obj \ - tool_formparsed.obj \ - tool_getparamd.obj \ - tool_getpassd.obj \ - tool_helpd.obj \ - tool_helpersd.obj \ - tool_homedird.obj \ - tool_hugehelpd.obj \ - tool_libinfod.obj \ - tool_maind.obj \ - tool_metalinkd.obj \ - tool_mfilesd.obj \ - tool_msgsd.obj \ - tool_operated.obj \ - tool_operhlpd.obj \ - tool_panykeyd.obj \ - tool_paramhlpd.obj \ - tool_parsecfgd.obj \ - tool_setoptd.obj \ - tool_sleepd.obj \ - tool_urlglobd.obj \ - tool_utild.obj \ - tool_vmsd.obj \ - tool_writeenvd.obj \ - tool_writeoutd.obj \ - tool_xattrd.obj \ - curld.res - -################################################# -# If CFG not specified, use static libs - -CFLAGS = $(CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) - -################################################# -# release dynamic library - -!IF "$(CFG)" == "release-dll" -LINKLIBS = $(LIBCURL_IMP_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) -!ENDIF - -################################################# -# release static library with zlib - -!IF "$(CFG)" == "release-zlib" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl - -!IF "$(CFG)" == "release-ssl" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl - -!IF "$(CFG)" == "release-dll-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl and zlib - -!IF "$(CFG)" == "release-ssl-zlib" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with winssl and zlib - -!IF "$(CFG)" == "release-winssl-zlib" -CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl - -!IF "$(CFG)" == "release-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic zlib - -!IF "$(CFG)" == "release-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic zlib - -!IF "$(CFG)" == "release-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -LINKLIBS = $(LINKLIBS) $(WINLIBS) -LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS) - -all : release - -release: $(RELEASE_OBJS) - $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS) - $(MANIFESTTOOL) - -debug: $(DEBUG_OBJS) - $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS) - $(MANIFESTTOOL) - -## Release -nonblockr.obj: ../lib/nonblock.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcaser.obj: ../lib/strcase.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftr.obj: ../lib/strtoofft.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnless.obj: ../lib/warnless.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wc.obj: slist_wc.c - $(CCR) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoder.obj: tool_binmode.c - $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamer.obj: tool_bname.c - $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgr.obj: tool_cb_dbg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrr.obj: tool_cb_hdr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgr.obj: tool_cb_prg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_rear.obj: tool_cb_rea.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seer.obj: tool_cb_see.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtr.obj: tool_cb_wrt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabler.obj: tool_cfgable.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertr.obj: tool_convert.c - $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhier.obj: tool_dirhie.c - $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswinr.obj: tool_doswin.c - $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcr.obj: tool_easysrc.c - $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparser.obj: tool_formparse.c - $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamr.obj: tool_getparam.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassr.obj: tool_getpass.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpr.obj: tool_help.c - $(CCR) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersr.obj: tool_helpers.c - $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedirr.obj: tool_homedir.c - $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpr.obj: tool_hugehelp.c - $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfor.obj: tool_libinfo.c - $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_mainr.obj: tool_main.c - $(CCR) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkr.obj: tool_metalink.c - $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesr.obj: tool_mfiles.c - $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsr.obj: tool_msgs.c - $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operater.obj: tool_operate.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpr.obj: tool_operhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyr.obj: tool_panykey.c - $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpr.obj: tool_paramhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgr.obj: tool_parsecfg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptr.obj: tool_setopt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepr.obj: tool_sleep.c - $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobr.obj: tool_urlglob.c - $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utilr.obj: tool_util.c - $(CCR) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsr.obj: tool_vms.c - $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvr.obj: tool_writeenv.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutr.obj: tool_writeout.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrr.obj: tool_xattr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c -curlr.res : curl.rc - $(RCR) $(RESFLAGS) /Fo"$@" curl.rc - -## Debug -nonblockd.obj: ../lib/nonblock.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcased.obj: ../lib/strcase.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftd.obj: ../lib/strtoofft.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnlessd.obj: ../lib/warnless.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wcd.obj: slist_wc.c - $(CCD) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoded.obj: tool_binmode.c - $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamed.obj: tool_bname.c - $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgd.obj: tool_cb_dbg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrd.obj: tool_cb_hdr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgd.obj: tool_cb_prg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_read.obj: tool_cb_rea.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seed.obj: tool_cb_see.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtd.obj: tool_cb_wrt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabled.obj: tool_cfgable.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertd.obj: tool_convert.c - $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhied.obj: tool_dirhie.c - $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswind.obj: tool_doswin.c - $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcd.obj: tool_easysrc.c - $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparsed.obj: tool_formparse.c - $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamd.obj: tool_getparam.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassd.obj: tool_getpass.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpd.obj: tool_help.c - $(CCD) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersd.obj: tool_helpers.c - $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedird.obj: tool_homedir.c - $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpd.obj: tool_hugehelp.c - $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfod.obj: tool_libinfo.c - $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_maind.obj: tool_main.c - $(CCD) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkd.obj: tool_metalink.c - $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesd.obj: tool_mfiles.c - $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsd.obj: tool_msgs.c - $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operated.obj: tool_operate.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpd.obj: tool_operhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyd.obj: tool_panykey.c - $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpd.obj: tool_paramhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgd.obj: tool_parsecfg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptd.obj: tool_setopt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepd.obj: tool_sleep.c - $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobd.obj: tool_urlglob.c - $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utild.obj: tool_util.c - $(CCD) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsd.obj: tool_vms.c - $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvd.obj: tool_writeenv.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutd.obj: tool_writeout.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrd.obj: tool_xattr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c -curld.res : curl.rc - $(RCD) $(RESFLAGS) /Fo"$@" curl.rc - -clean: - @-erase $(PROGRAM_NAME) 2> NUL - @-erase $(RELEASE_OBJS) 2> NUL - @-erase $(DEBUG_OBJS) 2> NUL - @-erase *.idb 2> NUL - @-erase *.pdb 2> NUL - @-erase *.pch 2> NUL - @-erase *.ilk 2> NUL diff --git a/src/Makefile.vc8 b/src/Makefile.vc8 deleted file mode 100644 index e20950c..0000000 --- a/src/Makefile.vc8 +++ /dev/null @@ -1,550 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-users. - -############################################################# -# -## Makefile for building curl.exe with MSVC8 -## Use: nmake -f makefile.vc6 [release | debug] [CFG=release-ssl] -## (default is release) -## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL -## into curl.exe producing a standalone SSL-enabled executable. -## -# -############################################################# - -PROGRAM_NAME = curl.exe - -# ------------------------------------------- -# Verify that current subdir is curl's 'src' -# ------------------------------------------- - -!IF ! EXIST(.\tool_main.c) -! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory. -! MESSAGE Change to curl's 'src' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC8 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -######################################################## -## Nothing more to do below this line! - -ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)" -ZLIB_LIBS = zlib.lib -ZLIB_IMP_LIBS = zdll.lib - -SSL_CFLAGS = /DUSE_OPENSSL -SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32" -SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll" -SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib -WINLIBS = ws2_32.lib bufferoverflowu.lib wldap32.lib advapi32.lib - -WINSSL_CFLAGS = /DUSE_SCHANNEL -#WINSSL_LIBS = gdi32.lib user32.lib - -!IFDEF USE_IDN -WINLIBS = $(WINLIBS) normaliz.lib -!ENDIF - -# Runtime library configuration -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - -## Release -CCR = cl.exe $(RTLIB) /O2 /DNDEBUG -LINKR = link.exe /incremental:no /libpath:"../lib" -RCR = rc.exe /dDEBUGBUILD=0 - -## Debug -CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1 -LINKD = link.exe /incremental:yes /debug /libpath:"../lib" -RCD = rc.exe /dDEBUGBUILD=1 - -CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE) -RESFLAGS = /i../include - -# This manifest thing is for VC8, enabled by the maketgz script that -# builds the VC8 version of this makefile. Left commented out in the VC8 -# version! -#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1 - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -RELEASE_OBJS= \ - nonblockr.obj \ - strcaser.obj \ - strtoofftr.obj \ - warnless.obj \ - slist_wc.obj \ - tool_binmoder.obj \ - tool_bnamer.obj \ - tool_cb_dbgr.obj \ - tool_cb_hdrr.obj \ - tool_cb_prgr.obj \ - tool_cb_rear.obj \ - tool_cb_seer.obj \ - tool_cb_wrtr.obj \ - tool_cfgabler.obj \ - tool_convertr.obj \ - tool_dirhier.obj \ - tool_doswinr.obj \ - tool_easysrcr.obj \ - tool_formparser.obj \ - tool_getparamr.obj \ - tool_getpassr.obj \ - tool_helpr.obj \ - tool_helpersr.obj \ - tool_homedirr.obj \ - tool_hugehelpr.obj \ - tool_libinfor.obj \ - tool_mainr.obj \ - tool_metalinkr.obj \ - tool_mfilesr.obj \ - tool_msgsr.obj \ - tool_operater.obj \ - tool_operhlpr.obj \ - tool_panykeyr.obj \ - tool_paramhlpr.obj \ - tool_parsecfgr.obj \ - tool_setoptr.obj \ - tool_sleepr.obj \ - tool_urlglobr.obj \ - tool_utilr.obj \ - tool_vmsr.obj \ - tool_writeenvr.obj \ - tool_writeoutr.obj \ - tool_xattrr.obj \ - curlr.res - -DEBUG_OBJS= \ - nonblockd.obj \ - strcased.obj \ - strtoofftd.obj \ - warnlessd.obj \ - slist_wcd.obj \ - tool_binmoded.obj \ - tool_bnamed.obj \ - tool_cb_dbgd.obj \ - tool_cb_hdrd.obj \ - tool_cb_prgd.obj \ - tool_cb_read.obj \ - tool_cb_seed.obj \ - tool_cb_wrtd.obj \ - tool_cfgabled.obj \ - tool_convertd.obj \ - tool_dirhied.obj \ - tool_doswind.obj \ - tool_easysrcd.obj \ - tool_formparsed.obj \ - tool_getparamd.obj \ - tool_getpassd.obj \ - tool_helpd.obj \ - tool_helpersd.obj \ - tool_homedird.obj \ - tool_hugehelpd.obj \ - tool_libinfod.obj \ - tool_maind.obj \ - tool_metalinkd.obj \ - tool_mfilesd.obj \ - tool_msgsd.obj \ - tool_operated.obj \ - tool_operhlpd.obj \ - tool_panykeyd.obj \ - tool_paramhlpd.obj \ - tool_parsecfgd.obj \ - tool_setoptd.obj \ - tool_sleepd.obj \ - tool_urlglobd.obj \ - tool_utild.obj \ - tool_vmsd.obj \ - tool_writeenvd.obj \ - tool_writeoutd.obj \ - tool_xattrd.obj \ - curld.res - -################################################# -# If CFG not specified, use static libs - -CFLAGS = $(CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) - -################################################# -# release dynamic library - -!IF "$(CFG)" == "release-dll" -LINKLIBS = $(LIBCURL_IMP_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) -!ENDIF - -################################################# -# release static library with zlib - -!IF "$(CFG)" == "release-zlib" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl - -!IF "$(CFG)" == "release-ssl" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl - -!IF "$(CFG)" == "release-dll-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl and zlib - -!IF "$(CFG)" == "release-ssl-zlib" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with winssl and zlib - -!IF "$(CFG)" == "release-winssl-zlib" -CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl - -!IF "$(CFG)" == "release-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic zlib - -!IF "$(CFG)" == "release-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic zlib - -!IF "$(CFG)" == "release-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -LINKLIBS = $(LINKLIBS) $(WINLIBS) -LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS) - -all : release - -release: $(RELEASE_OBJS) - $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS) - $(MANIFESTTOOL) - -debug: $(DEBUG_OBJS) - $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS) - $(MANIFESTTOOL) - -## Release -nonblockr.obj: ../lib/nonblock.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcaser.obj: ../lib/strcase.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftr.obj: ../lib/strtoofft.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnless.obj: ../lib/warnless.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wc.obj: slist_wc.c - $(CCR) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoder.obj: tool_binmode.c - $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamer.obj: tool_bname.c - $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgr.obj: tool_cb_dbg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrr.obj: tool_cb_hdr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgr.obj: tool_cb_prg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_rear.obj: tool_cb_rea.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seer.obj: tool_cb_see.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtr.obj: tool_cb_wrt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabler.obj: tool_cfgable.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertr.obj: tool_convert.c - $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhier.obj: tool_dirhie.c - $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswinr.obj: tool_doswin.c - $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcr.obj: tool_easysrc.c - $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparser.obj: tool_formparse.c - $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamr.obj: tool_getparam.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassr.obj: tool_getpass.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpr.obj: tool_help.c - $(CCR) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersr.obj: tool_helpers.c - $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedirr.obj: tool_homedir.c - $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpr.obj: tool_hugehelp.c - $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfor.obj: tool_libinfo.c - $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_mainr.obj: tool_main.c - $(CCR) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkr.obj: tool_metalink.c - $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesr.obj: tool_mfiles.c - $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsr.obj: tool_msgs.c - $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operater.obj: tool_operate.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpr.obj: tool_operhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyr.obj: tool_panykey.c - $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpr.obj: tool_paramhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgr.obj: tool_parsecfg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptr.obj: tool_setopt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepr.obj: tool_sleep.c - $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobr.obj: tool_urlglob.c - $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utilr.obj: tool_util.c - $(CCR) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsr.obj: tool_vms.c - $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvr.obj: tool_writeenv.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutr.obj: tool_writeout.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrr.obj: tool_xattr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c -curlr.res : curl.rc - $(RCR) $(RESFLAGS) /Fo"$@" curl.rc - -## Debug -nonblockd.obj: ../lib/nonblock.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcased.obj: ../lib/strcase.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftd.obj: ../lib/strtoofft.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnlessd.obj: ../lib/warnless.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wcd.obj: slist_wc.c - $(CCD) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoded.obj: tool_binmode.c - $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamed.obj: tool_bname.c - $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgd.obj: tool_cb_dbg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrd.obj: tool_cb_hdr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgd.obj: tool_cb_prg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_read.obj: tool_cb_rea.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seed.obj: tool_cb_see.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtd.obj: tool_cb_wrt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabled.obj: tool_cfgable.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertd.obj: tool_convert.c - $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhied.obj: tool_dirhie.c - $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswind.obj: tool_doswin.c - $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcd.obj: tool_easysrc.c - $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparsed.obj: tool_formparse.c - $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamd.obj: tool_getparam.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassd.obj: tool_getpass.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpd.obj: tool_help.c - $(CCD) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersd.obj: tool_helpers.c - $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedird.obj: tool_homedir.c - $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpd.obj: tool_hugehelp.c - $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfod.obj: tool_libinfo.c - $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_maind.obj: tool_main.c - $(CCD) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkd.obj: tool_metalink.c - $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesd.obj: tool_mfiles.c - $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsd.obj: tool_msgs.c - $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operated.obj: tool_operate.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpd.obj: tool_operhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyd.obj: tool_panykey.c - $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpd.obj: tool_paramhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgd.obj: tool_parsecfg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptd.obj: tool_setopt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepd.obj: tool_sleep.c - $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobd.obj: tool_urlglob.c - $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utild.obj: tool_util.c - $(CCD) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsd.obj: tool_vms.c - $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvd.obj: tool_writeenv.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutd.obj: tool_writeout.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrd.obj: tool_xattr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c -curld.res : curl.rc - $(RCD) $(RESFLAGS) /Fo"$@" curl.rc - -clean: - @-erase $(PROGRAM_NAME) 2> NUL - @-erase $(RELEASE_OBJS) 2> NUL - @-erase $(DEBUG_OBJS) 2> NUL - @-erase *.idb 2> NUL - @-erase *.pdb 2> NUL - @-erase *.pch 2> NUL - @-erase *.ilk 2> NUL diff --git a/src/Makefile.vc9 b/src/Makefile.vc9 deleted file mode 100644 index aa0aa23..0000000 --- a/src/Makefile.vc9 +++ /dev/null @@ -1,550 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# All files in the Makefile.vc* series are generated automatically from the -# one made for MSVC version 6. Alas, if you want to do changes to any of the -# files and send back to the project, edit the version six, make your diff and -# mail curl-users. - -############################################################# -# -## Makefile for building curl.exe with MSVC9 -## Use: nmake -f makefile.vc9 [release | debug] [CFG=release-ssl] -## (default is release) -## "nmake -f makefile.vc9 CFG=release-ssl" statically links OpenSSL -## into curl.exe producing a standalone SSL-enabled executable. -## -# -############################################################# - -PROGRAM_NAME = curl.exe - -# ------------------------------------------- -# Verify that current subdir is curl's 'src' -# ------------------------------------------- - -!IF ! EXIST(.\tool_main.c) -! MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory. -! MESSAGE Change to curl's 'src' subdirectory, and try again. -! ERROR See previous message. -!ENDIF - -# ------------------------------------------------ -# Makefile.msvc.names provides libcurl file names -# ------------------------------------------------ - -!INCLUDE ..\winbuild\Makefile.msvc.names - - -!IFNDEF OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -!ENDIF - -!IFNDEF ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -!ENDIF - -!IFNDEF MACHINE -MACHINE = X86 -!ENDIF - -# USE_WINDOWS_SSPI uses windows libraries to allow NTLM authentication -# without an openssl installation and offers the ability to authenticate -# using the "current logged in user". Since at least with MSVC9 the sspi.h -# header is broken it is either required to install the Windows SDK, -# or to fix sspi.h with adding this define at the beginning of sspi.h: -# #define FreeCredentialHandle FreeCredentialsHandle -# -# If, for some reason the Windows SDK is installed but not installed -# in the default location, you can specify WINDOWS_SDK_PATH. -# It can be downloaded from: -# https://msdn.microsoft.com/windows/bb980924.aspx - -# WINDOWS_SSPI = 1 - -!IFDEF WINDOWS_SSPI -!IFNDEF WINDOWS_SDK_PATH -WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK" -!ENDIF -!ENDIF - -######################################################## -## Nothing more to do below this line! - -ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)" -ZLIB_LFLAGS = "/LIBPATH:$(ZLIB_PATH)" -ZLIB_LIBS = zlib.lib -ZLIB_IMP_LIBS = zdll.lib - -SSL_CFLAGS = /DUSE_OPENSSL -SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32" -SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll" -SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib -WINLIBS = ws2_32.lib wldap32.lib advapi32.lib - -WINSSL_CFLAGS = /DUSE_SCHANNEL -#WINSSL_LIBS = gdi32.lib user32.lib - -!IFDEF USE_IDN -WINLIBS = $(WINLIBS) normaliz.lib -!ENDIF - -# Runtime library configuration -RTLIB = /MD -RTLIBD = /MDd - -!IF "$(RTLIBCFG)" == "static" -RTLIB = /MT -RTLIBD = /MTd -!ENDIF - -## Release -CCR = cl.exe $(RTLIB) /O2 /DNDEBUG -LINKR = link.exe /incremental:no /libpath:"../lib" -RCR = rc.exe /dDEBUGBUILD=0 - -## Debug -CCD = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1 -LINKD = link.exe /incremental:yes /debug /libpath:"../lib" -RCD = rc.exe /dDEBUGBUILD=1 - -CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -LFLAGS = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE) -RESFLAGS = /i../include - -# This manifest thing is for VC8, enabled by the maketgz script that -# builds the VC8 version of this makefile. Left commented out in the VC9 -# version! -#MANIFESTTOOL = mt -manifest $(PROGRAM_NAME).manifest -outputresource:$(PROGRAM_NAME);1 - -!IFDEF WINDOWS_SSPI -CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include -!ENDIF - -RELEASE_OBJS= \ - nonblockr.obj \ - strcaser.obj \ - strtoofftr.obj \ - warnless.obj \ - slist_wc.obj \ - tool_binmoder.obj \ - tool_bnamer.obj \ - tool_cb_dbgr.obj \ - tool_cb_hdrr.obj \ - tool_cb_prgr.obj \ - tool_cb_rear.obj \ - tool_cb_seer.obj \ - tool_cb_wrtr.obj \ - tool_cfgabler.obj \ - tool_convertr.obj \ - tool_dirhier.obj \ - tool_doswinr.obj \ - tool_easysrcr.obj \ - tool_formparser.obj \ - tool_getparamr.obj \ - tool_getpassr.obj \ - tool_helpr.obj \ - tool_helpersr.obj \ - tool_homedirr.obj \ - tool_hugehelpr.obj \ - tool_libinfor.obj \ - tool_mainr.obj \ - tool_metalinkr.obj \ - tool_mfilesr.obj \ - tool_msgsr.obj \ - tool_operater.obj \ - tool_operhlpr.obj \ - tool_panykeyr.obj \ - tool_paramhlpr.obj \ - tool_parsecfgr.obj \ - tool_setoptr.obj \ - tool_sleepr.obj \ - tool_urlglobr.obj \ - tool_utilr.obj \ - tool_vmsr.obj \ - tool_writeenvr.obj \ - tool_writeoutr.obj \ - tool_xattrr.obj \ - curlr.res - -DEBUG_OBJS= \ - nonblockd.obj \ - strcased.obj \ - strtoofftd.obj \ - warnlessd.obj \ - slist_wcd.obj \ - tool_binmoded.obj \ - tool_bnamed.obj \ - tool_cb_dbgd.obj \ - tool_cb_hdrd.obj \ - tool_cb_prgd.obj \ - tool_cb_read.obj \ - tool_cb_seed.obj \ - tool_cb_wrtd.obj \ - tool_cfgabled.obj \ - tool_convertd.obj \ - tool_dirhied.obj \ - tool_doswind.obj \ - tool_easysrcd.obj \ - tool_formparsed.obj \ - tool_getparamd.obj \ - tool_getpassd.obj \ - tool_helpd.obj \ - tool_helpersd.obj \ - tool_homedird.obj \ - tool_hugehelpd.obj \ - tool_libinfod.obj \ - tool_maind.obj \ - tool_metalinkd.obj \ - tool_mfilesd.obj \ - tool_msgsd.obj \ - tool_operated.obj \ - tool_operhlpd.obj \ - tool_panykeyd.obj \ - tool_paramhlpd.obj \ - tool_parsecfgd.obj \ - tool_setoptd.obj \ - tool_sleepd.obj \ - tool_urlglobd.obj \ - tool_utild.obj \ - tool_vmsd.obj \ - tool_writeenvd.obj \ - tool_writeoutd.obj \ - tool_xattrd.obj \ - curld.res - -################################################# -# If CFG not specified, use static libs - -CFLAGS = $(CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) - -################################################# -# release dynamic library - -!IF "$(CFG)" == "release-dll" -LINKLIBS = $(LIBCURL_IMP_LIB_REL) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) -!ENDIF - -################################################# -# release static library with zlib - -!IF "$(CFG)" == "release-zlib" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl - -!IF "$(CFG)" == "release-ssl" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl - -!IF "$(CFG)" == "release-dll-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with ssl and zlib - -!IF "$(CFG)" == "release-ssl-zlib" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with winssl and zlib - -!IF "$(CFG)" == "release-winssl-zlib" -CFLAGS = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS) -LFLAGS = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl - -!IF "$(CFG)" == "release-ssl-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic zlib - -!IF "$(CFG)" == "release-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic zlib - -!IF "$(CFG)" == "release-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release static library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB -LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -################################################# -# release dynamic library with dynamic ssl and dynamic zlib - -!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll" -CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) -LINKLIBS = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS) -LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS) -!ENDIF - -LINKLIBS = $(LINKLIBS) $(WINLIBS) -LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS) - -all : release - -release: $(RELEASE_OBJS) - $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS) - $(MANIFESTTOOL) - -debug: $(DEBUG_OBJS) - $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS) - $(MANIFESTTOOL) - -## Release -nonblockr.obj: ../lib/nonblock.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcaser.obj: ../lib/strcase.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftr.obj: ../lib/strtoofft.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnless.obj: ../lib/warnless.c - $(CCR) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wc.obj: slist_wc.c - $(CCR) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoder.obj: tool_binmode.c - $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamer.obj: tool_bname.c - $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgr.obj: tool_cb_dbg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrr.obj: tool_cb_hdr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgr.obj: tool_cb_prg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_rear.obj: tool_cb_rea.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seer.obj: tool_cb_see.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtr.obj: tool_cb_wrt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabler.obj: tool_cfgable.c - $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertr.obj: tool_convert.c - $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhier.obj: tool_dirhie.c - $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswinr.obj: tool_doswin.c - $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcr.obj: tool_easysrc.c - $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparser.obj: tool_formparse.c - $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamr.obj: tool_getparam.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassr.obj: tool_getpass.c - $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpr.obj: tool_help.c - $(CCR) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersr.obj: tool_helpers.c - $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedirr.obj: tool_homedir.c - $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpr.obj: tool_hugehelp.c - $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfor.obj: tool_libinfo.c - $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_mainr.obj: tool_main.c - $(CCR) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkr.obj: tool_metalink.c - $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesr.obj: tool_mfiles.c - $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsr.obj: tool_msgs.c - $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operater.obj: tool_operate.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpr.obj: tool_operhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyr.obj: tool_panykey.c - $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpr.obj: tool_paramhlp.c - $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgr.obj: tool_parsecfg.c - $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptr.obj: tool_setopt.c - $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepr.obj: tool_sleep.c - $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobr.obj: tool_urlglob.c - $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utilr.obj: tool_util.c - $(CCR) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsr.obj: tool_vms.c - $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvr.obj: tool_writeenv.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutr.obj: tool_writeout.c - $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrr.obj: tool_xattr.c - $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c -curlr.res : curl.rc - $(RCR) $(RESFLAGS) /Fo"$@" curl.rc - -## Debug -nonblockd.obj: ../lib/nonblock.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c -strcased.obj: ../lib/strcase.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strcase.c -strtoofftd.obj: ../lib/strtoofft.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c -warnlessd.obj: ../lib/warnless.c - $(CCD) $(CFLAGS) /Fo"$@" ../lib/warnless.c -slist_wcd.obj: slist_wc.c - $(CCD) $(CFLAGS) /Fo"$@" slist_wc.c -tool_binmoded.obj: tool_binmode.c - $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c -tool_bnamed.obj: tool_bname.c - $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c -tool_cb_dbgd.obj: tool_cb_dbg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c -tool_cb_hdrd.obj: tool_cb_hdr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c -tool_cb_prgd.obj: tool_cb_prg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c -tool_cb_read.obj: tool_cb_rea.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c -tool_cb_seed.obj: tool_cb_see.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c -tool_cb_wrtd.obj: tool_cb_wrt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c -tool_cfgabled.obj: tool_cfgable.c - $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c -tool_convertd.obj: tool_convert.c - $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c -tool_dirhied.obj: tool_dirhie.c - $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c -tool_doswind.obj: tool_doswin.c - $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c -tool_easysrcd.obj: tool_easysrc.c - $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c -tool_formparsed.obj: tool_formparse.c - $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c -tool_getparamd.obj: tool_getparam.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c -tool_getpassd.obj: tool_getpass.c - $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c -tool_helpd.obj: tool_help.c - $(CCD) $(CFLAGS) /Fo"$@" tool_help.c -tool_helpersd.obj: tool_helpers.c - $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c -tool_homedird.obj: tool_homedir.c - $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c -tool_hugehelpd.obj: tool_hugehelp.c - $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c -tool_libinfod.obj: tool_libinfo.c - $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c -tool_maind.obj: tool_main.c - $(CCD) $(CFLAGS) /Fo"$@" tool_main.c -tool_metalinkd.obj: tool_metalink.c - $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c -tool_mfilesd.obj: tool_mfiles.c - $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c -tool_msgsd.obj: tool_msgs.c - $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c -tool_operated.obj: tool_operate.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c -tool_operhlpd.obj: tool_operhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c -tool_panykeyd.obj: tool_panykey.c - $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c -tool_paramhlpd.obj: tool_paramhlp.c - $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c -tool_parsecfgd.obj: tool_parsecfg.c - $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c -tool_setoptd.obj: tool_setopt.c - $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c -tool_sleepd.obj: tool_sleep.c - $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c -tool_urlglobd.obj: tool_urlglob.c - $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c -tool_utild.obj: tool_util.c - $(CCD) $(CFLAGS) /Fo"$@" tool_util.c -tool_vmsd.obj: tool_vms.c - $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c -tool_writeenvd.obj: tool_writeenv.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c -tool_writeoutd.obj: tool_writeout.c - $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c -tool_xattrd.obj: tool_xattr.c - $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c -curld.res : curl.rc - $(RCD) $(RESFLAGS) /Fo"$@" curl.rc - -clean: - @-erase $(PROGRAM_NAME) 2> NUL - @-erase $(RELEASE_OBJS) 2> NUL - @-erase $(DEBUG_OBJS) 2> NUL - @-erase *.idb 2> NUL - @-erase *.pdb 2> NUL - @-erase *.pch 2> NUL - @-erase *.ilk 2> NUL diff --git a/src/macos/MACINSTALL.TXT b/src/macos/MACINSTALL.TXT index ce4d1dc..2bab9fd 100644 --- a/src/macos/MACINSTALL.TXT +++ b/src/macos/MACINSTALL.TXT @@ -1 +1 @@ -MACOS (not MACOS X) =================== This is the first attempt at porting curl to MacOS. http, ftp, dict and telnet seems to work fine, other protocols and advanced features have not been all tested. This port is heavily based on the GUSI library from Matthias Neeracher. GUSI (Grand Unified Socket Interface) is a POSIX/Pthreads/Sockets library bringing some of the comforts of UNIX 98 to traditional MacOS. The latest GUSI release can be downloaded from sourceforge at I have also written a few functions to help port Unix applications to MacOS. These functions are part of the GUSI Extra library that can be downloaded at OpenSSL support is still experimental but I hope to deliver a version including SSL soon. curl for MacOS requires using the CodeWarrior compiler from Metrowerks. First download GUSI, GUSI Extra and curl. Access paths have been setup so that GUSI, GUSI Extra and curl directories should have the same parent directory. Follow the instructions in GUSI Extra "readme.txt" mainly the ones related to SIOUX and GUSI patches. If you do not apply these patches curl will not behave correctly. In the 'curl/src/macos' directory, decode "curl.mcp.xml.sit.hqx" (This is a stuffit binhexed file) From the CodeWarrior IDE, import 'curl/src/macos/curl.xml', adjust the access paths if required. Then you should be able to build: - the libcurl libraries for PPC and 68K. - the curl application (also available for PPC and 68K) which is the command line version of curl. If the file "tool_hugehelp.c" is missing rename "curl/src/tool_hugehelp.c.cvs" to "tool_hugehelp.c" and make sure its file type is 'TEXT' +MACOS (not MACOS X) =================== This is the first attempt at porting curl to MacOS. http, ftp, dict and telnet seems to work fine, other protocols and advanced features have not been all tested. This port is heavily based on the GUSI library from Matthias Neeracher. GUSI (Grand Unified Socket Interface) is a POSIX/Pthreads/Sockets library bringing some of the comforts of UNIX 98 to traditional MacOS. The latest GUSI release can be downloaded from sourceforge at I have also written a few functions to help port Unix applications to MacOS. These functions are part of the GUSI Extra library that can be downloaded at OpenSSL support is still experimental but I hope to deliver a version including SSL soon. curl for MacOS requires using the CodeWarrior compiler from Metrowerks. First download GUSI, GUSI Extra and curl. Access paths have been setup so that GUSI, GUSI Extra and curl directories should have the same parent directory. Follow the instructions in GUSI Extra "readme.txt" mainly the ones related to SIOUX and GUSI patches. If you do not apply these patches curl will not behave correctly. In the 'curl/src/macos' directory, decode "curl.mcp.xml.sit.hqx" (This is a stuffit binhexed file) From the CodeWarrior IDE, import 'curl/src/macos/curl.xml', adjust the access paths if required. Then you should be able to build: - the libcurl libraries for PPC and 68K. - the curl application (also available for PPC and 68K) which is the command line version of curl. If the file "tool_hugehelp.c" is missing rename "curl/src/tool_hugehelp.c.cvs" to "tool_hugehelp.c" and make sure its file type is 'TEXT' diff --git a/src/makefile.dj b/src/makefile.dj index c3bbc23..fbd2d37 100644 --- a/src/makefile.dj +++ b/src/makefile.dj @@ -53,8 +53,6 @@ endif EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a -CFLAGS += -DUSE_ENVIRONMENT - PROGRAM = curl.exe OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o)) diff --git a/src/mkhelp.pl b/src/mkhelp.pl old mode 100644 new mode 100755 index 74a4b82..757f024 --- a/src/mkhelp.pl +++ b/src/mkhelp.pl @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/env perl #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | @@ -36,7 +36,7 @@ if($ARGV[0] eq "-c") { my $README = $ARGV[0]; if($README eq "") { - print "usage: mkreadme.pl [-c] < manpage\n"; + print "usage: mkhelp.pl [-c] < manpage\n"; exit; } @@ -102,71 +102,53 @@ while() { } close(READ); -# if compressed -if($c) { - my @test = `gzip --version 2>&1`; - if($test[0] =~ /gzip/) { - open(GZIP, ">dumpit") || - die "can't create the dumpit file, try without -c"; - binmode GZIP; - for(@out) { - print GZIP $_; - $gzip += length($_); - } - close(GZIP); - - system("gzip --best --no-name dumpit"); - - open(GZIP, ") { - push @gzip, $_; - $gzipped += length($_); - } - close(GZIP); - - unlink("dumpit.gz"); - } - else { - # no gzip, no compression! - undef $c; - print STDERR "MEEEP: Couldn't find gzip, disable compression\n"; - } -} - -$now = localtime; print <import(); + 1; + }; + print STDERR "Warning: compression requested but Gzip is not available\n" if (!$c) +} + +if($c) +{ + my $content = join("", @out); + my $gzippedContent; + IO::Compress::Gzip::gzip( + \$content, \$gzippedContent, Level => 9, TextFlag => 1, Time=>0) or die "gzip failed:"; + $gzip = length($content); + $gzipped = length($gzippedContent); + print < #include "memdebug.h" /* keep this as LAST include */ static const unsigned char hugehelpgz[] = { /* This mumbo-jumbo is the huge help text compressed with gzip. - Thanks to this operation, the size of this data shrunk from $gzip + Thanks to this operation, the size of this data shrank from $gzip to $gzipped bytes. You can disable the use of compressed help texts by NOT passing -c to the mkhelp.pl tool. */ HEAD ; + my $c=0; print " "; - for(@gzip) { - my @all=split(//, $_); - for(@all) { - my $num=ord($_); - printf(" 0x%02x,", 0+$num); - if(++$c>11) { - print "\n "; - $c=0; - } + for(split(//, $gzippedContent)) { + my $num=ord($_); + printf(" 0x%02x,", 0+$num); + if(!(++$c % 12)) { + print "\n "; } } print "\n};\n"; diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c index 8e81f1b..aa1ef85 100644 --- a/src/tool_cb_dbg.c +++ b/src/tool_cb_dbg.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,6 +26,7 @@ #include "curlx.h" #include "tool_cfgable.h" +#include "tool_convert.h" #include "tool_msgs.h" #include "tool_cb_dbg.h" #include "tool_util.h" @@ -41,7 +42,7 @@ static void dump(const char *timebuf, const char *text, */ int tool_debug_cb(CURL *handle, curl_infotype type, - unsigned char *data, size_t size, + char *data, size_t size, void *userdata) { struct OperationConfig *operation = userdata; @@ -171,7 +172,8 @@ int tool_debug_cb(CURL *handle, curl_infotype type, if(memcmp(&data[i], "\r\n\r\n", 4) == 0) { /* dump everything through the CRLFCRLF as a sent header */ text = "=> Send header"; - dump(timebuf, text, output, data, i + 4, config->tracetype, type); + dump(timebuf, text, output, (unsigned char *)data, i + 4, + config->tracetype, type); data += i + 3; size -= i + 4; type = CURLINFO_DATA_OUT; @@ -185,6 +187,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, switch(type) { case CURLINFO_TEXT: fprintf(output, "%s== Info: %s", timebuf, data); + /* FALLTHROUGH */ default: /* in case a new one is introduced to shock us */ return 0; @@ -208,7 +211,8 @@ int tool_debug_cb(CURL *handle, curl_infotype type, break; } - dump(timebuf, text, output, data, size, config->tracetype, type); + dump(timebuf, text, output, (unsigned char *) data, size, config->tracetype, + type); return 0; } @@ -234,37 +238,40 @@ static void dump(const char *timebuf, const char *text, if(tracetype == TRACE_BIN) { /* hex not disabled, show it */ for(c = 0; c < width; c++) - if(i+c < size) - fprintf(stream, "%02x ", ptr[i+c]); + if(i + c < size) + fprintf(stream, "%02x ", ptr[i + c]); else fputs(" ", stream); } - for(c = 0; (c < width) && (i+c < size); c++) { + for(c = 0; (c < width) && (i + c < size); c++) { /* check for 0D0A; if found, skip past and start a new line of output */ if((tracetype == TRACE_ASCII) && - (i+c+1 < size) && (ptr[i+c] == 0x0D) && (ptr[i+c+1] == 0x0A)) { - i += (c+2-width); + (i + c + 1 < size) && (ptr[i + c] == 0x0D) && + (ptr[i + c + 1] == 0x0A)) { + i += (c + 2 - width); break; } #ifdef CURL_DOES_CONVERSIONS /* repeat the 0D0A check above but use the host encoding for CRLF */ if((tracetype == TRACE_ASCII) && - (i+c+1 < size) && (ptr[i+c] == '\r') && (ptr[i+c+1] == '\n')) { - i += (c+2-width); + (i + c + 1 < size) && (ptr[i + c] == '\r') && + (ptr[i + c + 1] == '\n')) { + i += (c + 2 - width); break; } /* convert to host encoding and print this character */ - fprintf(stream, "%c", convert_char(infotype, ptr[i+c])); + fprintf(stream, "%c", convert_char(infotype, ptr[i + c])); #else (void)infotype; - fprintf(stream, "%c", ((ptr[i+c] >= 0x20) && (ptr[i+c] < 0x80)) ? - ptr[i+c] : UNPRINTABLE_CHAR); + fprintf(stream, "%c", ((ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80)) ? + ptr[i + c] : UNPRINTABLE_CHAR); #endif /* CURL_DOES_CONVERSIONS */ /* check again for 0D0A, to avoid an extra \n if it's at width */ if((tracetype == TRACE_ASCII) && - (i+c+2 < size) && (ptr[i+c+1] == 0x0D) && (ptr[i+c+2] == 0x0A)) { - i += (c+3-width); + (i + c + 2 < size) && (ptr[i + c + 1] == 0x0D) && + (ptr[i + c + 2] == 0x0A)) { + i += (c + 3 - width); break; } } diff --git a/src/tool_cb_dbg.h b/src/tool_cb_dbg.h index 7ac15cf..c1cbc80 100644 --- a/src/tool_cb_dbg.h +++ b/src/tool_cb_dbg.h @@ -28,7 +28,7 @@ */ int tool_debug_cb(CURL *handle, curl_infotype type, - unsigned char *data, size_t size, + char *data, size_t size, void *userdata); #endif /* HEADER_CURL_TOOL_CB_DBG_H */ diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c index 3891b07..7f2181f 100644 --- a/src/tool_cb_hdr.c +++ b/src/tool_cb_hdr.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -40,7 +40,7 @@ static char *parse_filename(const char *ptr, size_t len); ** callback for CURLOPT_HEADERFUNCTION */ -size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata) +size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata) { struct HdrCbData *hdrcbdata = userdata; struct OutStruct *outs = hdrcbdata->outs; @@ -56,7 +56,7 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata) * it does not match then it fails with CURLE_WRITE_ERROR. So at this * point returning a value different from sz*nmemb indicates failure. */ - size_t failure = (size * nmemb) ? 0 : 1; + size_t failure = (size && nmemb) ? 0 : 1; if(!heads->config) return failure; @@ -128,8 +128,7 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata) hdrcbdata->honor_cd_filename = FALSE; break; } - else - return failure; + return failure; } } @@ -147,7 +146,7 @@ static char *parse_filename(const char *ptr, size_t len) char stop = '\0'; /* simple implementation of strndup() */ - copy = malloc(len+1); + copy = malloc(len + 1); if(!copy) return NULL; memcpy(copy, ptr, len); @@ -162,8 +161,13 @@ static char *parse_filename(const char *ptr, size_t len) else stop = ';'; + /* scan for the end letter and stop there */ + q = strchr(p, stop); + if(q) + *q = '\0'; + /* if the filename contains a path, only use filename portion */ - q = strrchr(copy, '/'); + q = strrchr(p, '/'); if(q) { p = q + 1; if(!*p) { @@ -184,14 +188,6 @@ static char *parse_filename(const char *ptr, size_t len) } } - /* scan for the end letter and stop there */ - for(q = p; *q; ++q) { - if(*q == stop) { - *q = '\0'; - break; - } - } - /* make sure the file name doesn't end in \r or \n */ q = strchr(p, '\r'); if(q) @@ -215,7 +211,7 @@ static char *parse_filename(const char *ptr, size_t len) } #endif /* MSDOS || WIN32 */ - /* in case we built debug enabled, we allow an evironment variable + /* in case we built debug enabled, we allow an environment variable * named CURL_TESTDIR to prefix the given file name to put it into a * specific directory */ diff --git a/src/tool_cb_hdr.h b/src/tool_cb_hdr.h index bb54bbb..32032e9 100644 --- a/src/tool_cb_hdr.h +++ b/src/tool_cb_hdr.h @@ -48,7 +48,7 @@ struct HdrCbData { ** callback for CURLOPT_HEADERFUNCTION */ -size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata); +size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata); #endif /* HEADER_CURL_TOOL_CB_HDR_H */ diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c index eae80fe..60a3804 100644 --- a/src/tool_cb_prg.c +++ b/src/tool_cb_prg.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -21,6 +21,10 @@ ***************************************************************************/ #include "tool_setup.h" +#ifdef HAVE_SYS_IOCTL_H +#include +#endif + #define ENABLE_CURLX_PRINTF /* use our own printf() functions */ #include "curlx.h" @@ -31,6 +35,71 @@ #include "memdebug.h" /* keep this as LAST include */ +#ifdef HAVE_TERMIOS_H +# include +#elif defined(HAVE_TERMIO_H) +# include +#endif + +/* 200 values generated by this perl code: + + my $pi = 3.1415; + foreach my $i (1 .. 200) { + printf "%d, ", sin($i/200 * 2 * $pi) * 5000 + 5000; + } +*/ +static const unsigned int sinus[] = { + 5157, 5313, 5470, 5626, 5782, 5936, 6090, 6243, 6394, 6545, 6693, 6840, 6985, + 7128, 7269, 7408, 7545, 7679, 7810, 7938, 8064, 8187, 8306, 8422, 8535, 8644, + 8750, 8852, 8950, 9045, 9135, 9221, 9303, 9381, 9454, 9524, 9588, 9648, 9704, + 9755, 9801, 9842, 9879, 9911, 9938, 9960, 9977, 9990, 9997, 9999, 9997, 9990, + 9977, 9960, 9938, 9911, 9879, 9842, 9801, 9755, 9704, 9648, 9588, 9524, 9455, + 9381, 9303, 9221, 9135, 9045, 8950, 8852, 8750, 8645, 8535, 8422, 8306, 8187, + 8064, 7939, 7810, 7679, 7545, 7409, 7270, 7129, 6986, 6841, 6694, 6545, 6395, + 6243, 6091, 5937, 5782, 5627, 5470, 5314, 5157, 5000, 4843, 4686, 4529, 4373, + 4218, 4063, 3909, 3757, 3605, 3455, 3306, 3159, 3014, 2871, 2730, 2591, 2455, + 2321, 2190, 2061, 1935, 1813, 1693, 1577, 1464, 1355, 1249, 1147, 1049, 955, + 864, 778, 696, 618, 545, 476, 411, 351, 295, 244, 198, 157, 120, 88, 61, 39, + 22, 9, 2, 0, 2, 9, 22, 39, 61, 88, 120, 156, 198, 244, 295, 350, 410, 475, + 544, 618, 695, 777, 864, 954, 1048, 1146, 1248, 1354, 1463, 1576, 1692, 1812, + 1934, 2060, 2188, 2320, 2454, 2590, 2729, 2870, 3013, 3158, 3305, 3454, 3604, + 3755, 3908, 4062, 4216, 4372, 4528, 4685, 4842, 4999 +}; + +static void fly(struct ProgressData *bar, bool moved) +{ + char buf[256]; + int pos; + int check = bar->width - 2; + + snprintf(buf, sizeof(buf), "%*s\r", bar->width-1, " "); + memcpy(&buf[bar->bar], "-=O=-", 5); + + pos = sinus[bar->tick%200] / (10000 / check); + buf[pos] = '#'; + pos = sinus[(bar->tick + 5)%200] / (10000 / check); + buf[pos] = '#'; + pos = sinus[(bar->tick + 10)%200] / (10000 / check); + buf[pos] = '#'; + pos = sinus[(bar->tick + 15)%200] / (10000 / check); + buf[pos] = '#'; + + fputs(buf, bar->out); + bar->tick += 2; + if(bar->tick >= 200) + bar->tick -= 200; + + bar->bar += (moved?bar->barmove:0); + if(bar->bar >= (bar->width - 6)) { + bar->barmove = -1; + bar->bar = bar->width - 6; + } + else if(bar->bar < 0) { + bar->barmove = 1; + bar->bar = 0; + } +} + /* ** callback for CURLOPT_XFERINFOFUNCTION */ @@ -44,7 +113,7 @@ int tool_progress_cb(void *clientp, /* The original progress-bar source code was written for curl by Lars Aas, and this new edition inherits some of his concepts. */ - char line[MAX_BARLENGTH+1]; + char line[MAX_BARLENGTH + 1]; char format[40]; double frac; double percent; @@ -61,29 +130,36 @@ int tool_progress_cb(void *clientp, /* we've come this far */ point = dlnow + ulnow + bar->initial_size; - if(bar->calls && (tvdiff(now, bar->prevtime) < 100L) && point < total) - /* after first call, limit progress-bar updating to 10 Hz */ - /* update when we're at 100% even if last update is less than 200ms ago */ - return 0; - - if(point > total) - /* we have got more than the expected total! */ - total = point; + if(bar->calls) { + /* after first call... */ + if(total) { + /* we know the total data to get... */ + if(bar->prev == point) + /* progress didn't change since last invoke */ + return 0; + else if((tvdiff(now, bar->prevtime) < 100L) && point < total) + /* limit progress-bar updating to 10 Hz except when we're at 100% */ + return 0; + } + else { + /* total is unknown */ + if(tvdiff(now, bar->prevtime) < 100L) + /* limit progress-bar updating to 10 Hz */ + return 0; + fly(bar, point != bar->prev); + } + } /* simply count invokes */ bar->calls++; - if(total < 1) { - curl_off_t prevblock = bar->prev / 1024; - curl_off_t thisblock = point / 1024; - while(thisblock > prevblock) { - fprintf(bar->out, "#"); - prevblock++; - } - } - else if(point != bar->prev) { + if((total > 0) && (point != bar->prev)) { + if(point > total) + /* we have got more than the expected total! */ + total = point; + frac = (double)point / (double)total; - percent = frac * 100.0f; + percent = frac * 100.0; barwidth = bar->width - 7; num = (int) (((double)barwidth) * frac); if(num > MAX_BARLENGTH) @@ -103,12 +179,7 @@ int tool_progress_cb(void *clientp, void progressbarinit(struct ProgressData *bar, struct OperationConfig *config) { -#ifdef __EMX__ - /* 20000318 mgs */ - int scr_size[2]; -#endif char *colp; - memset(bar, 0, sizeof(struct ProgressData)); /* pass this through to progress function so @@ -117,34 +188,51 @@ void progressbarinit(struct ProgressData *bar, if(config->use_resume) bar->initial_size = config->resume_from; -/* TODO: get terminal width through ansi escapes or something similar. - try to update width when xterm is resized... - 19990617 larsa */ -#ifndef __EMX__ - /* 20000318 mgs - * OS/2 users most likely won't have this env var set, and besides that - * we're using our own way to determine screen width */ colp = curlx_getenv("COLUMNS"); if(colp) { char *endptr; long num = strtol(colp, &endptr, 10); - if((endptr != colp) && (endptr == colp + strlen(colp)) && (num > 0)) + if((endptr != colp) && (endptr == colp + strlen(colp)) && (num > 20)) bar->width = (int)num; - else - bar->width = 79; curl_free(colp); } - else + + if(!bar->width) { + int cols = 0; + +#ifdef TIOCGSIZE + struct ttysize ts; + if(!ioctl(STDIN_FILENO, TIOCGSIZE, &ts)) + cols = ts.ts_cols; +#elif defined(TIOCGWINSZ) + struct winsize ts; + if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts)) + cols = ts.ws_col; +#elif defined(_WIN32) + { + HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE); + CONSOLE_SCREEN_BUFFER_INFO console_info; + + if((stderr_hnd != INVALID_HANDLE_VALUE) && + GetConsoleScreenBufferInfo(stderr_hnd, &console_info)) { + /* + * Do not use +1 to get the true screen-width since writing a + * character at the right edge will cause a line wrap. + */ + cols = (int) + (console_info.srWindow.Right - console_info.srWindow.Left); + } + } +#endif /* TIOCGSIZE */ + bar->width = cols; + } + + if(!bar->width) bar->width = 79; -#else - /* 20000318 mgs - * We use this emx library call to get the screen width, and subtract - * one from what we got in order to avoid a problem with the cursor - * advancing to the next line if we print a string that is as long as - * the screen is wide. */ - - _scrsize(scr_size); - bar->width = scr_size[0] - 1; -#endif + else if(bar->width > MAX_BARLENGTH) + bar->width = MAX_BARLENGTH; bar->out = config->global->errors; + bar->tick = 150; + bar->barmove = 1; } diff --git a/src/tool_cb_prg.h b/src/tool_cb_prg.h index d62b4a0..f8d6dea 100644 --- a/src/tool_cb_prg.h +++ b/src/tool_cb_prg.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -33,6 +33,9 @@ struct ProgressData { int width; FILE *out; /* where to write everything to */ curl_off_t initial_size; + unsigned int tick; + int bar; + int barmove; }; void progressbarinit(struct ProgressData *bar, diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c index 0413457..6716ba5 100644 --- a/src/tool_cb_wrt.c +++ b/src/tool_cb_wrt.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -72,11 +72,13 @@ bool tool_create_output_file(struct OutStruct *outs) ** callback for CURLOPT_WRITEFUNCTION */ -size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata) +size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) { size_t rc; struct OutStruct *outs = userdata; struct OperationConfig *config = outs->config; + size_t bytes = sz * nmemb; + bool is_tty = config->global->isatty; /* * Once that libcurl has called back tool_write_cb() the returned value @@ -84,21 +86,26 @@ size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata) * it does not match then it fails with CURLE_WRITE_ERROR. So at this * point returning a value different from sz*nmemb indicates failure. */ - const size_t failure = (sz * nmemb) ? 0 : 1; - - if(!config) - return failure; + const size_t failure = bytes ? 0 : 1; #ifdef DEBUGBUILD + { + char *tty = curlx_getenv("CURL_ISATTY"); + if(tty) { + is_tty = TRUE; + curl_free(tty); + } + } + if(config->include_headers) { - if(sz * nmemb > (size_t)CURL_MAX_HTTP_HEADER) { + if(bytes > (size_t)CURL_MAX_HTTP_HEADER) { warnf(config->global, "Header data size exceeds single call write " "limit!\n"); return failure; } } else { - if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) { + if(bytes > (size_t)CURL_MAX_WRITE_SIZE) { warnf(config->global, "Data size exceeds single call write limit!\n"); return failure; } @@ -137,11 +144,22 @@ size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata) if(!outs->stream && !tool_create_output_file(outs)) return failure; + if(is_tty && (outs->bytes < 2000) && !config->terminal_binary_ok) { + /* binary output to terminal? */ + if(memchr(buffer, 0, bytes)) { + warnf(config->global, "Binary output can mess up your terminal. " + "Use \"--output -\" to tell curl to output it to your terminal " + "anyway, or consider \"--output \" to save to a file.\n"); + config->synthetic_error = ERR_BINARY_TERMINAL; + return failure; + } + } + rc = fwrite(buffer, sz, nmemb, outs->stream); - if((sz * nmemb) == rc) + if(bytes == rc) /* we added this amount of data to the output */ - outs->bytes += (sz * nmemb); + outs->bytes += bytes; if(config->readbusy) { config->readbusy = FALSE; diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h index fc60be0..4ccbf3a 100644 --- a/src/tool_cb_wrt.h +++ b/src/tool_cb_wrt.h @@ -27,7 +27,7 @@ ** callback for CURLOPT_WRITEFUNCTION */ -size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata); +size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata); /* create a local file for writing, return TRUE on success */ bool tool_create_output_file(struct OutStruct *outs); diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c index f00a0d1..81e16c1 100644 --- a/src/tool_cfgable.c +++ b/src/tool_cfgable.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -42,6 +42,7 @@ void config_init(struct OperationConfig* config) config->proto_redir_present = FALSE; config->proto_default = NULL; config->tcp_nodelay = TRUE; /* enabled by default */ + config->happy_eyeballs_timeout_ms = CURL_HET_DEFAULT; } static void free_config_fields(struct OperationConfig *config) @@ -113,6 +114,7 @@ static void free_config_fields(struct OperationConfig *config) Curl_safefree(config->proxy_capath); Curl_safefree(config->crlfile); Curl_safefree(config->pinnedpubkey); + Curl_safefree(config->proxy_pinnedpubkey); Curl_safefree(config->proxy_crlfile); Curl_safefree(config->key); Curl_safefree(config->proxy_key); @@ -123,7 +125,7 @@ static void free_config_fields(struct OperationConfig *config) Curl_safefree(config->pubkey); Curl_safefree(config->hostpubmd5); Curl_safefree(config->engine); - + Curl_safefree(config->request_target); Curl_safefree(config->customrequest); Curl_safefree(config->krblevel); @@ -140,11 +142,11 @@ static void free_config_fields(struct OperationConfig *config) curl_slist_free_all(config->headers); curl_slist_free_all(config->proxyheaders); - if(config->httppost) { - curl_formfree(config->httppost); - config->httppost = NULL; + if(config->mimepost) { + curl_mime_free(config->mimepost); + config->mimepost = NULL; } - config->last_post = NULL; + config->mimecurrent = NULL; curl_slist_free_all(config->telnet_options); curl_slist_free_all(config->resolve); diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index 0d2f765..743ce72 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,6 +27,12 @@ #include "tool_metalink.h" +typedef enum { + ERR_NONE, + ERR_BINARY_TERMINAL = 1, /* binary to terminal detected */ + ERR_LAST +} curl_error; + struct GlobalConfig; struct OperationConfig { @@ -108,6 +114,7 @@ struct OperationConfig { struct getout *url_last; /* point to the last/current node */ struct getout *url_get; /* point to the node to fill in URL */ struct getout *url_out; /* point to the node to fill in outfile */ + struct getout *url_ul; /* point to the node to fill in upload */ char *cipher_list; char *proxy_cipher_list; char *cert; @@ -121,6 +128,7 @@ struct OperationConfig { char *crlfile; char *proxy_crlfile; char *pinnedpubkey; + char *proxy_pinnedpubkey; char *key; char *proxy_key; char *key_type; @@ -133,6 +141,7 @@ struct OperationConfig { bool crlf; char *customrequest; char *krblevel; + char *request_target; long httpversion; bool nobuffer; bool readbusy; /* set when reading input returns EAGAIN */ @@ -141,6 +150,7 @@ struct OperationConfig { bool insecure_ok; /* set TRUE to allow insecure SSL connects */ bool proxy_insecure_ok; /* set TRUE to allow insecure SSL connects for proxy */ + bool terminal_binary_ok; bool verifystatus; bool create_dirs; bool ftp_create_dirs; @@ -151,19 +161,19 @@ struct OperationConfig { bool proxybasic; bool proxyanyauth; char *writeout; /* %-styled format string to output */ - bool writeenv; /* write results to environment, if available */ struct curl_slist *quote; struct curl_slist *postquote; struct curl_slist *prequote; long ssl_version; + long ssl_version_max; long proxy_ssl_version; long ip_version; curl_TimeCond timecond; - time_t condtime; + curl_off_t condtime; struct curl_slist *headers; struct curl_slist *proxyheaders; - struct curl_httppost *httppost; - struct curl_httppost *last_post; + curl_mime *mimepost; + curl_mime *mimecurrent; struct curl_slist *telnet_options; struct curl_slist *resolve; struct curl_slist *connect_to; @@ -181,6 +191,7 @@ struct OperationConfig { char *preproxy; int socks5_gssapi_nec; /* The NEC reference server does not protect the encryption type exchange */ + unsigned long socks5_auth;/* auth bitmask for socks5 proxies */ char *proxy_service_name; /* set authentication service name for HTTP and SOCKS5 proxies */ char *service_name; /* set authentication service name for DIGEST-MD5, @@ -234,6 +245,13 @@ struct OperationConfig { bool falsestart; bool path_as_is; double expect100timeout; + bool suppress_connect_headers; /* suppress proxy CONNECT response headers + from user callbacks */ + curl_error synthetic_error; /* if non-zero, it overrides any libcurl + error */ + bool ssh_compression; /* enable/disable SSH compression */ + long happy_eyeballs_timeout_ms; /* happy eyeballs timeout in milliseconds. + 0 is valid. default: CURL_HET_DEFAULT. */ struct GlobalConfig *global; struct OperationConfig *prev; struct OperationConfig *next; /* Always last in the struct */ diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c index 23bb2cb..a01f9dc 100644 --- a/src/tool_dirhie.c +++ b/src/tool_dirhie.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -41,16 +41,16 @@ # endif #endif -#ifdef WIN32 +#if defined(WIN32) || (defined(MSDOS) && !defined(__DJGPP__)) # define mkdir(x,y) (mkdir)((x)) -# ifndef __POCC__ +# ifndef F_OK # define F_OK 0 # endif #endif static void show_dir_errno(FILE *errors, const char *name) { - switch(ERRNO) { + switch(errno) { #ifdef EACCES case EACCES: fprintf(errors, "You don't have permission to create %s.\n", name); @@ -91,7 +91,7 @@ static void show_dir_errno(FILE *errors, const char *name) * should create all the dir* automagically */ -#ifdef WIN32 +#if defined(WIN32) || defined(__DJGPP__) /* systems that may use either or when specifying a path */ #define PATH_DELIMITERS "\\/" #else diff --git a/src/tool_doswin.c b/src/tool_doswin.c index 48af3bf..9129998 100644 --- a/src/tool_doswin.c +++ b/src/tool_doswin.c @@ -646,24 +646,18 @@ CURLcode FindWin32CACert(struct OperationConfig *config, if(curlinfo->features & CURL_VERSION_SSL) { DWORD res_len; - DWORD buf_tchar_size = PATH_MAX + 1; - DWORD buf_bytes_size = sizeof(TCHAR) * buf_tchar_size; + char buf[PATH_MAX]; char *ptr = NULL; - char *buf = malloc(buf_bytes_size); - if(!buf) - return CURLE_OUT_OF_MEMORY; buf[0] = '\0'; - res_len = SearchPathA(NULL, bundle_file, NULL, buf_tchar_size, buf, &ptr); + res_len = SearchPathA(NULL, bundle_file, NULL, PATH_MAX, buf, &ptr); if(res_len > 0) { Curl_safefree(config->cacert); config->cacert = strdup(buf); if(!config->cacert) result = CURLE_OUT_OF_MEMORY; } - - Curl_safefree(buf); } return result; diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c index c2dccf9..cb30e40 100644 --- a/src/tool_easysrc.c +++ b/src/tool_easysrc.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -42,7 +42,7 @@ struct slist_wc *easysrc_data = NULL; /* Build slists, forms etc. */ struct slist_wc *easysrc_code = NULL; /* Setopt calls */ struct slist_wc *easysrc_toohard = NULL; /* Unconvertible setopt */ struct slist_wc *easysrc_clean = NULL; /* Clean up allocated data */ -int easysrc_form_count = 0; +int easysrc_mime_count = 0; int easysrc_slist_count = 0; static const char *const srchead[]={ @@ -141,11 +141,11 @@ CURLcode easysrc_perform(void) const char *c; CHKRET(easysrc_add(&easysrc_code, "")); /* Preamble comment */ - for(i=0; ((c = srchard[i]) != NULL); i++) + for(i = 0; ((c = srchard[i]) != NULL); i++) CHKRET(easysrc_add(&easysrc_code, c)); /* Each unconverted option */ if(easysrc_toohard) { - for(ptr=easysrc_toohard->first; ptr; ptr = ptr->next) + for(ptr = easysrc_toohard->first; ptr; ptr = ptr->next) CHKRET(easysrc_add(&easysrc_code, ptr->data)); } CHKRET(easysrc_add(&easysrc_code, "")); @@ -189,12 +189,12 @@ void dumpeasysrc(struct GlobalConfig *config) int i; const char *c; - for(i=0; ((c = srchead[i]) != NULL); i++) + for(i = 0; ((c = srchead[i]) != NULL); i++) fprintf(out, "%s\n", c); /* Declare variables used for complex setopt values */ if(easysrc_decl) { - for(ptr=easysrc_decl->first; ptr; ptr = ptr->next) + for(ptr = easysrc_decl->first; ptr; ptr = ptr->next) fprintf(out, " %s\n", ptr->data); } @@ -202,13 +202,13 @@ void dumpeasysrc(struct GlobalConfig *config) if(easysrc_data) { fprintf(out, "\n"); - for(ptr=easysrc_data->first; ptr; ptr = ptr->next) + for(ptr = easysrc_data->first; ptr; ptr = ptr->next) fprintf(out, " %s\n", ptr->data); } fprintf(out, "\n"); if(easysrc_code) { - for(ptr=easysrc_code->first; ptr; ptr = ptr->next) { + for(ptr = easysrc_code->first; ptr; ptr = ptr->next) { if(ptr->data[0]) { fprintf(out, " %s\n", ptr->data); } @@ -219,11 +219,11 @@ void dumpeasysrc(struct GlobalConfig *config) } if(easysrc_clean) { - for(ptr=easysrc_clean->first; ptr; ptr = ptr->next) + for(ptr = easysrc_clean->first; ptr; ptr = ptr->next) fprintf(out, " %s\n", ptr->data); } - for(i=0; ((c = srcend[i]) != NULL); i++) + for(i = 0; ((c = srcend[i]) != NULL); i++) fprintf(out, "%s\n", c); if(fopened) diff --git a/src/tool_easysrc.h b/src/tool_easysrc.h index 54607b8..fd799ab 100644 --- a/src/tool_easysrc.h +++ b/src/tool_easysrc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -32,7 +32,7 @@ extern struct slist_wc *easysrc_code; /* Setopt calls etc. */ extern struct slist_wc *easysrc_toohard; /* Unconvertible setopt */ extern struct slist_wc *easysrc_clean; /* Clean up (reverse order) */ -extern int easysrc_form_count; /* Number of curl_httppost variables */ +extern int easysrc_mime_count; /* Number of curl_mime variables */ extern int easysrc_slist_count; /* Number of curl_slist variables */ extern CURLcode easysrc_init(void); diff --git a/src/tool_filetime.c b/src/tool_filetime.c new file mode 100644 index 0000000..6071e44 --- /dev/null +++ b/src/tool_filetime.c @@ -0,0 +1,154 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +#include "tool_filetime.h" + +#ifdef HAVE_UTIME_H +# include +#elif defined(HAVE_SYS_UTIME_H) +# include +#endif + +curl_off_t getfiletime(const char *filename, FILE *error_stream) +{ + curl_off_t result = -1; + +/* Windows stat() may attempt to adjust the unix GMT file time by a daylight + saving time offset and since it's GMT that is bad behavior. When we have + access to a 64-bit type we can bypass stat and get the times directly. */ +#if defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8) + HANDLE hfile; + + hfile = CreateFileA(filename, FILE_READ_ATTRIBUTES, + (FILE_SHARE_READ | FILE_SHARE_WRITE | + FILE_SHARE_DELETE), + NULL, OPEN_EXISTING, 0, NULL); + if(hfile != INVALID_HANDLE_VALUE) { + FILETIME ft; + if(GetFileTime(hfile, NULL, NULL, &ft)) { + curl_off_t converted = (curl_off_t)ft.dwLowDateTime + | ((curl_off_t)ft.dwHighDateTime) << 32; + + if(converted < CURL_OFF_T_C(116444736000000000)) { + fprintf(error_stream, + "Failed to get filetime: underflow\n"); + } + else { + result = (converted - CURL_OFF_T_C(116444736000000000)) / 10000000; + } + } + else { + fprintf(error_stream, + "Failed to get filetime: " + "GetFileTime failed: GetLastError %u\n", + (unsigned int)GetLastError()); + } + CloseHandle(hfile); + } + else if(GetLastError() != ERROR_FILE_NOT_FOUND) { + fprintf(error_stream, + "Failed to get filetime: " + "CreateFile failed: GetLastError %u\n", + (unsigned int)GetLastError()); + } +#else + struct_stat statbuf; + if(-1 != stat(filename, &statbuf)) { + result = (curl_off_t)statbuf.st_mtime; + } + else if(errno != ENOENT) { + fprintf(error_stream, + "Failed to get filetime: %s\n", strerror(errno)); + } +#endif + return result; +} + +#if defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \ + (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8)) +void setfiletime(curl_off_t filetime, const char *filename, + FILE *error_stream) +{ + if(filetime >= 0) { +/* Windows utime() may attempt to adjust the unix GMT file time by a daylight + saving time offset and since it's GMT that is bad behavior. When we have + access to a 64-bit type we can bypass utime and set the times directly. */ +#if defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8) + HANDLE hfile; + + /* 910670515199 is the maximum unix filetime that can be used as a + Windows FILETIME without overflow: 30827-12-31T23:59:59. */ + if(filetime > CURL_OFF_T_C(910670515199)) { + fprintf(error_stream, + "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T + " on outfile: overflow\n", filetime); + return; + } + + hfile = CreateFileA(filename, FILE_WRITE_ATTRIBUTES, + (FILE_SHARE_READ | FILE_SHARE_WRITE | + FILE_SHARE_DELETE), + NULL, OPEN_EXISTING, 0, NULL); + if(hfile != INVALID_HANDLE_VALUE) { + curl_off_t converted = ((curl_off_t)filetime * 10000000) + + CURL_OFF_T_C(116444736000000000); + FILETIME ft; + ft.dwLowDateTime = (DWORD)(converted & 0xFFFFFFFF); + ft.dwHighDateTime = (DWORD)(converted >> 32); + if(!SetFileTime(hfile, NULL, &ft, &ft)) { + fprintf(error_stream, + "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T + " on outfile: SetFileTime failed: GetLastError %u\n", + filetime, (unsigned int)GetLastError()); + } + CloseHandle(hfile); + } + else { + fprintf(error_stream, + "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T + " on outfile: CreateFile failed: GetLastError %u\n", + filetime, (unsigned int)GetLastError()); + } + +#elif defined(HAVE_UTIMES) + struct timeval times[2]; + times[0].tv_sec = times[1].tv_sec = (time_t)filetime; + times[0].tv_usec = times[1].tv_usec = 0; + if(utimes(filename, times)) { + fprintf(error_stream, + "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T + " on outfile: %s\n", filetime, strerror(errno)); + } + +#elif defined(HAVE_UTIME) + struct utimbuf times; + times.actime = (time_t)filetime; + times.modtime = (time_t)filetime; + if(utime(filename, ×)) { + fprintf(error_stream, + "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T + " on outfile: %s\n", filetime, strerror(errno)); + } +#endif + } +} +#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \ + (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8)) */ diff --git a/src/tool_mfiles.h b/src/tool_filetime.h similarity index 56% rename from src/tool_mfiles.h rename to src/tool_filetime.h index 827f400..966a70b 100644 --- a/src/tool_mfiles.h +++ b/src/tool_filetime.h @@ -1,5 +1,5 @@ -#ifndef HEADER_CURL_TOOL_MFILES_H -#define HEADER_CURL_TOOL_MFILES_H +#ifndef HEADER_CURL_TOOL_FILETIME_H +#define HEADER_CURL_TOOL_FILETIME_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,24 +23,16 @@ ***************************************************************************/ #include "tool_setup.h" -/* - * Structure for storing the information needed to build - * a multiple files section. - */ +curl_off_t getfiletime(const char *filename, FILE *error_stream); -struct multi_files { - struct curl_forms form; - struct multi_files *next; -}; +#if defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \ + (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8)) +void setfiletime(curl_off_t filetime, const char *filename, + FILE *error_stream); +#else +#define setfiletime(a,b,c) Curl_nop_stmt +#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \ + (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8)) */ -struct multi_files *AddMultiFiles(const char *file_name, - const char *type_name, - const char *show_filename, - struct multi_files **multi_first, - struct multi_files **multi_last); - -void FreeMultiInfo(struct multi_files **multi_first, - struct multi_files **multi_last); - -#endif /* HEADER_CURL_TOOL_MFILES_H */ +#endif /* HEADER_CURL_TOOL_FILETIME_H */ diff --git a/src/tool_formparse.c b/src/tool_formparse.c index 88352fb..719e341 100644 --- a/src/tool_formparse.c +++ b/src/tool_formparse.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -21,6 +21,7 @@ ***************************************************************************/ #include "tool_setup.h" +#include "mime.h" #include "strcase.h" #define ENABLE_CURLX_PRINTF @@ -28,25 +29,35 @@ #include "curlx.h" #include "tool_cfgable.h" -#include "tool_mfiles.h" +#include "tool_convert.h" #include "tool_msgs.h" +#include "tool_binmode.h" +#include "tool_getparam.h" +#include "tool_paramhlp.h" #include "tool_formparse.h" #include "memdebug.h" /* keep this as LAST include */ +/* Stdin parameters. */ +typedef struct { + char *data; /* Memory data. */ + curl_off_t origin; /* File read origin offset. */ + curl_off_t size; /* Data size. */ + curl_off_t curpos; /* Current read position. */ +} standard_input; + /* * helper function to get a word from form param * after call get_parm_word, str either point to string end * or point to any of end chars. */ -static char *get_param_word(char **str, char **end_pos) +static char *get_param_word(char **str, char **end_pos, char endchar) { char *ptr = *str; char *word_begin = NULL; char *ptr2; char *escape = NULL; - const char *end_chars = ";,"; /* the first non-space char is here */ word_begin = ptr; @@ -76,10 +87,10 @@ static char *get_param_word(char **str, char **end_pos) while(ptr < *end_pos); *end_pos = ptr2; } - while(*ptr && NULL==strchr(end_chars, *ptr)) + while(*ptr && *ptr != ';' && *ptr != endchar) ++ptr; *str = ptr; - return word_begin+1; + return word_begin + 1; } ++ptr; } @@ -87,12 +98,407 @@ static char *get_param_word(char **str, char **end_pos) ptr = word_begin; } - while(*ptr && NULL==strchr(end_chars, *ptr)) + while(*ptr && *ptr != ';' && *ptr != endchar) ++ptr; *str = *end_pos = ptr; return word_begin; } +/* Append slist item and return -1 if failed. */ +static int slist_append(struct curl_slist **plist, const char *data) +{ + struct curl_slist *s = curl_slist_append(*plist, data); + + if(!s) + return -1; + + *plist = s; + return 0; +} + +/* Read headers from a file and append to list. */ +static int read_field_headers(struct OperationConfig *config, + const char *filename, FILE *fp, + struct curl_slist **pheaders) +{ + size_t hdrlen = 0; + size_t pos = 0; + int c; + bool incomment = FALSE; + int lineno = 1; + char hdrbuf[999]; /* Max. header length + 1. */ + + for(;;) { + c = getc(fp); + if(c == EOF || (!pos && !ISSPACE(c))) { + /* Strip and flush the current header. */ + while(hdrlen && ISSPACE(hdrbuf[hdrlen - 1])) + hdrlen--; + if(hdrlen) { + hdrbuf[hdrlen] = '\0'; + if(slist_append(pheaders, hdrbuf)) { + fprintf(config->global->errors, + "Out of memory for field headers!\n"); + return -1; + } + hdrlen = 0; + } + } + + switch(c) { + case EOF: + if(ferror(fp)) { + fprintf(config->global->errors, + "Header file %s read error: %s\n", filename, strerror(errno)); + return -1; + } + return 0; /* Done. */ + case '\r': + continue; /* Ignore. */ + case '\n': + pos = 0; + incomment = FALSE; + lineno++; + continue; + case '#': + if(!pos) + incomment = TRUE; + break; + } + + pos++; + if(!incomment) { + if(hdrlen == sizeof hdrbuf - 1) { + warnf(config->global, "File %s line %d: header too long (truncated)\n", + filename, lineno); + c = ' '; + } + if(hdrlen <= sizeof hdrbuf - 1) + hdrbuf[hdrlen++] = (char) c; + } + } + /* NOTREACHED */ +} + +static int get_param_part(struct OperationConfig *config, char endchar, + char **str, char **pdata, char **ptype, + char **pfilename, char **pencoder, + struct curl_slist **pheaders) +{ + char *p = *str; + char *type = NULL; + char *filename = NULL; + char *encoder = NULL; + char *endpos; + char *tp; + char sep; + char type_major[128] = ""; + char type_minor[128] = ""; + char *endct = NULL; + struct curl_slist *headers = NULL; + + if(ptype) + *ptype = NULL; + if(pfilename) + *pfilename = NULL; + if(pheaders) + *pheaders = NULL; + if(pencoder) + *pencoder = NULL; + while(ISSPACE(*p)) + p++; + tp = p; + *pdata = get_param_word(&p, &endpos, endchar); + /* If not quoted, strip trailing spaces. */ + if(*pdata == tp) + while(endpos > *pdata && ISSPACE(endpos[-1])) + endpos--; + sep = *p; + *endpos = '\0'; + while(sep == ';') { + while(ISSPACE(*++p)) + ; + + if(!endct && checkprefix("type=", p)) { + for(p += 5; ISSPACE(*p); p++) + ; + /* set type pointer */ + type = p; + + /* verify that this is a fine type specifier */ + if(2 != sscanf(type, "%127[^/ ]/%127[^;, \n]", type_major, type_minor)) { + warnf(config->global, "Illegally formatted content-type field!\n"); + curl_slist_free_all(headers); + return -1; /* illegal content-type syntax! */ + } + + /* now point beyond the content-type specifier */ + p = type + strlen(type_major) + strlen(type_minor) + 1; + for(endct = p; *p && *p != ';' && *p != endchar; p++) + if(!ISSPACE(*p)) + endct = p + 1; + sep = *p; + } + else if(checkprefix("filename=", p)) { + if(endct) { + *endct = '\0'; + endct = NULL; + } + for(p += 9; ISSPACE(*p); p++) + ; + tp = p; + filename = get_param_word(&p, &endpos, endchar); + /* If not quoted, strip trailing spaces. */ + if(filename == tp) + while(endpos > filename && ISSPACE(endpos[-1])) + endpos--; + sep = *p; + *endpos = '\0'; + } + else if(checkprefix("headers=", p)) { + if(endct) { + *endct = '\0'; + endct = NULL; + } + p += 8; + if(*p == '@' || *p == '<') { + char *hdrfile; + FILE *fp; + /* Read headers from a file. */ + + do { + p++; + } while(ISSPACE(*p)); + tp = p; + hdrfile = get_param_word(&p, &endpos, endchar); + /* If not quoted, strip trailing spaces. */ + if(hdrfile == tp) + while(endpos > hdrfile && ISSPACE(endpos[-1])) + endpos--; + sep = *p; + *endpos = '\0'; + /* TODO: maybe special fopen for VMS? */ + fp = fopen(hdrfile, FOPEN_READTEXT); + if(!fp) + warnf(config->global, "Cannot read from %s: %s\n", hdrfile, + strerror(errno)); + else { + int i = read_field_headers(config, hdrfile, fp, &headers); + + fclose(fp); + if(i) { + curl_slist_free_all(headers); + return -1; + } + } + } + else { + char *hdr; + + while(ISSPACE(*p)) + p++; + tp = p; + hdr = get_param_word(&p, &endpos, endchar); + /* If not quoted, strip trailing spaces. */ + if(hdr == tp) + while(endpos > hdr && ISSPACE(endpos[-1])) + endpos--; + sep = *p; + *endpos = '\0'; + if(slist_append(&headers, hdr)) { + fprintf(config->global->errors, "Out of memory for field header!\n"); + curl_slist_free_all(headers); + return -1; + } + } + } + else if(checkprefix("encoder=", p)) { + if(endct) { + *endct = '\0'; + endct = NULL; + } + for(p += 8; ISSPACE(*p); p++) + ; + tp = p; + encoder = get_param_word(&p, &endpos, endchar); + /* If not quoted, strip trailing spaces. */ + if(encoder == tp) + while(endpos > encoder && ISSPACE(endpos[-1])) + endpos--; + sep = *p; + *endpos = '\0'; + } + else if(endct) { + /* This is part of content type. */ + for(endct = p; *p && *p != ';' && *p != endchar; p++) + if(!ISSPACE(*p)) + endct = p + 1; + sep = *p; + } + else { + /* unknown prefix, skip to next block */ + char *unknown = get_param_word(&p, &endpos, endchar); + + sep = *p; + *endpos = '\0'; + if(*unknown) + warnf(config->global, "skip unknown form field: %s\n", unknown); + } + } + + /* Terminate content type. */ + if(endct) + *endct = '\0'; + + if(ptype) + *ptype = type; + else if(type) + warnf(config->global, "Field content type not allowed here: %s\n", type); + + if(pfilename) + *pfilename = filename; + else if(filename) + warnf(config->global, + "Field file name not allowed here: %s\n", filename); + + if(pencoder) + *pencoder = encoder; + else if(encoder) + warnf(config->global, + "Field encoder not allowed here: %s\n", encoder); + + if(pheaders) + *pheaders = headers; + else if(headers) { + warnf(config->global, + "Field headers not allowed here: %s\n", headers->data); + curl_slist_free_all(headers); + } + + *str = p; + return sep & 0xFF; +} + + +/* Mime part callbacks for stdin. */ +static size_t stdin_read(char *buffer, size_t size, size_t nitems, void *arg) +{ + standard_input *sip = (standard_input *) arg; + curl_off_t bytesleft; + (void) size; /* Always 1: ignored. */ + + if(sip->curpos >= sip->size) + return 0; /* At eof. */ + bytesleft = sip->size - sip->curpos; + if((curl_off_t) nitems > bytesleft) + nitems = (size_t) bytesleft; + if(sip->data) { + /* Return data from memory. */ + memcpy(buffer, sip->data + (size_t) sip->curpos, nitems); + } + else { + /* Read from stdin. */ + nitems = fread(buffer, 1, nitems, stdin); + } + sip->curpos += nitems; + return nitems; +} + +static int stdin_seek(void *instream, curl_off_t offset, int whence) +{ + standard_input *sip = (standard_input *) instream; + + switch(whence) { + case SEEK_CUR: + offset += sip->curpos; + break; + case SEEK_END: + offset += sip->size; + break; + } + if(offset < 0) + return CURL_SEEKFUNC_CANTSEEK; + if(!sip->data) { + if(fseek(stdin, (long) (offset + sip->origin), SEEK_SET)) + return CURL_SEEKFUNC_CANTSEEK; + } + sip->curpos = offset; + return CURL_SEEKFUNC_OK; +} + +static void stdin_free(void *ptr) +{ + standard_input *sip = (standard_input *) ptr; + + Curl_safefree(sip->data); + free(sip); +} + +/* Set a part's data from a file, taking care about the pseudo filename "-" as + * a shortcut to read stdin: if so, use a callback to read OUR stdin (to + * workaround Windows DLL file handle caveat). + * If stdin is a regular file opened in binary mode, save current offset as + * origin for rewind and do not buffer data. Else read to EOF and keep in + * memory. In all cases, compute the stdin data size. + */ +static CURLcode file_or_stdin(curl_mimepart *part, const char *file) +{ + standard_input *sip = NULL; + int fd = -1; + CURLcode result = CURLE_OK; + struct_stat sbuf; + + if(strcmp(file, "-")) + return curl_mime_filedata(part, file); + + sip = (standard_input *) malloc(sizeof *sip); + if(!sip) + return CURLE_OUT_OF_MEMORY; + + memset((char *) sip, 0, sizeof *sip); + set_binmode(stdin); + + /* If stdin is a regular file, do not buffer data but read it when needed. */ + fd = fileno(stdin); + sip->origin = ftell(stdin); + if(fd >= 0 && sip->origin >= 0 && !fstat(fd, &sbuf) && +#ifdef __VMS + sbuf.st_fab_rfm != FAB$C_VAR && sbuf.st_fab_rfm != FAB$C_VFC && +#endif + S_ISREG(sbuf.st_mode)) { + sip->size = sbuf.st_size - sip->origin; + if(sip->size < 0) + sip->size = 0; + } + else { /* Not suitable for direct use, buffer stdin data. */ + size_t stdinsize = 0; + + sip->origin = 0; + if(file2memory(&sip->data, &stdinsize, stdin) != PARAM_OK) + result = CURLE_OUT_OF_MEMORY; + else { + if(!stdinsize) + sip->data = NULL; /* Has been freed if no data. */ + sip->size = stdinsize; + if(ferror(stdin)) + result = CURLE_READ_ERROR; + } + } + + /* Set remote file name. */ + if(!result) + result = curl_mime_filename(part, file); + + /* Set part's data from callback. */ + if(!result) + result = curl_mime_data_cb(part, sip->size, + stdin_read, stdin_seek, stdin_free, sip); + if(result) + stdin_free(sip); + return result; +} + + /*************************************************************************** * * formparse() @@ -142,219 +548,316 @@ static char *get_param_word(char **str, char **end_pos) int formparse(struct OperationConfig *config, const char *input, - struct curl_httppost **httppost, - struct curl_httppost **last_post, + curl_mime **mimepost, + curl_mime **mimecurrent, bool literal_value) { - /* nextarg MUST be a string in the format 'name=contents' and we'll + /* input MUST be a string in the format 'name=contents' and we'll build a linked list with the info */ - char name[256]; + char *name = NULL; char *contents = NULL; - char type_major[128] = ""; - char type_minor[128] = ""; char *contp; - const char *type = NULL; - char *sep; - - if((1 == sscanf(input, "%255[^=]=", name)) && - ((contp = strchr(input, '=')) != NULL)) { - /* the input was using the correct format */ - - /* Allocate the contents */ - contents = strdup(contp+1); - if(!contents) { - fprintf(config->global->errors, "out of memory\n"); + char *data; + char *type = NULL; + char *filename = NULL; + char *encoder = NULL; + struct curl_slist *headers = NULL; + curl_mimepart *part = NULL; + CURLcode res; + int sep = '\0'; + + /* Allocate the main mime structure if needed. */ + if(!*mimepost) { + *mimepost = curl_mime_init(config->easy); + if(!*mimepost) { + warnf(config->global, "curl_mime_init failed!\n"); return 1; } - contp = contents; + *mimecurrent = *mimepost; + } - if('@' == contp[0] && !literal_value) { + /* Make a copy we can overwrite. */ + contents = strdup(input); + if(!contents) { + fprintf(config->global->errors, "out of memory\n"); + return 2; + } - /* we use the @-letter to indicate file name(s) */ + /* Scan for the end of the name. */ + contp = strchr(contents, '='); + if(contp) { + if(contp > contents) + name = contents; + *contp++ = '\0'; + + if(*contp == '(' && !literal_value) { + curl_mime *subparts; + + /* Starting a multipart. */ + sep = get_param_part(config, '\0', + &contp, &data, &type, NULL, NULL, &headers); + if(sep < 0) { + Curl_safefree(contents); + return 3; + } + subparts = curl_mime_init(config->easy); + if(!subparts) { + warnf(config->global, "curl_mime_init failed!\n"); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 4; + } + part = curl_mime_addpart(*mimecurrent); + if(!part) { + warnf(config->global, "curl_mime_addpart failed!\n"); + curl_mime_free(subparts); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 5; + } + if(curl_mime_subparts(part, subparts)) { + warnf(config->global, "curl_mime_subparts failed!\n"); + curl_mime_free(subparts); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 6; + } + *mimecurrent = subparts; + if(curl_mime_headers(part, headers, 1)) { + warnf(config->global, "curl_mime_headers failed!\n"); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 7; + } + if(curl_mime_type(part, type)) { + warnf(config->global, "curl_mime_type failed!\n"); + Curl_safefree(contents); + return 8; + } + } + else if(!name && !strcmp(contp, ")") && !literal_value) { + /* Ending a mutipart. */ + if(*mimecurrent == *mimepost) { + warnf(config->global, "no multipart to terminate!\n"); + Curl_safefree(contents); + return 9; + } + *mimecurrent = (*mimecurrent)->parent->parent; + } + else if('@' == contp[0] && !literal_value) { - struct multi_files *multi_start = NULL; - struct multi_files *multi_current = NULL; + /* we use the @-letter to indicate file name(s) */ - char *ptr = contp; - char *end = ptr + strlen(ptr); + curl_mime *subparts = NULL; do { /* since this was a file, it may have a content-type specifier at the end too, or a filename. Or both. */ - char *filename = NULL; - char *word_end; - bool semicolon; - - type = NULL; - - ++ptr; - contp = get_param_word(&ptr, &word_end); - semicolon = (';' == *ptr) ? TRUE : FALSE; - *word_end = '\0'; /* terminate the contp */ - - /* have other content, continue parse */ - while(semicolon) { - /* have type or filename field */ - ++ptr; - while(*ptr && (ISSPACE(*ptr))) - ++ptr; - - if(checkprefix("type=", ptr)) { - /* set type pointer */ - type = &ptr[5]; - - /* verify that this is a fine type specifier */ - if(2 != sscanf(type, "%127[^/]/%127[^;,\n]", - type_major, type_minor)) { - warnf(config->global, - "Illegally formatted content-type field!\n"); - Curl_safefree(contents); - FreeMultiInfo(&multi_start, &multi_current); - return 2; /* illegal content-type syntax! */ - } - - /* now point beyond the content-type specifier */ - sep = (char *)type + strlen(type_major)+strlen(type_minor)+1; - - /* there's a semicolon following - we check if it is a filename - specified and if not we simply assume that it is text that - the user wants included in the type and include that too up - to the next sep. */ - ptr = sep; - if(*sep==';') { - if(!checkprefix(";filename=", sep)) { - ptr = sep + 1; - (void)get_param_word(&ptr, &sep); - semicolon = (';' == *ptr) ? TRUE : FALSE; - } - } - else - semicolon = FALSE; + ++contp; + sep = get_param_part(config, ',', &contp, + &data, &type, &filename, &encoder, &headers); + if(sep < 0) { + if(subparts != *mimecurrent) + curl_mime_free(subparts); + Curl_safefree(contents); + return 10; + } - if(*sep) - *sep = '\0'; /* zero terminate type string */ - } - else if(checkprefix("filename=", ptr)) { - ptr += 9; - filename = get_param_word(&ptr, &word_end); - semicolon = (';' == *ptr) ? TRUE : FALSE; - *word_end = '\0'; - } + /* now contp point to comma or string end. + If more files to come, make sure we have multiparts. */ + if(!subparts) { + if(sep != ',') /* If there is a single file. */ + subparts = *mimecurrent; else { - /* unknown prefix, skip to next block */ - char *unknown = NULL; - unknown = get_param_word(&ptr, &word_end); - semicolon = (';' == *ptr) ? TRUE : FALSE; - if(*unknown) { - *word_end = '\0'; - warnf(config->global, "skip unknown form field: %s\n", unknown); + subparts = curl_mime_init(config->easy); + if(!subparts) { + warnf(config->global, "curl_mime_init failed!\n"); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 11; } } } - /* now ptr point to comma or string end */ + /* Allocate a part for that file. */ + part = curl_mime_addpart(subparts); + if(!part) { + warnf(config->global, "curl_mime_addpart failed!\n"); + if(subparts != *mimecurrent) + curl_mime_free(subparts); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 12; + } - /* if type == NULL curl_formadd takes care of the problem */ + /* Set part headers. */ + if(curl_mime_headers(part, headers, 1)) { + warnf(config->global, "curl_mime_headers failed!\n"); + if(subparts != *mimecurrent) + curl_mime_free(subparts); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 13; + } - if(*contp && !AddMultiFiles(contp, type, filename, &multi_start, - &multi_current)) { - warnf(config->global, "Error building form post!\n"); + /* Setup file in part. */ + res = file_or_stdin(part, data); + if(res) { + warnf(config->global, "setting file %s failed!\n", data); + if(res != CURLE_READ_ERROR) { + if(subparts != *mimecurrent) + curl_mime_free(subparts); + Curl_safefree(contents); + return 14; + } + } + if(filename && curl_mime_filename(part, filename)) { + warnf(config->global, "curl_mime_filename failed!\n"); + if(subparts != *mimecurrent) + curl_mime_free(subparts); + Curl_safefree(contents); + return 15; + } + if(curl_mime_type(part, type)) { + warnf(config->global, "curl_mime_type failed!\n"); + if(subparts != *mimecurrent) + curl_mime_free(subparts); + Curl_safefree(contents); + return 16; + } + if(curl_mime_encoder(part, encoder)) { + warnf(config->global, "curl_mime_encoder failed!\n"); + if(subparts != *mimecurrent) + curl_mime_free(subparts); Curl_safefree(contents); - FreeMultiInfo(&multi_start, &multi_current); - return 3; + return 17; } - /* *ptr could be '\0', so we just check with the string end */ - } while(ptr < end); /* loop if there's another file name */ + /* *contp could be '\0', so we just check with the delimiter */ + } while(sep); /* loop if there's another file name */ /* now we add the multiple files section */ - if(multi_start) { - struct curl_forms *forms = NULL; - struct multi_files *start = multi_start; - unsigned int i, count = 0; - while(start) { - start = start->next; - ++count; - } - forms = malloc((count+1)*sizeof(struct curl_forms)); - if(!forms) { - fprintf(config->global->errors, "Error building form post!\n"); + if(subparts != *mimecurrent) { + part = curl_mime_addpart(*mimecurrent); + if(!part) { + warnf(config->global, "curl_mime_addpart failed!\n"); + curl_mime_free(subparts); Curl_safefree(contents); - FreeMultiInfo(&multi_start, &multi_current); - return 4; - } - for(i = 0, start = multi_start; i < count; ++i, start = start->next) { - forms[i].option = start->form.option; - forms[i].value = start->form.value; + return 18; } - forms[count].option = CURLFORM_END; - FreeMultiInfo(&multi_start, &multi_current); - if(curl_formadd(httppost, last_post, - CURLFORM_COPYNAME, name, - CURLFORM_ARRAY, forms, CURLFORM_END) != 0) { - warnf(config->global, "curl_formadd failed!\n"); - Curl_safefree(forms); + if(curl_mime_subparts(part, subparts)) { + warnf(config->global, "curl_mime_subparts failed!\n"); + curl_mime_free(subparts); Curl_safefree(contents); - return 5; + return 19; } - Curl_safefree(forms); } } else { - struct curl_forms info[4]; - int i = 0; - char *ct = literal_value ? NULL : strstr(contp, ";type="); - - info[i].option = CURLFORM_COPYNAME; - info[i].value = name; - i++; - - if(ct) { - info[i].option = CURLFORM_CONTENTTYPE; - info[i].value = &ct[6]; - i++; - ct[0] = '\0'; /* zero terminate here */ - } + /* Allocate a mime part. */ + part = curl_mime_addpart(*mimecurrent); + if(!part) { + warnf(config->global, "curl_mime_addpart failed!\n"); + Curl_safefree(contents); + return 20; + } - if(contp[0]=='<' && !literal_value) { - info[i].option = CURLFORM_FILECONTENT; - info[i].value = contp+1; - i++; - info[i].option = CURLFORM_END; + if(*contp == '<' && !literal_value) { + ++contp; + sep = get_param_part(config, '\0', &contp, + &data, &type, NULL, &encoder, &headers); + if(sep < 0) { + Curl_safefree(contents); + return 21; + } - if(curl_formadd(httppost, last_post, - CURLFORM_ARRAY, info, CURLFORM_END) != 0) { - warnf(config->global, "curl_formadd failed, possibly the file %s is " - "bad!\n", contp + 1); + /* Set part headers. */ + if(curl_mime_headers(part, headers, 1)) { + warnf(config->global, "curl_mime_headers failed!\n"); + curl_slist_free_all(headers); Curl_safefree(contents); - return 6; + return 22; + } + + /* Setup file in part. */ + res = file_or_stdin(part, data); + if(res) { + warnf(config->global, "setting file %s failed!\n", data); + if(res != CURLE_READ_ERROR) { + Curl_safefree(contents); + return 23; + } } } else { + if(literal_value) + data = contp; + else { + sep = get_param_part(config, '\0', &contp, + &data, &type, &filename, &encoder, &headers); + if(sep < 0) { + Curl_safefree(contents); + return 24; + } + } + + /* Set part headers. */ + if(curl_mime_headers(part, headers, 1)) { + warnf(config->global, "curl_mime_headers failed!\n"); + curl_slist_free_all(headers); + Curl_safefree(contents); + return 25; + } + #ifdef CURL_DOES_CONVERSIONS - if(convert_to_network(contp, strlen(contp))) { + if(convert_to_network(data, strlen(data))) { warnf(config->global, "curl_formadd failed!\n"); Curl_safefree(contents); - return 7; + return 26; } #endif - info[i].option = CURLFORM_COPYCONTENTS; - info[i].value = contp; - i++; - info[i].option = CURLFORM_END; - if(curl_formadd(httppost, last_post, - CURLFORM_ARRAY, info, CURLFORM_END) != 0) { - warnf(config->global, "curl_formadd failed!\n"); + + if(curl_mime_data(part, data, CURL_ZERO_TERMINATED)) { + warnf(config->global, "curl_mime_data failed!\n"); Curl_safefree(contents); - return 8; + return 27; } } + + if(curl_mime_filename(part, filename)) { + warnf(config->global, "curl_mime_filename failed!\n"); + Curl_safefree(contents); + return 28; + } + if(curl_mime_type(part, type)) { + warnf(config->global, "curl_mime_type failed!\n"); + Curl_safefree(contents); + return 29; + } + if(curl_mime_encoder(part, encoder)) { + warnf(config->global, "curl_mime_encoder failed!\n"); + Curl_safefree(contents); + return 30; + } + + if(sep) { + *contp = (char) sep; + warnf(config->global, + "garbage at end of field specification: %s\n", contp); + } } + /* Set part name. */ + if(name && curl_mime_name(part, name)) { + warnf(config->global, "curl_mime_name failed!\n"); + Curl_safefree(contents); + return 31; + } } else { warnf(config->global, "Illegally formatted input field!\n"); - return 1; + Curl_safefree(contents); + return 32; } Curl_safefree(contents); return 0; diff --git a/src/tool_formparse.h b/src/tool_formparse.h index ce7a292..a52b98d 100644 --- a/src/tool_formparse.h +++ b/src/tool_formparse.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,8 +25,8 @@ int formparse(struct OperationConfig *config, const char *input, - struct curl_httppost **httppost, - struct curl_httppost **last_post, + curl_mime **mimepost, + curl_mime **mimecurrent, bool literal_value); #endif /* HEADER_CURL_TOOL_FORMPARSE_H */ diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 686b01d..7ce9c28 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -30,6 +30,8 @@ #include "tool_binmode.h" #include "tool_cfgable.h" #include "tool_cb_prg.h" +#include "tool_convert.h" +#include "tool_filetime.h" #include "tool_formparse.h" #include "tool_getparam.h" #include "tool_helpers.h" @@ -60,244 +62,253 @@ struct LongShort { const char *letter; /* short name option */ const char *lname; /* long name option */ - bool extraparam; /* whether it takes an additional argument */ + enum { + ARG_NONE, /* stand-alone but not a boolean */ + ARG_BOOL, /* accepts a --no-[name] prefix */ + ARG_STRING /* requires an argument */ + } desc; }; static const struct LongShort aliases[]= { /* 'letter' strings with more than one character have *no* short option to mention. */ - {"*@", "url", TRUE}, - {"*4", "dns-ipv4-addr", TRUE}, - {"*6", "dns-ipv6-addr", TRUE}, - {"*a", "random-file", TRUE}, - {"*b", "egd-file", TRUE}, - {"*B", "oauth2-bearer", TRUE}, - {"*c", "connect-timeout", TRUE}, - {"*d", "ciphers", TRUE}, - {"*D", "dns-interface", TRUE}, - {"*e", "disable-epsv", FALSE}, - {"*E", "epsv", FALSE}, + {"*@", "url", ARG_STRING}, + {"*4", "dns-ipv4-addr", ARG_STRING}, + {"*6", "dns-ipv6-addr", ARG_STRING}, + {"*a", "random-file", ARG_STRING}, + {"*b", "egd-file", ARG_STRING}, + {"*B", "oauth2-bearer", ARG_STRING}, + {"*c", "connect-timeout", ARG_STRING}, + {"*d", "ciphers", ARG_STRING}, + {"*D", "dns-interface", ARG_STRING}, + {"*e", "disable-epsv", ARG_BOOL}, + {"*E", "epsv", ARG_BOOL}, /* 'epsv' made like this to make --no-epsv and --epsv to work although --disable-epsv is the documented option */ -#ifdef USE_ENVIRONMENT - {"*f", "environment", FALSE}, -#endif - {"*F", "dns-servers", TRUE}, - {"*g", "trace", TRUE}, - {"*G", "npn", FALSE}, - {"*h", "trace-ascii", TRUE}, - {"*H", "alpn", FALSE}, - {"*i", "limit-rate", TRUE}, - {"*j", "compressed", FALSE}, - {"*J", "tr-encoding", FALSE}, - {"*k", "digest", FALSE}, - {"*l", "negotiate", FALSE}, - {"*m", "ntlm", FALSE}, - {"*M", "ntlm-wb", FALSE}, - {"*n", "basic", FALSE}, - {"*o", "anyauth", FALSE}, + {"*F", "dns-servers", ARG_STRING}, + {"*g", "trace", ARG_STRING}, + {"*G", "npn", ARG_BOOL}, + {"*h", "trace-ascii", ARG_STRING}, + {"*H", "alpn", ARG_BOOL}, + {"*i", "limit-rate", ARG_STRING}, + {"*j", "compressed", ARG_BOOL}, + {"*J", "tr-encoding", ARG_BOOL}, + {"*k", "digest", ARG_BOOL}, + {"*l", "negotiate", ARG_BOOL}, + {"*m", "ntlm", ARG_BOOL}, + {"*M", "ntlm-wb", ARG_BOOL}, + {"*n", "basic", ARG_BOOL}, + {"*o", "anyauth", ARG_BOOL}, #ifdef USE_WATT32 - {"*p", "wdebug", FALSE}, + {"*p", "wdebug", ARG_BOOL}, #endif - {"*q", "ftp-create-dirs", FALSE}, - {"*r", "create-dirs", FALSE}, - {"*s", "max-redirs", TRUE}, - {"*t", "proxy-ntlm", FALSE}, - {"*u", "crlf", FALSE}, - {"*v", "stderr", TRUE}, - {"*w", "interface", TRUE}, - {"*x", "krb", TRUE}, - {"*x", "krb4", TRUE}, + {"*q", "ftp-create-dirs", ARG_BOOL}, + {"*r", "create-dirs", ARG_BOOL}, + {"*s", "max-redirs", ARG_STRING}, + {"*t", "proxy-ntlm", ARG_BOOL}, + {"*u", "crlf", ARG_BOOL}, + {"*v", "stderr", ARG_STRING}, + {"*w", "interface", ARG_STRING}, + {"*x", "krb", ARG_STRING}, + {"*x", "krb4", ARG_STRING}, /* 'krb4' is the previous name */ - {"*y", "max-filesize", TRUE}, - {"*z", "disable-eprt", FALSE}, - {"*Z", "eprt", FALSE}, + {"*y", "max-filesize", ARG_STRING}, + {"*z", "disable-eprt", ARG_BOOL}, + {"*Z", "eprt", ARG_BOOL}, /* 'eprt' made like this to make --no-eprt and --eprt to work although --disable-eprt is the documented option */ - {"*~", "xattr", FALSE}, - {"$a", "ftp-ssl", FALSE}, + {"*~", "xattr", ARG_BOOL}, + {"$a", "ftp-ssl", ARG_BOOL}, /* 'ftp-ssl' deprecated name since 7.20.0 */ - {"$a", "ssl", FALSE}, + {"$a", "ssl", ARG_BOOL}, /* 'ssl' new option name in 7.20.0, previously this was ftp-ssl */ - {"$b", "ftp-pasv", FALSE}, - {"$c", "socks5", TRUE}, - {"$d", "tcp-nodelay", FALSE}, - {"$e", "proxy-digest", FALSE}, - {"$f", "proxy-basic", FALSE}, - {"$g", "retry", TRUE}, - {"$V", "retry-connrefused", FALSE}, - {"$h", "retry-delay", TRUE}, - {"$i", "retry-max-time", TRUE}, - {"$k", "proxy-negotiate", FALSE}, - {"$m", "ftp-account", TRUE}, - {"$n", "proxy-anyauth", FALSE}, - {"$o", "trace-time", FALSE}, - {"$p", "ignore-content-length", FALSE}, - {"$q", "ftp-skip-pasv-ip", FALSE}, - {"$r", "ftp-method", TRUE}, - {"$s", "local-port", TRUE}, - {"$t", "socks4", TRUE}, - {"$T", "socks4a", TRUE}, - {"$u", "ftp-alternative-to-user", TRUE}, - {"$v", "ftp-ssl-reqd", FALSE}, + {"$b", "ftp-pasv", ARG_BOOL}, + {"$c", "socks5", ARG_STRING}, + {"$d", "tcp-nodelay", ARG_BOOL}, + {"$e", "proxy-digest", ARG_BOOL}, + {"$f", "proxy-basic", ARG_BOOL}, + {"$g", "retry", ARG_STRING}, + {"$V", "retry-connrefused", ARG_BOOL}, + {"$h", "retry-delay", ARG_STRING}, + {"$i", "retry-max-time", ARG_STRING}, + {"$k", "proxy-negotiate", ARG_BOOL}, + {"$m", "ftp-account", ARG_STRING}, + {"$n", "proxy-anyauth", ARG_BOOL}, + {"$o", "trace-time", ARG_BOOL}, + {"$p", "ignore-content-length", ARG_BOOL}, + {"$q", "ftp-skip-pasv-ip", ARG_BOOL}, + {"$r", "ftp-method", ARG_STRING}, + {"$s", "local-port", ARG_STRING}, + {"$t", "socks4", ARG_STRING}, + {"$T", "socks4a", ARG_STRING}, + {"$u", "ftp-alternative-to-user", ARG_STRING}, + {"$v", "ftp-ssl-reqd", ARG_BOOL}, /* 'ftp-ssl-reqd' deprecated name since 7.20.0 */ - {"$v", "ssl-reqd", FALSE}, + {"$v", "ssl-reqd", ARG_BOOL}, /* 'ssl-reqd' new in 7.20.0, previously this was ftp-ssl-reqd */ - {"$w", "sessionid", FALSE}, + {"$w", "sessionid", ARG_BOOL}, /* 'sessionid' listed as --no-sessionid in the help */ - {"$x", "ftp-ssl-control", FALSE}, - {"$y", "ftp-ssl-ccc", FALSE}, - {"$j", "ftp-ssl-ccc-mode", TRUE}, - {"$z", "libcurl", TRUE}, - {"$#", "raw", FALSE}, - {"$0", "post301", FALSE}, - {"$1", "keepalive", FALSE}, + {"$x", "ftp-ssl-control", ARG_BOOL}, + {"$y", "ftp-ssl-ccc", ARG_BOOL}, + {"$j", "ftp-ssl-ccc-mode", ARG_STRING}, + {"$z", "libcurl", ARG_STRING}, + {"$#", "raw", ARG_BOOL}, + {"$0", "post301", ARG_BOOL}, + {"$1", "keepalive", ARG_BOOL}, /* 'keepalive' listed as --no-keepalive in the help */ - {"$2", "socks5-hostname", TRUE}, - {"$3", "keepalive-time", TRUE}, - {"$4", "post302", FALSE}, - {"$5", "noproxy", TRUE}, - {"$7", "socks5-gssapi-nec", FALSE}, - {"$8", "proxy1.0", TRUE}, - {"$9", "tftp-blksize", TRUE}, - {"$A", "mail-from", TRUE}, - {"$B", "mail-rcpt", TRUE}, - {"$C", "ftp-pret", FALSE}, - {"$D", "proto", TRUE}, - {"$E", "proto-redir", TRUE}, - {"$F", "resolve", TRUE}, - {"$G", "delegation", TRUE}, - {"$H", "mail-auth", TRUE}, - {"$I", "post303", FALSE}, - {"$J", "metalink", FALSE}, - {"$K", "sasl-ir", FALSE}, - {"$L", "test-event", FALSE}, - {"$M", "unix-socket", TRUE}, - {"$N", "path-as-is", FALSE}, - {"$O", "socks5-gssapi-service", TRUE}, + {"$2", "socks5-hostname", ARG_STRING}, + {"$3", "keepalive-time", ARG_STRING}, + {"$4", "post302", ARG_BOOL}, + {"$5", "noproxy", ARG_STRING}, + {"$7", "socks5-gssapi-nec", ARG_BOOL}, + {"$8", "proxy1.0", ARG_STRING}, + {"$9", "tftp-blksize", ARG_STRING}, + {"$A", "mail-from", ARG_STRING}, + {"$B", "mail-rcpt", ARG_STRING}, + {"$C", "ftp-pret", ARG_BOOL}, + {"$D", "proto", ARG_STRING}, + {"$E", "proto-redir", ARG_STRING}, + {"$F", "resolve", ARG_STRING}, + {"$G", "delegation", ARG_STRING}, + {"$H", "mail-auth", ARG_STRING}, + {"$I", "post303", ARG_BOOL}, + {"$J", "metalink", ARG_BOOL}, + {"$K", "sasl-ir", ARG_BOOL}, + {"$L", "test-event", ARG_BOOL}, + {"$M", "unix-socket", ARG_STRING}, + {"$N", "path-as-is", ARG_BOOL}, + {"$O", "socks5-gssapi-service", ARG_STRING}, /* 'socks5-gssapi-service' merged with'proxy-service-name' and deprecated since 7.49.0 */ - {"$O", "proxy-service-name", TRUE}, - {"$P", "service-name", TRUE}, - {"$Q", "proto-default", TRUE}, - {"$R", "expect100-timeout", TRUE}, - {"$S", "tftp-no-options", FALSE}, - {"$U", "connect-to", TRUE}, - {"$W", "abstract-unix-socket", TRUE}, - {"0", "http1.0", FALSE}, - {"01", "http1.1", FALSE}, - {"02", "http2", FALSE}, - {"03", "http2-prior-knowledge", FALSE}, - {"1", "tlsv1", FALSE}, - {"10", "tlsv1.0", FALSE}, - {"11", "tlsv1.1", FALSE}, - {"12", "tlsv1.2", FALSE}, - {"13", "tlsv1.3", FALSE}, - {"2", "sslv2", FALSE}, - {"3", "sslv3", FALSE}, - {"4", "ipv4", FALSE}, - {"6", "ipv6", FALSE}, - {"a", "append", FALSE}, - {"A", "user-agent", TRUE}, - {"b", "cookie", TRUE}, - {"B", "use-ascii", FALSE}, - {"c", "cookie-jar", TRUE}, - {"C", "continue-at", TRUE}, - {"d", "data", TRUE}, - {"dr", "data-raw", TRUE}, - {"da", "data-ascii", TRUE}, - {"db", "data-binary", TRUE}, - {"de", "data-urlencode", TRUE}, - {"D", "dump-header", TRUE}, - {"e", "referer", TRUE}, - {"E", "cert", TRUE}, - {"Ea", "cacert", TRUE}, - {"Eb", "cert-type", TRUE}, - {"Ec", "key", TRUE}, - {"Ed", "key-type", TRUE}, - {"Ee", "pass", TRUE}, - {"Ef", "engine", TRUE}, - {"Eg", "capath", TRUE}, - {"Eh", "pubkey", TRUE}, - {"Ei", "hostpubmd5", TRUE}, - {"Ej", "crlfile", TRUE}, - {"Ek", "tlsuser", TRUE}, - {"El", "tlspassword", TRUE}, - {"Em", "tlsauthtype", TRUE}, - {"En", "ssl-allow-beast", FALSE}, - {"Eo", "login-options", TRUE}, - {"Ep", "pinnedpubkey", TRUE}, - {"Eq", "cert-status", FALSE}, - {"Er", "false-start", FALSE}, - {"Es", "ssl-no-revoke", FALSE}, - {"Et", "tcp-fastopen", FALSE}, - {"Eu", "proxy-tlsuser", TRUE}, - {"Ev", "proxy-tlspassword", TRUE}, - {"Ew", "proxy-tlsauthtype", TRUE}, - {"Ex", "proxy-cert", TRUE}, - {"Ey", "proxy-cert-type", TRUE}, - {"Ez", "proxy-key", TRUE}, - {"E0", "proxy-key-type", TRUE}, - {"E1", "proxy-pass", TRUE}, - {"E2", "proxy-ciphers", TRUE}, - {"E3", "proxy-crlfile", TRUE}, - {"E4", "proxy-ssl-allow-beast", FALSE}, - {"E5", "login-options", TRUE}, - {"E6", "proxy-cacert", TRUE}, - {"E7", "proxy-capath", TRUE}, - {"E8", "proxy-insecure", FALSE}, - {"E9", "proxy-tlsv1", FALSE}, - {"f", "fail", FALSE}, - {"fa", "fail-early", FALSE}, - {"F", "form", TRUE}, - {"Fs", "form-string", TRUE}, - {"g", "globoff", FALSE}, - {"G", "get", FALSE}, - {"h", "help", FALSE}, - {"H", "header", TRUE}, - {"Hp", "proxy-header", TRUE}, - {"i", "include", FALSE}, - {"I", "head", FALSE}, - {"j", "junk-session-cookies", FALSE}, - {"J", "remote-header-name", FALSE}, - {"k", "insecure", FALSE}, - {"K", "config", TRUE}, - {"l", "list-only", FALSE}, - {"L", "location", FALSE}, - {"Lt", "location-trusted", FALSE}, - {"m", "max-time", TRUE}, - {"M", "manual", FALSE}, - {"n", "netrc", FALSE}, - {"no", "netrc-optional", FALSE}, - {"ne", "netrc-file", TRUE}, - {"N", "buffer", FALSE}, + {"$O", "proxy-service-name", ARG_STRING}, + {"$P", "service-name", ARG_STRING}, + {"$Q", "proto-default", ARG_STRING}, + {"$R", "expect100-timeout", ARG_STRING}, + {"$S", "tftp-no-options", ARG_BOOL}, + {"$U", "connect-to", ARG_STRING}, + {"$W", "abstract-unix-socket", ARG_STRING}, + {"$X", "tls-max", ARG_STRING}, + {"$Y", "suppress-connect-headers", ARG_BOOL}, + {"$Z", "compressed-ssh", ARG_BOOL}, + {"$~", "happy-eyeballs-timeout-ms", ARG_STRING}, + {"0", "http1.0", ARG_NONE}, + {"01", "http1.1", ARG_NONE}, + {"02", "http2", ARG_NONE}, + {"03", "http2-prior-knowledge", ARG_NONE}, + {"1", "tlsv1", ARG_NONE}, + {"10", "tlsv1.0", ARG_NONE}, + {"11", "tlsv1.1", ARG_NONE}, + {"12", "tlsv1.2", ARG_NONE}, + {"13", "tlsv1.3", ARG_NONE}, + {"2", "sslv2", ARG_NONE}, + {"3", "sslv3", ARG_NONE}, + {"4", "ipv4", ARG_NONE}, + {"6", "ipv6", ARG_NONE}, + {"a", "append", ARG_BOOL}, + {"A", "user-agent", ARG_STRING}, + {"b", "cookie", ARG_STRING}, + {"B", "use-ascii", ARG_BOOL}, + {"c", "cookie-jar", ARG_STRING}, + {"C", "continue-at", ARG_STRING}, + {"d", "data", ARG_STRING}, + {"dr", "data-raw", ARG_STRING}, + {"da", "data-ascii", ARG_STRING}, + {"db", "data-binary", ARG_STRING}, + {"de", "data-urlencode", ARG_STRING}, + {"D", "dump-header", ARG_STRING}, + {"e", "referer", ARG_STRING}, + {"E", "cert", ARG_STRING}, + {"Ea", "cacert", ARG_STRING}, + {"Eb", "cert-type", ARG_STRING}, + {"Ec", "key", ARG_STRING}, + {"Ed", "key-type", ARG_STRING}, + {"Ee", "pass", ARG_STRING}, + {"Ef", "engine", ARG_STRING}, + {"Eg", "capath", ARG_STRING}, + {"Eh", "pubkey", ARG_STRING}, + {"Ei", "hostpubmd5", ARG_STRING}, + {"Ej", "crlfile", ARG_STRING}, + {"Ek", "tlsuser", ARG_STRING}, + {"El", "tlspassword", ARG_STRING}, + {"Em", "tlsauthtype", ARG_STRING}, + {"En", "ssl-allow-beast", ARG_BOOL}, + {"Eo", "login-options", ARG_STRING}, + {"Ep", "pinnedpubkey", ARG_STRING}, + {"EP", "proxy-pinnedpubkey", ARG_STRING}, + {"Eq", "cert-status", ARG_BOOL}, + {"Er", "false-start", ARG_BOOL}, + {"Es", "ssl-no-revoke", ARG_BOOL}, + {"Et", "tcp-fastopen", ARG_BOOL}, + {"Eu", "proxy-tlsuser", ARG_STRING}, + {"Ev", "proxy-tlspassword", ARG_STRING}, + {"Ew", "proxy-tlsauthtype", ARG_STRING}, + {"Ex", "proxy-cert", ARG_STRING}, + {"Ey", "proxy-cert-type", ARG_STRING}, + {"Ez", "proxy-key", ARG_STRING}, + {"E0", "proxy-key-type", ARG_STRING}, + {"E1", "proxy-pass", ARG_STRING}, + {"E2", "proxy-ciphers", ARG_STRING}, + {"E3", "proxy-crlfile", ARG_STRING}, + {"E4", "proxy-ssl-allow-beast", ARG_BOOL}, + {"E5", "login-options", ARG_STRING}, + {"E6", "proxy-cacert", ARG_STRING}, + {"E7", "proxy-capath", ARG_STRING}, + {"E8", "proxy-insecure", ARG_BOOL}, + {"E9", "proxy-tlsv1", ARG_NONE}, + {"EA", "socks5-basic", ARG_BOOL}, + {"EB", "socks5-gssapi", ARG_BOOL}, + {"f", "fail", ARG_BOOL}, + {"fa", "fail-early", ARG_BOOL}, + {"F", "form", ARG_STRING}, + {"Fs", "form-string", ARG_STRING}, + {"g", "globoff", ARG_BOOL}, + {"G", "get", ARG_NONE}, + {"Ga", "request-target", ARG_STRING}, + {"h", "help", ARG_BOOL}, + {"H", "header", ARG_STRING}, + {"Hp", "proxy-header", ARG_STRING}, + {"i", "include", ARG_BOOL}, + {"I", "head", ARG_BOOL}, + {"j", "junk-session-cookies", ARG_BOOL}, + {"J", "remote-header-name", ARG_BOOL}, + {"k", "insecure", ARG_BOOL}, + {"K", "config", ARG_STRING}, + {"l", "list-only", ARG_BOOL}, + {"L", "location", ARG_BOOL}, + {"Lt", "location-trusted", ARG_BOOL}, + {"m", "max-time", ARG_STRING}, + {"M", "manual", ARG_BOOL}, + {"n", "netrc", ARG_BOOL}, + {"no", "netrc-optional", ARG_BOOL}, + {"ne", "netrc-file", ARG_STRING}, + {"N", "buffer", ARG_BOOL}, /* 'buffer' listed as --no-buffer in the help */ - {"o", "output", TRUE}, - {"O", "remote-name", FALSE}, - {"Oa", "remote-name-all", FALSE}, - {"p", "proxytunnel", FALSE}, - {"P", "ftp-port", TRUE}, - {"q", "disable", FALSE}, - {"Q", "quote", TRUE}, - {"r", "range", TRUE}, - {"R", "remote-time", FALSE}, - {"s", "silent", FALSE}, - {"S", "show-error", FALSE}, - {"t", "telnet-option", TRUE}, - {"T", "upload-file", TRUE}, - {"u", "user", TRUE}, - {"U", "proxy-user", TRUE}, - {"v", "verbose", FALSE}, - {"V", "version", FALSE}, - {"w", "write-out", TRUE}, - {"x", "proxy", TRUE}, - {"xa", "preproxy", TRUE}, - {"X", "request", TRUE}, - {"Y", "speed-limit", TRUE}, - {"y", "speed-time", TRUE}, - {"z", "time-cond", TRUE}, - {"#", "progress-bar", FALSE}, - {":", "next", FALSE}, + {"o", "output", ARG_STRING}, + {"O", "remote-name", ARG_NONE}, + {"Oa", "remote-name-all", ARG_BOOL}, + {"p", "proxytunnel", ARG_BOOL}, + {"P", "ftp-port", ARG_STRING}, + {"q", "disable", ARG_BOOL}, + {"Q", "quote", ARG_STRING}, + {"r", "range", ARG_STRING}, + {"R", "remote-time", ARG_BOOL}, + {"s", "silent", ARG_BOOL}, + {"S", "show-error", ARG_BOOL}, + {"t", "telnet-option", ARG_STRING}, + {"T", "upload-file", ARG_STRING}, + {"u", "user", ARG_STRING}, + {"U", "proxy-user", ARG_STRING}, + {"v", "verbose", ARG_BOOL}, + {"V", "version", ARG_BOOL}, + {"w", "write-out", ARG_STRING}, + {"x", "proxy", ARG_STRING}, + {"xa", "preproxy", ARG_STRING}, + {"X", "request", ARG_STRING}, + {"Y", "speed-limit", ARG_STRING}, + {"y", "speed-time", ARG_STRING}, + {"z", "time-cond", ARG_STRING}, + {"#", "progress-bar", ARG_BOOL}, + {":", "next", ARG_NONE}, }; /* Split the argument of -E to 'certname' and 'passphrase' separated by colon. @@ -416,10 +427,62 @@ GetFileAndPassword(char *nextarg, char **file, char **password) cleanarg(nextarg); } -ParameterError getparameter(char *flag, /* f or -long-flag */ - char *nextarg, /* NULL if unset */ - bool *usedarg, /* set to TRUE if the arg - has been used */ +/* Get a size parameter for '--limit-rate' or '--max-filesize'. + * We support a 'G', 'M' or 'K' suffix too. + */ +static ParameterError GetSizeParameter(struct GlobalConfig *global, + const char *arg, + const char *which, + curl_off_t *value_out) +{ + char *unit; + curl_off_t value; + + if(curlx_strtoofft(arg, &unit, 0, &value)) { + warnf(global, "invalid number specified for %s\n", which); + return PARAM_BAD_USE; + } + + if(!*unit) + unit = (char *)"b"; + else if(strlen(unit) > 1) + unit = (char *)"w"; /* unsupported */ + + switch(*unit) { + case 'G': + case 'g': + if(value > (CURL_OFF_T_MAX / (1024*1024*1024))) + return PARAM_NUMBER_TOO_LARGE; + value *= 1024*1024*1024; + break; + case 'M': + case 'm': + if(value > (CURL_OFF_T_MAX / (1024*1024))) + return PARAM_NUMBER_TOO_LARGE; + value *= 1024*1024; + break; + case 'K': + case 'k': + if(value > (CURL_OFF_T_MAX / 1024)) + return PARAM_NUMBER_TOO_LARGE; + value *= 1024; + break; + case 'b': + case 'B': + /* for plain bytes, leave as-is */ + break; + default: + warnf(global, "unsupported %s unit. Use G, M, K or B!\n", which); + return PARAM_BAD_USE; + } + *value_out = value; + return PARAM_OK; +} + +ParameterError getparameter(const char *flag, /* f or -long-flag */ + char *nextarg, /* NULL if unset */ + bool *usedarg, /* set to TRUE if the arg + has been used */ struct GlobalConfig *global, struct OperationConfig *config) { @@ -436,11 +499,12 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ bool toggle = TRUE; /* how to switch boolean options, on or off. Controlled by using --OPTION or --no-OPTION */ + *usedarg = FALSE; /* default is that we don't use the arg */ if(('-' != flag[0]) || (('-' == flag[0]) && ('-' == flag[1]))) { /* this should be a long name */ - char *word = ('-' == flag[0]) ? flag+2 : flag; + const char *word = ('-' == flag[0]) ? flag + 2 : flag; size_t fnam = strlen(word); int numhits = 0; @@ -483,13 +547,12 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ if(!longopt) { letter = (char)*parse; - subletter='\0'; + subletter = '\0'; } else { letter = parse[0]; subletter = parse[1]; } - *usedarg = FALSE; /* default is that we don't use the arg */ if(hit < 0) { for(j = 0; j < sizeof(aliases)/sizeof(aliases[0]); j++) { @@ -503,7 +566,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } } - if(aliases[hit].extraparam) { + if(aliases[hit].desc == ARG_STRING) { /* this option requires an extra parameter */ if(!longopt && parse[1]) { nextarg = (char *)&parse[1]; /* this is the actual extra parameter */ @@ -514,6 +577,8 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ else *usedarg = TRUE; /* mark it as used */ } + else if((aliases[hit].desc == ARG_NONE) && !toggle) + return PARAM_NO_PREFIX; switch(letter) { case '*': /* options without a short option */ @@ -536,7 +601,8 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ GetStr(&config->oauth_bearer, nextarg); break; case 'c': /* connect-timeout */ - err = str2udouble(&config->connecttimeout, nextarg); + err = str2udouble(&config->connecttimeout, nextarg, + LONG_MAX/1000); if(err) return err; break; @@ -553,11 +619,6 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ case 'E': /* --epsv */ config->disable_epsv = (!toggle)?TRUE:FALSE; break; -#ifdef USE_ENVIRONMENT - case 'f': - config->writeenv = toggle; - break; -#endif case 'F': /* --dns-servers */ /* IP addrs of DNS servers */ GetStr(&config->dns_servers, nextarg); @@ -583,43 +644,19 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'i': /* --limit-rate */ { - /* We support G, M, K too */ - char *unit; - curl_off_t value = curlx_strtoofft(nextarg, &unit, 0); - - if(!*unit) - unit = (char *)"b"; - else if(strlen(unit) > 1) - unit = (char *)"w"; /* unsupported */ - - switch(*unit) { - case 'G': - case 'g': - value *= 1024*1024*1024; - break; - case 'M': - case 'm': - value *= 1024*1024; - break; - case 'K': - case 'k': - value *= 1024; - break; - case 'b': - case 'B': - /* for plain bytes, leave as-is */ - break; - default: - warnf(global, "unsupported rate unit. Use G, M, K or B!\n"); - return PARAM_BAD_USE; - } + curl_off_t value; + ParameterError pe = GetSizeParameter(global, nextarg, "rate", &value); + + if(pe != PARAM_OK) + return pe; config->recvpersecond = value; config->sendpersecond = value; } break; case 'j': /* --compressed */ - if(toggle && !(curlinfo->features & CURL_VERSION_LIBZ)) + if(toggle && + !(curlinfo->features & (CURL_VERSION_LIBZ | CURL_VERSION_BROTLI))) return PARAM_LIBCURL_DOESNT_SUPPORT; config->encoding = toggle; break; @@ -743,9 +780,15 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ return PARAM_LIBCURL_DOESNT_SUPPORT; break; case 'y': /* --max-filesize */ - err = str2offset(&config->max_filesize, nextarg); - if(err) - return err; + { + curl_off_t value; + ParameterError pe = + GetSizeParameter(global, nextarg, "max-filesize", &value); + + if(pe != PARAM_OK) + return pe; + config->max_filesize = value; + } break; case 'z': /* --disable-eprt */ config->disable_eprt = toggle; @@ -777,15 +820,14 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ url = config->url_get; else /* there was no free node, create one! */ - url = new_getout(config); + config->url_get = url = new_getout(config); if(!url) return PARAM_NO_MEM; - else { - /* fill in the URL */ - GetStr(&url->url, nextarg); - url->flags |= GETOUT_URL; - } + + /* fill in the URL */ + GetStr(&url->url, nextarg); + url->flags |= GETOUT_URL; } } break; @@ -876,7 +918,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ &config->localportrange); if(!rc) return PARAM_BAD_USE; - else if(rc == 1) + if(rc == 1) config->localportrange = 1; /* default number of ports to try */ else { config->localportrange -= config->localport; @@ -995,7 +1037,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ #ifdef USE_METALINK int mlmaj, mlmin, mlpatch; metalink_get_version(&mlmaj, &mlmin, &mlpatch); - if((mlmaj*10000)+(mlmin*100)+mlpatch < CURL_REQ_LIBMETALINK_VERS) { + if((mlmaj*10000)+(mlmin*100) + mlpatch < CURL_REQ_LIBMETALINK_VERS) { warnf(global, "--metalink option cannot be used because the version of " "the linked libmetalink library is too old. " @@ -1044,7 +1086,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ return err; break; case 'R': /* --expect100-timeout */ - err = str2udouble(&config->expect100timeout, nextarg); + err = str2udouble(&config->expect100timeout, nextarg, LONG_MAX/1000); if(err) return err; break; @@ -1060,6 +1102,23 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ config->abstract_unix_socket = TRUE; GetStr(&config->unix_socket_path, nextarg); break; + case 'X': /* --tls-max */ + err = str2tls_max(&config->ssl_version_max, nextarg); + if(err) + return err; + break; + case 'Y': /* --suppress-connect-headers */ + config->suppress_connect_headers = toggle; + break; + case 'Z': /* --compressed-ssh */ + config->ssh_compression = toggle; + break; + case '~': /* --happy-eyeballs-timeout-ms */ + err = str2unum(&config->happy_eyeballs_timeout_ms, nextarg); + if(err) + return err; + /* 0 is a valid value for this timeout */ + break; } break; case '#': /* --progress-bar */ @@ -1170,7 +1229,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ config->resume_from_current = TRUE; config->resume_from = 0; } - config->use_resume=TRUE; + config->use_resume = TRUE; break; case 'd': /* postfield data */ @@ -1334,11 +1393,11 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ memcpy(config->postfields, oldpost, (size_t)oldlen); /* use byte value 0x26 for '&' to accommodate non-ASCII platforms */ config->postfields[oldlen] = '\x26'; - memcpy(&config->postfields[oldlen+1], postdata, size); - config->postfields[oldlen+1+size] = '\0'; + memcpy(&config->postfields[oldlen + 1], postdata, size); + config->postfields[oldlen + 1 + size] = '\0'; Curl_safefree(oldpost); Curl_safefree(postdata); - config->postfieldsize += size+1; + config->postfieldsize += size + 1; } else { config->postfields = postdata; @@ -1451,6 +1510,10 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ GetStr(&config->pinnedpubkey, nextarg); break; + case 'P': /* proxy pinned public key */ + GetStr(&config->proxy_pinnedpubkey, nextarg); + break; + case 'q': /* --cert-status */ config->verifystatus = TRUE; break; @@ -1546,11 +1609,27 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ config->proxy_insecure_ok = toggle; break; - case '9': + case '9': /* --proxy-tlsv1 */ /* TLS version 1 for proxy */ config->proxy_ssl_version = CURL_SSLVERSION_TLSv1; break; + case 'A': + /* --socks5-basic */ + if(toggle) + config->socks5_auth |= CURLAUTH_BASIC; + else + config->socks5_auth &= ~CURLAUTH_BASIC; + break; + + case 'B': + /* --socks5-gssapi */ + if(toggle) + config->socks5_auth |= CURLAUTH_GSSAPI; + else + config->socks5_auth &= ~CURLAUTH_GSSAPI; + break; + default: /* unknown flag */ return PARAM_OPTION_UNKNOWN; } @@ -1570,11 +1649,11 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ to sort this out slowly and carefully */ if(formparse(config, nextarg, - &config->httppost, - &config->last_post, - (subletter=='s')?TRUE:FALSE)) /* 's' means literal string */ + &config->mimepost, + &config->mimecurrent, + (subletter == 's')?TRUE:FALSE)) /* 's' is literal string */ return PARAM_BAD_USE; - if(SetHTTPrequest(config, HTTPREQ_FORMPOST, &config->httpreq)) + if(SetHTTPrequest(config, HTTPREQ_MIMEPOST, &config->httpreq)) return PARAM_BAD_USE; break; @@ -1583,7 +1662,11 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'G': /* HTTP GET */ - config->use_httpget = TRUE; + if(subletter == 'a') { /* --request-target */ + GetStr(&config->request_target, nextarg); + } + else + config->use_httpget = TRUE; break; case 'h': /* h for help */ @@ -1594,12 +1677,45 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'H': /* A custom header to append to a list */ - if(subletter == 'p') /* --proxy-header */ - err = add2list(&config->proxyheaders, nextarg); - else - err = add2list(&config->headers, nextarg); - if(err) - return err; + if(nextarg[0] == '@') { + /* read many headers from a file or stdin */ + char *string; + size_t len; + bool use_stdin = !strcmp(&nextarg[1], "-"); + FILE *file = use_stdin?stdin:fopen(&nextarg[1], FOPEN_READTEXT); + if(!file) + warnf(global, "Failed to open %s!\n", &nextarg[1]); + else { + err = file2memory(&string, &len, file); + if(!err) { + /* Allow strtok() here since this isn't used threaded */ + /* !checksrc! disable BANNEDFUNC 2 */ + char *h = strtok(string, "\r\n"); + while(h) { + if(subletter == 'p') /* --proxy-header */ + err = add2list(&config->proxyheaders, h); + else + err = add2list(&config->headers, h); + if(err) + break; + h = strtok(NULL, "\r\n"); + } + free(string); + } + if(!use_stdin) + fclose(file); + if(err) + return err; + } + } + else { + if(subletter == 'p') /* --proxy-header */ + err = add2list(&config->proxyheaders, nextarg); + else + err = add2list(&config->headers, nextarg); + if(err) + return err; + } break; case 'i': config->include_headers = toggle; /* include the headers as well in the @@ -1649,7 +1765,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'm': /* specified max time */ - err = str2udouble(&config->timeout, nextarg); + err = str2udouble(&config->timeout, nextarg, LONG_MAX/1000); if(err) return err; break; @@ -1714,25 +1830,24 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ url = config->url_out; else /* there was no free node, create one! */ - url = new_getout(config); + config->url_out = url = new_getout(config); if(!url) return PARAM_NO_MEM; + + /* fill in the outfile */ + if('o' == letter) { + GetStr(&url->outfile, nextarg); + url->flags &= ~GETOUT_USEREMOTE; /* switch off */ + } else { - /* fill in the outfile */ - if('o' == letter) { - GetStr(&url->outfile, nextarg); + url->outfile = NULL; /* leave it */ + if(toggle) + url->flags |= GETOUT_USEREMOTE; /* switch on */ + else url->flags &= ~GETOUT_USEREMOTE; /* switch off */ - } - else { - url->outfile = NULL; /* leave it */ - if(toggle) - url->flags |= GETOUT_USEREMOTE; /* switch on */ - else - url->flags &= ~GETOUT_USEREMOTE; /* switch off */ - } - url->flags |= GETOUT_OUTFILE; } + url->flags |= GETOUT_OUTFILE; } break; case 'P': @@ -1779,10 +1894,13 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ if(ISDIGIT(*nextarg) && !strchr(nextarg, '-')) { char buffer[32]; curl_off_t off; + if(curlx_strtoofft(nextarg, NULL, 10, &off)) { + warnf(global, "unsupported range point\n"); + return PARAM_BAD_USE; + } warnf(global, "A specified range MUST include at least one dash (-). " "Appending one for you!\n"); - off = curlx_strtoofft(nextarg, NULL, 10); snprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", off); Curl_safefree(config->range); config->range = strdup(buffer); @@ -1837,34 +1955,33 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ /* we are uploading */ { struct getout *url; - if(!config->url_out) - config->url_out = config->url_list; - if(config->url_out) { + if(!config->url_ul) + config->url_ul = config->url_list; + if(config->url_ul) { /* there's a node here, if it already is filled-in continue to find an "empty" node */ - while(config->url_out && (config->url_out->flags & GETOUT_UPLOAD)) - config->url_out = config->url_out->next; + while(config->url_ul && (config->url_ul->flags & GETOUT_UPLOAD)) + config->url_ul = config->url_ul->next; } /* now there might or might not be an available node to fill in! */ - if(config->url_out) + if(config->url_ul) /* existing node */ - url = config->url_out; + url = config->url_ul; else /* there was no free node, create one! */ - url = new_getout(config); + config->url_ul = url = new_getout(config); if(!url) return PARAM_NO_MEM; + + url->flags |= GETOUT_UPLOAD; /* mark -T used */ + if(!*nextarg) + url->flags |= GETOUT_NOUPLOAD; else { - url->flags |= GETOUT_UPLOAD; /* mark -T used */ - if(!*nextarg) - url->flags |= GETOUT_NOUPLOAD; - else { - /* "-" equals stdin, but keep the string around for now */ - GetStr(&url->infile, nextarg); - } + /* "-" equals stdin, but keep the string around for now */ + GetStr(&url->infile, nextarg); } } break; @@ -1979,11 +2096,15 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; } now = time(NULL); - config->condtime=curl_getdate(nextarg, &now); - if(-1 == (int)config->condtime) { + config->condtime = (curl_off_t)curl_getdate(nextarg, &now); + if(-1 == config->condtime) { /* now let's see if it is a file name to get the time from instead! */ - struct_stat statbuf; - if(-1 == stat(nextarg, &statbuf)) { + curl_off_t filetime = getfiletime(nextarg, config->global->errors); + if(filetime >= 0) { + /* pull the time out from the file */ + config->condtime = filetime; + } + else { /* failed, remove time condition */ config->timecond = CURL_TIMECOND_NONE; warnf(global, @@ -1991,10 +2112,6 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ "a file name). Disabling time condition. " "See curl_getdate(3) for valid date syntax.\n"); } - else { - /* pull the time out from the file */ - config->condtime = statbuf.st_mtime; - } } break; default: /* unknown flag */ diff --git a/src/tool_getparam.h b/src/tool_getparam.h index 0c85c69..2148e40 100644 --- a/src/tool_getparam.h +++ b/src/tool_getparam.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -40,13 +40,15 @@ typedef enum { PARAM_LIBCURL_UNSUPPORTED_PROTOCOL, PARAM_NO_MEM, PARAM_NEXT_OPERATION, + PARAM_NO_PREFIX, + PARAM_NUMBER_TOO_LARGE, PARAM_LAST } ParameterError; struct GlobalConfig; struct OperationConfig; -ParameterError getparameter(char *flag, char *nextarg, bool *usedarg, +ParameterError getparameter(const char *flag, char *nextarg, bool *usedarg, struct GlobalConfig *global, struct OperationConfig *operation); diff --git a/src/tool_getpass.c b/src/tool_getpass.c index 8e3e5fa..e5e2d6d 100644 --- a/src/tool_getpass.c +++ b/src/tool_getpass.c @@ -207,18 +207,16 @@ static bool ttyecho(bool enable, int fd) #endif return TRUE; /* disabled */ } - else { - /* re-enable echo, assumes we disabled it before (and set the structs we - now use to reset the terminal status) */ + /* re-enable echo, assumes we disabled it before (and set the structs we + now use to reset the terminal status) */ #ifdef HAVE_TERMIOS_H - tcsetattr(fd, TCSAFLUSH, &withecho); + tcsetattr(fd, TCSAFLUSH, &withecho); #elif defined(HAVE_TERMIO_H) - ioctl(fd, TCSETA, &withecho); + ioctl(fd, TCSETA, &withecho); #else - return FALSE; /* not enabled */ + return FALSE; /* not enabled */ #endif - return TRUE; /* enabled */ - } + return TRUE; /* enabled */ } char *getpass_r(const char *prompt, /* prompt to display */ diff --git a/src/tool_help.c b/src/tool_help.c index 5085e54..9796b7e 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -33,256 +33,446 @@ #endif /* - * A few of these source lines are >80 columns wide, but that's only because - * breaking the strings narrower makes this chunk look even worse! - * - * Starting with 7.18.0, this list of command line options is sorted based - * on the long option name. It is not done automatically, although a command - * line like the following can help out: - * - * curl --help | cut -c5- | grep "^-" | sort + * The help output is generated with the following command + --------------------------------------------------------- + + cd $srcroot/docs/cmdline-opts + ./gen.pl listhelp */ -static const char *const helptext[] = { - "Usage: curl [options...] ", - "Options: (H) means HTTP/HTTPS only, (F) means FTP only", - " --anyauth Pick \"any\" authentication method (H)", - " -a, --append Append to target file when uploading (F/SFTP)", - " --basic Use HTTP Basic Authentication (H)", - " --cacert FILE CA certificate to verify peer against (SSL)", - " --capath DIR CA directory to verify peer against (SSL)", - " -E, --cert CERT[:PASSWD] Client certificate file and password (SSL)", - " --cert-status Verify the status of the server certificate (SSL)", - " --cert-type TYPE Certificate file type (DER/PEM/ENG) (SSL)", - " --ciphers LIST SSL ciphers to use (SSL)", - " --compressed Request compressed response (using deflate or gzip)", - " -K, --config FILE Read config from FILE", - " --connect-timeout SECONDS Maximum time allowed for connection", - " --connect-to HOST1:PORT1:HOST2:PORT2 Connect to host (network level)", - " -C, --continue-at OFFSET Resumed transfer OFFSET", - " -b, --cookie STRING/FILE Read cookies from STRING/FILE (H)", - " -c, --cookie-jar FILE Write cookies to FILE after operation (H)", - " --create-dirs Create necessary local directory hierarchy", - " --crlf Convert LF to CRLF in upload", - " --crlfile FILE Get a CRL list in PEM format from the given file", - " -d, --data DATA HTTP POST data (H)", - " --data-raw DATA HTTP POST data, '@' allowed (H)", - " --data-ascii DATA HTTP POST ASCII data (H)", - " --data-binary DATA HTTP POST binary data (H)", - " --data-urlencode DATA HTTP POST data url encoded (H)", - " --delegation STRING GSS-API delegation permission", - " --digest Use HTTP Digest Authentication (H)", - " --disable-eprt Inhibit using EPRT or LPRT (F)", - " --disable-epsv Inhibit using EPSV (F)", - " --dns-servers DNS server addrs to use: 1.1.1.1;2.2.2.2", - " --dns-interface Interface to use for DNS requests", - " --dns-ipv4-addr IPv4 address to use for DNS requests, dot notation", - " --dns-ipv6-addr IPv6 address to use for DNS requests, dot notation", - " -D, --dump-header FILE Write the received headers to FILE", - " --egd-file FILE EGD socket path for random data (SSL)", - " --engine ENGINE Crypto engine (use \"--engine list\" for list) (SSL)", -#ifdef USE_ENVIRONMENT - " --environment Write results to environment variables (RISC OS)", -#endif - " --expect100-timeout SECONDS How long to wait for 100-continue (H)", - " -f, --fail Fail silently (no output at all) on HTTP errors (H)", - " --fail-early Fail on first transfer error, do not continue", - " --false-start Enable TLS False Start.", - " -F, --form CONTENT Specify HTTP multipart POST data (H)", - " --form-string STRING Specify HTTP multipart POST data (H)", - " --ftp-account DATA Account data string (F)", - " --ftp-alternative-to-user COMMAND " - "String to replace \"USER [name]\" (F)", - " --ftp-create-dirs Create the remote dirs if not present (F)", - " --ftp-method [MULTICWD/NOCWD/SINGLECWD] Control CWD usage (F)", - " --ftp-pasv Use PASV/EPSV instead of PORT (F)", - " -P, --ftp-port ADR Use PORT with given address instead of PASV (F)", - " --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n" - " --ftp-pret Send PRET before PASV (for drftpd) (F)", - " --ftp-ssl-ccc Send CCC after authenticating (F)", - " --ftp-ssl-ccc-mode ACTIVE/PASSIVE Set CCC mode (F)", - " --ftp-ssl-control Require SSL/TLS for FTP login, " - "clear for transfer (F)", - " -G, --get Send the -d data with a HTTP GET (H)", - " -g, --globoff Disable URL sequences and ranges using {} and []", - " -H, --header LINE Pass custom header LINE to server (H)", - " -I, --head Show document info only", - " -h, --help This help text", - " --hostpubmd5 MD5 " - "Hex-encoded MD5 string of the host public key. (SSH)", - " -0, --http1.0 Use HTTP 1.0 (H)", - " --http1.1 Use HTTP 1.1 (H)", - " --http2 Use HTTP 2 (H)", - " --http2-prior-knowledge Use HTTP 2 without HTTP/1.1 Upgrade (H)", - " --ignore-content-length Ignore the HTTP Content-Length header", - " -i, --include Include protocol headers in the output (H/F)", - " -k, --insecure Allow connections to SSL sites without certs (H)", - " --interface INTERFACE Use network INTERFACE (or address)", - " -4, --ipv4 Resolve name to IPv4 address", - " -6, --ipv6 Resolve name to IPv6 address", - " -j, --junk-session-cookies Ignore session cookies read from file (H)", - " --keepalive-time SECONDS Wait SECONDS between keepalive probes", - " --key KEY Private key file name (SSL/SSH)", - " --key-type TYPE Private key file type (DER/PEM/ENG) (SSL)", - " --krb LEVEL Enable Kerberos with security LEVEL (F)", -#ifndef CURL_DISABLE_LIBCURL_OPTION - " --libcurl FILE Dump libcurl equivalent code of this command line", -#endif - " --limit-rate RATE Limit transfer speed to RATE", - " -l, --list-only List only mode (F/POP3)", - " --local-port RANGE Force use of RANGE for local port numbers", - " -L, --location Follow redirects (H)", - " --location-trusted " - "Like '--location', and send auth to other hosts (H)", - " --login-options OPTIONS Server login options (IMAP, POP3, SMTP)", - " -M, --manual Display the full manual", - " --mail-from FROM Mail from this address (SMTP)", - " --mail-rcpt TO Mail to this/these addresses (SMTP)", - " --mail-auth AUTH Originator address of the original email (SMTP)", - " --max-filesize BYTES Maximum file size to download (H/F)", - " --max-redirs NUM Maximum number of redirects allowed (H)", - " -m, --max-time SECONDS Maximum time allowed for the transfer", - " --metalink Process given URLs as metalink XML file", - " --negotiate Use HTTP Negotiate (SPNEGO) authentication (H)", - " -n, --netrc Must read .netrc for user name and password", - " --netrc-optional Use either .netrc or URL; overrides -n", - " --netrc-file FILE Specify FILE for netrc", - " -:, --next " - "Allows the following URL to use a separate set of options", - " --no-alpn Disable the ALPN TLS extension (H)", - " -N, --no-buffer Disable buffering of the output stream", - " --no-keepalive Disable keepalive use on the connection", - " --no-npn Disable the NPN TLS extension (H)", - " --no-sessionid Disable SSL session-ID reusing (SSL)", - " --noproxy List of hosts which do not use proxy", - " --ntlm Use HTTP NTLM authentication (H)", - " --ntlm-wb Use HTTP NTLM authentication with winbind (H)", - " --oauth2-bearer TOKEN OAuth 2 Bearer Token (IMAP, POP3, SMTP)", - " -o, --output FILE Write to FILE instead of stdout", - " --pass PASS Pass phrase for the private key (SSL/SSH)", - " --path-as-is Do not squash .. sequences in URL path", - " --pinnedpubkey FILE/HASHES Public key to verify peer against (SSL)", - " --post301 " - "Do not switch to GET after following a 301 redirect (H)", - " --post302 " - "Do not switch to GET after following a 302 redirect (H)", - " --post303 " - "Do not switch to GET after following a 303 redirect (H)", - " --preproxy [PROTOCOL://]HOST[:PORT] Proxy before HTTP(S) proxy", - " -#, --progress-bar Display transfer progress as a progress bar", - " --proto PROTOCOLS Enable/disable PROTOCOLS", - " --proto-default PROTOCOL Use PROTOCOL for any URL missing a scheme", - " --proto-redir PROTOCOLS Enable/disable PROTOCOLS on redirect", - " -x, --proxy [PROTOCOL://]HOST[:PORT] Use proxy on given port", - " --proxy-anyauth Pick \"any\" proxy authentication method (H)", - " --proxy-basic Use Basic authentication on the proxy (H)", - " --proxy-digest Use Digest authentication on the proxy (H)", - " --proxy-cacert FILE " - "CA certificate to verify peer against for proxy (SSL)", - " --proxy-capath DIR " - "CA directory to verify peer against for proxy (SSL)", - " --proxy-cert CERT[:PASSWD] " - "Client certificate file and password for proxy (SSL)", - " --proxy-cert-type TYPE " - "Certificate file type (DER/PEM/ENG) for proxy (SSL)", - " --proxy-ciphers LIST SSL ciphers to use for proxy (SSL)", - " --proxy-crlfile FILE " - "Get a CRL list in PEM format from the given file for proxy", - " --proxy-insecure " - "Allow connections to SSL sites without certs for proxy (H)", - " --proxy-key KEY Private key file name for proxy (SSL)", - " --proxy-key-type TYPE " - "Private key file type for proxy (DER/PEM/ENG) (SSL)", - " --proxy-negotiate " - "Use HTTP Negotiate (SPNEGO) authentication on the proxy (H)", - " --proxy-ntlm Use NTLM authentication on the proxy (H)", - " --proxy-header LINE Pass custom header LINE to proxy (H)", - " --proxy-pass PASS Pass phrase for the private key for proxy (SSL)", - " --proxy-ssl-allow-beast " - "Allow security flaw to improve interop for proxy (SSL)", - " --proxy-tlsv1 Use TLSv1 for proxy (SSL)", - " --proxy-tlsuser USER TLS username for proxy", - " --proxy-tlspassword STRING TLS password for proxy", - " --proxy-tlsauthtype STRING " - "TLS authentication type for proxy (default SRP)", - " --proxy-service-name NAME SPNEGO proxy service name", - " --service-name NAME SPNEGO service name", - " -U, --proxy-user USER[:PASSWORD] Proxy user and password", - " --proxy1.0 HOST[:PORT] Use HTTP/1.0 proxy on given port", - " -p, --proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)", - " --pubkey KEY Public key file name (SSH)", - " -Q, --quote CMD Send command(s) to server before transfer (F/SFTP)", - " --random-file FILE File for reading random data from (SSL)", - " -r, --range RANGE Retrieve only the bytes within RANGE", - " --raw Do HTTP \"raw\"; no transfer decoding (H)", - " -e, --referer Referer URL (H)", - " -J, --remote-header-name Use the header-provided filename (H)", - " -O, --remote-name Write output to a file named as the remote file", - " --remote-name-all Use the remote file name for all URLs", - " -R, --remote-time Set the remote file's time on the local output", - " -X, --request COMMAND Specify request command to use", - " --resolve HOST:PORT:ADDRESS Force resolve of HOST:PORT to ADDRESS", - " --retry NUM " - "Retry request NUM times if transient problems occur", - " --retry-connrefused Retry on connection refused (use with --retry)", - " --retry-delay SECONDS Wait SECONDS between retries", - " --retry-max-time SECONDS Retry only within this period", - " --sasl-ir Enable initial response in SASL authentication", - " -S, --show-error " - "Show error. With -s, make curl show errors when they occur", - " -s, --silent Silent mode (don't output anything)", - " --socks4 HOST[:PORT] SOCKS4 proxy on given host + port", - " --socks4a HOST[:PORT] SOCKS4a proxy on given host + port", - " --socks5 HOST[:PORT] SOCKS5 proxy on given host + port", - " --socks5-hostname HOST[:PORT] " - "SOCKS5 proxy, pass host name to proxy", - " --socks5-gssapi-service NAME SOCKS5 proxy service name for GSS-API", - " --socks5-gssapi-nec Compatibility with NEC SOCKS5 server", - " -Y, --speed-limit RATE " - "Stop transfers below RATE for 'speed-time' secs", - " -y, --speed-time SECONDS " - "Trigger 'speed-limit' abort after SECONDS (default: 30)", - " --ssl Try SSL/TLS (FTP, IMAP, POP3, SMTP)", - " --ssl-reqd Require SSL/TLS (FTP, IMAP, POP3, SMTP)", - " -2, --sslv2 Use SSLv2 (SSL)", - " -3, --sslv3 Use SSLv3 (SSL)", - " --ssl-allow-beast Allow security flaw to improve interop (SSL)", - " --ssl-no-revoke Disable cert revocation checks (WinSSL)", - " --stderr FILE Where to redirect stderr (use \"-\" for stdout)", - " --tcp-nodelay Use the TCP_NODELAY option", - " --tcp-fastopen Use TCP Fast Open", - " -t, --telnet-option OPT=VAL Set telnet option", - " --tftp-blksize VALUE Set TFTP BLKSIZE option (must be >512)", - " --tftp-no-options Do not send TFTP options requests", - " -z, --time-cond TIME Transfer based on a time condition", - " -1, --tlsv1 Use >= TLSv1 (SSL)", - " --tlsv1.0 Use TLSv1.0 (SSL)", - " --tlsv1.1 Use TLSv1.1 (SSL)", - " --tlsv1.2 Use TLSv1.2 (SSL)", - " --tlsv1.3 Use TLSv1.3 (SSL)", - " --trace FILE Write a debug trace to FILE", - " --trace-ascii FILE Like --trace, but without hex output", - " --trace-time Add time stamps to trace/verbose output", - " --tr-encoding Request compressed transfer encoding (H)", - " -T, --upload-file FILE Transfer FILE to destination", - " --url URL URL to work with", - " -B, --use-ascii Use ASCII/text transfer", - " -u, --user USER[:PASSWORD] Server user and password", - " --tlsuser USER TLS username", - " --tlspassword STRING TLS password", - " --tlsauthtype STRING TLS authentication type (default: SRP)", - " --unix-socket PATH Connect through this Unix domain socket", - " --abstract-unix-socket PATH Connect to an abstract Unix domain socket", - " -A, --user-agent STRING Send User-Agent STRING to server (H)", - " -v, --verbose Make the operation more talkative", - " -V, --version Show version number and quit", -#ifdef USE_WATT32 - " --wdebug Turn on Watt-32 debugging", -#endif - " -w, --write-out FORMAT Use output FORMAT after completion", - " --xattr Store metadata in extended file attributes", - " -q, --disable Disable .curlrc (must be first parameter)", - NULL +struct helptxt { + const char *opt; + const char *desc; +}; + +static const struct helptxt helptext[] = { + {" --abstract-unix-socket ", + "Connect via abstract Unix domain socket"}, + {" --anyauth", + "Pick any authentication method"}, + {"-a, --append", + "Append to target file when uploading"}, + {" --basic", + "Use HTTP Basic Authentication"}, + {" --cacert ", + "CA certificate to verify peer against"}, + {" --capath ", + "CA directory to verify peer against"}, + {"-E, --cert ", + "Client certificate file and password"}, + {" --cert-status", + "Verify the status of the server certificate"}, + {" --cert-type ", + "Certificate file type (DER/PEM/ENG)"}, + {" --ciphers ", + "SSL ciphers to use"}, + {" --compressed", + "Request compressed response"}, + {" --compressed-ssh", + "Enable SSH compression"}, + {"-K, --config ", + "Read config from a file"}, + {" --connect-timeout ", + "Maximum time allowed for connection"}, + {" --connect-to ", + "Connect to host"}, + {"-C, --continue-at ", + "Resumed transfer offset"}, + {"-b, --cookie ", + "Send cookies from string/file"}, + {"-c, --cookie-jar ", + "Write cookies to after operation"}, + {" --create-dirs", + "Create necessary local directory hierarchy"}, + {" --crlf", + "Convert LF to CRLF in upload"}, + {" --crlfile ", + "Get a CRL list in PEM format from the given file"}, + {"-d, --data ", + "HTTP POST data"}, + {" --data-ascii ", + "HTTP POST ASCII data"}, + {" --data-binary ", + "HTTP POST binary data"}, + {" --data-raw ", + "HTTP POST data, '@' allowed"}, + {" --data-urlencode ", + "HTTP POST data url encoded"}, + {" --delegation ", + "GSS-API delegation permission"}, + {" --digest", + "Use HTTP Digest Authentication"}, + {"-q, --disable", + "Disable .curlrc"}, + {" --disable-eprt", + "Inhibit using EPRT or LPRT"}, + {" --disable-epsv", + "Inhibit using EPSV"}, + {" --dns-interface ", + "Interface to use for DNS requests"}, + {" --dns-ipv4-addr
", + "IPv4 address to use for DNS requests"}, + {" --dns-ipv6-addr
", + "IPv6 address to use for DNS requests"}, + {" --dns-servers ", + "DNS server addrs to use"}, + {"-D, --dump-header ", + "Write the received headers to "}, + {" --egd-file ", + "EGD socket path for random data"}, + {" --engine ", + "Crypto engine to use"}, + {" --expect100-timeout ", + "How long to wait for 100-continue"}, + {"-f, --fail", + "Fail silently (no output at all) on HTTP errors"}, + {" --fail-early", + "Fail on first transfer error, do not continue"}, + {" --false-start", + "Enable TLS False Start"}, + {"-F, --form ", + "Specify multipart MIME data"}, + {" --form-string ", + "Specify multipart MIME data"}, + {" --ftp-account ", + "Account data string"}, + {" --ftp-alternative-to-user ", + "String to replace USER [name]"}, + {" --ftp-create-dirs", + "Create the remote dirs if not present"}, + {" --ftp-method ", + "Control CWD usage"}, + {" --ftp-pasv", + "Use PASV/EPSV instead of PORT"}, + {"-P, --ftp-port
", + "Use PORT instead of PASV"}, + {" --ftp-pret", + "Send PRET before PASV"}, + {" --ftp-skip-pasv-ip", + "Skip the IP address for PASV"}, + {" --ftp-ssl-ccc", + "Send CCC after authenticating"}, + {" --ftp-ssl-ccc-mode ", + "Set CCC mode"}, + {" --ftp-ssl-control", + "Require SSL/TLS for FTP login, clear for transfer"}, + {"-G, --get", + "Put the post data in the URL and use GET"}, + {"-g, --globoff", + "Disable URL sequences and ranges using {} and []"}, + {" --happy-eyeballs-timeout-ms", + "How long to wait in milliseconds for IPv6 before trying IPv4"}, + {"-I, --head", + "Show document info only"}, + {"-H, --header
", + "Pass custom header(s) to server"}, + {"-h, --help", + "This help text"}, + {" --hostpubmd5 ", + "Acceptable MD5 hash of the host public key"}, + {"-0, --http1.0", + "Use HTTP 1.0"}, + {" --http1.1", + "Use HTTP 1.1"}, + {" --http2", + "Use HTTP 2"}, + {" --http2-prior-knowledge", + "Use HTTP 2 without HTTP/1.1 Upgrade"}, + {" --ignore-content-length", + "Ignore the size of the remote resource"}, + {"-i, --include", + "Include protocol response headers in the output"}, + {"-k, --insecure", + "Allow insecure server connections when using SSL"}, + {" --interface ", + "Use network INTERFACE (or address)"}, + {"-4, --ipv4", + "Resolve names to IPv4 addresses"}, + {"-6, --ipv6", + "Resolve names to IPv6 addresses"}, + {"-j, --junk-session-cookies", + "Ignore session cookies read from file"}, + {" --keepalive-time ", + "Interval time for keepalive probes"}, + {" --key ", + "Private key file name"}, + {" --key-type ", + "Private key file type (DER/PEM/ENG)"}, + {" --krb ", + "Enable Kerberos with security "}, + {" --libcurl ", + "Dump libcurl equivalent code of this command line"}, + {" --limit-rate ", + "Limit transfer speed to RATE"}, + {"-l, --list-only", + "List only mode"}, + {" --local-port ", + "Force use of RANGE for local port numbers"}, + {"-L, --location", + "Follow redirects"}, + {" --location-trusted", + "Like --location, and send auth to other hosts"}, + {" --login-options ", + "Server login options"}, + {" --mail-auth
", + "Originator address of the original email"}, + {" --mail-from
", + "Mail from this address"}, + {" --mail-rcpt
", + "Mail to this address"}, + {"-M, --manual", + "Display the full manual"}, + {" --max-filesize ", + "Maximum file size to download"}, + {" --max-redirs ", + "Maximum number of redirects allowed"}, + {"-m, --max-time